Original URL: http://www.theregister.co.uk/2012/11/09/opensource_festering_hacks/

The GPL self-destruct mechanism that is killing Linux

Festering hacks, endlessly copied and pasted - thanks Eric!

By Liam Proven

Posted in Developer, 9th November 2012 11:12 GMT

Analysis Does one of the biggest-ever revolutions in software, open source, contain the seeds of its own decay and destruction?

Poul-Henning Kamp, a noted FreeBSD developer and creator of the Varnish web-server cache, wrote this year that the open-source world's bazaar development model - described in Eric Raymond's book The Cathedral and the Bazaar - has created an "embarrassing mess" of software.

For anyone who hasn't flicked through ESR's essay, the bazaar represents software development done in public, as seen with the Linux kernel, while the cathedral model describes coding behind closed doors although the source code is made public with each new version.

"A pile of old festering hacks, endlessly copied and pasted by a clueless generation of IT 'professionals' who wouldn't recognise sound IT architecture if you hit them over the head with it," was Kamp's summary of the bazaar model after laying into baffling tool autoconf.

"Under this embarrassing mess lies the ruins of the beautiful cathedral of Unix, deservedly famous for its simplicity of design, its economy of features, and its elegance of execution," he wrote in a piece titled A generation lost in the Bazaar.

With major Linux updates due in October and this month (such as Ubuntu 12.10 and Fedora 18) and with the Beast of Redmond spitting out a platform shift with Windows 8, it's worth considering: is open-source software doomed to a fate of facsimile, and are there any ways around it?

By the end of the 1980s, things were looking bad for Unix. AT&T's former skunkworks project had metastasised into dozens of competing products from all the major computer manufacturers, plus clones and academic versions, all slightly different and subtly incompatible - sometimes even multiple different versions from a single manufacturer.

Richard Stallman's GNU Project to create a free alternative to Unix was moving ahead, but it hadn't produced a complete operating system because it didn't have a kernel. BSD was struggling to free itself from the binding vestiges of AT&T code and as a result also wasn't a completely free operating system.

To escape from the hell of competing proprietary products, programmers should share their code under licences that compelled others to share it too.

Meanwhile, the IBM PC was quietly taking over, growing in power and capabilities. IBM had crippled its OS/2 product by mandating that it ran on Intel's 286 processor. This was a chip that hamstrung an operating system's ability to multitask existing DOS programs - even though OS/2 came out after Intel introduced the superior 386 processor, which could easily handle multiple "real mode" DOS apps.

The field was wide open for Microsoft, which had already had an accidental hit with Windows 3. Microsoft hired DEC's genius coder Dave Cutler and set him to rescuing the "Portable OS/2" project. The result was Windows NT: the DOS-based Windows 3 and its successors bought Microsoft enough time to get the new kernel working, and today it runs on about 90 per cent of all desktop computers.

But Windows didn't dominate the entire market. It has two rivals, and both are some flavour of Unix and have free software in their DNA: On one hand, there's Apple with Mac OS X and iOS - close relatives and both built on Apple's Darwin OS, which uses bits and pieces from BSD and free software projects. On the other is GNU/Linux, the fusion of a free software kernel and the GNU Project's array of tools and programs.

Note the careful use of the term free software, not "open source"; the latter being a corporate-friendly term that came later and it's not quite the same thing as free software. The ideals laid down by the GNU Project's Richard Stallman in 1983 are what made BSD and Linux possible: that to escape from the hell of competing proprietary products, programmers should share their code under licences that compelled others to share it too. It's an agreement that forces people to confer their rights to others - so the GNU calls it "copyleft" as it uses copyright law to drive the licence.

The problem is that not everyone shares nicely. Some people will do the minimum they can to comply with the rules. BSD has one of the original idealistic free software licences; it permits use of the code so long as a small credit is included somewhere, so many bits of BSD-licensed software are lifted for free and hidden away inside commercial products - and any changes made to the source don't have to be given back.

Free software: A virus in Microsoft's eyes

This ability to freely copy lines from source code without giving anything in return is something the GNU directly stamped out with its licence, the GPL, which mandates that anything using GPL components should itself fall under the terms of the GPL. If you write a program and include in it work cut'n'pasted from GPL-licensed source code, your program also falls under the GPL and you'll have to make its source code available. This establishes a level playing field and enables Stallman's ultimate goal: the ability to freely modify whatever software is running on his computer and share it.

That's why Microsoft CEO Steve Ballmer declared the licence "viral".

When Unix was young, it was an elegant command-line driven OS, built around the idea that everything is a file and small single-function programs could be linked together with pipes to achieve sophisticated results.

But today's Unix descendants are large, complex graphical beasts, and so are their apps. Any significant modern application is a big project, which means teams of cooperating developers - and programmers are just people. Sometimes they fall out, sometimes they just want to go and do their own thing. Result: lots of competing projects.

Linux itself hasn't split is the forceful, charismatic leadership of Linus Torvalds, but - unfortunately - Linus doesn't scale. Very few projects get to have a Torvalds-like leader.

The other issue is that as the tools to build software mature and grow more powerful and flexible, it's getting easier for relatively inexperienced, unskilled programmers to assemble complex apps out of many supplementary components - subsidiary parts that they may not know very well. This increases the chances of people reinventing wheels which might differ in nothing more significant than their colour.

The GPL per se does nothing to prevent this, which is why forks are quite common. Sometimes it's because different developers want to focus on different things - which is why the original Linux clone of WinAmp, XMMS, has begotten the Beep Media Player, Audacious, Youki and two projects called XMMS2. Sometimes, rival projects happen over political differences - as in the resistance to KDE's use of Qt and C++ which led to the creation of GNOME. Today, they're joined by half a dozen rivals - along with umpteen Free Software web browsers.

It's widely held that the reason Linux itself hasn't split is the forceful, charismatic leadership of Linus Torvalds, but - unfortunately - Linus doesn't scale. Very few projects get to have a Torvalds-like leader.

So aside from careful choice of licence and project leadership, is there anything to be done? Perhaps not, but this might not always be a weakness. Diversity means adaptive radiation: some projects will win users, favour and support and thus prosper; less popular ones will atrophy. Occasionally, projects merge, as did Compiz and its forks Beryl, NOMAD and Compiz++.

Flock of C-gulls

This may turn out to be a defining aspect of free and open-source software (FOSS). From the start, part of the Unix philosophy was that it was a mosaic of many smaller parts. Linux has been memorably described as less an operating system, more a flock of several thousand separate packages flying in close formation. Perhaps its vast numbers of alternative, competing components is actually a strength.

The other possibility is that if the industry moves beyond C and toward other languages, that pooled resources akin to Perl's CPAN or Python's PyPI will become more widespread, making code reuse easier and more convenient. Another trend that might help is languages that run on top of shared runtimes, such as the JVM or Microsoft's CLR, allowing code in one language to call libraries written in different ones.

If that becomes an insuperable problem, well, there are others FOSS operating systems and platforms out there - plus some with very different approaches to OS design waiting to be discovered.

Linux is a remarkable wad of code, but as operating system design expert Professor Andrew Tannenbaum pointed out in 1992, it was already obsolete. The answer may lie in not merely reinventing the wheel, but the entire car - or replacing it with a bicycle instead. ®