Now that you know about functions, you should consider all good programs to be collections of functions. Aim to keep each function simple and self-contained. Make each function correspond to an identifiable part of the solution. Minimise the amount of data shared between them. Each section of code should have a single entrance point and a single exit point.
maspjw@