TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How many lines of code per day?

10 点作者 swix将近 14 年前
How many lines of code do you write per day on average? Whats your record? Please specify in what language, im curious

10 条评论

j_baker将近 14 年前
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>
makecheck将近 14 年前
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.
ddagradi将近 14 年前
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 未加载
brk将近 14 年前
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.
TMK将近 14 年前
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 年前
And how many lines of code do you delete per day? What are you trying to measure?
stonemetal将近 14 年前
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 年前
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 年前
I don't know, but the number has been negative the past few days. :)
kunley将近 14 年前
"Every line of code not written is a correct one"