Sunday 1 July 2018

Programming references?

I must have been fortunate in that my higher education took place about the same time as the personal computer was starting to make an impact on everyday life and the world was starting to turn digital. It was a good time to be in computing -- despite what my parents thought, especially my father (bless him). Over the years I have been able to make a modest but comfortable living from IT, and so it continues.

When I started out I wanted to be a programmer, and my wish was fulfilled immediately after I had finished university. Even though I then moved into (computer) Systems Administration, I have always enjoyed programming and try to keep my hand in, even if it is only simple shell scripts which are then subsequently discarded.

Pre-university, probably like thousands of other people, I taught myself BASIC, no doubt with some common bad habits. In university, I was taught -- or was expected to learn at various times -- FORTRAN, Pascal, PL/1, SNOBOL, PDP Assembly language, and C. I subsequently picked up Intel 8086/8088 assembly language , Bourne shell scripting, and Perl. (Some of the programming reference books I used can be seen in the photo.) I briefly dabbled with C++ and PHP, but Java and JavaScript completely passed me by. Either shell scripting or Perl are my weapons of choice for repeatable systems administration tasks and projects.

In recent years, I have heard much about the scripting language Python. It is the favoured language for a number of my users, and the Debian Linux packaging system is written in it. I have received a number of requests to install new Python packages, or update existing ones. (This does not require much Python knowledge, fortunately.) Perhaps it was time that I learnt more about Python?

With this in mind, I sought a suitable reference book -- as I have found a portable, printed, read-nearly-anywhere guide had been essential in the past. I have long been a fan of the O'Reilly series of books, so this seemed like the obvious place to look. My copy of Programming Perl had served me well over the years; I wanted an equivalent written for Python. So, rather than check the wisdom of the internet and look more closely at what I was asking for, I put O'Reilly's Programming Python on my Christmas gift list...

My sister was kind enough to get it for me. What arrived was this monster volume of 1600+ pages that can be used to prop doors open. It is not such a pleasant experience to carry it any distance, and its size makes it difficult to easily keep the book open on certain pages. Had I done just a little more research, I would have noticed that it is big by the page count: 1632. And also that it should have been named more appropriately as Using Python. (Perhaps I should have been looking at Learning Python instead, all 1648 pages of it?...)

To use a bit of (Monty) Python: Stop, this is silly! The general consensus is that it is easier to learn Python than it is C, so why does it take 1600 pages to cover what the seminal The C Programming Language seems to do in 200? (I know this is being provocative, as the C book assumes a single version of the language, a Unix OS, a command line and a limited number of libraries. Things have moved on since the 1990s.)