Settings

Theme

Ask HN: How many lines of code per day?

10 points by swix 14 years ago · 13 comments · 1 min read


How many lines of code do you write per day on average? Whats your record? Please specify in what language, im curious

j_baker 14 years ago

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

makecheck 14 years ago

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 14 years ago

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 14 years ago

    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.

  • thomson 14 years ago

    I decided one day to spend all my time refactoring code and ended up writing -200 lines. That was probably one of my most productive days ever.

brk 14 years ago

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 14 years ago

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 14 years ago

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

stonemetal 14 years ago

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 14 years ago

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 14 years ago

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

kunley 14 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection