This paper is marked $\texttt{EWD117}$. (It's a bit smudged on this...

**Edsger Wybe Dijkstra** (1930 - 2002) was one of the most influent...

**Ludwig Eduard Boltzmann** (1844 -1906) was an Austrian physicist ...

**George Boole** (1815 -1864) was an english mathematician and phil...

It might be useful to understand the landscape of programming langu...

Dijkstra picks the problem of finding the factors of a number as an...

If you are curious, in most cases your laptop could probably factor...

Dijkstra understood that up until then language design was to a lar...

This “recipe” might seem rather obvious and intuitive nowadays. Wel...

`ALGOL 60` (short for **ALGO**rithmic **L**anguage 1960) was a prog...

Without algebraic expressions to just simply add 2 numbers you migh...

`goto` performs a one-way transfer of control to another line of co...

This is commonly known as the [Halting problem](https://en.wikipedi...

Without algebraic expressions to just simply add 2 numbers you might have to do something like:
```
mov eax, 5
mov ebx, 6
add eax,ebx
push eax
ret
```
This is understandably much more error prone than just writing `5+6` in a language that supports algebraic expressions.
This paper is marked $\texttt{EWD117}$. (It's a bit smudged on this page, but clear on the other pages.) Dijkstra marked all his papers like this, in chronological order, and there's a complete archive at https://www.cs.utexas.edu/~EWD/.
This is commonly known as the [Halting problem](https://en.wikipedia.org/wiki/Halting_problem).
If you are curious, in most cases your laptop could probably factor a 20-digit number within a second. 20 digit semiprimes (product of two prime numbers) with 2 large prime factors are the worst case scenario and might take around a minute to factor.
Dijkstra picks the problem of finding the factors of a number as an example. Even at the time it was certainly not an obscure problem, but It should be noted that this was published more than 10 years before the *New Directions in Cryptography* paper by Diffie and Hellman. This was the paper that would kickstart public key cryptography which would eventually bring a whole new importance to the problem of finding the factors of large numbers.
`goto` performs a one-way transfer of control to another line of code, and it tends to make programs rather harder to analyze. Dijkstra was certainly not a fan of `goto` statements. He would go on to write a letter entitled [A Case against the GO TO Statement](http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF)
**Edsger Wybe Dijkstra** (1930 - 2002) was one of the most influential computer scientists of the 20th century. He was born in Rotterdam, Netherlands and studied theoretical physics at Leiden University.
He is considered one of the most important members of computer science’s founding generation and influenced the discipline from both an engineering and theoretical perspective.
![Dijkstra](http://cs-exhibitions.uni-klu.ac.at/fileadmin/template/documents/picture/EWD_thinking_1963.jpg)
Dijkstra understood that up until then language design was to a large extent mostly concerned in getting the most out of hardware. Computers were getting better and better every year. The power of the human brain would however remain unchanged. As a consequence, it made a lot of sense to design programming languages that, by design, would help us better deal with the shortcomings of the human brain.
**Ludwig Eduard Boltzmann** (1844 -1906) was an Austrian physicist who largely advanced the field of statistical mechanics. His work involved a good deal of dense mathematics and at first instance one might judge Boltzmann's work to not be as elegant and neat as Newton’s work on mechanics or Faraday’s work on electromagnetism. That said, that has probably more to do with the field Boltzmann focused on rather than his abilities as a physicist or mathematician.
![Boltzmann](https://upload.wikimedia.org/wikipedia/commons/a/ad/Boltzmann2.jpg)
**George Boole** (1815 -1864) was an english mathematician and philosopher. Boole is best known for introducing Boolean algebra in his books *The Mathematical Analysis of Logic* (1847) and *An Investigation of the Laws of Thought* (1854).
If you want to dig deeper into Boole’s work it might be worth it to take a look at [An Investigation of the Laws of Thought](https://www.gutenberg.org/files/15114/15114-pdf.pdf).
It is interesting to note that at the time Dijkstra wrote this essay there weren’t that many languages that had an explicit boolean data type (for instance, Common Lisp used an empty list for false and any other value for true). In fact, ALGOL 60 (which Dijkstra mentions later on) was one of the first programming languages to provide an explicit boolean data type and logical operators.
![Boole](http://i.imgur.com/5gUw4zj.jpg)
*George Boole*
It might be useful to understand the landscape of programming languages at the time Dijkstra wrote this (1965).
Back then, a lot of programmers were still spending a great deal of their time writing symbolic machine instructions. Computer resources were scarce and programmers often had to rely on hardware specific tricks in order to accomplish their goals while not exceeding the limited memory and disk space.
The first `FORTRAN` (FORmula TRANslation) compiler was released in 1957 and it promised the speed of low level programming and the ease of coding of a high level language. `FORTRAN` did accomplish a lot of its promises but it still lacked a few features useful for structured programming (a term coined by Dijkstra). For instance, `FORTRAN` lacked full block structuring i.e. the ability to isolate variable names in program blocks (`FORTRAN` only allows such isolation to one sublevel). `ALGOL` (1958) would be the first language to get full block structuring.
This “recipe” might seem rather obvious and intuitive nowadays. Well, that is in no small part due to Dijkstra and is efforts to try to convert the programming community to structured programming. It is important to remember once more that Dijkstra wrote this in 1965. At that time programming usually meant writing machine code from scratch for a specific piece of hardware.
`ALGOL 60` (short for **ALGO**rithmic **L**anguage 1960) was a programming language developed by researchers in the United States and Europe. It was used mostly in research (it lacked for instance native I/O facilities which made industry adoption harder).
### Procedures
Dijkstra mentions static properties, in other words the ability to isolate variable names in program blocks that are organized in an hierarchical structure. We can see an example of that in the `ALGOL 60` program below:
```
boolean procedure PRIME(x); integer x;
begin integer i; boolean pr;
pr:= x - 2 * (x / 2) != 0;
i:=1;
for i:= i+2 while i**2 <= x and pr do
if x - i * (x / i) = 0 then pr:=false;
PRIME:=pr
end;
```
Dijkstra also mentions the ability to call a procedure from within itself. We can see an example of that in the `ALGOL 60` program below.
```
real procedure POWER(a,n); real a; integer; n;
begin
if n = 1 then POWER:=a
else POWER:=a*POWER(a,n-1)
end;
```