Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Line-counts of perl programs/modules

by ftforger (Sexton)
on Apr 27, 2001 at 21:55 UTC ( [id://76193]=note: print w/replies, xml ) Need Help??

in reply to Line-counts of perl programs/modules

Line counts are something that bean counters that do not understand software or rather quality software, use as a metric to determine how efficient their programmers are. I could quite easily pump out 1000 lines of crap code per day, and then have to change half of them 3 times and remove 30% to get to a predetermined level of quality, or I can average 1/4 of that, and produce code that has the requested level of quality from the start. Depending on the size of the project I may not code anything for days or weeks, while working through the design. Frequently the well thought out design has fewer lines of code and also has a higher level of quality (fewer lines of code usually means fewer chances to make a mistake).

However, to really answer your question, if some bean counter does ask for such a metric, I usually just give them a wc -l, or possibly, if I'm trying to make them think I've put some real work into the number, I have a script that does a glorified wc -l, but has an impressive name, and a hideous number of comand line switches and 'thinks' about the result for about 45 seconds to a minute, and then prints its result.

  • Comment on Re: Line-counts of perl programs/modules

Replies are listed 'Best First'.
Re: Re: Line-counts of perl programs/modules
by indigo (Scribe) on Apr 28, 2001 at 00:18 UTC
    Back in my C days, we had a manager who was obsessed with line counts. Not just the data, but he wanted to make sure those lazy programmers weren't inflating their line count by including whitespace, comments, wrapped lines, or anything like that. He eventually came up with a byzantine set of rules he expected us to follow.

    In the end, we started running code through the preprocessor before we delivered.

    Moral: If you impose arbitrary metrics, programmers will do arbitrary things to reach those metrics.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://76193]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-07-25 06:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.