Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Code counter

by ichimunki (Priest)
on Feb 01, 2001 at 20:35 UTC ( [id://55732]=note: print w/replies, xml ) Need Help??


in reply to Code counter

I have to ask, not to be nitpicky, but because I am curious about what the normal sense of a line is when counting lines of code...

Are these one, two, or more lines of code, and why?
my $var = Package::Module->get_value or die "Fatal error: $!"; my $var = { 'List' => [ 'Foo', 'Bar', 'Batz' ], 'List Two' => [ 'Phu', 'Bah', 'Buzz' ] };

Replies are listed 'Best First'.
Re: Re: Code counter
by salvadors (Pilgrim) on Feb 01, 2001 at 20:40 UTC

    The first is 2 lines. The 2nd is 5 lines.

    This is purely in the "wc -l" sense. If someone chooses to make any futher assumptions on what a certain number of lines of code actually *means*, well, there be dragons.

    But, as with many things, not being able to precisely define an exact 100% accurate all the time valid reason for something doesn't meant that it can't be useful.

    I like to measure the number of lines of code in our system over time. I don't really make any important decisions based solely on that number, but it's still useful to watch. Yes, changes in coding style can have an impact on that, but I can bear things like that in mind.

    It's like benchmarking. Knowing the raw speed of something tells you very little most of the time, just as knowing how many lines of code you have in a system tells you little. But telling how things move over time, or compare to other things, starts making it more useful.

    Tony

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://55732]
help
Chatterbox?
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-04-23 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found