Lines per week
In the Python thread Q posted this:
"Surprised to hear you are getting stopped out at 1000 lines. That’s what two weeks or a month of work?"
In my language of choice, C#, I can bang out about 500 lines per day when I am in the flow.
Sure, now I have so many meetings in each day I don't write that much code typically. But 1000 lines per month is dismal.
November 11th, 2017 8:29pm
Canonical CSC rules are like 10 LOC/hour. I once gave a presentation which would have required 20 LOC/hour, and they wouldn't approve it because my estimate would "take too long" to implement.
Now, that's not "produced during coding" rate, that's "By the end of the project, having done Analysis, Design, Implementation, and Debugging, and Delivery, the RESULT is 10 to 15 LOC/hour. The Implementation phase is a LOT of coding around 100 LOC/hour. But divide that by the time of all the other phases, and yeah, 10 to 15 LOC/hour.
But hey, ALL these sizes are just estimates in the beginning anyway.
So, Lines Per Week, at 10 lines/hour -- you do the math.
OP doesn't design, debug or document ;)
November 11th, 2017 9:09pm
Well, Like Jack Reacher says: "Oh. Well then, I REALLY can't afford you".
Coding without any design is just masturbation. It makes you feel better, but doesn't produce anything lasting.
UNLESS, you're talking about Rapid Prototyping, in which case it CAN grow into something useful. You still need a little design for that though.
I wondered about this too. Typically I end up deleting as many lines as I write, so in principle 1,000 lines of Python could have taken any amount of time. But in practice I'd say that ver 1 of a fully debugged 1,000 line Python script would probably take 1 week to produce... over time it's always seemed like 200 lines/day is a good, sustainable rate, when you're being productive, averaged out.
Very important to note that it's an average! - 1,500 lines/day is not a crazy amount, and sometimes that will happen, but you won't keep that up over the whole project. But in general any day I write 250+, I'm happy. Less is fine, too. Sometimes a lot less. It averages out and I don't let it bother me.
(Can also depend on the type of work. If your thing has to interface with other systems that are still incomplete, that have multiple stakeholders involved, and you're still a bit unsure yourself about how it's all going to fit together, it could easily take a month, or even more. Or, if everything is in place, technically, and you've got it all lined up in your mind, it might end up getting done in 1 day.)
November 11th, 2017 9:17pm
(Over the course of a project, this probably amounts to what StH suggests. When I count LOC/day, I'm counting the days when I'm mainly doing the coding, and not the days when we're mainly in meetings discussing what needs to be done.)
November 11th, 2017 9:21pm
On a good day, I remove about 500 lines of code a day.
November 11th, 2017 9:45pm
Lines of code just will not die.
November 11th, 2017 10:32pm
Everyone knows lines of code is a worse than useless metric.
In the context of Q's quote, the starting point was a new program with zero lines of code. Lines of code is something you can measure yourself against during the first few days of writing.
Not even Almost Bystander or Bored Anonymous could remove 500 lines of code a day from a zero-length program.
November 11th, 2017 10:48pm
Paste a suitable program into the editor and remove all the lines that don't look like the desired new program. We're sculptors. (Not painters.)
November 11th, 2017 11:32pm
Last task I had was to simplify an algorithm while fixing some use cases in the process. Simplification lead to it having considerably more LOC. It tried to do too many things in one place and while it did most of them right, it missed some cases. And when LOC is tight, trying to fix one case usually breaks 3.
November 12th, 2017 12:33am
> Sure, now I have so many meetings in each day I don't write that much code typically. But 1000 lines per month is dismal.
Typically how many C# lines do you write in a week?
November 12th, 2017 2:15am
It's like saying the faster a novel is written the better it is.
November 12th, 2017 4:08am
>In my language of choice, C#, I can bang out about 500 lines per day when I am in the flow.
Perhaps you aren't doing something challenging enough then.
November 12th, 2017 4:52am
Bill Gates — 'Measuring programming progress by lines of code is like measuring aircraft building progress by weight.'
Because he's right.
And the 'canonical' figure is 10 LOC per day StH (amortised across all project staff), not 10 LOC per day.
Obviously it varies a lot by class of system (low level systems programming is hard). And many developers seem to stupidly equate it with the productivity of an individual developer in a position to code (i.e. with a spec or clear idea what they're trying to do).
November 12th, 2017 5:35am
not 10 LOC per day -> not 10 LOC per hour
November 12th, 2017 5:36am
And 10 LOC/day is a figure for 'programming in the large' on major-league projects of cours,e.
November 12th, 2017 5:38am
>Everyone knows lines of code is a worse than useless metric.
November 12th, 2017 6:24am
Doesn't seem like it.
November 12th, 2017 6:25am
> >In my language of choice, C#, I can bang out about 500 lines per day when I am in the flow.
> Perhaps you aren't doing something challenging enough then.
I tend to agree. If I can zip through coding so fast, even in a familiar language, I'm most likely (not always) re-writing an old program or function from memory.
November 12th, 2017 4:49pm
13LOC/month is the industry average.
People often look at that and say "wow, shit coders".
13 LOC from Larry Wall == 10,000 LOC from many others.
But that's rare.
The real issue is that you have 30 minutes a month to get work done. The rest is process, fluff, politics, drama, and meetings.
November 12th, 2017 5:50pm
Also, 1000 LOC in a day is fine for a green open brand new script you are writing.
If you are writing 1000 or 1500 LOC in a completed mature multithreaded application, you are an asshole who is damaging the code and introducing massive numbers of bugs. Your productivity is in the extreme negative region because this damage has to be fixed, and may take 20 hrs to fix each hour of your "coding".
November 12th, 2017 5:55pm
Sometimes I'll spend a whole day on a single query.
November 12th, 2017 6:12pm