This just happens to be another rambling post about programming. I’d like to get some kind of little tags by the post title so you can quickly tell what a post will be about, but until then, I will warn you manually.
Ok, now that all the non-programmers are gone, let’s talk about something near and dear to my beady digital little heart: Cross-platformability. But first, let me tell you a boring little story about myself. Looking back at my youth, I can’t point to any one place in my life when I first knew. For a while I thought I was normal, just like everyone else. But gradually, bit by bit, I came to the realization that I was not. Somehow, through some random roll of the Big Dice, I had come out different. I was a minority for life. I was an Apple user. It started innocently with an Apple II+ handed down from my dad. I’m told this is a fairly normal experience for many boys. But unlike most boys who would go on to own a manly, grown-up IBM-PC Business Computer, for some unknown reason I continued down the effete track with an Apple IIe+, and Apple IIgs, a PowerBook 140, a PowerMac 7100, PowerBook G3 (Lombard), and now finally a PowerBook G4 (Aluminum, showing its age in a gross patina of grime and smudges).
Being in the ethnic minority of computer systems is probably at the root of my interest in cross-platform programming. I want to make things that will run on my own computer, but I’m not so fanatical as to think that developing for the Mac alone is sufficient. So I’ve always approached game programming as a process of building upon those tools that are open or portable. Thus I learned to use OpenGL instead of DX, mikmod instead of DirectSound, and network byte order instead of native order.
I’ve always been “that guy” when it comes to byte ordering. Working in the games industry, where up until recently cross-platform usually means WinXP and Win98, things often stick in my craw, and one of those things has been a willful disregard for the importance of serializing binary data in network order. Big-endian is natural. It’s what academic egg-heads agree on. It’s what Sun and Macintosh computers use. The only hold-outs using little-ending systems are those pesky Windows machines. A pox on them for using wrongly-ordered data! They should all just man-up and switch their bytes around so that they can communicate like civilized beings.
At least, that was my feelings on the matter until recently. Starting yet another project, my first inclination was to, of course, send network data in network order. But then for some reason I paused. It occurred to me that new Macs now are little-endian, and that nobody has installed anything on a Sun server since 1998. I suddenly realized that the number of computers still using a big-endian architecture can only diminish from here on out. And I was finally able to let go of my fetish of flipping bytes and compulsively calling hton() and ntoh(). I was finally able to let go of being right let go of just one more piece of archaic computer history.
I’m typing this on my last big-endian computer. From here on out, I’m stepping out of the way, and allowing for the fact that the lingua franca isn’t necessarily always French.


Jeremy, do you have any feelings about the forward slash vs. the backslash in pathnames? (And which IS the backslash anyway, is it ‘/’ or ‘\’, I always forget…)
Yes, on slashes I am still a fanatic. The forward slash ( / ) is the way to go! Every OS now understands about forward slashes, and using them in strings is much easier, since if you want to include a backslash in a string you have to escape it, and that starts looking pretty ridiculous.