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

Re: Programming Mantras

by jonjacobmoon (Pilgrim)
on Jan 21, 2002 at 07:00 UTC ( [id://140295]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-03-29 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found