bradlee@cg-atla.UUCP (Rob Bradlee X5153) (07/09/88)
Some time ago I put out this plea for help: >I'm looking both for information explaining how to judge the size and >quality of C code, and also for any tools that will automatically I suggested response by email with a latter summary to the group. Unfortunately, I was underwhelmed by the number of responses, but I have gotten some very good tips from those kind enough to reply. Here's a summary: From: Randy Neff <neff@shasta.stanford.edu> Code quality is not something that is apparent in the simplistic manipulation of lines, characters, semi-colons, etc. The Code metrics are snake oil attempts to find simple things to measure. Avoid the charlatans. From: uunet!pdn!bob (Bob Hickle) I suggest measuring code complexity by measuring open/close brace pairs. >From: warren@psu-cs.UUCP (Warren Harrison) Look into PC-METRIC from SET Laboratories [503-289-4758]. Does Halsteads Software Science (the operator/operand strategy you refer to) and Cyclomatic Complexity. Versions for C, Pascal, Modula-2, COBOL, FORTRAN, etc. It was reviewed in this month's Computer magazine from IEEE. >From: cl@datlog.co.uk (Charles Lambert) Can we keep this discussion in the open, please? I know it gets hashed over fairly regularly but it is important and perspectives are changing all the time. At the moment, there are several initiatives in the UK to promote better engineering practices in software; we cannot engineer what we cannot measure, so any discussion of methods is useful. ********************************************************** There was also a comp.software-eng entry suggesting I look at the Feb 88 ACM Communications for "NPATH: a measure of exectuon path complexity and its applications" by Brian Nejmeh. This is a good article that has led me to several others both pro and con. Also I received a call from Keith Wible at Analytics (301-381-4300). Seems Keith has just written a program for C software metrics. He will be mailing me info. I have ordered the PC-METRICS stuff today ($99 PCs only). This seems like a very interesting field, how about some net input? Anybody out there use an metrics in their projects past or present? Are you for or against their use? Speak your piece! And to all those that contributed, many thanks for the input. -- Rob Bradlee w:(617)-658-5600 X5153 h:(617)-944-5595 Compugraphic Corp. ...!{ima,ulowell,ism780c}!cg-atla!bradlee 200 Ballardvale St. Wilmington, Mass. 01887 The Nordic Way: Ski till it hurts!