Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac,att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.misc Subject: Re: WANTED: "C" code line counter program Message-ID: <11078@dog.ee.lbl.gov> Date: 19 Mar 91 00:40:04 GMT References: <1991Mar6.214157.18633@ntpal.uucp> <2628@p4tustin.UUCP> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 25 X-Local-Date: Mon, 18 Mar 91 16:40:04 PST Although these observations have been made before, I will make them again. Code `productivity' metrics are hard to define, but line counts are not even a good approximation. >Once you have the comments removed, you can use the wc program ... If you remove comments, such a line count would call a day wasted if it were spent commenting some code so that it could be maintained. Whether or not you remove comments, deleting lines is not necessarily `negative productivity'. For instance, in order to make TCP work over actual (lossy) networks, you need good estimates of the round trip time and its variance. Van Jacobson did this for Berkeley Unix; when he was done, the final code was several lines shorter, but it was much faster over real Internet connections. He has recently removed even more lines (and added just a few in a few critical places) and obtained large performance improvements. What is really needed is a way to measure the amount of `useful thought' put in, rather than the number of characters typed. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov