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

Re: Preferred output for development tool

by flyingmoose (Priest)
on May 06, 2004 at 20:23 UTC ( #351271=note: print w/ replies, xml ) Need Help??


in reply to Preferred output for development tool

I still don't see the need to emulate reset (or your buggy code, or why one program does two completely different things), but I understand this has been a looooooooong battle for you. I suggest you read up on some code-refactoring techniques. Some of it is rather obvious, but it may help you try to understand what we are saying and why your antiquated ways need to change. Also read up on error handling, design driven development, and so on. And debugging! If you want to watch values, use a debugger or instrument debugging hooks.

To be constructive, I'll give some feedback. I like to chain GNU tools together, and parse things (running items through sort and grep and such), so I'd do something like the following to keep parsing simple. Shiny output is of little use to machines.

iteration    variable    value
1            abcdef      foo
1            bbcdef      bar
2            sheep       zebra

or is there hope for my module?
I see little hope. Especially in that you still have a few subroutines and don't even have a module yet.


Comment on Re: Preferred output for development tool
Re: Re: Preferred output for development tool
by Wassercrats on May 06, 2004 at 20:51 UTC

    After probably more then a dozen replies to VarStructor and VarStructor 1.0 NOBODY BUT MYSELF found a single bug, except when someone spent 6 hours analyzing the code, and even then, the bugs he found would have been noticed in use only in rare occasions. And it's not as though nobody tried to find bugs. I got plenty of bogus complaints about the code.

    I don't need to get any better at debugging or testing, and my programming ways don't need to change. Anyway, all that is irrelevant to my question.

    Chain GNU tools together and parse things? The change to my script to produce the output you showed wouldn't take much time or code. Sounds like you want me to spend extra time to do it the way you would from scratch. That doesn't sound appealing.

      After probably more then a dozen replies to VarStructor and VarStructor 1.0 NOBODY BUT MYSELF found a single bug, except when someone spent 6 hours analyzing the code,
      Are you implying that since it took 6 hours of analysis to find a bug that your code must be good? I take it to mean that if it took 6 hours to understand 2 pages of code, your code needs to be rethought.
      and even then, the bugs he found would have been noticed in use only in rare occasions.
      But still a bug. If you're planning on releasing this to CPAN, why not make it as robust as possible?

      I know you would dismiss an in-depth discussion about how you can't parse Perl with regular expressions as just "academic" and therefore stupid. If you're really interested, find a book on formal language theory and models of computation. The point is that not being able to parse Perl with regular expressions is a fact. You whine and whine about how lexicals and use strict are so restrictive, but now anyone who uses this code you release will be restricted to the coding style that are recognized by your basic regexes.

      And it's not as though nobody tried to find bugs. I got plenty of bogus complaints about the code.
      The complaints were valid, they just weren't bug reports. Someone telling you that your code is crap is not necessarily "bogus." In this particular case, it's spot-on.
      I don't need to get any better at debugging or testing, and my programming ways don't need to change. Anyway, all that is irrelevant to my question.
      You're right, it is. And I think we all know that it's hopeless to try to convince you of pretty much anything about your code.
      Chain GNU tools together and parse things? The change to my script to produce the output you showed wouldn't take much time or code. Sounds like you want me to spend extra time to do it the way you would from scratch. That doesn't sound appealing.
      If you already know how to do it the best way, why post in SOPW?

        I posted in SOPW to ask whether I should use a simple output style. You said I should. Fine. But, I disagree with your unspecific comments about chaining GNU tools.

        But still a bug. If you're planning on releasing this to CPAN, why not make it as robust as possible?
        No. I'll make it as robust as practical and as robust as necessary to be a good module. It's not a module yet, though it's already robust enough to be useful, even before taking the two minutes I'd need to fix the bugs.

        You can certainly parse Perl well enough to do what I'm doing, and I've demonstrated that. The proof is in the code, and the code is here.

      Howdy!

      I don't need to get any better at debugging or testing, and my programming ways don't need to change. Anyway, all that is irrelevant to my question.

      <VOICE "Bill Cosby">Right!

      Hubris is one of the virtues of a programmer. This isn't hubris. This is "stick my head in the sand". This is "stick my fingers in my ears and say 'I can't hear you'". Hubris does not mean you claim personal perfection. You make that claim, and, like most such claims, it is just flat wrong.

      You need to step back and chill out, dude.

      If this were Usenet, people would be commenting on the tightness of the death spiral. Pull up! Pull up!

      No, wait. Roll out, *then* pull up! You keep pullin up, but all it does is make the spiral tighter. Pretty soon, the wings come off.

      You seem to have gotting yourself heavily invested in this tool thingy. You come asking for wisdom, but you do worse than ignore it. You are like the guy trapped by floods who spurned two boats and a helicopter come to rescue him saying "God will save me". When he then gets a chance to ask God why he didn't, God says "I sent two boats and a helicopter. Whadda ya want?"

      I'm getting tired of downvoting your nodes -- the ones that really deserve it. It's not fun. When more than half, and perhaps two-thirds of all the nodes you have written have a negative reputation, one has to wonder. The big foam clue bats are getting ratty from the amount of use they have gotten on your account.

      yours,
      Michael
        Exactly.
        When one person tells you you're drunk, just shrug it off. When ten people tell you you're drunk, then sleep it off.

        --
        [ e d @ h a l l e y . c c ]

        You said NOTHING.

        I came asking for wisdom, but not any old wisdom that works for you regarding programming style. I asked for something specific. If you want to throw in a bonus answer, have something to back it up relating to the code I posted. If you can't determine that my script is broken, and if you don't know of a better way to accomplish what I want to accomplish, and if it looks like my script will be useful, then there is nothing for you to do except to answer my specific question and thank me for building a debugging and logging tool that every single Perl programmer would have a use for.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2014-08-20 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (121 votes), past polls