Sunday, July 29, 2007

There is no such thing as peaceful coexistence

I must admit that the rumors are true. There are still some pieces of Microsoft software on my home computer, just like there are still some pieces of Sinclair Ltd. software I tend to use from time to time. The Sinclair Spectrum was the first computer I owned and it wasn't until 1987 that I switched to MS-DOS. In 2000 I switched from MS-DOS to Linux. No Windows? No Windows. I used Windows 3.1, but that isn't an operating system, unless you consider X to be an operating system too.

In short, I drag my whole computing history with me. Although I do not use it anymore to create new content, I still like to play an old game or consult a multimedia CD-ROM from time to time. In the six years that I use Linux now I've found capable replacements for every single piece of functionality I had on MS-DOS. Apart from a bout of nostalgia I have no reason to return to the old applications.

Personally, I think this is the way one should make a switch. Although I like DOSBox, DOSEmu, Wine and QEMU very much, they make it much too easy to hang on to the old stuff. The question 'Can I do some proper word processing with Linux' turns into 'Can I run MS-Word on Linux' and that is not a good thing for several reasons.

The most obvious one is strategy: simply don't feed the enemy. If nobody would use MS-Word, Microsoft won't get any funds out of it and hopefully stop producing it. The world would be a better place. Some say we could all be nice to one another, but Microsoft has proven time after time it cannot be trusted and certainly not with Open Source Software. Why else do you think it needs a 120 million dollar campaign to crank up its blemished and soiled reputation?

But the most practical reason is that you won't get the full advantage of Open Source Software until the make the full switch and never (need to) look back. Listen and shiver when you hear this horrifying story of bad architecture, buggy software and failing support. All this could have been prevented using Open Source Software.

One notoriously bad product is MS-Access. Until recently Microsoft itself admitted that it could not be used "for production" purposes. I know. Although me and my colleague followed all recommendations, we still had to fight corruption and failing ODBC connections. Visual Basic for Applications is a horror to say the least. It is not truly object-oriented, has no standard way to return error codes, a terrible 'catch' mechanism and disgusting flow control structures with no 'lazy evaluation'.

All that could be pardoned if it would just do what it should do - but it doesn't. You can test code in isolation and it works. You integrate it and Dr. Watson appears. Sometimes working .MDE's cease to function from one moment to the other - only to function again for no apparent reason.

At one moment in time I told myself that was it. No more Access frontends. Sure, it took some time to develop the proper libraries in PHP and even more time to write the code generators, but then I would be free. And it was wonderful. I no longer needed to distribute the client software, since it was all on the webserver. I could use Firefox to test the frontend, using such goodies as "Web Developer", "HTML Validator" and "Fire Bug" and produce almost perfect, compliant HTML code. For a while I was very happy, until..

When you give users a finger now, next time they'll want an arm. I don't say you should blame them for that, it is just a fact of life. Like everyone else, they are trying to push the envelope and as long as you keep delivering the goods they keep coming up with more. My web applications were no exception. That they looked and worked like ordinary Access applications was nothing special anymore. That I could crank out an entire application in a week because most code was generated neither. They wanted images, generated on the fly. Graphs, diagrams, you name it. Can you do something like that with MS stuff? Not that I know of. So I present you GraphViz.

GraphViz is an amazing piece of software. Just feed it information on a few objects and their relations and it will make a diagram in almost any format you can think of. Like any good Open Source Software it is easy to interface and ported to a wealth of platforms. Making a PHP interface was really a piece of cake and before I knew it I was cranking out diagrams like there was no tomorrow.

But there was a danger luring under the surface. Something I hadn't count on. All those diagrams were produced occasionally, let's say once or twice per week. I produce the diagrams in SVG format, simply because they remain small, can be blown up or reduced without any loss in quality and are completely standard. The only thing you need is a plugin from Adobe, because IExplorer does not support SVG natively, contrary to Firefox and Opera. Still, the plugin is officially supported by Microsoft, so you wouldn't expect any problems, right? WRONG!

Note that the problems I am about to describe here are not incidental. They have been reproduced on every single desktop I tried. And of course, there are no problems with Firefox. I have to add that the company I work for still uses NT, which isn't supported anymore. XP was tested as well and worked fine too. So what was the matter?

The problem is that SVG doesn't really open in the browser, but is first saved to disk. I can forgive IExplorer that you have to click the download dialog twice, because of the paranoid security settings we're using. Hey, we've been adding ".bin" and ".txt" extensions to ".exe" and ".mde" files for as long as we can remember, since otherwise it is impossible to mail these things around the intranet using Exchange and Outlook. All that remailing and renaming really boosts our productivity and gives some interesting insight in Microsofts security strategy. I guess the next step forward is to remove Outlook altogether..! You can't really trust a user with a mailer, can you?

The SVG plugin from Adobe (or Corel for that matter) works really well. It is fast, you can zoom in and out, pan and even find text. So far so good. It works fine when you download a single diagram or even two, but after a while your browser hangs. That is: it won't open a new window (any window at all) and simply sits there and waits. If you can think you can right-click the damn thing and shut it down, you're wrong. The only thing that helps is killing all "IEXPLORE" processes in the task manager. Needless to say that is hardly user friendly.

So there I was. I had meticulously ported all my applications to Open Source and was still stuck with Microsoft in the end. And this wasn't the first time. But up to now I had always been able to work around it. You want a few examples? Well, think CSS, DHTML, PNG. Most of these issues were cosmetic, but still I wasn't happy with it to begin with. My life as a developer would have been so much easier if people had just been able to use Linux workstations with Konquerer or Firefox..

The end of the story? Well, I found only one real article on hanging IExplorer browsers. I added a fix to my GraphViz interface which appends a random number to the SVG filename, so a user will rarely reload the same file. Now the browser remained stable during the session, but the process itself still got corrupted and refused to unload from memory. In the end I got tired and installed an MS-equivalent of "killall". Hardly elegant, but better than rebooting.

Had I been using Open Source Software, it wouldn't have mattered whether my OS was still supported or not. I would have had the source code and compiled it for my platform, including the fixes. I won't even mention the possibility to fix the source code myself, since in a major piece of software like a browser the chances that I could find the error and fix it myself are remote. But I would have had a fighting chance instead of no chance at all. I could also have incorporated the "killall" in the calling sequence of the browser, but since there is no such thing as letting CMD.EXE wait for the end of the process it started.. I guess you catch my drift.

In a previous blog I mentioned Ballmer wanting more developers. Well Steve, you won't get them if you keep frustrating them like that. After a days work I really long for the stability, responsiveness and comfort of my Linux desktop. Even better, sometimes I just work at home, since I won't touch MS-Word anymore to write documentation. Believe me, as a developer you gotta love LyX. No worries about the layout anymore, just keep hammering those keys. And even if LyX dies, it saves my document before it exhales its last breath. LyX adds headers, footers and there is nothing I need to do. Images don't get hidden by text, they just stay where they are. LyX files are plain ASCII and quite small. And last but not least, it produces HTML, plain text, PDF and some other useful formats.

You know Steve, since I don't use your Office-whatever-version, I may be a dinosaur as far as you're concerned, but hey: I'm a damn fast one!! You need a pretty big meteor to wipe me out..

No comments: