This recipe might be introducing some readers to a concept they would like to avoid: software engineering. It's true, you are probably writing scripts to quickly get a task completed, but if your script is to be used by other people (or for a long time), its great to catch errors early when they occur and prevent program misbehaviour.
Let's look at a step by step example using a program ...