Last year I was taught “Object Orientated Design and Programming” as part of my Birkbeck MSc, using Groovy, a dynamic functional language built on top of Java and running on the Java VM.
I enjoyed it and liked Groovy – I went on to write some pieces of software for my MSc project using it.
But it also gave the impression of being a dying language and there were some complaints from fellow students who thought C# or Java itself would have been a better bet for them jobs wise (to which one of the lecturers responded with admirable chutzpah with a suggestion of using Lisp in the future).
This last week I have again been dabbling in Groovy and I get a sense that the language is suddenly back in fashion and its community of users seems more energy charged than a year ago.
Nothing scientific to back that feeling up with, just my judgement.
If you are old enough, like me, to remember the Cold War before the days of glasnost and perestroika, you will also recall that one of the strategic weaknesses of the Soviet Union was that it was forced to steal and copy advanced western technologies, seemingly unable to invent them itself.
In many cases that was plainly true – spies stole the secrets of the Manhattan Project to give Stalin his atomic bomb (though Soviet scientists devised H-bomb mechanisms independently).
But in the case of computing, the decision to copy the west was a deliberate and conscious one, taken despite real skill and specialism existing inside the Soviet Union. A while back I wrote about how Soviet computer scientists appeared to be some years ahead of the west in the study of certain algorithms that are important for operating system management. In hardware it was not that the Soviets had a lead – but the first electronic computer on continental Europe was build in the Soviet Union and was based on independent research – but they certainly had real know-how. What killed that was a decision by the Soviet leadership to copy out-of-date IBM machines instead of continuing with their own research and development.
All this is recounted, in novelised form, in the brilliant Red Plenty. The book highlights the role of Sergey Alekseevich Lebedev, the Ukrainian known as “the Soviet Turing“. Like Turing, Lebedev was taken from his work (as an electrical/electronic engineer rather than a mathematician) by the war and played an important role in Soviet tank design. Afterwards he returned to his studies with a vengeance and by the mid-fifties he was building some of the world’s fastest and, arguably, the best engineered, computer systems – the so-called MESM (a Russian acronym for “Small Electronic Calculating Machine”.)
Yet today he does not even appear to rate an entry in Wikipedia.
The Soviet computer industry was not just killed by poor decisions at the top, but by the nature of the Soviet system. Without a market there was no drive to standardise or commoditise computer systems and so individual Soviet computers were impressive but the “industry” as a whole was a mess. Hopes that computers could revolutionise Soviet society also fell flat as the centralised planning system ran out of steam. Switching to copying IBM seemed like a way of getting a standardised system off the shelf, but it was a blow from which Soviet computing never recovered.
Well, the hex editor still feels like a death march project but “I’ve started, so I’ll finish” and I have made a little bit of progress today, and it handles unicode characters (see screenshot). I am not aware of any hex editors doing that (though I am sure some do), so it feels like a reason to persevere.
Actually outputting the text and getting edits back into the file are going to be a pain though…
If you want to see the code (a dog’s breakfast right now) – it is here.
I have become a victim of my own lack-of-ambition.
Having remarked, in my OS/2 article, on the continued lack of a decent hex editor, I thought, what-the-hell, it’s a double Bank Holiday weekend, why don’t I write one.
Except I thought about that a lot on Friday but didn’t write a line of code. On Saturday I decided I would definitely do it, but didn’t start until quite late. And then I decided I really wanted to watch The Battle Of The River Plate again (I don’t regret it, it’s a fantastic film), so did not do much coding.
But by then I had also made the really bad decision to do all this in Groovy (ie., a super-charged version of Java). I thought about using C or C++ but then, no, I wanted a piece of code I could move from platform to platform easily.
I thought it would be relatively simple. I had even written down some use cases and a simple idea of an MVC pattern to underpin it.
Since then I have struggled. Bad tutorials on the Oracle site that reference long dead features of the language were one issue, combined with Groovy’s (by design) ability to compile code that references functions not yet written was another (as badly specified functions can appear as odd run time exceptions). But the biggest flaw was Java’s fundamental lack of support for unsigned types. What A Joke!
How has this language survived when it insists of typing everything as signed?!
If I had written this in C or C++ I’d have the basic framework done by now, though admittedly the user interface parts would have been a lot more difficult.
For those who have similar problems – the answer is to use bigger types eg inside a Closure, I have this: Long x = 0x00000000000000FF & it
numb = numb * 256 + x
– which ensures that it – an instance of Byte is read in as an unsigned number before being shunted on to the end of numb.
Part of the problem is that students learn faster than many of their teachers, according to Lily Miranda, who runs a computer lab at a state school in San Borja, a middle-class area of Lima. Sandro Marcone, who is in charge of educational technologies at the ministry, agrees. “If teachers are telling kids to turn on computers and copy what is being written on the blackboard, then we have invested in expensive notebooks,” he said. It certainly looks like that.
I was working for the Labour Party when, in his 1995 conference speech, Tony Blair made a pledge to deliver laptops to kids in schools (the exact details escape my memory over this distance but it was not quite at the OLPC level of provision). Even then I was a bit dubious – a computer needs to be for something – but the pledge was also extremely popular.
The problem in Britain – and I suspect in Peru also – was that computers were handed out to people to write documents, spreadsheets and presentations. But if you cannot write good English, or understand percentages, then having a new wordprocessor or spreadsheet is not going to help.
In Britain we have created a culture where computer science has been neglected in favour of teaching children how to use (as in type in) wordprocessors. It bores kids of all abilities and no wonder.
Computers need to be used as educational tools aligned with the core curriculum subjects if they are going to make a difference. This is why teaching some programming would be far more useful than how to manipulate the last-but-one version of Microsoft Powerpoint.
I sent off my order for the Raspberry Pi – the device which many hope will lead to a revival of computer science (as opposed to ECDL type teaching) in British schools today – I registered for it close to three months ago but was only give the option to “pre-order” it this week, so huge has the demand been. Reminds me of the “28 days” of the Sinclair era – though I am sure Raspberry Pi’s makers are not making their money from cashing money in the bank, given today’s interest rates.
Here is a fascinating account of the rise and fall of OS/2, the operating system that was supposed to seal IBM’s (and Microsoft’s) global domination. Instead it flopped, being beaten by a poorer quality alternative in the form of Windows 3.0/3.1 after Microsoft pulled out.
I remember when Windows NT was launched in 1993 – one of its selling points was its ability to run OS/2 1.0 software natively via a dedicated subsystem (strange to remember, but then Microsoft went heavy on the modular nature of NT and its ability to run on non-Intel hardware and to support different software on top of the microkernel).
I could only ever find one free piece of native OS/2 software to run – a hex editor. A fundamentally vital workhorse for any programmer yet good implementations always seem to be in short supply (even now – last month I seriously considered writing my own so fed up was I with the basic offerings that come with Linux flavours). This one – its name escapes me – was a goodie though and I was a bit cheesed off when an NT upgrade (to 3.5) broke it. By then Microsoft plainly did not care much for software compatibility (or for NT’s ability to run on different platforms – that was scrapped too).
Still, OS/2 had its fans. As a journalist reporting on housing I went to see a public sector housing manager in rural Somerset at about this time: he was pioneering a new software system for his district housing offices and OS/2, with its revolutionary object-orientated desktop (which is what right clicking is all about) was to be at the core of that – with housing officers treating the desktop like various forms on which they could order repairs and so on. It was difficult not to share his enthusiasm because the idea, now a commonplace, that objects on the desktop could be more than just program icons was so new and exciting.
The article lists the ways in which Microsoft went all out to kill OS/2 and, in every practical sense, they succeeded. Those who doubt the need for free-as-in-freedom software should consider that. But it also lists various places where OS/2 is still in use (in the US). Anyone know of similar examples in the UK?
I am not saying the book is not without charm but having only read a small proportion of it, my complaints against it are piling up – shallow, manipulative, repetitive, emphasising gossip over fact and theory, calling Rupert Allason “Nigel West” and so on…
Luckily for Gladwell (I am sure he cares!) I will not be only relying on the “thin slice” of opinion, but will plough on for a bit more before deciding whether or not to go on.