Wednesday, July 23, 2008

In pursuit of my scheme to replace the Grads webmaster with my own good self I have been learning the rudiments of a programming language called PHP.

It’s over 40 years now since I spent part of a university vacation being introduced to computer programming at Tube Investments in Aldridge, a suburb of Walsall, (I was as surprised as you to discover that Walsall has suburbs).

Those were the days when undergraduates were courted by British industry with expenses paid this, that and the other!

Working in SPS on the IBM 1401 I met for the first time GOTO (known as Branch in that language), an instruction that over the ensuing years I met time and time again in its various guises, and grew to appreciate highly, perhaps even to love. There is no swamp in the programming world that you can’t leap out of with a snappy GOTO to a well chosen label.

From KDF9 Usercode and Fortran in the 60s through COBOL, Plan and PL/1 in the 70’s to Excel Macros in the 90’s, occasionally brushing up against IBM Assembler and other now extinct languages I have seen the wonderful work done by GOTO.

But all that time the computer scientists and programming theorists have been scheming to do away with it in pursuit of the philosopher’s stone of the perfectly provable program. What do they offer in its place but CASE constructs, FOR loops, DO WHILE and DO UNTIL, and that most tortuous of techniques the nested IF.

In life as in binary; when you play Monopoly and land on a square that says “Go directly to jail. Do not pass Go. Do not collect £200.” You are left in no doubt. The situation is clear and unambiguous.

Or gyrating round the dance floor with a partner whose presence makes the juices rise causing you to shout in her ear above the DJ’s decibels “Do you fancy coming back to my place for a S***?” To be met with the response “Go to F***” settles the matter there and then.

Should instead the answer run along the lines of “If I decide you’re the sort of chap I fancy then if your wallet’s as big as your ego and if your pad’s not far away or else if it’s in a smart part of town then if my chum’s got a lumber or has a headache then if you can swear you’re disease free I might, or else I might not” you are likely to have felt the enthusiasm drain away and not be sure where you stand. And in addition you’ve wasted time that could have been spent trying your chat up line elsewhere.

That’s PHP; no GOTO, no labels, no escape. Getting it to work is very iffy.

No comments: