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.

Counting Lines of Code

13 pointsby apwheele10 months ago

3 comments

WillAdams10 months ago
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 months ago
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 months ago
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>