Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Suspending Disbelief While Debugging

by JPaul (Hermit)
on Dec 09, 2002 at 05:34 UTC ( [id://218453]=note: print w/replies, xml ) Need Help??


in reply to Suspending Disbelief While Debugging

I find whenever I come across a bug in my own code that appears to defy logic or explaination, and its not immediately apparent what I've screwed up, then it inevitably falls into the category of a DUMB mistake.
Just one of those things, I suppose, but everytime I come across something like this... I just know its something really stupid, and I'm just not thinking well enough to spot it.

I'm kinda curious if the solution is the same for everyone else: Walk away.
I leave the programme alone for as long as possible (And, generally, depending on how nasty the code is, the longer I avoid the issue) and when I return, I return afresh. I run the programme. I get the error. I do a little debugging, and bam. There it is.
Hello, its Mr Wildly-Stupid-Muck-Up.

Anyone else share this?

JP,
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

  • Comment on Re: Suspending Disbelief While Debugging

Replies are listed 'Best First'.
Re: Re: Suspending Disbelief While Debugging
by Popcorn Dave (Abbot) on Dec 09, 2002 at 06:00 UTC
    Usually yes, the same for me too. I once caught a *very* stupid error where I was trying to assign the match of a regex in which my regex didn't have anything in parenthesis. Of course I was writing code quickly and probably thought that was the direction I was going, but after a few words that would make a sailor blush and a few hours away from it, I found it in a flash.

    The only thing I've never been able to reconcile is when my windows machine gets wonky and code that has run perfectly before, suddenly doesn't run until I reboot. THOSE errors really get you. :)

    There is no emoticon for what I'm feeling now.

      Apparently there is a Moscow to Ulan Bator flight, however the airport at Ulan Bator freezes up every now and then.
      -- Chris Ebenezer

      Have they tried rebooting?
      -- Joe Zeff

      That's "Ulan Bator", not "Microsoft Lan Manager"
      -- Paul Tomblin

      Hey! In the 7 years I ran LAN Manager, I almost never had to reboot.
      It always rebooted whenever it wanted.
      -- Carl Schelin

      Makeshifts last the longest.

Re: Re: Suspending Disbelief While Debugging
by iguanodon (Priest) on Dec 09, 2002 at 15:10 UTC
    Absolutely. Sometimes it happens when I'm debugging something and I get stuck, other times it happens during the design phase, when I'm trying to figure out data structures, etc. I find out that walking away is more efficient than sticking with it in many cases. Sometimes the answer comes to me on the ride home, or while I'm mountain biking, or mowing the lawn... then the trick is to remember the solution. I send myself emails, leave myself voice mails, or write the dreaded yellow sticky notes before that part of my brain is overwritten.
Re^2: Suspending Disbelief While Debugging
by atcroft (Abbot) on Dec 09, 2002 at 15:26 UTC
    I'm kinda curious if the solution is the same for everyone else: Walk away. I leave the programme alone for as long as possible (And, generally, depending on how nasty the code is, the longer I avoid the issue) and when I return, I return afresh. I run the programme. I get the error. I do a little debugging, and bam. There it is. Hello, its Mr Wildly-Stupid-Muck-Up.

    I would assume that is an approach that appears quite often amongst those here. It makes sense-you get handed a problem, many times with someone breathing down your neck for a solution. Like a battlefield commander, you look at the problem opposing you, skirmish along its lines in attempts to find where best to hit it, form your battle plan, attack with all your forces... and your attack fails. You regroup your forces, and charge it again... and again... and again. You continue to attack along the same lines, until your attacks form muddy ruts in which you get stuck, attacking the same point over and over. Then you withdraw-the cost has been too high for little to no ground gained. You regroup, refresh, focus on other things for a bit, possibly even get new intelligence about your foe and its actions. When you return to that problem, you now come to it with a fresh view, and seeing it anew, you spot a better target point, or think of a better attack plan, and execute it, winning the day.

    (Yes, do it all the time.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-23 22:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found