Computer programming centre-right lovers of Swedish meatballs

English: YouGov logo
English: YouGov logo (Photo credit: Wikipedia)

According to YouGov (the UK’s largest polling company) that is what typical lovers of Linux are – though it’s based on just 272 individual profiles (out of 200,000 or so members of YouGov’s panel). Oh, and they are blokes. More at

(YouGov made at least some of their profiling data available online this morning and it has kept British internet users amused all day.)

Windows lovers are, apparently, somewhat more numerous – there are 744 of them – but also typically younger, less well off and even more right wing. And are also men. Apple pie is their favourite dish and perhaps unsurprisingly they are not as keen on programming. Yes, it’s true: Windows lovers are lusers through and through. See

Admirers of the Microsoft brand, though, tend to be older (still male) and rather more centrist – and numerous. Perhaps this is the Bill Gates effect? People admire his creation in the abstract but there is little concrete love. See

But what of your favourite hipster computer brand – Apple? Turns out they are centrist, female and middle class and like grilled halloumi cheese. It’s harder to make a direct comparison though as (surprise, surprise) Apple users don’t seem to identify their operating system. See

There is lots more to look at – for instance Android users are seemingly very left wing while computer scientists are middle aged men who eat a lot of chicken.

Wanted: a better C++ book

I first taught myself C++ back in 1993 – using Borland’s Turbo C++: a great product I had lots of fun with.

Photo of Bjarne Stroustrup, creator of the pro...
Photo of Bjarne Stroustrup, creator of the programming language C++. (Photo credit: Wikipedia)

After that I moved on Microsoft’s Visual C++ (it was their unilateral cancellation of my subscription that marked a key stage in my disillusionment with Redmond).

In those days C++ was simple – people talked about templates and namespaces but nobody actually used them.

So, when in 2009/10 when I was being taught C++ at Birkbeck I didn’t really pay enough attention – I thought I knew the language but I didn’t.

After that course was over I made a real effort to teach myself C++ properly and wrote some not too bad code. But then Groovy came along and nobody was much interested in my VMUFAT file driver for the Linux kernel and so both C++ and C got neglected.

Now C is like bike riding – if you haven’t done it for a while you are a bit unsteady at first but soon get the hang of it. But C++ is different and now I back to writing in both idioms I miss having a good C++ guide book.

I do have C++: The Complete Reference (4th Edition) but, in my view, this is one of the worst computer books ever written – as it simply reads like a book about C with some bolt-ons.

I also have Computing Concepts with C++ Essentials: but it’s a book about how to program, not a good reference.

What I want is something that tells me how to do things and use things without either drowning me in formal references or treating me like a newcomer.

What is the best option – is The C++ Programming Language still the best? I used to have a copy of that from 20 years ago (perhaps I still have it somewhere in the house) and it was quite good but obviously that edition has long since been superseded.

Any recommendations gratefully received in the comments.

Enhanced by Zemanta

Microsoft versus Linux: did we win after all?

At the end of John Le Carre’s Smiley’s People George Smiley is congratulated for having triumphed in his life’s struggle with Karla, the eminence grise of the KGB and told “George, you won”, to which the British spymaster, perhaps shamed by his need to adopt his opponent’s tactics of threat to the innocent replies “Did I?”

It feels a bit like that this weekend when I look back what is surely Microsoft’s humbling in the face of Android’s triumph. (I don’t claim to be any sort of central figure in this – I just mean I know we have won, but I don’t know what we have won given the compromises required to secure victory).

Free software made the victory possible – but the freedom that counted was the ‘as in beer’ one: Linux proved to be a cheaper platform for the hardware manufacturers to use. I do not detect any greater public understanding of the ideas of the free software movement than a decade ago – even if so many of the old arguments against its use have been killed by the onrushing Android juggernaut.

Indeed, the fact that Apple, whose business model is even more fundamentally hostile to free software than that of Microsoft, are doing so well suggests that no sort of ideological battle has been won at all – for so many consumers it is “shiny thing make it all better” (and Apple do do a fine line in shinnies).

