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

Re^2: win32api::commport install fails (useless)

by tye (Cardinal)
on Nov 01, 2012 at 14:15 UTC ( #1001832=note: print w/ replies, xml ) Need Help??


in reply to Re: win32api::commport install fails
in thread win32api::commport install fails

Yes, prove sucks. A lot. I recall it not sucking this bad. The "summary" output is way too verbose and yet almost everything in the summary is useless (and much of it is just purely incorrect). Meanwhile, it is doing a great job of hiding from the user what would be less output but that would be extremely informative.

What's worse, the current implementation of prove is like some doctoral thesis on how to over-engineer software using rampant application of inheritance, factories, and "pure" layers of abstraction (that appear to have no use other than adding layers of abstraction). And this makes it extremely time-consuming to find the bit of code that is at fault each time I go to make a tiny improvement to it.

Trying to follow the flow of prove's code, you repeatedly get the impression that extreme effort was exerted for the sole purpose of making it difficult to follow the code flow.

You get to a promising-sounding class only to find it has no code that does anything real at all. It just contains a method called 'run' that does nothing other than call a method called 'next' on something else. So you go to find where that something was created so you can know the class name so you can go read the code for that class to see what the 'next' method does. But the code that creates that "something else" is a factory where the class name used is derived via complex means hidden under several layers of abstraction.

After spending a significant amount of time trying to navigate those several layers of abstraction, you finally come up with another promising-sounding class name. So you go read the code for it and you even find a 'next' method. Unfortunately, all it does is dereference a code reference that was created by some other code. Now you don't even have a method name to aid your next search step.

Now I've spent an hour or two trying to just find what is surely a very simple couple of lines of Perl code that I'm sure I could fix in a matter of minutes because the specific problem I'm trying to address is a very simple problem, but I don't get three hours of uninterrupted time at work hardly ever so I have to go to a meeting or help somebody with some issue and after that, the dozens of layers of pure abstraction have mostly fallen out of my head and I'm nearly starting over from the beginning if I want to look for the needle of functional, practical code in the haystack of dozens of pure abstraction layers.

I think I'll next just install an old version of 'prove' and see if the output is tons more useful (like I remember). If not, at least I can tell from the much shorter list of modules that are included (and the fact that these modules have practical-sounding names rather than names that sound like theoretical abstraction layers) that I'll be able to make fixes without needing hours and hours of time to fill my head with dozens of pure layers of abstraction.

(At least none of the layers are (yet) hiding behind a truly enormous pile of code like if they started using Moose... *shudder*)

- tye        


Comment on Re^2: win32api::commport install fails (useless)
Re^3: win32api::commport install fails (useless)
by BrowserUk (Pope) on Nov 01, 2012 at 14:35 UTC
    and "pure" layers of abstraction (that appear to have no use other than adding layers of abstraction).

    When abstraction becomes distraction, it has failed.

    the current implementation of prove is like some doctoral thesis on how to over-engineer software

    Putting the woe in O'Woe (Order of Worshipful Over Engineers).

    (At least none of the layers are (yet) hiding behind a truly enormous pile of code like if they started using Moose... *shudder*)

    The OO in s-l-o-o-w!


    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.

    RIP Neil Armstrong

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-04-19 23:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls