Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwvax!tank!uxc!uxc.cso.uiuc.edu!gistdev!flint From: flint@gistdev.UUCP Newsgroups: comp.lang.c Subject: Re: 1000 lines of C a week? Message-ID: <7800012@gistdev> Date: 13 Jun 89 19:37:00 GMT References: <18783@vax5.CIT.CORNELL.EDU> Lines: 40 Nf-ID: #R:vax5.CIT.CORNELL.EDU:18783:gistdev:7800012:000:1829 Nf-From: gistdev.UUCP!flint Jun 13 14:37:00 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@uxc.cso.uiuc.edu UUCP: {uunet,pur-ee,convex}!uiucuxc!gistdev!flint