One of the best lessons I learnt from my first boss was: “when your code doesn’t behave as expected, don’t use the debugger, think.” Can't entirely agree. I'm not a grizzled programmer, so sometimes when I'm coding for microcontrollers the debugger winds up teaching me about some new quirk in architecture. It's often something I was aware of (endianness, some of the finer details of addressing) but had not yet actual…
It drives me nuts when people 'fix' things by making the symptom go away without understanding what causes that symptom in the first place.
Want to write some code? Get away from your computer
31–40 of 64 posts
Re: Want to write some code? Get away from your computer
#32Earlier quoted context omitted.
It drives me nuts when people 'fix' things by making the symptom go away without understanding what causes that symptom in the first place.
When used correctly a debugger will help you unravel the root cause of a problem, I don't see using one as a route to just fixing symptoms.
Re: Want to write some code? Get away from your computer
#33Re: Want to write some code? Get away from your computer
#34I find I solve the trickiest problems in one of three places: Walking my dog, taking a shower, and laying in bed trying to fall asleep. I find that stepping away from the keyboard, and my programming environment entirely, allows me to let go of all the basic assumptions I hadn't even realized I'd been making.
I think you are right, about letting go of all assumptions, and that helps you find the edge cases.
Re: Want to write some code? Get away from your computer
#35One of the best lessons I learnt from my first boss was: “when your code doesn’t behave as expected, don’t use the debugger, think.” Can't entirely agree. I'm not a grizzled programmer, so sometimes when I'm coding for microcontrollers the debugger winds up teaching me about some new quirk in architecture. It's often something I was aware of (endianness, some of the finer details of addressing) but had not yet actual…
Re: Want to write some code? Get away from your computer
#36I find I solve the trickiest problems in one of three places: Walking my dog, taking a shower, and laying in bed trying to fall asleep. I find that stepping away from the keyboard, and my programming environment entirely, allows me to let go of all the basic assumptions I hadn't even realized I'd been making.
Any time they had a problem they couldn't figure out, they'd come to me and ask me to help with it.
My trick was to listen to their problem and then go take a walk. Our office was in a nice area with plenty of sidewalks. So, I'd get the details of the problem and then go take a walk for about a half hour while I thought about the issue.
After the walk I was able to sit down and my computer and implement whatever weird thing it was.
These days I do work from home (freelance) so I find myself pacing around my house while trying to figure out something odd. I think I've worn a groove in the grass at this point.
It really does do wonders for the brain.
Re: Want to write some code? Get away from your computer
#37One of the best lessons I learnt from my first boss was: “when your code doesn’t behave as expected, don’t use the debugger, think.” Can't entirely agree. I'm not a grizzled programmer, so sometimes when I'm coding for microcontrollers the debugger winds up teaching me about some new quirk in architecture. It's often something I was aware of (endianness, some of the finer details of addressing) but had not yet actual…
Sometimes good old pen and paper is the best solution when you find yourself getting into a bind. Other times, stepping through the code and watching what happens to the data/memory is the way to go.
Re: Want to write some code? Get away from your computer
#38Earlier quoted context omitted.
When used correctly a debugger will help you unravel the root cause of a problem, I don't see using one as a route to just fixing symptoms.
A poor developer uses his tools to cover up the symptoms. A good developer fixes the root cause. The ability of the good developer to fix the root cause quickly and efficiently is bounded by the quality of their tools. If you want to claim that a good developer will find it no matter what, fine, but don't tell me the developer with better tools won't be able to do it faster ; it's almost the definition of "better too…
It's just the catalyzing power of the internet that drives people to the extreme of insisting one should never, ever use a debugger. Or a plane.
Re: Want to write some code? Get away from your computer
#39"Step Away From the Computer" or "Hammock-driven Development" by Rich Hickey (author of Clojure): http://clojure.blip.tv/file/4457042/
Marvin Minsky said in his influential paper Steps Toward Artificial Intelligence that "everyone should know the work of George Pólya on how to solve problems." - Wikipedia
Re: Want to write some code? Get away from your computer
#40I find I solve the trickiest problems in one of three places: Walking my dog, taking a shower, and laying in bed trying to fall asleep. I find that stepping away from the keyboard, and my programming environment entirely, allows me to let go of all the basic assumptions I hadn't even realized I'd been making.