And the site of the great battles of the past – the desktop – has become something hardly worth fighting over. Windows 8 stinks – I replaced it on one of my daughter’s computers with Ubuntu recently – but I suspect what has made it such a turkey for Microsoft is not the tiny numbers who, like me, are getting rid of it, but the falling sales of desktops and laptops in the developed world’s markets.

Do desktop computers have a future?

Sun box and Pentium 90 from 2005The market for desktop computers is in desperate trouble (and that for laptops not much healthier) – the latest sign being the decision to take Dell private.

The issue is not that we don’t need desktops and laptops anymore, but rather that we do not need new ones: while Moore’s Law continues to increase the number of transistors we can fit on silicon, we cannot drive those transistors at ever faster rates as we cannot dissipate the heat.

So instead of having an option of shelling out to buy a new desktop (or laptop) to match the speed of our rivals’ machines, we can soldier on with the old machines, get a smaller, low energy device (such as a tablet – Moore’s Law won’t deliver faster devices but will deliver smaller ones of equivalent computing power or lower power consumption) or maybe buy a multicore device (but these too have their limits – bus based designs start to eat up power as they get more processors and the speed increase from putting on an extra processor falls far off a linear increase).

We might, of course, just opt for a no more powerful machine but just one that looks better – something Apple has profited from.

In the end this means that the economics of desktop computers is likely to shift fundamentally and as the market consolidates prices may even start rising.

There are still technological advances that will drive performance improvements – faster storage is the obvious example. But the golden age of the PC is over – indeed it probably has been for a few years now.

Microsoft’s desperation to get Windows 8 out the door and across all the possible platforms is one of the reactions to this: but right now I have to wonder if Redmond’s finest will still be with us in ten years. Win8 seems to be something of a turkey and is not making any headway in the smartphone/tablet world and if we do not buy new machines every 24 months, why should we shell out for a new copy of “Office”? And, of course, Linux is still nibbling away.

In the longer term new hardware designs – such as thousands of CPUs on a “network on a chip” could turn things upside down again (I should be researching this now and not writing this blog) – but to fully exploit the power of such systems we are going to need to rethink most of our software and programming models. And it’s still not clear to me if those sorts of machines will ever get to the desktop (as opposed to powering an ever more powerful internet of things through embedded computers).

Proposals for a new English ICT curriculum

This morning’s Times carries an full page report – on page 3 no less (subscription required) – of the British Computer Society’s (BCS) proposals, on behalf of the Education Department, for a new ICT curriculum.

In fact the newspaper report seems have been injected with more than a little bit of spin – The Times says that pupils should, by the age of 11 (ie Key Stage 2), be able to build a mobile phone app – but the draft programme for the curriculum (thankfully) says no such thing. It states pupils should be able to:

Write programs to accomplish given goals; solve problems by decomposing them into smaller parts; recognize that there may be more than one algorithm to solve a single problem; detect and fix errors in algorithms and programs.

Which is much more sensible.

(The Times also states that KS4 – A level – pupils should be able to build their own languages, presumably meaning some teaching of compilers and related CS concepts such as automata, but again I can see no reference to that.)

Today’s, discredited, ICT curriculum concentrates on what the BCS calls “digital literacy” – basic skills at manipulating “office” products. It has cemented Microsoft’s monopoly position, stripped the UK of its historical lead in teaching kids programming skills and stifled innovation and, frankly, seen schools waste money.

The new programme appears much better but given the tendency of existing software and hardware providers to demand their products and paradigms are included in any curriculum then ideas that kids should be taught to build mobile phone apps or anything similar should be resisted – do we really think that today’s shared memory, lock-controlled, programming model is going to be that relevant in a decade’s time? I do not but can see why many companies with billions invested in existing technologies and models would want to resist the disruption that many-core technologies will bring.

Computing stands on the edge of another revolution:

As multicore chips scale to larger numbers of cores, systems are becoming increasingly complex and difficult to program. Parallel architectures expose more of the system resources to the software and ask programmers to manage them. In addition … programmers are forced to optimize for both performance and energy; a task that’s nearly impossible without knowing the exact hardware and environment in which an application will run. As machines scale to hundreds of cores, it will no longer be possible for the average programmer to understand and manage all of the constraints placed upon them.

