Xref: utzoo alt.sources.wanted:1058 comp.sources.wanted:15718 comp.software-eng:5040 Path: utzoo!news-server.csri.toronto.edu!rutgers!bellcore!uunet!mcsun!ukc!axion!puppis!pyoung From: pyoung@axion.bt.co.uk (Pete Young) Newsgroups: alt.sources.wanted,comp.sources.wanted,comp.software-eng Subject: Re: WANTED: "C" code line counter program Message-ID: <1991Mar12.163607.18799@axion.bt.co.uk> Date: 12 Mar 91 16:36:07 GMT References: <2969@inews.intel.com> Sender: news@axion.bt.co.uk Reply-To: pyoung@zaphod.axion.bt.co.uk Organization: British Telecom Research Labs Lines: 36 From article <2969@inews.intel.com>, by bhoughto@pima.intel.com (Blair P. Houghton): > In article <1991Mar11.182848.26693@comm.wang.com> lws@comm.wang.com (Lyle Seaman) writes: >>Counting semi-colons is a pretty good approach, as that counts C >>statements. Lines is kind of less meaningful. Counting '{' is >>an interesting one, too. > {{{{{{{{printf("Oh, if I were a rich man... ;;;;;;;;;;;;;;;;;;;;;;;\n");}}}}}}}} Tee Hee. Good point though. Counting lines, or semicolons, or braces is much more meaningful if you have some kind of standard to compare your figures with. In this instance such a standard might take the form of a set of guidelines about the use of symbols in comments, layout and indentation of code etc. Or even a machine to generate the code from a specification (don't scoff too loud, it might happen one day!) It seems to me (although I am quite prepared to admit I'm wrong) that there are two generic questions about gathering metrics. The first is, "what do I want to know about this program/specification/bridge/whatever?" The second is "What can I measure to get this information?" Counting statements is a possible answer to the second question. So, has the first question been satisfactorily answered? In many cases, I suspect not. But counting lines of code is a lot easier than thinking about useful measures of the size and complexity of a program. ____________________________________________________________________ Pete Young pyoung@axion.bt.co.uk Phone +44 473 645054 British Telecom Research Labs, Martlesham Heath IPSWICH IP5 7RE