Programming

1.  Programming experience: Although I had some very slight "programming" experience with mainframes - Algol and Lisp, fed by punch-cards, with an output on sheets of dot-matrix printers - and with AppleBasic of the year 1980, I first learned to program somewhat decently in 1988, with one of the first versions of Borland's Turbo Pascal.

I liked programming a lot and still do, for I like mathematics and I like to understand what computers do. Also, it turned out to be very often quite convenient: There are lots of things you might want to do with a computer, and which are relatively easy - but only if you know how to program.

So I have written lots of programs in lots of programming languages. Most of these programs were small and fairly to very useless, but I have written several programs of several ten-thousands of lines which were quite useful for my own purposes and which I could not have satisfied, there and then, except by programming.

I have very briefly or quite lengthily worked with GWBasic, Visual Basic, Turbo Pascal, Turbo Prolog, Turbo C, Turbo Assembler, Dbase, Paradox, Smalltalk, C++, Java, Visual Prolog, and Delphi.

There will be more extensive files on aspects of these languages elsewhere, but here I want to give some brief appraisals of the above systems (which have many versions, of which I usually did not use more than 1 or 2) and of how programming changed quite radically.

2. A radical change in programming: First the radical change, since it is most important.

It is OOP: Object-Oriented Programming. Until a few years ago this was not so much OOP as OOPS, where the added "S" stood for "Style" and any programming language presented its own supposed OOP-Style, which usually involved a lot of tech-talk and hardly any useful results, since the language wasn't really fit for objects nor its compiler written around it.

At present - 2000 - I suppose MicroSoft's Visual Basic is the best known OOP-system, and it is well worth dipping into, but the best I have seen is Borland's Delphi, which is object-oriented Pascal, and quite amazing for anyone who has ever laboriously programmed DOS-interfaces: Where one had to fight with the OS and the compiler for several months in the old days in order to get a useful interface for a complicated program, in Delphi you do a couple of minutes of dropping and dragging, and Delphi writes an interface for you that is better than any you could produce yourself a few years ago in months of hard work.

Besides, what is known as the Developer's Interface - editor, helpfiles, compiler and linker etc. - has spectacularly improved as time passed and processor-speeds got up and harddisks got larger.

The result is that programming is quite different from what it was 5 or 10 years ago, since much of it has been automated and can be safely left to Delphi or Visual Basic.

3. About programming languages: Second, as promised a brief appraisal of the languages I have worked with.

Basic dialects: For some reason or other, I never liked Basic. In part, this has to do with its old syntax, goto statement and other nonsense that since has disappeared, and in part with its interpreted status. With Visual Basic both aspects are a lot better, but it remains an interpreted language, and still strikes me as the dumb man's guide to programming. (This may be why Bill Gates loves it.)

Pascal dialects: From the start, I liked Pascal far more than I liked Basic, for it seemed much more logical than Basic. As soon as I discovered Turbo Pascal I gave up the Basic of the day (GWBasic), and in fact learned to program tolerably well in Borland's Turbo Pascal.

The latest incarnation of Pascal is in Borland's Delphi, and Delphi is a Good Thing, that also makes programming totally different from what it was in the old Pascal days, since so much can be left to Delphi's pre-programmed classes and objects that in earlier days one had to write laboriously oneself.

Prolog dialects: As it happens, I know a lot of mathematical logic, and Borland's Turbo Prolog was quite a pleasant surprise: a computer language that looked like first-order predicate logic. I programmed a lot in it, also because it tended to need far fewer lines for the same result as did Pascal and C, and upgraded as Borland gave up Turbo Prolog and resold it to its Danish originators, who kept developing it to its present incarnation Visual Prolog.

As it happens, Visual Prolog is interesting, but it doesn't compare well to Delphi or Visual Basic. The reason is probably mostly monetary: Visual Prolog is developed by a few people, while Delphi and Visual Basic are developed by hundreds or thousands. The end-result is that while Visual Prolog is a bit like OOP, it is far less easy to work with than Delphi.

Smalltalk: More or less the same as applies to Visual Prolog applies to Smalltalk: Five or ten years ago, Smalltalk seemed to have great promise because it incorporated the first true and useful OOP-style of programming, but since then it has been developed by few, with the result that its better known competitors have slicker systems that are easier to learn and work with.

Assembler dialects: I have done a little Turbo Assembler, and would recommend anybody who is serious about understanding computers to do the same. In the old days of DOS, it often was necessary to write a program or part of it in assembler, for else it would be either too big or too slow to run. These days, this is hardly ever necessary, and so the interest of assembler is mostly academic.

C dialects: As I liked Pascal and Prolog, and didn't like Basic, I also didn't like C. The main reason is its syntax, which produces code which is solidly unreadable as soon as it is long enough to start to be a useful program. The advantage of C was that one could write smaller and faster programs in it than in other languages, but these days these advantages are far less important than when processors were on average in the 8 Mhz instead of the 400 Mhz speed range.

Java dialects: Java is a sort of simplified C++ developed by Sun for the internet. Like Basic it is an interpreted language, and it can do a lot to make one's internet pages come alive.

Since I don't like the syntax of C, I don't have much of a taste for Java, but it is more readable than is C. Also, there are several neat OOP-style developing environments for Java, that take away much of the pain of having to write, read and debug C-like code. (And as is normal in my experience, Borland's JBuilder seems much better than MicroSoft's J++, and indeed the latter thoroughly fucked up my hard drive some time ago.)

Database languages: Dbase and Paradox refer to database-programs which include their own programming languages fit for working with databases. (Other well-known one are SQL and Fox.)

I spend some time learning some of these, but they seemed to me a waste of time in that a general purpose programming language should be able to achieve the same often with less fuss, at least if you know how to program. This still seems to me to be the case, and indeed learning Delphi seems to me a much wiser investment.

4. The moral and mathematical experience of programming: The nice thing about programming is that it is applied mathematics, can be applied to very many topics, and admits rapid what-if analyses, calculations, and mathematical modelling.

In this sense, programming is in many ways a Leibnizian dream come true: a universal mathematical language (or family of languages) dedicated to the practical solution of problems in reasoning of any kind.

But programming is also a moral experience: Since the program you write is executable and meant to be, and since being human you make mistakes all the time when writing code, programming shows you what it is to be human and what it means in practical terms to yourself to be fallible and limited.