Ask HN: How many Lines of Code do You Write Every Day?
Just wondering how productive my fellow programmers are. yesterday I spent 13 hours coding and someone at the end of the day, after writing, testing, re-factoring, deleting and re-writings chunks of code, I realized i only wrote about 800+ lines, which is pretty sad.
Any tips on how to increase productivity would be appreciated too.
12 comments
[ 7.3 ms ] story [ 85.3 ms ] threadDon't focus on this.
"Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away." -- Antoine de Saint-Exupery
If you're at a more established company, then chances are, they'll care about things getting done, but on a day to day basis, will have a different metric to use. Which is the angle you're coming from, I think.
We're not factory workers -- mass is not a good metric of productivity.
Also, my dad is 12 feet tall and he can beat up your dad.
In all seriousness, LOC will always be an almost-meaningless metric.
Sustainable productivity comes from good teams working on products that have user/customer feedback early on, and which actually solve someone's problem (a tractable one) in a reasonable way.
Or, if you prefer Dijkstra:
"In this respect a program is like a poem: you cannot write a poem without writing it. Yet people talk about programming as if it were a production process and measure 'programmer productivity' in terms of 'number of lines of code produced'. In so doing they book that number on the wrong side of the ledger: We should always refer to 'the number of lines of code spent'."
I truly don't understand why counting LOC is some sort of badge of accomplishment. I think once you've coded enough you'll realize that efficiency matters most. Efficiency and elegance is what I aim for.