When I worked at NAG – the Numerical Algorithms Group – friends and relatives often asked me what an ‘algorithm’ was. I explained that it was simply a recipe describing how to derive a given analysis from supplied data.
In statistics there have been many perfectly good algorithms for ages; Newton’s root-finding algorithm is probably best known to all of us. Originally, they might have been used on mechanical calculators such as the one below.

Leveraging modern computer languages for efficient data analysis
It is salutary to note that the use of these machines was taught to the ordinary degree student when I was at university. Quite complicated calculations were performed on these machines to aid the war effort in the second world war. The birth of the electronic computer removed the need for such labours.
Developers were quick to provide statistical packages which took the user’s data and applied given algorithms to provide the analysis they sought. These packages took from the user the need-to-know details of the algorithms used; they simply had to provide the necessary information defining their problem and perhaps any supplementary information that the packaged code might need.
The end user should not care how the vendor went about providing the package, but invariably it was computer code developed in a contemporary programming language; the earliest was Fortran. For those interested in how Fortran (FORmula TRANslation) was created, here is a YouTube explainer.
Since those long ago days, a variety of different computer languages have been implemented: I myself have used Atlas Autocode, Algol 60, Algol 68, C, C++ and Visual Basic, but most of my work has used Fortran in many different forms. The Fortran of today is not the Fortran of the 1950s; it has moved on.
In this blog I will argue that vendors and programmers should write to a standard that has been defined and agreed upon by an international standards body. Because of my greater familiarity with the language and because of the huge backlog of old code in Fortran, I will make my case by referring to this language.
Simplified user interfaces and flexible memory management
At one time, a user had to tell the package how much ‘memory’ the algorithm needed. This involved working out how many data items needed to be stored in the computer and accessed to produce the required results. The early Fortran language insisted that this be specified at the beginning of the package. It could not be changed, even if most of that memory, once used, would no longer be needed.
With the more modern Fortran, described in the book Modern Fortran explained (Metcalf, Reid and Cohen, 2018), it is possible to ALLOCATE (or ask for) space and DEALLOCATE (or free up) that space when it is no longer needed. A package using these facilities and the modern Fortran command MOVE_ALLOC doesn’t need to ask the user to give information needed by the algorithm as it can be worked out from the data provided.
Another feature added from the earlier versions of Fortran is the CHARACTER (string) type. Using the new Fortran, the developers are not constrained to stick within a limited character set and can therefore represent more complicated characters such as Kanji. The package can therefore interact with the user in his or her native language, not just using the English alphabet.
Improved code readability, easier maintenance and easier extension
Data was often entered using punched cards like this FORTRAN statement on a card found at Wikipedia.

Information was stored in a single column consisting of ones and zeros depending on whether there was a hole in that location or not. In the early Fortran, the first 72 columns were regarded as Fortran code while the columns 73 to 80 were regarded as columns to aid in sorting the cards.
Early Fortran thus insisted that lines be constrained in length and at one time in uppercase only. Later Fortran allowed ‘free-format’ and lowercase letters too. The code was becoming more readable. Additional constructs like IF … THEN … ELSE, SELECT CASE and a simplified loop facility (DO) all aided readability. If the developer can see clearly what the code is doing, errors are less likely to occur.
BIGGER (data), FASTER (speed), STRONGER (performance)
Computers would become faster and faster as technology improved. Moore’s Law stated that computers doubled in speed every 2 years. It was very much like playing music to a metronome which got twice as fast every 2 years – increasingly you finished the music in less and less time.
Developers had to do little to reap the benefits of that hardware improvement. They only needed to know that their code compiled and ran on newer, faster machines. Writing to a standard assisted that process. Clearly, any non-standard code might be rejected or treated differently on different computers or compilers, so standardized code was important.
Eventually, this model broke down as it was not possible to keep on making such improvements. As one researcher in the Clarendon Lab at Oxford said, ‘The trouble is, the speed of light is so darned slow’.
Adapting to new machines and architectures
Nevertheless, bigger problems needed to be solved and more and more data needed to be handled. Fortran acknowledged that a normal integer represented in binary as 32 zeros and ones might not be large enough to handle the problems needed. Hence, a standard larger Integer was introduced into the language. More dramatic events happened with hardware; the processor that did the arithmetic was replaced by several processors (parallel computing) all able to be harnessed by developers to compute solutions more quickly.
To exploit these architectures, the language or languages used by developers needed to evolve even more; some practices long regarded as standard needed to be abandoned. If the code has not been kept up-to-date, then such changes needed to be dramatic and very time-consuming. Constructs such as the elderly COMMON BLOCKS, and EQUIVALENCES needed to be very carefully replaced by alternative code.
The future of modern computer languages in data analysis
Looking ahead we may see a growth in the use of mixed-precision calculation where sometimes, for speed of computations, low-precision algorithms might be used. At other times extra-precision might be needed to navigate through troubled areas of a calculation. Again, the new versions of Fortran allow this; older versions generally do not. Algorithmic improvement, perhaps using automatic differentiations to calculate sensitivities or aid iterative schemes converge are also candidates for inclusion. In all such cases, a modern standard code base is an essential prerequisite for ongoing improvement.
Final words
I have outlined the benefits of keeping code standard and up-to-date with the latest developments. I’m happy to say that VSNi is aware of these needs, and work is ongoing to reap the benefits of internal improvements to the code.
About the Author
Dr. David Sayers graduated from Manchester University with a first class honours degree in mathematics, an M Sc in numerical analysis and computing and a Ph D in the numerical solution of elliptic partial differential equations.
Whilst there, he helped the numerical analysis group , headed by Prof Joan Walsh, to contribute to the nascent NAG Library. He worked alongside Dr – later Prof – Ian Gladwell who was to become major supplier of material to the library. He also acted as first-line computing support for computing users, working on the university CDC 7600, though his first experience was on Atlas using the Atlas Autocode language.
After completing his thesis David moved to Oxford to join NAG in its new offices at Oxford. David’s first role was as the numerical analyst at NAG which put him in contact not only with many giants in the field of numerical computing but also with customers seeking help with their computing problems. After his retirement he was awarded the NAG Lifetime Achievement award.