So good old @dozba, in his typically endearing style, wrote about why MacOS X is an Unsuitable Platform for Web Development. His criticism about Textmate seems a bit silly, but his rants about package management remind me of my own problems with a proliferation of language-specific package systems, and “you don’t deploy to BSD” is spot-on. You would think that people would realize that developing on one platform for deployment on another can be problematic at best, but apparently the lesson needs repeating. At work, we even see glitches when people develop RHEL stuff on Fedora or vice versa, and those are both far more similar than the Mac is to anything you would ever deploy in production. What was even more amazing to me was the Slashdot reaction. Even knowing – all too well – how far Slashdot has declined, some of the stupidity on parade there literally made my jaw drop. Let’s review the main point here, OK?

Developing and deploying on different platforms is only OK if you stay well inside some kind of insulated sandbox and don’t care about performance.

The first part, about sandboxes, is mostly about avoiding functional differences between the platforms. If you ever use platform-specific configuration info or ioctls or anything else that requires an additional abstraction layer to make the code even run on both platforms, then you’re on very thin ice. Nine times out of ten you’ll be giving the people who actually deploy the code on real systems a good reason to hate you. As for performance, there are two sub-points. If you’re running in that nice insulated sandbox of a JVM, then its performance warts with regard to thread and memory handling will probably outweigh the warts in the OS scheduler and virtual memory systems. To a lesser extent the same might be true if you’re using Python or Ruby or Erlang. If the performance that matters is network or storage (filesystem/LVM/disk) performance, then you won’t even have that excuse. You just can not expect two operating systems from completely different families to exhibit the same balance and inflection points at different I/O rates, sizes, thread counts, etc. and all of the knobs for tuning around these idiosyncrasies will be different too. If performance matters at all for your application, you need to be working with the same performance ratios and tuning facilities across development and production. Does the Slashdot crowd seem to get any of this? Of course not.

Of course, you can dual-boot Linux on it or run it in VMWare. But you knew that, right?

Couldn’t be more wrong. If you’re doing anything virtual, then you’ve just made the matching-environment problem even worse, because now you’re subject to differences in both the host and guest OSes (and the hypervisor between them). Also, if you’re so addicted to running stuff in virtual machines then you’ll probably have a lot of them contending with one another and distorting the performance picture even more.

I can’t imagine writing code so finicky and unstable that it can only be cajoled into running under such a specific environment.

This guy has obviously never written anything but toy code. In the real world it’s very easy for code to run well on one platform, run poorly on others, and not run at all on still others. All you need to do is use one platform-specific feature, or rely on one platform-specific aspect of performance to guide your implementation tradeoffs. It’s writing code that runs on many platforms that can be a challenge, and code that runs well on many platforms is quite rare.

OK, so picking on Slashdotters is like shooting pithed fish in a very small bucket. The real point, though, is that all those developers using their MacBook Pros to develop code that’s supposed to run on Linux are doing their colleagues and users a great disservice. You don’t like the Linux environment as much? Too bad. Make it better. That’s how your deployment platform got to the point where you’re using it, after all. People used it, mostly liked it, and fixed/replaced the things they didn’t like so much, and added new stuff to scratch their own itches. If you use the same platform for development and deployment, then every improvement you make has twice as many chances to benefit someone else, and every improvement someone else makes has twice as many chances to benefit you.