Computer ProgrammingElegance I have always felt that computer programming could be as elegant an expression of life experience as could poetry. ![]() One of the "games" then available on the Spectrum was a flight simulator. I choose the World War II Spitfire. I wondered, as I was lining up on the runway for takeoff, how realistic the programme really was. So I decided, there and then, to retract the undercarriage. Quick as a flash, a message came up on the screen: "You pranged the kite". Fair dues. Nicely anticipated. Now, that is elegant programming, even if my modern MS spellcheck can't understand the verb prang. Lotus flower .. ![]() I remember onetime in work when we had a Lotus spreadsheet add-on under licence and the licence ran out without anyone noticing. One day the add-on suddenly didn't work and this was a crisis as it was essential for the daily management of a mega-buck debt programme . Lotus were phoned. They would not give a fix over the phone but said they would post (snail mail) an uptodate version. The crisis remained. What would we do in the meantime. I was asked to have a look at the programme and see if I could work out some sort of fix. I started the hard way, looking at possible reverse engineering solutions, but, nothing worked. Finally, after about two hours of complete frustration, I wondered if the termination date of the licence might just have been included somewhere in the configuration text file. Surely not, I thought, not in a major commercial product. But surely yes when I looked into it. There it was: a simple text date. I changed the date to 30 years hence and the add-on purred. Now that is crap programming. Son et Lumière The family went to Paris in 1988 and I took the lads, 9 and 11 years old, to Cit� des Sciences, the then latest cutting edge presentation of the sciences to the population at large. On the whole it was very disappointing. A lot of posters and presentation but limited enough hands on stuff. I had found the Petit Palais in central Paris much more enjoyable many years before: it was much more plain physics but very hands on and exciting. ![]() The computer said "ventillateur" [fan]. I stopped and thought. If it was simply taking a voice pattern did it matter what I said as long as I was consistent at the end of the day. I said "fan". The lads looked uncomfortable, the Da was about to make a fool of himself. The queue looked cynical, what does this idiot think he's doing, is he deaf? The computer said "lumi�re", I said "light". The computer said "radio" with a French accent, I said "radio" with an Irish accent. The queue were becoming irritated waiting their turn while this messer messed about. Voice pattern registered, I said "light", the light lit. I said "fan", the fan spun. I said "radio" with an Irish accent, the radio spoke French. A small linguistic victory over the empire. We left happy, a bounce in our step. The Aer Rianta Virus I was familiar with the slogan "Burn everything English bar their coal" from my youth. I never thought it would lead to the demise of the British embassy in Dublin in 1972, but there you are. You may be more familiar with the phrase "bringing coals to Newcastle" which meant bringing to people what they already had plenty of (pace Sir Winston). Anyway, all you need, to appreciate the irony of this story, is to know that Bulgaria was for a while the main source of computer viruses. ![]() When I arrived at the Bank, in Sofia, the floppy was checked for viruses before being uploaded to the Bank's own computer network. Bells rang and lights flashed. The disk was contaminated. Left unchecked it could have undermined the support system for the meeting. I was mortified. But I was also worried. Did it mean that the office network in Dublin was also contaminated. I tried to figure it out. I had a few other floppies with me which had been formatted in the office and tests on these proved negative. The office was safe. The Bank was now safe. But where did this virus come from? ![]() Frantic calls were made to Aer Rianta, the airport management company in Dublin, and these finally produced a very sceptical person who, after much persuading, undertook to raise the matter pronto with his computer central. I sure hope he did. I would like something good to have come of my "bringing coals to Newcastle". Byte rules, OK? I recently visited Hickey's Home Focus shop (near the Northside Shopping Centre) to buy two small tubs of pink dye. I eventually found five of them on the display stand and brought two over to the counter to pay. ![]() "Why is that?" "Well, the computer tells me I only have one in stock and it won't let me charge the second one on the cash register." "But there are another three on the shelf." "Perhaps, but the computer doesn't appear to know that." "I could understand it telling you there were still some in stock when the shelves were in fact bare; people are always nicking stuff; but the other way round?" To be fair, the senior assistant, with due disregard for the wonders of modern comptomoting, managed to override the cash register and I departed with my two dyes. A victory of sorts for the human over the machine. Subsequent defeat at home, however, when the purchase not only dyed, it ran! Projecting ![]() The guy turned up to give the talk. There was the usual kerfuffle at the top of the room while all the equipment was plugged in, turned on and linked up. I don't know whether it was due to a mismatch between his computer and the library projector, or whether the projector was just feeling used and rebelling, but the picture came up on the screen upsidedown. The organisers tried to sort it. Self-appointed geeks from the audience had a go but to no avail. I had got to the stage of resigning myself to hearing a straight talk without pictures. Not a bad thing in itself, but this talk was about the pictures, and would fall flat on its face without them. Then someone had a non-geek brainwave which solved the problem at a stroke, and we all enjoyed an extremely interesting talk, Solution: turn the projector upsidedown. (Fortunately it was a table-top and not embedded in the ceiling.) Another small victory. [Update: I subsequently found out, years later, that there is a simple menu item in the projector to do this. But my recollection it is not called anything as simple as "upside down", so the self-proclaimed geeks from the audience missed it.] [Footnote: Raheny library (Dublin 5, Ireland) is a fantastic community resource and staffed with dedicated personnel. Just for the record.] Hacking Hacking now has a reputation as a disreputable and malicious activity but it was not always so. Hacking was a hobby and a challenge. The hacker was usually neither trying to steal or damage, only outwit. Much hacking is akin to straight programming and is simply rising to a challenge. It is good for the brain and does no-one any harm. ![]() My hacking was all done on the back of the MS DOS operating system. When Windows came along the whole thing got more complicated and I just gave up. As far as I was concerned there wasn't any moral dilemma involved. This was not an honour system like the old shareware which didn't have any built in protection but if you ended up using a programme regularly you were honour bound to contribute to the author. The programmes I'm talking about did have built in protection: you could use the programme, say, thirty times or up to the end of the month following that of the current issue of the magazine concerned. Both of these conditions were vulnerable to hacking. The first required the programme to secrete an index number somewhere on your system and increment it each time you used the programme. A review of the "increment" instructions usually revealed the locus of this instruction in the programme very fast. Equally, timebound use required the programme to get the current date from the system and this could also be quickly traced. It only remained then to replace whatever "abort" instruction the programmer had put in with a "do nothing" instruction and the programme was yours for eternity. In effect the vendor had issued a challenge by inserting the protection and if the hacker got round it the programme was the prize. How simple was life then. |