in reply to Programming Mantras

My response has less to do with mantras and more to do with the idea of wasting space.

I have a perl pet peeve that I know everyone will jump on me about, but I do it because of the need to save time during debugging.

I hate the one line conditional. You know the little villian:

$foo = "bar" if (blah eq "blue");
Funny how it takes no longer to compile or run in a multi-line statement, yet everyone wants to do it in one line to look cool. Let's say I need to add a second statement to that conditional or need to put a print statement in there to debug it. Cut and paste, cut and paste, and then cut and paste to put it back.

Okay, so maybe that is my mantra: "avoid cut and paste, avoid cut and paste..." :)


I admit it, I am Paco.

Replies are listed 'Best First'.
Re: Re: Programming Mantras
by blakem (Monsignor) on Jan 21, 2002 at 14:47 UTC
    $foo = "bar", print "DEBUG: $foo\n" if ($blah eq "blue");

    -Blake
    with tongue, firmly in cheek. ;-P