Algorithms and program code

In previous chapters we briefly introduced algorithm construction and the C programming language. Although these are independent languages, it is important that both are applied when planning and building software and, even more importantly, that they correspond to each other one-to-one. The graphical presentation of an algorithm as a flowchart is a model of the program that describes the program code visually and simply. From the flowchart it is easy to see logical errors made while planning the system behavior, and it also greatly simplifies other people's (and the programmer's own) understanding of the program structure and operation. Of course, the program code must be derived from the algorithm, and the correctness of the algorithm alone does not automatically guarantee the correctness of the program code. Common practice is that errors are fixed in the program code, but the graphical algorithm is no longer updated afterward. This is not the right approach, because then the program model and the software code are no longer aligned. Although at first it may seem that time is saved, later, when you need to find fundamental errors in the program or when other people (including the programmer after some time has passed) need to understand the program in general, the time loss is much greater.

The following image shows how the graphical representation of the algorithm (right) is related to the program code (left).

en/programming/algorithm_code.txt · Last modified: by 127.0.0.1
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0