2004-11-28 »
Conspiracy Theory Updates
So I'm emerging from my ExchangeIt project acceleration marathon, which of course involved plenty of Windows programming. I won't go into the gory details of that, because the details are not that important. (The answer to my earlier question about _read(), by the way, is to special-case every kind of stdin, such as named pipes, console objects, and files. Like I said - gory.)
My conspiracy theory comes in three parts:
1. Architectural Philosophy
I think my next NonDirectionalFridays presentation will be about what I call "Architectural Philosophy" - how your way of looking at things influences the way you design software. In particular, it's interesting to compare Windows and Unix architecture (since I recently became intimately familiar with the former), where they came from, and the results.
The short version is that Windows was built, from day one, on pragmatism. There is no sense of art, no simplifying assumption that binds it all together. On the other hand, if you want to do something, it's for sure that you can (assuming you put in enough effort) - and better still, Microsoft will jump through hoops until the end of time to make sure that your code keeps on working forever. That's the only reason DOS programs still run in Windows XP.
Unix was built, at the core, on a sense of elegance. There are a small few simplifying assumptions in its design that makes many things easy to do. It is also, not quite by coincidence, very pragmatic - my old Unix programs can still work today, too (if I can compile from source), and this has little to do with art. It has to do with keeping the API relatively constant from day one. Just like Windows did. The only difference is that the Unix API made more sense on day one.
But the Unix philosophy, nowadays, is more about the elegance than the pragmatism. WvStreams is my personal example of this. The API is nice, and it lets you write simple programs, but I also change it relatively often; my simplifying assumptions weren't always right.
GTK, on the other hand, is really based on the Windows philosophy. The ability to write code simply and expressively doesn't figure into GTK at all; but the desire to make sure a program you wrote last year still runs ten years from now is hardcoded into the design.
What's interesting is that you usually have to choose between pragmatism and elegance; Unix is a rare exception in which, by sheer genius of the designers, you could have something both useful and expressive at the same time. But the original Unix design didn't include a GUI, and there are no design geniuses for the GUI like there were for the kernel. That, or their designs were never popular.
Lacking the ability to have elegance and pragmatism at once, you have to choose one or the other. Customers will choose the working solution, thank you very much. That's why GTK exists and is popular; it's also why GTK is no better than Windows.
2. Microsoft is a Gluer
I've written before about the role of Gluers in coding, and how their time has come. Microsoft is actually the biggest gluer of all; by forcing a pragmatic architecture down our throats, they force Windows applications to (more or less) interoperate. I wish the pile of crap this produces would be a bit more elegant sometimes, but at least it works. That's why customers buy it.
Unix people (like me) keep trying to build beautiful designs, hoping that if the design is sufficiently beautiful, it will defeat Windows and Windows applications. They point to the elegant design of Unix as an example of how this might be possible. But this won't happen. Your system must be pragmatic first, and pretty design is a bonus. People have missed the fact that Unix is not only elegant: it's also highly functional.
3. Microsoft Needs Competition, But It's Okay if They Win
One thing I'm becoming more and more sure of as time goes on is that Microsoft is one of the better monopolists I could have to deal with. I mean, the phone companies? Kill them all. Cable companies? Garbage. Oil? Well.
Microsoft, for all their faults, still has this misguided notion that the way to maintain their monopoly is to produce better products than everybody else. (For some definition of "better". Let's not go into that.)
But here's the catch: they stop at "better than everybody else." And if someone produces a slightly better product but drops dead too soon, Microsoft won't bother to steal their ideas. So you have to compete with Microsoft until they steal your ideas. Then your ideas become mainstream, and once Microsoft supports them, they'll never really die. So you win, even if you lost. (Example: IE is still the best web browser, darn it. And yes, I've tried Firefox and seen Opera.)
Conclusion
If in doubt, bet on Windows. But if you want something to show up in Windows, build it in Linux first, then make sure you don't die until they clone your stuff. It doesn't have to be pretty - it just has to work.
Of course, all of this is probably little help to you if you're actually trying to win the war...
Why would you follow me on twitter? Use RSS.