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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Counting Lines of Code

13 点作者 apwheele10 个月前

3 条评论

WillAdams10 个月前
Pretty much every such discussion demands linking:<p><a href="https:&#x2F;&#x2F;www.folklore.org&#x2F;Negative_2000_Lines_Of_Code.html" rel="nofollow">https:&#x2F;&#x2F;www.folklore.org&#x2F;Negative_2000_Lines_Of_Code.html</a><p>I would definitely agree that early on one writes more lines of code, while later development one spends more time finding where to make a change, and then reviewing the results of the alteration.<p>Curious how much attention folks pay to this sort of thing --- my current project: <a href="https:&#x2F;&#x2F;github.com&#x2F;WillAdams&#x2F;gcodepreview">https:&#x2F;&#x2F;github.com&#x2F;WillAdams&#x2F;gcodepreview</a> is a Literate Program and in its current state just crossed over 1,600 lines of code, but I&#x27;m re-working that so that each file will instead be numbered individually.
评论 #41097321 未加载
readthenotes110 个月前
I once was asked to count loc using a tool another team developed, to measure code produced in the last 3 months.<p>They had imported about a year&#x27;s worth of crap from a previous repository 2.5 months ago.<p>I noticed that the loc counter included all commented loc, so I made a legit file of several tens of thousands &quot;loc&quot;, checked it in, ran the counter, made the report, was recognized for productivity, and thn reverted the comments.<p>Productivity, largely, is reducing loc while improving other quality attributes and features...
评论 #41097328 未加载
ChrisMarshallNY10 个月前
I use cloc[0], when I want to count my code (not often. It’s not a metric that really interests me).<p>It’s generally 50&#x2F;50, between code (Swift, usually), and comments.<p>I don’t do the Java “one file for every class” thing, but I still like to keep my files relatively small, if I can.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;AlDanial&#x2F;cloc">https:&#x2F;&#x2F;github.com&#x2F;AlDanial&#x2F;cloc</a>