Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^6: Avoiding silly programming mistakes

by JavaFan (Canon)
on Aug 23, 2008 at 11:43 UTC ( [id://706403]=note: print w/replies, xml ) Need Help??


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

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^6: Avoiding silly programming mistakes

Replies are listed 'Best First'.
Re^7: Avoiding silly programming mistakes
by dragonchild (Archbishop) on Aug 23, 2008 at 19:13 UTC
    The OP was about avoiding silly programming mistakes. The responses given do that. The OP has since clarified the question, but that doesn't change the usefulness of the initial responses.

    I use Perl in order to avoid classes of potential errors, such as dangling pointers. I use certain modules (such as DBI) to avoid other classes of potential errors (such as SQL injection). Then, there are the ways to improve using Perl to avoid other classes of errors (such as = in a conditional test vs. ==). After that, there is experience which is what the OP was attempting to ask for. That's what my response addresses.

    As for this thread . . . have you ever tried to explain something to someone 10 years younger than you? That feeling of "Why can't you just understand the deeper subtleties" is what we're feeling right now with regards to your responses.


    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?
Re^7: Avoiding silly programming mistakes
by grep (Monsignor) on Aug 23, 2008 at 18:20 UTC
    So you're homeless and you walk up to a soup kitchen. You ask "Can I have something to eat, it would solve my hunger problem.". They hand you potato soup. You reply "I don't like potato soup".

    There response is "Potato soup is high in calories and our nutritionist says it's the best food for someone in your situation. We've chosen this as the best food and everyone else seems to like it."

    You may not like it. It may not be what you were looking for. But many people have thought about the problem longer than you have and they have come up with a good solution.

    If you would like to add to the menu, that is great. If people like it they'll do it. But complaining about volunteer help with strawmen (seatbelt analogy) and ad hominem (borg comment) attacks is pointless.

    grep
    One dead unjugged rabbit fish later...
Re^7: Avoiding silly programming mistakes
by Your Mother (Archbishop) on Aug 24, 2008 at 03:43 UTC

    These were the questions asked in the OP --

    What are your strategies for avoiding those 'doh' moments? ...are there things I could do now to reduce the number of silly mistakes I make?

    -- not how to avoid object destructor confusion which is a solved issue. use strict and use warnings might be a bit trite but it is the best advice to a newbie who asks for newbie advice, not "use 4-arg substr instead of lvalue substr" or almost any of the rest of the PBP. Which for the most part would not be good advice but showing off.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-23 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found