Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Sometimes I see people and wonder which of these two things is true:

> 1. They have no idea what the average developer actually is.

> 2. They are lying to make it sound like they were elite when they were a freshman in college.

Concerning 1: they might really be living in some kind of filter bubble of really smart people. Smart people often attract and are surrounded by smart people.



A while ago I checked what's the rate at which code gets put down within the organization I'm working at.

I went through a few repos and the result was a weirdly consistent 30-45 LOC(sans tests) daily for a 2-3 person team - at least on the front-end.

Since then I'm sceptical of opinions saying that a 1500 LOC+ project could be put together "within a weekend".

Not saying it doesn't happen, but good projects of this sort have to be rare.


If you sit down for a weekend and write a one shot project that's never going to be used in production 1500 LOC is more than doable, especially as a college student where you sometimes can go many weeks without doing anything productive.

Sitting at a desk for 6-8 hours every weekday with an editor in front of you has this weird demotivating effect. Add to that all the unit tests (and general need for stuff to actually work well the first time), documentation, and not being able to just run off and build what ever you feel like and you get closer to 30-45 LOC.


The numbers you have found are the numbers averaged over all kind of projects (new projects, old projects). It is well known that the average daily LOC output in the industry is not high. Once a project has reached a certain complexity or maturity, people spend more and more time on debugging, refactoring, documenting, profiling etc.

For a new project, 1500 LOC within a weekend sound possible if the goal is to quickly produce some kind of proof of concept. You would probably spend the following days on redesigning the whole thing, though :)


Once I spent 2 days debugging something that got solved be deleting half a line (some hopefully unneeded condition in a long if)...


You can put out a lot more code when you're starting from a blank page than when it has to integrate with thousands of lines of existing code. Not to mention that at the start there's basically no refactoring, debugging or rewriting target, so you can just pump out new code. Whether 1500+ LOC on a weekend is realistic is another matter.


> I went through a few repos and the result was a weirdly consistent 30-45 LOC(sans tests) daily for a 2-3 person team

The "sans tests" metric is in my opinion some kind of cheating to keep the number small.

Let me explain: when I was younger, I was already immensely productive as a programmer. But because I was young and naive, I did not care about testing etc.

When I look at code that I produce today in my free time, I observe that the ratio between test code and normal code is about 6:1. It is similarly hard to produce good test code as it is to produce "ordinary" code.

So by demanding that the code is well-tested, we need a lot more code to solve the same job. If I multiply your upper bound of 45 LOC by my factor of 7 (= 1 + 6), I obtain 210-315 LOC/day. This is much nearer to my experience of 400-500 LOC per day. The remaining difference can be plausibly explained by experience of other team member, time for communication in the team, time for communication with customers, overhead demanded by management, ...


I had to use this metric to account for the, ahem, work ethic of some and the lack of tests resulting from it.

But I agree - a good test suite is going to be much larger than the code it's testing.


Lord. I was reading 30/45 KLOC...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: