in reply to Programmer's Frustration

This is kind of a fun topic. Every 'coder' I know goes crazy when the 'coding block' hits. Deadlines loom, people get irate, and you've only written 2 lines of code that actually seem to work. Then you get the setbacks, and tempers flair... (Yes, I know it well.)
Everyone handles it differently. The method that works for me is that I try to reason it out, especially with someone that doesn't know code. I find that when I have to 'dumb down' my explainations of what's happening, what it is and isn't doing, that I ususally start to debug my problem mentally as I'm explaining it. Usually through making the other person (who usually doesn't care what your doing or why) suffer through your explainations of the problem(s), I typically encounter an "AH-HA!" The end result is that I usually have a thought about how to overcome/re-write, or start anew. The down side is that people start to think you're crazy because you hold this long boring discussion about your problem and in the middle of the explaination, you get the "AH-HA!" and run off leaving them hang. (I know I owe my wife big time to lots of these discussion... anymore, she's learned to sort of listen and just let me work it out.)
When I'm at the breaking point (AKA: Point of No Resolution) I unplug. I do anything that I can to avoid thinking about the problem (game, read, movies, draw...) That ususally allows my gray matter a chance to calm down a bit. When I do return to the problem with a fresh mind, I find that I usually can spot the obvious.
Last item: My most recent 'block' was actually a spelling mistake in a variable name in one section of a sub. It took three days of debugging to find it, and when I did I was so angry at myself. It's frustrating, but I learned my lesson (I check spelling first... at least in my code!)
Good luck coders!!!

- Mission
"Heck I don't know how to do it either, but do you think that's going to stop me?!!"

Replies are listed 'Best First'.
Re: The 'Code Block'
by toadi (Chaplain) on May 21, 2001 at 11:35 UTC
    For your spelling mistake:

    use strict;



    --
    My opinions may have changed,
    but not the fact that I am right