Implementing algorithms
Introduction
We know that there are different ways of producing an algorithm. We have already looked at two of them, flowcharts an pseudo-code.
The next step
What you need to do now is to get some practice writing algorithms and then 'dry run' them on paper. This means putting some data into the flowchart and checking that the correct paths are followed through the diagram, which is often easier said than done! Flowcharts can become quite complex and therefore difficult to follow and debug. This is another reason why we try to write programs using the modular approach. Smaller, self-contained procedures and functions (each of which have one job) can be described using algorithms a lot easier than big blocks of code with many jobs to do. They are easier to understand and follow, and also easier to dry run, test and debug.