

Ask HN: How many lines of code per day? - swix

How many lines of code do you write per day on average? Whats your record? Please specify in what language, im curious
======
j_baker
Dunno. SLOC just isn't an important enough metric to track. Here's an example
of why that is:

[http://www.folklore.org/StoryView.py?project=Macintosh&s...](http://www.folklore.org/StoryView.py?project=Macintosh&story=Negative_2000_Lines_Of_Code.txt&topic=Management&sortOrder=Sort%20by%20Date&detail=medium)

------
makecheck
When it comes to maintaining most software projects, the number I hope to
achieve on every commit is _negative_. In fact, I take pride if I can add 700
lines but remove 1500 (C++).

This is because writing code is relatively simple, whereas understanding it
and ultimately maintaining it is very hard. So aiming to write more code is a
very poor objective, you should be aiming to keep a project maintainable so
that your costs are low (in terms of time, bug frequency, etc.).

That doesn't mean new features won't require lots of code, but there should be
some way to prune old code on the same schedule.

------
ddagradi
As long as it's a negative number, it's a win. I feel like LoC as a
measurement for anything is pretty outdated.

~~~
eru
You could look at the size of your diffs instead. Though that's not such a
good metric, either.

But really, last week I helped a co-worker rip out 80 of the 100 lines of his
Parsec parser.

------
brk
Just 2.

But, they are each 10,000 characters on average. ;)

It's kind of a difficult metric to extract any measurable data from.

------
TMK
Can write easily few thousands of lines of code in a day if I really want to
do that, but SLOC is not good metric like others have already said. One reason
for this is that you can write much code, but is it worth it when you could
possibly do the same thing with way less code.

------
tlammens
And how many lines of code do you delete per day? What are you trying to
measure?

------
stonemetal
Couldn't tell you, I don't keep track. While LoC correlates highly with number
of defects(making it tangentially important), I don't find it useful as a per
day metric. It is just something to minimize.

------
dangrossman
On a day where I do write new code rather than rewrite and refactor, it's
usually no more than a few hundred lines. I wouldn't know what my record is,
LOC-per-day is not something I take interest in.

------
croddin
I don't know, but the number has been negative the past few days. :)

------
kunley
"Every line of code not written is a correct one"

