1000 lines of C a week?

flint at gistdev.UUCP flint at gistdev.UUCP
Wed Jun 14 05:37:00 AEST 1989


The code below obviously was by an inexperienced programmer:

    if (x  == 1)
      return (sqrt(x));

It should have been written thusly: (An immediate 400% increase in 
productivity, and you can point to all the wonderful comments!)

    if (x  == 1)
	{
	/* return the square root of 1 */
	/* (to the calling routine)    */
	return (
		sqrt(x)
		);
	}

More seriously, I was asked to come forward with some lines-of-code produced
numbers for the people on my staff.  I knew the results weren't going to mean
squat in advance, but I did it anyway.  The results (over a year) ranged from
70,000 lines of code to 2,000 lines of code, for a group of about 15
programmers.  The individuals I want working for me are the ones that spend
2 days thinking about the problem and come up with a creative idea so that
they can solve it with 10-100 lines of code, not the ones that spend those 2
days cranking out 2000 lines of brute-force code.  (My staff varies widely
in their duties: some people are doing maintenance, where they spend 2 days
trying to figure out what is causing a bug, and then add 1 line to fix it,
others are using programs to modify/create code (like running a utility that
automatically creates prototypes in old code), others are spending all their
time writing designs and none writing code, etc.)  I have seen programmers
with a "we need something like this routine in 10 places, but it has to
be slightly different in each, so we'll copy it into all 10 places and modify
one line" mentality that really crank code out.  Give me the guy who knows
enough to add a parameter to the routine anyday. 

Flint Pellett, Global Information Systems Technology, Inc.
1800 Woodfield Drive, Savoy, IL  61874     (217) 352-1165
INTERNET: flint%gistdev at uxc.cso.uiuc.edu
UUCP:     {uunet,pur-ee,convex}!uiucuxc!gistdev!flint



More information about the Comp.lang.c mailing list