Thinking in code · Finding bugs

What does this program do?

Before you can tell whether a program is right, you need to say in one sentence what it does.