It's Not About Lines of Code
Charles Connell writes: "What makes a programmer highly productive? Is it lines of code per
day? Lines of good code? In this article, I examine the concept of software
productivity. I look at some of the standard definitions for productivity
and show why they are wrong. I then propose a new definition that captures
what programming really is about." Read on for Connell's stab at a better way of evaluating the worth of programmer time.
CT Originally the contents of an article were here but there was
a communication problem resulting in us thinking we were given permission to
print the article here. Now that things have been cleared up, we've linked
the
original article which you can read instead.
Sorry about the inconvenience.
They should evaluate programmers by the length of thier beards. =)
I SURVIVED THE GREAT SLASHDOT BLACKOUT OF 2002!
As far as "what makes a programmer productive", I know what makes a programmer unproductive... reading Slashdot all day. Back to work, all of you!
I don't care if it's 90,000 hectares. That lake was not my doing.
"I need you to be great and create something totally fantastic and immensely profitable by Friday, Can you do it?"
Why programmers consider murder:
"What's taking you so long? I've already built something just like it in Access."
Why programmers retire early:
"We're totally bankrupt, you probably didn't work hard enough. Thank goodness I've got a golden parachute."
A feeling of having made the same mistake before: Deja Foobar
; )
"If being a geek means being passionate about something, then I pity those who aren't geeks." - Pike65
Now, if I can just get my boss to endorse this programming style...
If someone demanded more lines of code from me I'd write a perl script which would take all my loops and unroll them, then the function calls inline.
Never again would they want more lines of code.
Rod Taylor
"No. of Bugs Fixed" is a great way to open the system up to some massive exploitation.
IIRC, there was a Dilbert comic about this a few years ago: PHB decides to change the work metrics, and selects #OfBugsFound/Fixed. Wally, resourceful as ever, is seen a panel or two later saying "I'm gonna code myself up a new minivan this afternoon."
PhilMills
Once you eliminate the impossible, whatever remains, no matter how improbable, will be quoted out of context on
You're trying to define quality - quality of code. Just be certain you don't go insane trying.
Hehe, anyone else remember the old Dilbert cartoon where the PHB decides that bonuses will be awarded for each bug fixed? Wally tells Dilbert: "I'm going to write me a minivan this afternoon".
Fred now writes comments and he completes his program by writing 1000 lines of well-documented, correct code per day for five days. Danny also completes his assignment in five days, but he writes only 500 lines of code per day
) [20]&48){D=89;_=unqb24,qT,@
b=map{ord qB8,unqb8,qT,_^$a[--D]}@INC;s/...$/1$&/;Q=unqV,qb2 5,_;H=73;O=$b[4]>8^(P=(E=255)&(Q>>12^Q> ;>4^Q/8^Q))>8^(E&(F=(S=O>>14&7^O)
^S*8^S>=8
)+=P+(~F&E))for@a[128..$#a]}print+qT,@a}';s/[D-HO- U_]/\$$&/g;s/q/pack+/g;eval
Unfortunately, Danny's code was written in perl and looked like this:
s''$/=\2048;while(){G=29;R=142;if((@a=unqT="C*",_
Huh? What are you talking about!?
Now I suppose you're going to call the "Man-Month" measurement of a project's size some kind of myth!!
What kind of engineer would get a DECAF mochaccino?? No wonder she fell asleep right afterwards...
This is why you tell managers numbers that will make them comfortable with your progress, no matter if they are really accurate. The better your managers feel about your work on the project, the better you will feel, since they will stop bothering you as much. In other words, arbitrary and meaningless questions deserve arbitrary and meaningless answers.
:)
Of course, you still need to finish everything on time or your arbitrary and meaningless answers won't work the next time.
Boss: How many lines of code did you do today?
Coder: 1
Boss: [next day], how many lines did you do today?
Coder: 1
Boss: [day 3] how many lines did you do today?
Coder: 1
Boss: how come you only do one line per day
Coder: Actually I'm working on the same line.
Boss: How many lines is the damn program?!?
Coder: 1
Boss: You're programming in Perl again arent you...
... that Java is better than Perl. It takes so many more lines of code to do the same simple thing. 'splains everything.
Miko O'Sullivan
And anyone who complains that it takes too long to type "ISDN_Terminals_Per_Trunk" compared to "data" really needs to take a cluecheck...
In all fairness, ISDN_Terminals_Per_Trunk is a bit much to type out and can be shortened without any loss in understandability to ISDN_Terms_Per_Trunk and we can combine the last two terms giving us ISDN_Terms_Perunk and removing those pesky vowels gives us SDN_Trms_Prnk which can be condensed to DN_T_P and removing the ugly underscores gives us DNTP. But look at what your descriptive variable naming has given us, we now have a variable called DNTP which could easily be confused for some sort of Transport Protocol since it ends in TP. We could rename DNTP to something general like "data", we've kept the same first letter for easy recognition and it no longer looks like an acronym for a network protocol.
This is why the iterative development method is useful -- you set a certain number of things you want to see done by such-and-such a date (best done with the interaction of the developer), then if it's not done the developer better have a good reason.
This approach works on most development projects (with the possible exception of very new projects with no existing product) and only when at least the lower level managers understand the development of the project and can participate in setting the goals.
Oh, and here's the big secret: then you build on an extra 15 days for every six months of the project and don't tell anyone involved with the development. That way, you look like a hero if it gets done in time and don't lose your job if its not. Don't tell anyone.
Every year during my review, I just pray the words "slashdot.org" aren't mentioned.
Mamamilla! He wants me to do what!!!!
- Michanlangelo