Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Avoiding silly programming mistakes

by missingthepoint (Friar)
on Aug 21, 2008 at 11:27 UTC ( #705762=note: print w/ replies, xml ) Need Help??


in reply to Re: Avoiding silly programming mistakes
in thread Avoiding silly programming mistakes

Thanks, L~R. That first trick seems useful... I'll work hard to adopt it.

I've come across the second before as I have some C experience. Initially, I found it useful. After using it for a few months I realised I'd gotten into the habit of writing

if (constant == variable)

... so I deliberately switched back to writing

if (variable == constant)

... and I haven't made the 'one-equals' mistake since. For me it was a good mental training exercise.

Oh, and I'm reading the refactoring post now. Ta.


email: perl -e 'print scalar reverse map { chr( ord($_)-1 ) } split //, "ufo/hojsfufqAofc";'


Comment on Re^2: Avoiding silly programming mistakes
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2015-07-03 09:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (51 votes), past polls