How many lines of code does an average prog.....

Started by
56 comments, last by Basiror 20 years, 10 months ago
grammer write per day let s say you work 8 hours the day and code a medium difficult project how many lines of your do you write then? i am just looking for a comparsion
http://www.8ung.at/basiror/theironcross.html
Advertisement
Some days I write thousands of lines of code, some days I remove just as many. To quote Dijkstra: "What kind of measurement is that?"
Amortized, most programmers in a business setting code 10-50 lines per day. Before you start talking about how low that is, though, keep in mind that programmers also spend a lot of time designing, documenting, testing, supporting, etc.

<flame>Programmers who use hungarian notation tend to be "slow", in more ways than one, and churn out about two lines per day. And one of them is buggy.</flame>

EDIT: to expand on what the AP said:

/// Programmer A writes:for(i=0; i<MAX_FOO; i++){    if(foos[i] == bar)    {        if(dblfoo == true)        {            return baz[i] * 2;        }        else        {            return baz[i];        }    }}/// Programmer B writes:for(i=0; i<MAX_FOO; i++){    if(foos[i] == bar)        return dblfoo ? baz[i]*2 : baz[i];}


Programmer A writes three times as many lines of code as Programmer B.

How appropriate. You fight like a cow.

[edited by - sneftel on June 5, 2003 1:03:37 PM]
quote:Original post by Sneftel
<flame>Programmers who use hungarian notation tend to be "slow", in more ways than one, and churn out about two lines per day. And one of them is buggy.</flame>


ROFL!
Measuring programming progress by lines of code is like measuring aircraft building progress by weight -- Bill Gates


AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
If you're actually 'coding' 8 hours a day.. no doubt much of that time isn't productive, it's pretty tough to just code that long.

If an experienced programmer could actually program 8 hours nonstop It'd most likely really speed that project on. As Sneftel said, often the time isn't spent programming, but if it somehow was the 8 hours would roughly equal the amount of time available to code over the course of 1-2 weeks.

If you're like many, you'll code while you check out gamedev or some other sites, substantially slowing you down, while increasing your tolerance of this 8 hour stretch.



[edited by - cozman on June 5, 2003 1:06:11 PM]
quote:Original post by cozman
If you''re like many, you''ll code while you check out gamedev or some other sites, substantially slowing you down, while increasing your tolerance of this 8 hour stretch.

Er... yup. *Guiltily goes back to work.*

How appropriate. You fight like a cow.
with 8 hours i mean 8 hours of work (planing coding, drinking, playing...rofl)

to be true i hardly use this type of comparsion


dblfoo ? baz*2 : baz;<br><br>since my if state ments are much more complexe in general<br><br>if i wouldn t see this comparsion some times i d forget it pretty soon </i>
http://www.8ung.at/basiror/theironcross.html
The ternary operator can increase the readability of your code if used correctly.

How appropriate. You fight like a cow.
If you are going to use lines of code as a metric, arguing notation means less work gets done is silly - tracking LOC isn''t terrifically meaningful, but at least approach it reasonably. Saying that lines which are whitespace or just brackets count against the typical number is silly.

Part of the reason the count seems so low is the cost of integrating code into huge, complex million line code bases (which is small by corporate standards). Debugging, supporting and documenting take a lot of time and those count against hours as well.

Code maintainence is much more expensive than writting code, and much of what you do while at a company is combat against entropy.

This topic is closed to new replies.

Advertisement