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

Re: Avoiding silly programming mistakes

by dragonchild (Archbishop)
on Aug 20, 2008 at 23:01 UTC ( #705675=note: print w/replies, xml ) Need Help??


in reply to Avoiding silly programming mistakes

I have ,c aliased to :!perl -wc %^V^M in vim. My fingers know that sequence better than they know any other sequence, and they should - I obsessively type it every 3-5 lines I type and every 2-3 lines I edit. ALWAYS. My template is:
package XXX; use strict; use warnings FATAL => 'all'; 1; __END__
(Yes - every single piece of code I write has warnings throwing fatal errors.)

What these two practices do make it very easy to find the lines that have caused any problem. They would have made it very easy to find your error and they make it very easy to find other errors, too.

There's a number of other practices that help as well, but those are for another post.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://705675]
help
Chatterbox?
[Corion]: Nice to see that the kids have some understanding of important things that happen and the appropriate behaviour :)
[marto]: at times mine surprise me with this behavior :)
[Corion]: I mean, in a way it would be nicer+easier if they always where that obedient, but it's comforting to see that they are when it matters, at least for now ;)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2016-12-08 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (138 votes). Check out past polls.