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

Re: Nobody Expects the Agile Imposition (Part VII): Metrics

by BrowserUk (Patriarch)
on Jul 16, 2014 at 00:40 UTC ( #1093782=note: print w/replies, xml ) Need Help??

in reply to Nobody Expects the Agile Imposition (Part VII): Metrics

I have two takes on the premise of the use of metrics to measure, or regulate, or reward the writing of code.

Agile -- simplistically stated -- uses the number, or rather the percentage of, tests passed as its primary working metric. And that encourages producing lots of, simple, easily passed, pointless tests.

You doubt this? Inspect *any* perl module that uses the Test::* conglomeration and see if it uses require_ok( 'Some::Module' );. If it does -- and most do -- you've seen this encouragement in action!

This is a completely pointless test.


  • (this instance of) Perl is incapable of loading a module:

    then the module (Test::More?) that provides the code for require_ok() will not be loaded and the test will never be reached.

  • The module (Some::Module above) has not been installed:

    The the test suite containing this test will also not be installed, so the test will never be run.

However, if the module has been installed; but the Some::Module file has been 'emptied' except for the return 1; (or equivalent), then the test will be run and pass; despite that no other test will pass as no actual code has been loaded.

The upshot of that is that in the only scenario in which the test actually tells you anything (the latter case), it gives a false positive resulting in a 1/N tests pass instead of a 100% failure.

Note: There is no "gaming the system" here. The tool(s) provide the facility, the synopsis and detail promote its use; the users simply use it because "it seems like the right thing to do". The fault lies with both the tool -- for the provision -- and the philosophy for promoting the use.

My second take is that the moment you try to separate the physical construction of code -- kloc, function points, abstracts test quantities -- from the intellectual processes of gathering requirements; understanding work-patterns and flows; and imagining suitable, appropriate, workable algorithms to meet them; you do not have sufficient understanding of the process involved in code development to be making decisions about it.

You might just as well employ a mortuary attendant to run A&E triage.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2023-02-02 22:07 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (23 votes). Check out past polls.