Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > How many lines of code per day should a good programmer produce?

Reply
Thread Tools

How many lines of code per day should a good programmer produce?

 
 
Ron Natalie
Guest
Posts: n/a
 
      10-03-2007
Angus wrote:
> I know this is very much dependent on complexity etc but is there a
> standard benchmark number of lines of code that a reasonably
> experienced C++ programmer produces per day. I reckon on a good day I
> can knock out 200 lines. Is that good? Bad?
>
> Or is this benchmakr a bit of a waste of time?
>
> I know this is a bit of topic but I am genuinely interested. And no I
> am not a troll.
>


On a good day, I have a negative code output. I deal with managing
a million line legacy code project.
 
Reply With Quote
 
 
 
 
Jerry Coffin
Guest
Posts: n/a
 
      10-03-2007
In article <(E-Mail Removed). com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> I know this is very much dependent on complexity etc but is there a
> standard benchmark number of lines of code that a reasonably
> experienced C++ programmer produces per day. I reckon on a good day I
> can knock out 200 lines. Is that good? Bad?
>
> Or is this benchmakr a bit of a waste of time?
>
> I know this is a bit of topic but I am genuinely interested. And no I
> am not a troll.


It's sort of a waste of time, but has a few uses as well. If you want to
get into it, there are quite a few books on the subject -- Googling for
"Barry Boehm" should give at least a reasonable start. Asking on a
software engineering newsgroup would probably yield a lot more pointers
as well.

--
Later,
Jerry.

The universe is a figment of its own imagination.
 
Reply With Quote
 
 
 
 
Puppet_Sock
Guest
Posts: n/a
 
      10-03-2007
On Oct 2, 2:49 pm, Phlip <(E-Mail Removed)> wrote:
> Juha Nieminen wrote:
> > What counts is the *quality* of that code, not its amount. I would
> > prefer doing 200 lines of extremely high-quality code in 1 week than to
> > make 500 lines of crappy code in one day.

>
> I delete 20 to 50 lines of code per day...


Heh heh. You likely have a negative bug rate then.
Socks

 
Reply With Quote
 
Juha Nieminen
Guest
Posts: n/a
 
      10-03-2007
Puppet_Sock wrote:
> On Oct 2, 2:49 pm, Phlip <(E-Mail Removed)> wrote:
>> Juha Nieminen wrote:
>>> What counts is the *quality* of that code, not its amount. I would
>>> prefer doing 200 lines of extremely high-quality code in 1 week than to
>>> make 500 lines of crappy code in one day.

>> I delete 20 to 50 lines of code per day...

>
> Heh heh. You likely have a negative bug rate then.


As they say, "every program has at least one bug, and every program
can be reduced by at least one line; this means that all possible
programs can be reduced to one single line, which doesn't work".
 
Reply With Quote
 
Jim Langston
Guest
Posts: n/a
 
      10-03-2007
"Angus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>I know this is very much dependent on complexity etc but is there a
> standard benchmark number of lines of code that a reasonably
> experienced C++ programmer produces per day. I reckon on a good day I
> can knock out 200 lines. Is that good? Bad?
>
> Or is this benchmakr a bit of a waste of time?
>
> I know this is a bit of topic but I am genuinely interested. And no I
> am not a troll.


42


 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      10-03-2007
Puppet_Sock wrote:

>> I delete 20 to 50 lines of code per day...

>
> Heh heh. You likely have a negative bug rate then.


Bugs? No. The point of deleting lines is preventing future bugs.

--
Phlip
 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      10-04-2007
On Oct 3, 11:44 pm, Phlip <(E-Mail Removed)> wrote:
> Puppet_Sock wrote:
> >> I delete 20 to 50 lines of code per day...


> > Heh heh. You likely have a negative bug rate then.


> Bugs? No. The point of deleting lines is preventing future bugs.


I think his point was that when you remove lines, you also
remove bugs. So you are producing a negative number of lines,
and a negative number of bugs.

Statistically, I'm not sure that's good: a negative over a
negative results in a positive, so your bugs per lines of code
ratio won't be all that good.

