Path: utzoo!news-server.csri.toronto.edu!rutgers!mcnc!decwrl!ads.com!saturn!rar From: rar@saturn.ads.com (Bob Riemenschneider) Newsgroups: comp.software-eng Subject: Re: WANTED: "C" code line counter program Message-ID: Date: 13 Mar 91 18:08:40 GMT References: <2969@inews.intel.com> <1991Mar12.163607.18799@axion.bt.co.uk> <12583@pucc.Princeton.EDU> Sender: usenet@ads.com (USENET News) Organization: Advanced Decision Systems, Mountain View, CA 94043, +1 (415) 960-7300 Lines: 51 In-Reply-To: EGNILGES@pucc.Princeton.EDU's message of 13 Mar 91 16:57:18 GMT In article <12583@pucc.Princeton.EDU> EGNILGES@pucc.Princeton.EDU (Ed Nilges) writes: => ... A program written in simple French (using French => rather than English identifiers) is "too complex to maintain" => when given to an American programmer since there is a 99.99% => probability that such a programmer has never learned French. => Complexity is a PSYCHOLOGICAL property. A non sequitur if I've ever seen one! All you've shown is that a program that isn't complex may still be hard to understand if, e.g., identifiers are poorly chosen. Everyone knows that. => ... If this means that software => engineers spend their time designing good PHYSICAL environments => for programmers, determining the best location of vending machines => and making certain that programmers have privacy and interaction => when necessary, then such activity would be more productive than => what goes under the rubric of software engineering. ... Optimizing the physical environment is important, and a great deal of work has gone into figuring out what the best environment is -- from serious ergonomic studies to more informal studies, such as DeMarco and Lister's _Peopleware_. It doesn't follow that complexity metrics are useless. Programming is hard for many reasons, and different people have chosen to address different limited sets of reasons. This is called "separation of concerns". => ... Telling a programmer who has written a correct program that is => complicated according to your metric is peculiarly offensive. ... Obviously, correctness is a desirable property of programs. But it's not the only desirable property. In the "real world", where far more is spent on maintaining the average program than on developing it -- and the maintenance is usually done by someone other than the original programmer -- simplicity is also a very desirable property. In many cases, a correct but overly complex program is useless. What do you find so offensive in asking a programmer to make a useless program more useful? => ... [Software metrics are] artificial and ill-considered hoops [that => programmers are forced to jump through]. While some metrics are, no doubt, fairly worthless, others seem to correlate strongly with our intuitive notion of complexity. (This isn't guesswork based on personal prejudice. Studies have been performed to determine how well complexity measures correlate with understandability -- see, e.g., the proceedings of the "Empirical Studies of Programmers" workshops.) They may not be perfect, but they're better than nothing, so people use them. -- rar