As programmers, it is our karma to witness constant change. The wheel of life keeps turning, and we turn with it. Each creaky, joyful, revolution represents a new phase, a new song to sing.
This revolution of the wheel is called the War of the Virtual Worlds. One spoke points toward Bill the Great, and his .NET virtual world, and another points to Bill the Joyful, and his cross platform Java virtual world.
As programmers we sweat over minute details in computer syntax, while these two behemoths face off, Goliath vs Goliath, one the mirror image of the other. Choose Java, or choose .NET: it hardly matters. In either case, you are living in a virtual world. It’s one virtual machine against the other, and the devil take the hindmost.
Despite the hype of their respective supporters, it is hard to believe that either will triumph decisively in the end. Here in America, many believe Microsoft rules the roost. But cross the sea to either the east or west, or travel south or north, and the further one gets from home, the more dully shines the Microsoft coin, and the more golden and glittering shine opposing technologies such as Java or Linux. The two opposing camps are both too huge, too set in their ways, too committed to their respective technologies, to ever give in. This is the age of the virtual Bills, and they will clash over and over until the wheel turns and each is taken by their aging, withered hands and marched off into the sunset.
Pick One from Column A, One from Column B
Some people have very strong opinions about which virtual machine is better: The one from Sun, or the one from Microsoft. But personally, I’m having an increasingly hard time telling the two apart. And so, I surmise, is the rest of the world.
This year Microsoft’s Tech Ed had 14 thousand attendees, while Java One had 15 thousand: a virtual dead heat. In a lead article from the June 27 edition of InfoWorld, we learn that: "Java is the de facto platform for enterprise-scale applications, owing to its proven scalability and the extraordinary range of services it provides."
In the eyes of your average Microsoft marketing victim, however, Java is little more than the cybernetic equivalent of Latin: A dead language used by a few bald-headed, pot bellied professors laboring away in virtual anonymity at small two year colleges lost on the plains of the American midwest. In the words of the Microsoft marketing wizards: "The Microsoft [.NET] strategy helps businesses realize the promise of information anytime, anywhere, on any device." With a promise like that, who needs anything else but a copy of Windows with the .NET virtual machine?
The Gospel According to Bills I and II
Driven by the desire to compete with Microsoft Windows, both Sun and IBM bit the bullet and worked together to champion Java and the cause of platform independence. The same Java code runs smoothly on Windows, Linux, Solaris, HP Unix, and a host of other platforms and small devices. The primary message of Java is that it fosters independence: Java applications run smoothly anytime, anywhere. Or at least that is how the song goes.
In the Windows world, the .NET CLR sometimes appears to have the opposite goal. It aims not at platform independence, but at Microsoft world dominanation: "One VM to rule them all, and in the darkness bind them!" In the Brave New World envisioned by Microsoft, one need never think again. Microsoft has the answers and the marketing team that can explain the details to you if you are dull enough to need them. The future is planned out for you: one shining steel rail reaching from Singapore to Washington, one seamless platform, based on the law of Redmond. In this land, there is plenty of choice, one can choose between Visual Basic, C++ or C# — so long as you don’t mind finding that all the different languages use nearly identical API’s and end up compiling down to more or less identical byte code.
NOTE: Of course, Microsoft has standardized parts of the .NET platform, just as parts of the Java platform are open sourced. The question we have to wrestle with is whether we are writing to the open parts of these platforms, or whether we are locked in to an individual company’s plan for "world dominance." The Mono project represents the bridge from the Microsoft world to the larger world of cross platform programming, and hence it is always worth careful study if you are interested in .NET technology.
The More they Stay the Same
With two such opposite strategies, one would think that there must be a huge difference between the Java and .NET platforms. But of course, there is no significant difference between them. The average first year programmer with a semester or two of programming behind her would be hard pressed to guess whether a randomly selected swatch of code was written in C# or Java. Syntactically, the two languages are all but identical, and their API’s frequently vary only in the most minor details.
As I explained in a previous article, the Java VM and the Microsoft VM (aka as the CLR), are so nearly identical as to be virtually indistinguishable. They both have the same type of byte code scheme, the same type of JITcompilation engine, the same memory management scheme, the same syntax, the same interface based compositional architecture, and the same simple types.
NOTE: Occasionally we hear rumors that the .NET VM will become part of the Windows OS, but Microsoft has no plans to do this in the next revision of their operating system. As a result, any such development is likely to occur many years in the future. By then, the whole computing landscape will no doubt have evolved into something very different from what we see today.
Listening to the opposing marketing teams trying to claim technical superiority makes me feel like I’m back at college trying to parse a passage from Kant’s Critique of Pure Reason. Get beneath the bombastic hyperbole, and the VM marketer’s logic is sliced so thinly, the wheels are grinding so finely, that the whispy differences between the two positions will blow out of your hands in a five knot breeze.
Coping with the Virtual Twins
One way to deal with the twin virtual juggernauts is to stick to open API’s and cross platform strategies. Some technologies, such as unit testing and Ant build files, look virtually the same on either platform. Other technologies, such as HTML and Web Services, are designed to free you from having to choose a particular platform. It takes little work to make a .NET web service talk to a Java web service. Web Services are designed to work across platforms, and across API’s.
Anyone who has worked in the industry for awhile knows that technologies come and go. Seeing this panoply of change, I try not to become the victim of a marketing machine. When possible, I design my code to work with other technologies. Choosing accepted standards and open API’s is not a commitment to a particular platform, it is a commitment to the future of programming and to your own career. Every time you buy into an API controlled by a single company you are sucking the life blood from your own body. To choose a closed API is to help a chuckling bean counter create a world where there are victors and victims, and to work against a more spiritual, decent and fair world where there is security and stability.
In the Belly of the Virtual Snake
Ten years ago hardly anyone would have guessed that our future as programmers would be built on top of virtual machines. But now, morning noon and night, the talk is of virtual machines, and little else. It always .NET this and Java that. In some social circles, it is less risky to sing the praises of George Bush or Bill Clinton than it is to praise the wrong virtual machine.
I’ve always been a dreamer, and these days, my favorite dream is of a huge, virtual snake coming along and swallowing up both of these behemoths. I can picture it’s huge belly bulging with the meal on which it has gorged.
Like Java and .NET, Python is built on top of a virtual machine. But the Python virtual machine has no billion dollar marketing machine singing its praises. As a result, it is a lot less well known, but the air it breaths is clean and the rivers and lakes from which it drinks are clear and unpolluted.
While Java and C# are simply opposite sides of the same coin, Python has its own unique syntax. Created after Java and after Perl, it absorbed the best features of both languages, and then learned many new tricks. And it is constantly under revision, as you can learn from studying the new decorator syntax available in version 2.4. It’s creator, Guido von Rossum, is both more handsome and more creative than either of the Bills. And besides, he has a better name.
Of course, in today’s world, programmers and managers alike follow the pied piper of marketing, which leads them off to lemming land where the cliffs are high and the sky is always gray and cold. Humming his tune as they march toward the cliff, few look to the right or left and see that there is more than one virtual machine from which to choose.
Here at Falafel, land of good food, where the Egyptians dance, and the Nile flows blue between the sands, there are those who worship at the altar of Bill the Great, God of Microsoft. His virtual machine floats like a giant blue sun on the horizon of our consciousness. But there are others who look above them and see a different sky.
And certainly the behemoth virtual machines have done much for programmers. They each provide freedom from the cold metallic hardware that lies beneath us. In these virtual worlds we can work with logical machines that operate at least a bit more like a human brain and bit less like a cold, rigid mechanism made of silicon and metal.
The flexibility found in a virtual machine has proved to be a boon to everyone. Unfortunately, a marketing team can help mold these virtual machines into whatever shape they like. For my part, I try to write not to a virtual machine, but instead to write to accepted standards and open API’s.
If you want freedom, and a breath of fresh air, you might also try to set aside a little time each month in which to play with a virtual machine that is not powered by a billion dollar marketing team. I suggest Python, but some prefer Perl, and others prefer Ruby. In any case, you owe it to yourself to see what life is like in the free world. The war of the virtual Bills rages unabated, but there are other worlds where the grass is still green, the air fresh, and the land peaceful.
Whatever we do, the wheel will keep turning. Listen to the creaking and groaning, hear the rhythms the wheel makes as it turns. This is the song we dance to each day as we write code.