(From Eric Lau et al’s paper “Multicore performance optimization using partner cores”, in Proceedings of the 3rd USENIX conference on Hot Topics in Parallelism, USENIX, May 2011)

Even we do not agree with every idea expressed in the above comment, the basic argument is sound – all your programming are belong to us. A new ICT curriculum must be flexible enough to respond to the huge changes that are coming and resist any attempts at technology lock-in. Previous stories about the ICT rethink are littered with corporate name dropping, and the government (any government, frankly) are always too keen for corporate endorsement. So we need to beware.

The BCS programme looks like a promising start, if it can manage to avoid falling into populist traps like the one it seems to have set itself in the Times this morning.

The year of Linux on the desktop?

KDE 4 Current version: 4.7 Older versions: 4.0...
KDE 4 Current version: 4.7 Older versions: 4.0 beta 2, 4.0 beta 3, 4.0 beta 4, 4.0 RC2, 4.0 final, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6 (see file history) (Photo credit: Wikipedia)

For many who work or research in the industry, desktop computers have an “end of history” feel about them.

The improvements in technology that allow chip makers to double the number of transistors in a given area of silicon every 18 – 24 months are still there but “Moore’s Law” as we understand it – ie., that computers will get twice as fast every 18 – 24 months – has broken down. We simply cannot power the chips (or rather keep them cool while supplying them with the power they need) and while parallelisation (ie “manycore”) means manufacturers can lower power demands and, to some extent, keep the speed of machines rising, it too is hitting a fundamental barrier – the inability of commodity hardware to supply instructions and data from memory fast enough to serve many more than 4 – 8 cores.

All this suggests that we might be close to “peak desktop” or to put it another way, the desktop computer you have now is not much slower than the one you will have in ten years time (unless, that is, you shell out quite a lot more for some fancy memory architecture or some other technological advance changes the rules.)

But what I think is clear is that you will have a desktop computer in a decade’s time, though it may look a bit more like today’s laptops: smaller, lighter, devices are going to be easier to deliver than faster ones. Tablets and other small form factor devices are useful for browsing the internet or writing a 140 character message, but who they are not the ideal devices for writing a 5, 10 or 100 page document on.

But if we are only going to buy one or at most two new desktop devices in the next decade then the business model of Microsoft – which still utterly dominates this space – is broken. No new desktops means no new sales of Office, the big money spinner for Microsoft.  Their response has been to compete for tablet and phone sales with Apple, though they start from a long way behind and, now, to lever their near-monopoly on general-use operating systems to seize control of all of the software on desktop.

Their plan to demand complete control over the desktop may yet fall foul of the regulators – it is difficult to see the European Commission nodding this one through, for instance. But there are other responses available.

Microsoft got clobbered in two ways when they previously tried to lock up one aspect of the software ecosystem – the browser. For sure, regulators put the squeeze on, but long before then users developed a far more effective way of breaking free – they switched to Mozilla Firefox.

Now the battle is much bigger. Microsoft are not just trying to control your browser, but all the other software on your machine. They will say they will still let others manufacture software and they are just supplying quality control – but would you really agree to the only books being available for sale those that were approved by Amazon (sadly, the evidence from the ebook market suggests that many of you would!)?

And what if Windows 9 removes all support for non-approved software (no doubt in the name of virus suppression or trojan elimination?) The behaviour of Apple fanatics shows there are plenty willing to welcome their new all-controlling overlords. But there is an alternative – whisper it – Linux on the desktop.

Now that very phrase – “Linux on the desktop” – has an internet meme-like jokey feel to it. It’s the gallows humour phrase of the free software world. If Linus Torvalds were ever to be led to the scaffold for crimes against intellectual property robber barons his last words would no doubt be “this is the year of Linux on the desktop” – but maybe the moment has come to find a generation of “second adopters” who are willing to break out of Microsoft’s jail?

The pace of development of the Linux kernel has not slowed, but there is a less excited feel to it all these days: Thermidor came to this revolution some time ago, but that is also a sign of its maturity.

