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.

Mythical man month: 10 lines per developer day

280 pointsby rcsorensenover 5 years ago

38 comments

antirezover 5 years ago
I did some trivial math. Redis is composed of 100k lines of code, I wrote at least 70k of that in 10 years. I never work more than 5 days per week and I take 1 month of vacations every year, so assuming I work 22 days every month for 11 months:<p><pre><code> 70000&#x2F;(22*11*10) = ~29 LOC &#x2F; day </code></pre> Which is not too far from 10. There are days where I write 300-500 LOC, but I guess that <i>a lot</i> of work went into rewriting stuff and fixing bugs, so I rewrote the same lines again and again over the course of years, but yet I think that this should be taken into account, so the Mythical Man Month book is indeed quite accurate.<p>However this math is a bit off because in the course of such 10 years I wrote quite a number of side projects, but still, max ~50 LOC &#x2F; day.
评论 #22308500 未加载
评论 #22308507 未加载
评论 #22314100 未加载
评论 #22310543 未加载
bArrayover 5 years ago
What annoys me most about these metrics is that some days zero lines are written. Anything up to a month without results to show.<p>Where, then, does all this time go? Sometimes it&#x27;s reading existing code. Sometimes it&#x27;s learning about a new algorithm by reading blogs and papers. Sometimes it&#x27;s developing test programs to iron out a bug or test out some new code.<p>There used to be one chap in the office that got all the hard problems - the seriously hard problems. Some of this was figuring out why USB couldn&#x27;t transition from low-speed mode to high-speed mode reliably (USB is quite hard to probe due to frequency), or figuring out why the application crashed one in a million boots.<p>Some of our most valuable developers committed the least amount of code, but saved our arses more times than I can count.
评论 #22308501 未加载
评论 #22306515 未加载
评论 #22306596 未加载
评论 #22309159 未加载
评论 #22307601 未加载
评论 #22314244 未加载
评论 #22309099 未加载
评论 #22307069 未加载
seventh-chordover 5 years ago
Not quite sure what point the author is trying to make? He agrees that lines of code are a bad measure of productivity because, yet claims that the average he computes can help him predict future development times. Then he explicitly points out that different parts of the codebase required different amounts of work, apparently unrelated to their code line count, yet does not relate this to the previously mentioned points. Also, what is up with the random comment about code coverage at the end? That doesnt fit in with the rest of the article either...
评论 #22308690 未加载
评论 #22306809 未加载
评论 #22307305 未加载
评论 #22306526 未加载
dmos62over 5 years ago
My current task is to implement a feature and I wrote about 50 lines during the last 2-3 weeks. I&#x27;m not slacking off, just examining the codebase and planning. I did collect about ~25-50 lines of notes per day though, so it&#x27;s not like I&#x27;m keeping everything in my head. To be fair, the codebase is new to me, so I don&#x27;t expect to keep this tempo for very long.<p>If I had been pressured to start writing code immediately it would have been more difficult to comprehend the codebase, thus slower, or even worse I would have introduced anti-features or bugs.
评论 #22307838 未加载
Tade0over 5 years ago
<i>a professional developer will write on average 10 lines of code (LoC) day.</i><p>My experience so far is a <i>team</i> of developers can deliver 30-100 LoC per day of front-end code.<p>The team size is of little consequence. It&#x27;s been hilariously consistent across projects and companies I&#x27;ve been in.
评论 #22308743 未加载
andrewstuartover 5 years ago
10 lines per developer day - this is so outdated it should be disregarded entirely. Not much is gained from writing articles around this &quot;10 lines a day&quot; assertion unless you&#x27;re writing something about computing history.<p>Maybe this was true when people were writing operating systems in assembly language - which is the time and context in which The Mythical Man Month was written.<p>Lines of code per day really is a pretty meaningless measure but having said that there is at least some truth to it, in that any developer who is writing a typical 21st century application and getting only 10 lines of code per day written, should really examine if they are in the right job.
评论 #22306906 未加载
评论 #22307570 未加载
评论 #22311436 未加载
评论 #22308735 未加载
z3t4over 5 years ago
Anyone else feel sad when you remove a bunch of code? All those man-hours it took to write that code, and now I&#x27;m deleting it all. I believe it&#x27;s called sunk cost fallacy. I often wish I had a time machine so that I could go back in time and say, hey, this will all be deleted a year from now, go with the other solution instead.
评论 #22309862 未加载
评论 #22307235 未加载
评论 #22311343 未加载
评论 #22309331 未加载
评论 #22308892 未加载
评论 #22307912 未加载
评论 #22311437 未加载
评论 #22310268 未加载
cpascalover 5 years ago
My company has been experimenting with doing our feature estimations in LOC changed instead of points (1, 2, 3, 5). The general idea being that point estimation can vary between engineers based on ability, but LOC changed should be similar among engineers. This is supposed to make it easier to answer management&#x27;s favorite question of &quot;How long is this gonna take?&quot;. The answer is calculated using a team&#x27;s historical average LOC&#x2F;hr rate.<p>It remains to be seen if our estimates are any better.
评论 #22311646 未加载
jammygitover 5 years ago
Over the last 2 months I’ve managed about 3k new loc and 90 classes, so that’s about 60ish lines per work day. I don’t feel like I was that productive though and spent a lot of time refactoring. Eg, last 1k lines barely added any features<p>What do you do to keep up a fast pace in a big project without throwing quality out? They say TDD increases your speed overall, according to a few case studies I found (15% longer to code, but 40% less bugs, so faster finish times overall etc)
评论 #22306934 未加载
评论 #22311497 未加载
jillesvangurpover 5 years ago
That book was written in the seventies, 45 years ago. It still has valid points but obviously a few things have changed in terms of how we do things. For example, we use version control systems these days and have sophisticated refactoring tooling.<p>But one of the things that hasn&#x27;t changed is that we haven&#x27;t really come up with any better metrics than time spent and nr. of things changed per time unit. There are a lot of people complaining these things are not representative (for the last five decades) but not a whole lot of people coming up with better productivity metrics and even fewer that did the leg work of actually validating their work in something that might pass scientific scrutiny (which is hard). If you do work in this space, you&#x27;ll find yourself citing articles that are decades old.<p>These days, I tend to look at the activity statistics on github projects when joining a new project. It tells me in a glance of an eye who are the movers and shakers on a project in terms of lines of code added&#x2F;removed and amount of commits and the time distribution of those commits. It&#x27;s not perfect and doesn&#x27;t tell you the complete story but it it&#x27;s rarely completely wrong. Usually it&#x27;s quite easy to spot patterns like Weekends, Christmas, vacations, and that people tend to get back energized from a good break (a little spike in productivity).<p>Also these numbers confirm the notion of a 10x programmer: a handful of people tends to be responsible for the vast majority of commits and line changes. Not all software engineers are created equally. Diffstats on pull requests tell me a lot as well; though of course these numbers are inflated by e.g. refactorings (more so on languages that have proper tools for this). But refactoring is a good thing and combined with code reviews tell you a lot about the quality of engineering.
评论 #22307294 未加载
zackmorrisover 5 years ago
We should probably be using the absolute value of lines of code, so abs(LOC) as the metric, or something like a least squares mean for estimating the moving average of LOC per day.<p>Anymore, my daily average LOC is probably negative since I tend to rescue floundering projects. I usually avoid object-oriented (OO) programming whenever possible, as I&#x27;ve found that functional one-shot code taking inputs and returning outputs, with no side effects, using mostly higher order functions, is 1 to 2 orders of magnitude smaller&#x2F;simpler than OO code.<p>Also I have a theory that OO itself is what limits most programs to around 1 million lines of code. It&#x27;s because the human mind can&#x27;t simulate the state of classes with mutable variables beyond that size. Shoot, I have trouble simulating even a handful of classes now, even with full tracing and a debugger.<p>I&#x27;d like to see us move past LOC to something like a complexity measurement of the intermediate code or tree form.<p>And on that note, my gut feeling is that none of this even matters. The world&#x27;s moving towards results-oriented programming, where all that matters is maximizing user satisfaction over cost of development. So acceptance test-driven development (ATDD) should probably be highest priority, then behavior-driven tests (BDD), then unit tests (TDD). On that note, these take at least as long to write as the code itself. I&#x27;d even argue that they express the true abstractions of a program, while the code itself is just implementation details. Maybe we should be using user stories implemented per day as the metric.
throwaway100xover 5 years ago
My project at work is 60k LOC, developed over the course of 3 years. It&#x27;s in production and works quite well. I wrote it all by myself. My hobby project is 100k LOC (2.5 years of development in free time). Both are UI + service code in C++. I code several hours a day. Maybe 3-5 on average.<p>10 LOC&#x2F;day is ridiculous. Think about Brad Fitzpatrick, Fabrice Bellard, John Carmack. They would never accomplish anything like they did with those 10 LOC.<p>You have to have dedication and really good text editing skills. Being smart is nothing if you can&#x27;t write code fast enough. Good skills with tools like shell, debugger, version control are important as well.<p>Another problem is that dev collectives these days tend to bully and punish those with higher performance. There are several reasons for that 1) most devs do an absolute minimum just not to get fired 2) job security is a thing, you won&#x27;t make your project look too simple or complete as this might end your contract 3) at least 90% of hype is from idiots and by idiots. Idiots are a heavy tax on any engineering 4) frameworks, tools and methodologies are often designed for a different scale 5) ceremonia, overcomplication of development processes, treating devs like anonymous, interchangeable units<p>I&#x27;m male in my 40s with a CS degree. I work from home most of the time.
scarejunbaover 5 years ago
Guys, can I be honest? I have never actually met anyone who has worked in a LOC-optimized company. This stuff seems like the outrage porn of software engineering.
评论 #22306733 未加载
评论 #22307528 未加载
评论 #22312961 未加载
hermitcrabover 5 years ago
I did some analysis of my own projects and came up with around 50 LOC per day: <a href="https:&#x2F;&#x2F;successfulsoftware.net&#x2F;2017&#x2F;02&#x2F;10&#x2F;how-much-code-can-a-coder-code&#x2F;" rel="nofollow">https:&#x2F;&#x2F;successfulsoftware.net&#x2F;2017&#x2F;02&#x2F;10&#x2F;how-much-code-can-...</a><p>But: -As a 1-man-band I also do the support, documentation, testing, website, marketing etc. So coding is only part of what I do. -I don&#x27;t think the article defines what a LOC is. Does it include headers? Does it include auto generated code?
tom_hillover 5 years ago
Another post currently on the front page has a great example of this: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22306002" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22306002</a><p>How do you score this for lines of code per day. ?<p>&gt; I&#x27;ve added 700k lines of code and deleted 747k (yay negative!).<p>Interesting that if you divide the added lines by the 7 years, and figure 250 days&#x2F;year, he&#x27;s phenomenally productive<p>700,00 &#x2F; 7 &#x2F; 250 = 400 lines of code per day, sustained over 7 year!
m0zgover 5 years ago
I wish I had a job where writing 10LOCs per day would be enough. I wrote quarter of a million LOCs at Google alone, and I wasn&#x27;t the most prolific programmer on the team, not even close. I wrote about as much code since I left Google, too. And it&#x27;s not Java code either, where your IDE has to crap out 100 lines of boilerplate before you even begin to do anything meaningful. This is mostly C++ and in the last few years Python as well.
评论 #22309303 未加载
speledingover 5 years ago
I&#x27;m a 10x programmer, so I do 100 lines per day ;-)
paulajohnsonover 5 years ago
The 10 LOC&#x2F;day includes the entire project, including analysis, requirements, design, documentation (user and tech), test, management etc, in a large project. Saying (as many do) that an individual programmer has produced hundreds of LOC per day is to miss the point.<p>You have to start by defining your terms of reference and make sure you are comparing like with like.
ChrisCinelliover 5 years ago
If you are doing a good refactoring, you may have a massive negative LoC at the end.<p>LoC added or removed is not a very good metric for anything.<p>Except if I see a big negative number on a PR, it is usually a great thing. I still have to check what was removed but it usually mean that things are easier to understand.
评论 #22306665 未加载
thrower123over 5 years ago
I&#x27;m not sure I add 10 lines of code, on average, to our products a day. Most days are probably negative, to be honest.<p>Of course, any time I have to add a new Windows Forms dialog to our install&#x2F;config utility, there&#x27;s a couple thousand lines of code-behind added to the repo...
mettamageover 5 years ago
How I explain why LoC is a bad metric to non-techsavvy people.<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 +<p>3 = 45<p>And so is 3 * 15.
评论 #22306683 未加载
评论 #22311512 未加载
评论 #22306745 未加载
magicalhippoover 5 years ago
I&#x27;ve never found LOC as a useful metric for productivity. Lines of code are most definitely not born equal.<p>So what&#x27;s this obsession about it? Is it managers who can&#x27;t or don&#x27;t want to properly evaluate the performance of the people they&#x27;re managing?
eeZah7Uxover 5 years ago
A good bricklayers places MORE bricks in a day than others.<p>A good construction engineer builds a house using LESS concrete that others.<p>I&#x27;d rather be a good software engineer than a &quot;x10 developer&quot;.
ww520over 5 years ago
A good measure is how many lines removed per day.
评论 #22308271 未加载
toadiover 5 years ago
This is still a thing... working in the field for 20 years and really is 15 years ago LOC as KPI went away... Why is it back?
talkingtabover 5 years ago
Does anyone else question the mythical man month? If I accept the basic assumption of the mythical man month then I also have to accept that NYC is a myth - there is no way that a city that size can possibly function. Lets start out with ten people in NYC and they add ten more people .... My own belief is the MMM is an apologists view of how we currently collaborate to develop software and products.
评论 #22309554 未加载
评论 #22308986 未加载
评论 #22308562 未加载
Koshkinover 5 years ago
Well, this depends on the language. I once wrote 12,000 lines of x86 assembly code in four (long) days.
collywover 5 years ago
Personally I take more pride in removing code these days.
B008L355over 5 years ago
Mumps developers only need to write 1 line of code a day
dustedover 5 years ago
Seems about right, on the average day, you put about 500 in. the average year later, you&#x27;re lucky if 10 of those are left.<p><i>sits back waiting to be told how badly I suck and something about code churn and patterns</i>
评论 #22306914 未加载
rdiddlyover 5 years ago
Anybody know how he made those treemaps?
评论 #22306604 未加载
nodomainover 5 years ago
Shouldn&#x27;t that article be removed from HN? For me it looks like click bait to promote his nDepend tool.
fctorialover 5 years ago
3, take it or leave it.
not_buying_itover 5 years ago
lol I average about 200 a day, guess I&#x27;m not a pro:(
shultaysover 5 years ago
sounds like I am at least a 10x programmer
Brave-Steakover 5 years ago
Am I mad? Did anybody actually read the article? Why is everybody piling on LoC&#x2F;day when the article is about average LoC over a period of time and how it correlates to the work you&#x27;re doing and what a realistic average LoC might look like for a sane project. From this point of view, it doesn&#x27;t matter at all if you deleted 20k lines and have a negative LoC for the day. That&#x27;s missing the forest for the trees.
评论 #22310861 未加载
评论 #22310847 未加载
iamaelephantover 5 years ago
This is just an ad for NDepend.
grumpleover 5 years ago
Web devs: don&#x27;t think this applies to you.<p>If you&#x27;re pushing up 0 lines of code on a day where you had no meetings or interruptions, and you aren&#x27;t working on something truly novel and near-impossible, you took the day off on the company dime. And everybody you worked with noticed, and if you do it regularly - they are just waiting for everybody to reach their breaking point with you so they can push to get rid of you. Sure, you&#x27;ll find a new job and do it again, but you&#x27;ll still not have anybody&#x27;s respect.
评论 #22308401 未加载
评论 #22309745 未加载