192 points · by wslh · 9y ago · 76 comments
I don't think the two can be separated. Being stuck and being moving are dependent on each other.
A lot of the time I'm frustrated because I haven't quite figured out how the code should look. It takes a long time, a lot of chopping and changing, before you come upon a structure that you feel comfortable building on.
When you do get to that point though, it feels easy. Everything you write makes sense in terms of your new structure, and there aren't so many awkward kludges. The only thing is this period can be brief, because when you're fast, you get to the next problem sooner. You'll find higher and higher levels at which to view your code, and at each level you'll need to do some organising.
Thing is, the more experienced I become at programming, the less of that I end up doing. I more and more tend to break everything down into tiny parts that can all work independently and be composed into bigger bits. Most of my career I've used OO languages, especially C#, but nowadays I usually avoid using a lot of the features of OO, like inheritance, and just try and make everything from tiny little methods (functions) big things are just made from several of those methods in sequence and really big things are just made from several of the big ones.
From a development perspective it means I can just go ahead and start writing useful little snippets of code and start composing them together into bigger and bigger features as I go. So, I'm switching from a top-down style to more of a bottom-up one.
There's also eg the copy-on-write filesystems, and git---whose main on-disk data-structures are conceptually immutable despite being implemented in C.
You might enjoy reading "Out of the tarpit" (https://github.com/papers-we-love/papers-we-love/blob/master...), a paper that deals with approaches to master software complexity.
A lot of textbook management techniques seem hellbent on trying to force steady productivity instead of punctuated equilibrium. Not the recipe for a satisfying environment.
Sounds like something straight of office space, but that was my life for a while. Least productive job I've ever had because of that (well, and the myriad other little toxic/passive aggressive behaviors he had).
He had a Stanford MBA too, which convinced me of how useless MBAs must be. Because if you make it through one of the top programs in "business administration" in the world and still manage like that, you might as well have an MD from Harvard and still believe bloodletting is a viable treatment for illnesses.
This seems to have become very nearly normalised in the guise of daily stand ups. Some would argue it's less intrusive if it's for "the team" rather than for an individual manager, but I'm not convinced myself.
and every hour or two, he'd make a point of interrupting me to ask me "so how's <current_task> going?"
Similarly, in environments where tasks are getting broken down into tickets that are only expected to take a few hours, there's a similar level of oversight (although hopefully a bit less disruptive than hourly shoulder-taps, I agree).
And what you have to do in order to look good to your manager or manager's manager's manager is different than what you have to do to be productive. Your boss was perhaps just doing the former?
Can you unpack this? Would like to hear more.
Very little of a management course is about how you treat people. If anything, you are left with Taylorism and the lingering question of how it relates to knowledge workers. Because Taylor was basically measuring factory workers' performance, whose contribution is to do some repeated action over and over. If that sounds like treating someone like a robot, it's because it is.
This is not to say nobody has thought about this. HBR will run an article now and again about HR issues. But there's nothing especially compelling where you'd be able to find a root cause, find a specific solution, and implement it. If it was, management wouldn't be magic, it would be engineering. And the practitioners would not be paid enormous sums for doing the impossible, they'd be paid moderately well for being ordinarily competent.
Most of the things on the course are really not that different from reading the FT regularly. So-and-so company found their product wasn't appealing to young people, so they tried X and it was a massive success. Doesn't tell you what to do if you were to run this firm, but after you've read a few you'll think you know. Case studies are a case study in post-hoc fallacy.
Then there's a bunch of supposedly advanced financial stuff, which if you're an engineer you'll laugh at. Ratios, really? Interest rates? If you do a proper finance course there will be real things to learn (stoch calc doesn't show up much in engineering), but not in the business school.
And there's a few useful things, too, like the history of capitalism, but nothing that develops a proper intuition or method for a field of problems like engineering does.
However, whenever I see generalist managers at work, there always seems to be massive emphasis on schedule risk and at least in organisation I've been in, the proposed mitigation is always regular status meetings (and perhaps other forms of check-in as well).
This seems to have been almost entirely normalised in the software world, particularly anywhere that's gone down the agile pathway: fine-grained tickets in an issue tracker (or possibly cards on the wall -- but haven't ever seen that one in action) and a daily standup with an explicit goal of making sure nobody is "spinning their wheels".
Yeah, but in times of being stuck, it's much easier to get distracted and procrastinate.
A bit, but I tend to do directed procrastination. Go the gym, do some research on a different problem, write some emails, etc... As soon as I stop actively thinking about the problem a solution will come.
Another solution (and this works well with coding and writing) is just to start coding/writing. I'm writing an article now for a newsletter, and the top of my document is a bunch of stand alone sentences that eventually lead to a full article.
In programming, I'll often do the same thing and just start solving the problem even if I know it's not the right solution yet. Usually this leads me to a better understanding, and eventually the solution.
But when I hit the inertia part of the productivity cycle, this saves me. It's always better to do something than just being stuck. And while I mechanically do those tasks, my head also gets in order, I start dreaming and slowly, I'm on the roll again.
When the right time comes, I slide back into the 'real' work. I can't quite regret for 'wasting' that time, because usually the reward is a new perspective, and the ideas that come with it.
Shrugs, we're not machines.
The book 'Hare Brain, Tortoise Mind' has a good explanation of how that works, what it's good at and what it's not.
I get a lot of side chores done with directed procrastination. But, what works for me to get the main task done is to just open the IDE even without a goal. Instead of "Ugg... I need to make X work today...". Just open the editor and do anything. Refactor a function. Comment something. Whatever. Once you get started, it much easier to continue.
Once you have concrete working code, it's much easier to organize it in ways that make sense than trying to visualize everything beforehand.
As a young programmer I was taught to carefully design code before starting to write it. It kinda blows my mind that now I design it after writing!
I read somewhere that Neil Gaiman considers himself only a decent writer who is an extremely good editor. Which is to say, he starts writing a simple draft, and then changes what's wrong with it, over and over.
i start on the up-stroke myself, always worked for me
* For programming, this can be knowing a language very well, having smart coworkers who can help with issues, and a plan of how your software will look in the end.
* For getting in shape it can be living near your gym and going to bed at 10:30 instead of 11.
* For writing it can be about turning off message notifications and keeping an outline to prevent writer's block (honestly I'm still working on this one).
I can go on, but this realization has been tremendously useful to me, and lets me exist in "10x productivity mode" many times longer than in the past. While I don't agree with his politics, I strongly believe Scott Adams' ideas around systems vs goals is the right way of thinking of life. You shouldn't expend energy achieving specific goals, you should set your life up so it takes minimal effort to be productive and live a good life. http://blog.dilbert.com/post/102964992706/goals-vs-systems
Currently I'm working on a new startup which tries to tackle a rather hard problem (a generic document parser for invoices). Sometimes I'm stuck for days on a particular problem, and I feel like I'm not productive at all, I just stare at a blinking cursor all day. However, in my head I'm constantly working on the problem, and one could say that the moments where I don't write code are actually the most productive, even though it does not feel that way. It's rather counter intuitive.
So I don't think there really isn't a pattern in actual productivity (at least not in my case), although there might be a pattern in how productive you feel.
That stressful period, full of uncertainty and half-articulated thoughts, as you figure out the basic concepts, how they inter-relate, form goals, make things fall into place conceptually.
Personally, I don't find staring at a blinking cursor helps. During this phase, long walks work the best for me.
Also great of you to mention walking, I walk a lot during 'work hours'. To outsiders it's so hard to explain that yes, walking is actually part of my process, and yes, walking around in the nearby forest is in some sense my job.
This would save from having to parse anything.
To create a bill-of-materials you simply would attach a bunch of invoices from a bunch of vendors. There are jobs out there of people who fetch invoices and then transform them into in-house systems all manually.
Since digital bookkeeping is ubiquitous nowadays, one could argue that invoicing is simply about sharing digital transactions between systems, and should not need to be 'pretty' or human readable at all.
I'm trying to bridge this gap, and I know that given enough time, my service will become obsolete.
But I'm goign higly off-topic now ;-)
I don't think you need to worry for a long time.
There is often excitement at the beginning "I have this new skill!" However, the new skill or knowledge hasn't really integrated with the existing body of knowledge yet. Then often it seems that there needs to be a gestation period. You have the sense that connections are forming and something new is forming that is the combination of the new and the old.
And, then it feels like I am ready to pour it out. Whether it is writing an article, preparing a speech or coding up that feature or application. When that happens it feels like the "Flow." But I understand that the gestation period was just as important if much less visible and seemingly unproductive.
You can feel like you're producing great code but the proof is in the pudding. It might all need to be thrown away and rewritten.
Value also depends on other factors. Maybe if you spent more time with the junior in the next cube to ensure his piece turns out good the product would actually be successful. You wrote all that good code and the project was cancelled, what was your real productivity?
I go through periods where I don't feel like doing anything and then I go through periods where I have a burning desire to build stuff. Different ideas are in different phases in my mind, some are in long term hibernation, some are ready to execute.
EDIT: I know people who create a lot of code. Even good code. The problem is sometimes we didn't actually need that code at all. Very smart people, wrote a ton of good code, with no leverage. So step #1 in being "productive" is knowing where to put your efforts. I say software engineering is all about leverage, when you have leverage a little bit of code will move the world. With no leverage you can write all the code you want.
DRIVE - electrons in, mechanical energy out
REGEN - mechanical energy in, electrons out
Except in your brain it's a little harder to label the i/o... it's something like
CONTROL - cortical activation in, perceptual changes in the world out
SUBMISSION - percepts from the world in, cortical activation out
Just like a vehicle, you stop functioning if you stay too much in one mode or the other. And ironically, I find I achieve maximum control when I cycle back and forth in even measure.
As for long term projects, I find I need to do this cycling at all time scales. Hour, day, week, month, year. It's the cycling back and forth that flushes out nonsense and keeps your finger on a degree of incontrovertible reality.
The trouble is, I often lose track of where I am supposed to be in all these cycles. I am working on software to try to help. Encourage some harmonics.
I do agree that productivity itself exhibits complex patterns, especially with relation to time. These patterns can vary significantly from person to person and over time, though.
I've had inklings of some of own trends for some time now, but it's still pretty fuzzy. I expect to slowly learn more through patient, dispassionate self-observation over the coming years and decades, to the best of my ability. It's tricky stuff, but very interesting.
There is some variance: Test code increases the ratio, UI code increases the ratio, and debugging lowers the ratio. But it's either wildly off being one of these, or 36-40 lines/hour.
Anyway, in that regard, LOC is probably a bad metric. Unless the 36 lines of Haskell actually do more, and thus the Haskell/FP language actually allows you to be more productive. That'd be interesting.
For me, Haskell is a little more verbose than Clojure (similarly-powerful expression language, but potentially skipping a bunch of type-related stuff). Maybe comparable to the likes of JavaScript.
APL and Forth-like languages seem to be the place to look for extreme tenseness.