What's your Modus Operandi for solving a (programming) problem?

language-agnostic

Solution

Step away from the computer and grab some paper and a pen or pencil if you prefer.

If I'm around the computer then I try to program a solution right then and there and it normally doesn't work right or it's just crap. Pen and paper force me to think a little more.

Problem

While solving any programming problem, what is your modus operandi? How do you fix a problem? Do you write everything you can about the observable behaviors of the bug or problem? Take me through the mental checklist of actions you take. (As they say - `First, solve the problem. Then, write the code`)

Original source