Live data from Hacker News

You only get 1,000 lines of code a week

onebigfluke.com

1–10 of 86 posts

Re: You only get 1,000 lines of code a week

#2
This is really spot on. The only thing I could add, is that I've found the only way to continue to write code in the capacity he's talking about, is to dedicate a day or days of the week to programming. If you're going to make your 1,000 or so lines meaningful, then the context switch to that mental state is too high when your day is intermixed with distractions.

Sometimes I can put my headphones on at the end of the day and try to get 2 hours in; or work the graveyard shift at home but that's never as good (or healthy really).

I tip my hat to the pure engineering managers who don't code at all. They're more like social engineers than anything, but boy would that be challenging to do 100% of the time.

Re: You only get 1,000 lines of code a week

#4
post #3

Actually 1,000 lines of code a week is quite a lot. Of course it depends on language / technology stack, I'm speaking from Rails / JavaScript programmer point of view.

That was my reaction too. If you want to force thought and conciseness, make it 100 lines. :-)

Re: You only get 1,000 lines of code a week

#5
How do you know that you are going to write 1000 lines a week? Once you begin to write code you it can happen that the code is more easy to write than to explain and then you can code hundreds of lines in little time, but also it could happen that the code requires very special attention and sophistication, a tough problem, here you can only write a few lines but those are crucial or very important to write for efficiency or memory constraints. What I would suggest is to distribute your time according to the complexity of the modules or parts of the problem, but prior to that you need to have a good understanding of logic and internal structure of the code you are going to develop, and this is also another problem that you must address in your distribution of time.

Re: You only get 1,000 lines of code a week

#6
It depends on what career trajectory a senior developer is. If he is destined to become a specialist, then this article is spot on.

If instead he dreams of becomming a manager or architect, then he would actually not be coding the most complicated parts, and make sure to keep himself off the critical path of the project, so as to free up his time, so he can spend his time helping his colleagues and clearing the rocks in their path.

Also as a manager or architect, you better get used to constant interruptions, degrading the quality of code you can generate. So think hard before assigning that critical section to yourself.

Re: You only get 1,000 lines of code a week

#7
post #3

Actually 1,000 lines of code a week is quite a lot. Of course it depends on language / technology stack, I'm speaking from Rails / JavaScript programmer point of view.

Yes. And this: "Your 1,000 lines should be the essential core that enables a team of programmers to write another 10,000 lines effortlessly."

If you're writing critical core stuff like that, you better spend a lot more than a week on it. I can't imagine working on anything where the team regularly writes 10,000 lines a week. Prototypes by one person can easily grow at 1kLOC per week for a short time, but that's a special case.

Re: You only get 1,000 lines of code a week

#8

This is really spot on. The only thing I could add, is that I've found the only way to continue to write code in the capacity he's talking about, is to dedicate a day or days of the week to programming. If you're going to make your 1,000 or so lines meaningful, then the context switch to that mental state is too high when your day is intermixed with distractions. Sometimes I can put my headphones on at the end of the…

The best managers I've had were ex-engineers who realized that they couldn't write code any more. One of them explained it like this: "You get your work done by moving lines of code around. I get mine done by moving people to where they're needed, a little like chess." And it was true: He was tuned into the technical issues, and knew what his talent pool was, and was quite good at helping people make decisions about what to work on.

The worst managers I've had have been the ones who thought they could do engineering plus "the people stuff", whereupon they stunk at both. (Well, not the worst -- the absolute worst tried to make all the decisions, too: Code it this way, little robot. Or neck-and-neck, the managers who made no decisions at all and left everyone rudderless until they decided on a product and a deadline; ugh).

Back to coding, that's roughly 50K lines of shipped code a year, which seems pretty high to me. Well, you can definitely do that in a green fields area, like a totally new feature or product. But writing that much code in an existing system is gonna be hard.

Re: You only get 1,000 lines of code a week

#9

It depends on what career trajectory a senior developer is. If he is destined to become a specialist, then this article is spot on. If instead he dreams of becomming a manager or architect, then he would actually not be coding the most complicated parts, and make sure to keep himself off the critical path of the project, so as to free up his time, so he can spend his time helping his colleagues and clearing the rocks…

For a manager, I agree. An architect should write the most complicated, not the least complicated, part of code. This is assuming that the architect is the most experienced developer on the team.

This doesn't include paper architects, which are pretty much salespeople.

I would like to hear other people's thoughts on this - this is the way that I have always handled projects.

Re: You only get 1,000 lines of code a week

#10
post #3

Actually 1,000 lines of code a week is quite a lot. Of course it depends on language / technology stack, I'm speaking from Rails / JavaScript programmer point of view.

Still it's not a metric. I know people that use ruby in a way that every 6-lines method of mine, could be 1 (hard to read, sometimes extremely cryptic) line of theirs. I'm not sure you can measure, not even using third party apps.
Post reply on HN