Short Course in FORTRAN Programming Methodology

You want to obtain good solutions to a problem as fast as possible and there are a number of programming methods which will help you to do so. The most important consideration is to keep your thoughts clean, modular and hierarchical. The only way humans can solve complex problems is by means of breaking them down into smaller ones. This is applied recursively until you finally reach the level of trivialities: the problem is solved. In exactly the same way you should construct your programs: define blocks which attack a particular task. In order to solve some well-defined task, one such block will have to call upon other well-defined tasks. These blocks of work should be made into FORTRAN subroutines (or functions). As a rule no subroutine should be more than about one (with an absolute maximum of two) pages of FORTRAN. The less skilled you are, the smaller the subroutines should be. For a beginner 5–10 lines of code is a reasonable size.