TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How many lines of code per day?

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

10 comments

j_bakeralmost 14 years ago
Dunno. SLOC just isn't an important enough metric to track. Here's an example of why that is:<p><a href="http://www.folklore.org/StoryView.py?project=Macintosh&#38;story=Negative_2000_Lines_Of_Code.txt&#38;topic=Management&#38;sortOrder=Sort%20by%20Date&#38;detail=medium" rel="nofollow">http://www.folklore.org/StoryView.py?project=Macintosh&#38;s...</a>
makecheckalmost 14 years ago
When it comes to maintaining most software projects, the number I hope to achieve on every commit is <i>negative</i>. In fact, I take pride if I can add 700 lines but remove 1500 (C++).<p>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.).<p>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.
ddagradialmost 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.
评论 #2884481 未加载
评论 #2884739 未加载
brkalmost 14 years ago
Just 2.<p>But, they are each 10,000 characters on average. ;)<p>It's kind of a difficult metric to extract any measurable data from.
TMKalmost 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.
tlammensalmost 14 years ago
And how many lines of code do you delete per day? What are you trying to measure?
stonemetalalmost 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.
dangrossmanalmost 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.
croddinalmost 14 years ago
I don't know, but the number has been negative the past few days. :)
kunleyalmost 14 years ago
"Every line of code not written is a correct one"