News for hackers. Stuff that matters.
Re:Ask HN: How many lines of code per day? by j_baker on Sunday August 14, 2011 @05:16PM (#2884467)
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...

Re:Ask HN: How many lines of code per day? by makecheck on Sunday August 14, 2011 @08:57PM (#2884976)
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.

Re:Ask HN: How many lines of code per day? by ddagradi on Sunday August 14, 2011 @05:16PM (#2884466)
As long as it's a negative number, it's a win. I feel like LoC as a measurement for anything is pretty outdated.
Re:Ask HN: How many lines of code per day? by eru on Sunday August 14, 2011 @05:20PM (#2884481)
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.

Re:Ask HN: How many lines of code per day? by thomson on Sunday August 14, 2011 @06:55PM (#2884739)
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.
Re:Ask HN: How many lines of code per day? by brk on Sunday August 14, 2011 @06:13PM (#2884627)
Just 2.

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

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

Re:Ask HN: How many lines of code per day? by TMK on Sunday August 14, 2011 @06:24PM (#2884663)
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.
Re:Ask HN: How many lines of code per day? by tlammens on Sunday August 14, 2011 @05:42PM (#2884534)
And how many lines of code do you delete per day? What are you trying to measure?
Re:Ask HN: How many lines of code per day? by stonemetal on Sunday August 14, 2011 @07:28PM (#2884820)
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.
Re:Ask HN: How many lines of code per day? by dangrossman on Sunday August 14, 2011 @05:27PM (#2884495)
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.
Re:Ask HN: How many lines of code per day? by croddin on Sunday August 14, 2011 @06:56PM (#2884745)
I don't know, but the number has been negative the past few days. :)
Re:Ask HN: How many lines of code per day? by kunley on Sunday August 14, 2011 @06:46PM (#2884720)
"Every line of code not written is a correct one"