Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Line-counts of perl programs/modules

by clemburg (Curate)
on Apr 27, 2001 at 12:18 UTC ( #76016=note: print w/replies, xml ) Need Help??

in reply to Line-counts of perl programs/modules

Be sure you don't measure the wrong thing. Read Chapters 21 (How Program Size Affects Construction) and 22 (Managing Construction) of Code Complete (ISBN ISBN 1556154844). It has pragmatical advice that should apply to all languages, even to Perl.

From Table 22.2, p. 545, "Useful Metrics":


  • Total lines of code written
  • Total comment lines
  • Total data declarations
  • Total blank lines


  • Work-hours spent on the project
  • Work-hours spent on each routine
  • Number of times each routine changed
  • Dollars spent on project
  • Dollars spent per line of code
  • Dollars spent per defect

There are also metrics listed for Defect Tracking, Overall Quality, and Maintainability, but I won't type those in here. Get the book and read it.

Christian Lemburg
Brainbench MVP for Perl

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

Replies are listed 'Best First'.
Resources for good programming technique
by morgan (Initiate) on Apr 28, 2001 at 23:50 UTC

    clemburg recommended Code Complete for good coding techniques that improve readablity, optimization, quality, etc. Someone else that reviewed that book also recommended The Software Project Survival Guide and Rapid Development. Does anyone know about these books?

    Further, are there books or URLs specifically on solutions and techniques for Perl? (Along the lines of the Cookbook, which I understand is for amateurs and quick hacks.) I have found plenty of resources on syntax and specific uses of various functions, but few that really consider the Perl Approach. :)

      First of all the Cookbook is not just for amateurs and quick hacks. I find it to be a very valuable resource.

      As for good software development, most of that is not very specific to any language. The fundamentals of programming well don't change just because you are programming in Perl now. However among the classics on that topic, the one that I know of with the strongest Perl bent is probably Pragmatic Programmer, The.

      For pointers on good Perl style, well books like Effective Perl Programming are meant to address that.

      But still there are a plethora of good resources out there. If you do not know the material in them, all of the books that I just mentioned are probably worthwhile to read. Not all at once, of course, but start somewhere and start learning...

      "The Software Project Survival Guide" contains a lot of templates and check-lists to impress your manager if you need to. For real-world project planning, you have to see if your project size matches with the intentions of the author (from the intro to "The Software Project Survival Guide": "The plan has been designed with project team sizes of 3 to 25 team members and schedules of 3 to 18 months in mind. These are considered to be medium-sized projects.").

      If find the book valuable, but not a "must have", and on the whole much less important to the single programmer than "Code Complete".

      Christian Lemburg
      Brainbench MVP for Perl

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-08-14 08:59 GMT
Find Nodes?
    Voting Booth?

    No recent polls found