After all, there is still no stopping an idea whose time has come.

Why choice in software matters … a story from the real world

Ten years ago today something happened that has had a significant impact on many millions of people across the world … Mozilla 1.0 was released.

Image representing Mozilla as depicted in Crun...
Image via CrunchBase

Above all else Mozilla, and it’s leaner, fitter, offspring, Mozilla Firefox, is the most important piece of free (as in freedom) software ever produced. For sure, it stood on the shoulders of giants to get there, but by giving the world a real choice in browsers the Mozilla Foundation changed the rules for the Internet, forced Microsoft to get its act together and crushed that company’s attempts to bind us all into a proprietary software future (remember ActiveX anyone?) online.

It is probably going too far to say that without Mozilla there would be no Arab Spring, for instance, but maybe not by much. Because Mozilla and Firefox also taught the public that there were alternatives out there and so the future did not have to be about what ever Baby Blue said it was. And that willingness to experiment online is helping power the mass adoption of smart phones, which are the weapons of choice for online revolutionaries.

It is easy to forget how bad it had got before Mozilla came along … Internet Explorer was a truly atrocious application that was not updated for several years. Microsoft had no interest in open standards because it had no competition. Mozilla changed all that. Not instantly, but the pressure began immediately.

How much control can Microsoft exert in the development ecosystem?

It’s a long time – over a decade – since I last used a Microsoft development tool. For what it’s worth, I quite liked Visual C++ back then, but in the middle of my subscription (in 1998 if I remember correctly) Microsoft just tore up the contract and offered me something of less use. The details escape me now but it was a formative moment – I was not willing to trust them any more and suddenly the idea of using Linux had new appeal.


(At the same time I was teaching myself how to use Unix on the Sun OS system that hosted the Labour Party’s Excalibur EFS document system: after the 1997 general election there was nobody left in the team but me and so I went out and bought the venerable Essential System Administration: Tools and Techniques for Linux and Unix Administration: Help for UNIX System Administrators – which helped but it was still hard going to escape from the Windows monoculture. The Party’s IT staff essentially said “Unix? Does anyone still use that?” – this was truly the apogee of Microsoft’s monopolistic drive.)


Today the world seems very different. But if Microsoft have taken a few knocks and people are almost as likely to think of Apple and even Google as the enemies of software diversity and freedom, we should not underestimate its raw power in the market. Most desktops in most workplaces are still Windows boxes and writing for the mass market means targeting Microsoft’s operating system.


The Windows family tree.

Not surprisingly many, probably most, of the people who are doing that are using Microsoft’s tools and compilers. That gives the boys and girls in Redmond a lot of power and they don’t have to be acting in a malicious way to have an detrimental impact – as in their refusal to support the C99 language standard. The only mantra that C is a proper subset of C++ (which Microsoft fully support) has been dead for a few years now and there are features in C99, which is the standard in general use in the Unix/Linux development world not supported in C++11 (the current standard there which Microsoft are working to support). Microsoft do support the twenty year old C90 standard but have essentially said that they are not going to develop that any further – you can read more about this here.


In response to this some C++ developers have done so far as to say “C is obsolete” – perhaps reflecting a new confidence in the C++ development world, as that language has been making something of a comeback in the last couple of years (not least because Microsoft have promoted it so heavily).


That may or may not be the case – personally I doubt it very much. But since when did we allow tool manufacturers to make that decision for us?


As I did in 1998 maybe it is time for the developers to look at the alternatives. There are plenty of industrial strength compilers and editors out there that will free them from the caprice of a company which is once more demonstrating it just doesn’t get it.



Odd looking Microsoft logo

Is it just me who thinks that Microsoft’s cloud computing logo reminds them of Ubuntu?

I cannot believe that Microsoft feel so threatened by Ubuntu and Canonical that they have done this deliberately, but it still seems like a very odd choice to me.

PS: Remind me never to use OS X to write blog posts – this is the second time I have tried it and every time I do, the text gets deleted. A bug somewhere.

Related articles

OS/2: killed by Bill?

OS/2 logo
OS/2 logo (Photo credit: Wikipedia)

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?