(FWIW: my record is doubtlessly the time when I replaced 2000
lines of code---all in main()!---with 180, in one 14 hour
session. That's -130 lines of code per hour. It's easy to look
good if your predecessor was really bad.)

--
James Kanze (GABI Software) email:(E-Mail Removed)
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      10-04-2007
On Oct 2, 8:29 pm, Angus <(E-Mail Removed)> wrote:
> I know this is very much dependent on complexity etc but is there a
> standard benchmark number of lines of code that a reasonably
> experienced C++ programmer produces per day. I reckon on a good day I
> can knock out 200 lines. Is that good? Bad?


> Or is this benchmakr a bit of a waste of time?


The number of lines of code a well organized team will produce
will depend on a lot of factors: the competence of the team
members, of course, but also the application domain, the
language, and so on---a team producing its 20th version of a
corporate pay program will produce a lot more lines than a team
writing a distributed OS in C++.

And the important figure isn't lines of code per programmer, but
for the team. A programmer well supported by people on the team
who perhaps don't write a single line of code will be far more
productive than a programmer who has no support. (How do you
account for time spent writing user documentation, for example?
Or negotiating the contract?)

In the end, I think you have it a bit backwards. The way lines
of code are used is to start by determining, empirically, how
many lines of code your *team* produces, for your particular
application domain, using your particular tool set, and with the
support functionality that you have available. You then also
determine roughly how many lines of code it takes to implement
various basic functionalities---again, for your team, in the
language the team uses, using the methodologies that you use.
Given that, you can usually make a pretty good estimate as to
how much effort it will take to implement a given set of
functionality in the future, which serves as the basis for
estimating a price and a delivery delay.

--
James Kanze (GABI Software) email:(E-Mail Removed)
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      10-04-2007
James Kanze wrote:
>
> In the end, I think you have it a bit backwards. The way lines
> of code are used is to start by determining, empirically, how
> many lines of code your *team* produces, for your particular
> application domain, using your particular tool set, and with the
> support functionality that you have available. You then also
> determine roughly how many lines of code it takes to implement
> various basic functionalities---again, for your team, in the
> language the team uses, using the methodologies that you use.
> Given that, you can usually make a pretty good estimate as to
> how much effort it will take to implement a given set of
> functionality in the future, which serves as the basis for
> estimating a price and a delivery delay.
>

I'd argue that you can eliminate determining how many lines of code your
team produces and just measure how long it takes to implement the
functions, stories or whatever it is you implement.

Lines of code are completely irrelevant. I wouldn't have a clue how
many I or my last team do in a day.

--
Ian Collins.
 
Reply With Quote
 
John Bode
Guest
Posts: n/a
 
      10-04-2007
On Oct 2, 1:29 pm, Angus <(E-Mail Removed)> wrote:
> I know this is very much dependent on complexity etc but is there a
> standard benchmark number of lines of code that a reasonably
> experienced C++ programmer produces per day. I reckon on a good day I
> can knock out 200 lines. Is that good? Bad?
>
> Or is this benchmakr a bit of a waste of time?
>
> I know this is a bit of topic but I am genuinely interested. And no I
> am not a troll.


SLOC is the least meaningful metric for measuring anything. A
programmer is not judged by the volume of his output, but by the
quality of it -- is the code correct, complete, robust, maintainable,
etc.? Several people have mentioned that they spend a lot of time
time culling dead or deprecated code. Should that be counted as
negative productivity? I've written thousands of lines of code that
wound up being tossed because an external dependency changed. How
should that be measured?

It's not about pounding out massive amounts of code, it's about
solving the problem.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Now.day and day(now) returning the wrong day! Andy ASP .Net 1 11-06-2008 12:20 PM
How to display a string in many lines, each lines have a specified length thuyptt@dsp.com.vn C++ 1 12-06-2005 07:26 AM
Should i select per device or per server to do all exercises? ADRENALINE MCSE 20 01-22-2004 09:20 PM
Doctor HTML: How many free single-page checks per day? Jack Crane HTML 4 10-08-2003 09:46 PM



Advertisments