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

J

James Kanze

James Kanze wrote:
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.

It comes out to the same thing in the end. It's just that many
people find it easier to associate a count of lines of code to
some functionality, than to associate time directly. The real
question is: what is a single "story" or function point (as
opposed to two or more)? Even in a given domain, the size and
complexity of a function point will vary some. Experienced
designers generally seem to have some feel about how many lines
of code it takes to implement any given function point, and you
go from there. It's not an absolute, of course. It's just
something that has been found to work in a lot of places.
(Other places do use function points.)
 
J

Jorgen Grahn

exec in command line?

You're replying to a thread from October 2007 without context. Please
don't do that -- most people with a real news server have no idea what
you're talking about (especially since you don't quote anything and
don't write complete sentences).

/Jorgen
 
W

woodbrian77

It depends. Show us what you "know out", and we can tell. Of course,
in order for me to review your code, I need to be compensated. And,
no, a sample 200 lines won't do. You need to show us at least 2000 LOC
to make the review meaningful.

I asked here about a code review a year or two ago
and there were a couple of complaints because the
code was thousands of lines long. Anyway, there are
4,435 lines in the archive here --
http://webEbenezer.net/build_integration.html .
991 of that is from a compression library that someone
else wrote and I've never had a problem with. 84 lines
are in a Readme file. That leaves 3,360 lines of code.
I agree with the comments about reworking code to make
it more concise. With G-d's help I've been able to
put a lot of time into that, and now that the code is
getting better, I find it's getting harder to ignore
some Microsoft warts in the code...

#ifdef CMW_WINDOWS
WSADATA wsa;
int result = WSAStartup(MAKEWORD(2, 2), &wsa);
if (result != 0) {
throw failure("WSAStartup error is ") << result;
}
#endif

#if defined(CMW_WINDOWS)
#define poll WSAPoll
#endif

In another thread I mentioned how not being able to
use non-static data member initialization in class
declarations is another wart because of Microsoft.
I bring this up in the hope that someone will say
support for this has arrived or will arrive shortly.
About 5% of two of my programs amount to these warts.


If someone is interested in reviewing the code for
compensation, you would have to be willing to accept
about 80% of it in terms of an investment in my company.
We would have to agree on how much each suggestion is
worth. I can see that ranging from $20 to hundreds of
dollars. Keep in mind, I'm sometimes stubborn and
won't take a suggestion for years until it makes sense
to me that I should. I would do my best to let you
know of my change of mind in such cases. And keep in
mind that I'm already aware of some good suggestions.
For example, the library part of the code, in particular,
should be more consistent in terms of naming.

There's info about investing here --
http://webEbenezer.net/about.html .
And I'll add that you're not waiting for me to be
rewarded in terms of the list of investments. I've
invested lots of money and time in the company, but
I'm not on that list.



Brian
Ebenezer Enterprises
http://webEbenezer.net
 
Ö

Öö Tiib

IMHO on a good day a good programmer should remove more lines of code than s/he
produced.

Yes if the work is to increase performance then the change is often like -200 to -50 lines per day.
However if it is work on new feature then production code might change -100 to +100 but you always write like 100 lines of unit tests as well then so that makes 0 to +200 lines. But that is when you really write software. THese days it is unusual.

All in all the whole team effort (including designing,documenting,testing,reviewing,deploying) is something like a non-empty line of code per man-hour.
 
W

Werner

I

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.

I'd say he should start at about a 1000 LOC, which
he should then refactor to 50 to make it maintainable (or
just for the heck of it).

Or perhaps, he should start with 50, and then use his
favourite editor to cut and paste it up to 10000. He
will at least pull the wool over some managers eyes.

But... for those kind of metrics, the better question is
rather - "How many lines shall I write for you today, sir?"

Kind regards,

Werner
 
P

Pavel Volkovskiy

вторник, 2 октÑÐ±Ñ€Ñ 2007 г., 22:29:40 UTC+4 пользователь Angus напиÑал:
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 depends. Sometimes it takes two days to fix a bug with by one line of code.
 
A

Andrew Cooper

вторник, 2 октÑÐ±Ñ€Ñ 2007 г., 22:29:40 UTC+4 пользователь Angus напиÑал:

It depends. Sometimes it takes two days to fix a bug with by one line of code.

I see your two days and raise you two months. (xen unstable changeset
23765, although its hardly very interesting on its own)

The point is - you cannot, nor should not judge "how good a programmer
is" by lines of code.
 
J

Jorgen Grahn

I have also had a case where I found the bug in a couple of hours, and
the fix was only two or three lines - but it took several days to
re-organise the program to get enough space for the fix

I often spend a week or more with the bureaucracy around a simple fix:
the paperwork, so to speak.

But the idea of lines/person/day is bogus, of course.

/Jorgen
 
C

coa09cjh

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.If this is a question (I would have liked a question mark at the end of one), then the answer is "no, there isn't".> I reckon on a good day I > can knock out 200 lines. Is that good? Bad?It depends. Show us what you "know out", and we can tell. Of course, in order for me to review your code, I need to be compensated. And, no, a sample 200 lines won't do. You need to show us at least 2000 LOC to make thereview meaningful.> Or is this benchmakr a bit of a waste of time?A benchmark is a benchmark; once obtained it might have its use some day. However, without a target use, obtaining such a benchmark _can_ be viewed as a wasteof time. And I don't think there is such a thing as "a bit of a waste of time". It's either a waste of time or it isnot. > I know this is a bit of topic but I am genuinely interested. And no I > am not a troll.Try posting to'comp.software-eng'. That's where discussions like this belong.V-- Please remove capital 'A's when replying by e-mail I do not respond to top-posted replies, please don't ask

There is no need to be so pedantic Victor!
 
E

erin

There's a reasonable analogy to this old saw:

"I didn't have enough time to write you a short letter, so I had to write you a long letter instead."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top