Live data from Hacker News

You only get 1,000 lines of code a week

onebigfluke.com

31–40 of 86 posts

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

#31
post #28
post #27

Earlier quoted context omitted.

I'm a senior engineer who has written over 150k loc the past month :( . I have had to tackle some difficult problems that allowed the other engineers to keep moving. My workaround so far has been to do most of the critical work during after hours or before everyone comes in the office, since my primary role during regular hours is to keep everyone unblocked. It isn't sustainable though, and I only do it at the moment…

150 000 lines of code / (10 hours * 5 days * 4 weeks) = a sustained 750 lines of code an hour? That's impressive. Can you share a bit more about how you manage to achieve such productivity for those of us who aspire to be like that?

I have an excellent command of JavaScript and AngularJS, which allows me to focus on the problems themselves and not get fussed up with language subtleties...usually. I also have been working 70+ hour weeks for the past month, often 75 hours. There have been multiple times I had to shut my brain for the night because my focusing ability starts to deteriorate if I code too long. I also try to get a good night of sleep most nights - 7-8 hours prove optimal for me, although I often end up with 6.

A good portion of those loc have been complete rewrites based on existing code to clean it up and meet unforeseen changes in requirements that nobody planned for. Honestly, the amount of code I pumped out is a miracle, I'm hoping I don't get stuck in such a situation again at my current job.

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

#32
post #28
post #27

Earlier quoted context omitted.

I'm a senior engineer who has written over 150k loc the past month :( . I have had to tackle some difficult problems that allowed the other engineers to keep moving. My workaround so far has been to do most of the critical work during after hours or before everyone comes in the office, since my primary role during regular hours is to keep everyone unblocked. It isn't sustainable though, and I only do it at the moment…

150 000 lines of code / (10 hours * 5 days * 4 weeks) = a sustained 750 lines of code an hour? That's impressive. Can you share a bit more about how you manage to achieve such productivity for those of us who aspire to be like that?

750 LOC/hour on average? The secret to that is either having a very loose definition of code (e.g. counting generated files, copy and pasting huge amounts of boilerplate, etc) or a very loose definition of honesty. Nobody is that productive, especially not working 10 hours a day. If I do 750 LOC in a week, that's a good week!

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

#33
post #28

Earlier quoted context omitted.

150 000 lines of code / (10 hours * 5 days * 4 weeks) = a sustained 750 lines of code an hour? That's impressive. Can you share a bit more about how you manage to achieve such productivity for those of us who aspire to be like that?

I don't think he was suggesting you aspire to that. And both 10 hours and 5 days are probably underestimates of the time he is spending.

That... and I shiver to think of the amount of buggy code being churned out. 150k lines of crappy code isn't something to be proud of.

More code = more points of interaction = more bugs.

Caveat: This is assumption based. I assume that much code is due to "quantity not quality". Boilerplate code, copy/pasta, 10 lines of actual code, 100 lines of test, etc

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

#34
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.

Same here. The German Wikipedia page for LOC ( http://de.wikipedia.org/wiki/Lines_of_Code ) says that usually 10-50 LOCs per day are normal which would be 70-350 LOC per week.

seems okay to me.

Sometimes I hack away 100s of lines a day and sometimes I search for problems for days without writing a single (persistent) line of code.

I think the longest span I went was about 3 weeks till I tracked down a bug in a legacy system and wrote about 4 lines to fix it :D

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

#35
post #28

Earlier quoted context omitted.

150 000 lines of code / (10 hours * 5 days * 4 weeks) = a sustained 750 lines of code an hour? That's impressive. Can you share a bit more about how you manage to achieve such productivity for those of us who aspire to be like that?

I don't think he was suggesting you aspire to that. And both 10 hours and 5 days are probably underestimates of the time he is spending.

The claim was he did this mostly while others weren't in the office. If you assume they work a straight 8 hours (and why would they at crunch time) that leaves 14hrs/day to eat/sleep/work. 10/5 isn't so unreasonable approximation

But hey, another way to look at it. 150,000/30 = 5000 lines/day. At 16 hrs/day, that is 312.5 lines/hour, or 5 lines/minute non-stop.

Not killing myself, and leaving the typos in that wouldn't affect compilation, I generated the code below in 36 seconds; I knew what I was going to program ahead of time - there was no thinking involved. I honestly could have typed faster, but I also didn't want to type faster than I could sustain for 16 hours nonstop. I haven't had my coffee yet, so that is a factor.

So that is right at the target rate. I don't think I could maintain that 16/7 for real problem. I'm going to have to stop to think, to look up things, to make mistakes, to write tests, to document. Unless we assume I am perfect, I'm going to have to spend time debugging. This is for a stupid Euclidian distance function, whereas the claim was it was difficult, critical code. And the claim is not 16/7, it is "before/after" office hours.

    import math

    def distance(x,y):
        """ compute striaght line distance between x and y"""

        return math.sqrt(x**2 + y**2)

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

#36
1k loc / week sounds like a lot. As a teenager, I got a tour of a company doing contract work for the government making drones. Their manager said they average 12 lines of "final" code per day per engineer over the course of a project. I was stunned and shocked it's so low, but it has stuck with me ever since. After many years more experience, factoring in bug rates and debugging time and meetings and rewrites and all the other things that eat time, I'm quite convinced that nobody goes as fast as they they think, and in reality all software dev is surprisingly slow, measured over the course of a large project. Granted government / military work is expected to run slower (and more carefully) than most software. But if you're writing code, you're creating bugs, and bugs take time to fix, there's no way around that.

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

#37
post #31
post #28

Earlier quoted context omitted.

150 000 lines of code / (10 hours * 5 days * 4 weeks) = a sustained 750 lines of code an hour? That's impressive. Can you share a bit more about how you manage to achieve such productivity for those of us who aspire to be like that?

I have an excellent command of JavaScript and AngularJS, which allows me to focus on the problems themselves and not get fussed up with language subtleties...usually. I also have been working 70+ hour weeks for the past month, often 75 hours. There have been multiple times I had to shut my brain for the night because my focusing ability starts to deteriorate if I code too long. I also try to get a good night of sleep…

That is under 7.2 seconds per line, nonstop. [1]

I'm a fast typist, and I can't type that fast.

[1] 75 hrs/week * 4 weeks * 3600 sec/hr / 'over' 150,000 lines = 'under' 7.2 sec/line

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

#39
post #27
post #7

Earlier quoted context omitted.

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 spe…

I'm a senior engineer who has written over 150k loc the past month :( . I have had to tackle some difficult problems that allowed the other engineers to keep moving. My workaround so far has been to do most of the critical work during after hours or before everyone comes in the office, since my primary role during regular hours is to keep everyone unblocked. It isn't sustainable though, and I only do it at the moment…

What tool did you use to measure your loc?

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

#40
post #27
post #7

Earlier quoted context omitted.

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 spe…

I'm a senior engineer who has written over 150k loc the past month :( . I have had to tackle some difficult problems that allowed the other engineers to keep moving. My workaround so far has been to do most of the critical work during after hours or before everyone comes in the office, since my primary role during regular hours is to keep everyone unblocked. It isn't sustainable though, and I only do it at the moment…

Whoa. Is this code amount due to the crunch mode you are in or is it typical you need so much code to implement features?
Post reply on HN