Programming Tips: Take a Walk
This is a simple tip that is important for programmers both novice and experienced:
When you run into a programming problem you just can’t seem to solve, take a walk.
Indeed, a major difference between experienced and novice programmers is often how much time they spend attacking a problem before they make the crucial decision to step away from their desk. Often, the worst thing you can do when you’ve run out of ideas is to simply stay at your desk, staring at your screen, hacking away at the same problem. The resulting loop of tweak-recompile-fail-repeat behavior almost becomes like some sort of programming slot machine which wholly invalidates the point of hiring ostensibly intelligent human beings to be programmers.
If you find yourself falling into the tweak-and-recompile loop, it’s time to stop yourself and change your approach. Take a short walk. Break out the old paper and pen. Redefine the problem. Maybe the best solution is a completely different approach than the one you were trying to implement.
One of the most important skills of the experienced programmer is knowing when not to code.
English
日本語
Russian Blue