Systematic programming: an introduction
Today I found a small envelope in the mail. As far as I remember, I did not order anything of this size, lately. So I looked at the envelope. The front was filled with stamps. And my name and address in print. The back was empty, apart from a small ZIP code in writing: "3062 XE 15". For my SatNav this is good enough to knock on that door within the hour. But I'm not sure if that makes sense.
In the envelope was the book in the picture on the right. A collectors item. Yet, nothing in the envelope or the book itself that could give me a clue about the "why?" of it it all. Apparently some one wants to surprise me. And I can guarantee: you succeeded. I am surprised. Pleasantly surprised.
But, you may say, why not contact the person who lives at "3062 XE 15"? Well, I will send this person a postcard. But I wouldn't be surprised if that person is not aware of the envelope. It doesn't make sense to send a book anonymously, and then put you zipcode on the return address field...
What's in the book? Easy: this seams to be the precursor, the forefather, of all later compiler construction and programming styles tutorials. The book dates back to 1973. The year I wrote my first lines of BASIC on a TeleType based computer. Here's the contents of the book:
Programming in Modula-2
This is the masterpiece that every serious Modula-2 programmer is after. The english version is the original,
but it has been out of print for over a decade.
So mow it pays off to live in a small country near Germany: learning the language of the biggest foreign country is ideal to me. The english versions of PIM (Programming In Modula-2) may be unreachable, the german versions (which are equally good) are still available.
I got this copy through www.amazon.de. The book is in mint condition yet second hand. It has never been opened for reading. This book was money well spent. For me.
A small excerpt from the book. Mind you, this book was written in 1978, years before most of us bought their first computer:
This book assumes there is a basic knowledge of computers and the ways in which these are programmed. Still, it may be suitable to start with shedding some light on concepts and terminology. We know that -with few exceptions- programs were written, or rather: designed, in order to have them interpreted by a computer. This computer then carries out a process (a sequence of actions), based on the specification as described in the program. This process is also referred to as a calculation.
The program itself is a text. And since it usually describes a rather complicated process, which must be executed with utmost care and precision, this text in itself also must be very precisely defined. This kind of precision requires a very strict formalism. This formalism was coined the term 'language'. We use the word language, although languages normally are spoken and are much less strictly defined. Our target here is to describe the formalism (or language) Modula-2.[...]
The chapters are as short as possible and the examples are programmed as simple as possible, but not simpler. Here is one example from chapter 9:
MODULE Fractions; FROM InOut IMPORT Write, WriteLn, WriteString, WriteInt; CONST Base = 10; N = 32; VAR i, j, m, rem : INTEGER; d : ARRAY [1..N] OF INTEGER; x : ARRAY [0..N] OF INTEGER; BEGIN FOR i := 2 TO N DO FOR j := 0 TO i - 1 DO x[j] := 0 END; m := 0; rem := 1; REPEAT INC (m); x[rem] := m; rem := Base * rem; d[m] := rem DIV i; rem := rem MOD i UNTIL x[rem] # 0; WriteInt (i, 6); WriteString (" 0."); FOR j := 1 TO x[rem] - 1 DO Write (CHR (d[j] + ORD ("0"))) END; Write ("'"); FOR j := x[rem] TO m DO Write (CHR (d[j] + ORD ("0"))) END; WriteLn END END Fractions. And the output: bash-2.05$ Fractions 2 0.5'0 3 0.'3 4 0.25'0 5 0.2'0 6 0.1'6 7 0.'142857 8 0.125'0 9 0.'1 10 0.1'0 11 0.'09 12 0.08'3 13 0.'076923 14 0.0'714285 15 0.0'6 16 0.0625'0 17 0.'0588235294117647 18 0.0'5 19 0.'052631578947368421 20 0.05'0 21 0.'047619 22 0.0'45 23 0.'0434782608695652173913 24 0.041'6 25 0.04'0 26 0.0'384615 27 0.'037 28 0.03'571428 29 0.'0344827586206896551724137931 30 0.0'3 31 0.'032258064516129 32 0.03125'0 bash-2.05$OK, now you all figure out what this program text is about and what the output actually does.
The school of Niklaus Wirth
This book is a tribute to professor Wirth, written by former students, assistant professors and admirers. ALl of them have spent considerable time with professor Wirth.
Learn who made which part of which system. Who designed the hardware and why. Read about how Philips made big
profits by using the then ultra modern Lilith workstations.
Lilith and Ceres workstations were extremely powerful machines with fast and reliable operating systems and user programs. The reliability was caused by the fact that all over ETH people used them. And when there as some kind of problem, students could simply get the source, fix the error and recompile.
Now, that is something different from using MS Windows, like all the rest of the world did at universities.
The book contains many chapters and each one is from a different author. Many stories are told, clarifying
some of the development trees of the Wirthian languages.
All stories are well written, whitty and a pleasure to read. Read about the introduction of the internet in 1983 by Diser AG. But they were too far ahead of their time... The ideas were there. The Lilith computers could do it all (graphics, mouse, laserprinter, network cards) but the network system wasn't there yet.
If you admire Professor Wirth, you must buy this book. You won't regret it. I bought mine via www.amazon.co.uk.
The table of contents:
Algorithms and datastructures with Modula-2
Again, the english versions of this book were out of print and the current owners where keeping their copies. Which is perfectly understandable since I would (and will) do the same.
So I got myself a used copy in german language. Germany is just around the corner here so most dutch engineers and programmers speak and read german. Writing is a completely different story though.
The book explains in detail about the essence of computers and how to deal with this while programming the
machines. It tells about datatypes, data representations, and data mining techniques long before those words
were published in the Byte issues of the 90's.
Professor Wirth did it again: he taught about mining data, using fast and flexible algorithms, in the programming language that needs no comment lines.
I got this copy via www.amazon.de
The table of contents:
Geek of the millenium
Professor Wirth was interviewed by a professional (and knowledgable) journalist where Professor Wirth spills his beans about modern day programmers and the involved languages. This is a must read for everyone who is serious in programming: https://www.simple-talk.com/content/article.aspx?article=747 . In case the link is dead, get yourself a copy of th PDF file I created and stored locally: Niklaus Wirth, Geek of the Week.
Page created June 2004,