http://www.perlmonks.org?node_id=410264


in reply to Re^2: Pearls (not really) of Perl programming
in thread Pearls (not really) of Perl programming

I am very glad that ikegami posted this, because this touches on something of a pet peeve. This should be considered by anyone who has ever added a noop to code for the mere sake of symmetry.

Considering that ikegami is someone who knows his stuff ... the (tongue-in-cheek) "deserves to be shot" remark is well taken, but also a bit discouraging because of a common tendency out there ... what is that tendency?

Programmers tend to unfairly critique (and even bully) themselves (and others) when they don't take the time to distinguish anomolies that arise from ignorance, from anomolies that arise from a justifiable desire to do things differently.

Who knows how it got started, perhaps when we were small children and told to "color inside the lines" of our coloring book ... but dammit ... what if the lines are in the wrong place to begin with? The mere fact that many many (experienced) people have done this kind of 'coding faux pas' indicates to me that there is some merit to this 'anti-pattern', and we should think twice before poking fun or shooting at ourselves when we use it.

This is not to detract from ikegami's point, but rather a tangent, in hopes that we don't stifle our own creativity in our attempts to do 'what is expected of us'.

Sometimes you just gotta color outside the lines.

  • Comment on Re^3: Pearls (not really) of Perl programming

Replies are listed 'Best First'.
Re^4: Pearls (not really) of Perl programming
by Mutant (Priest) on Nov 25, 2004 at 09:29 UTC
    I agree. I don't have a problem with coding however you want, even if that vast majority of the world considers it to be wrong. The important thing is that you have sound reasons for doing it that way (ie. the lines really are in the wrong place), that you understand those reasons, and preferably document them.