Thinking in code · Step by step
Most programs that go wrong do exactly what they say; the trick is finding where that differs from the plan.