Macs Make Terrible Development Platforms
Mac’s are not a panacea for programming/web development. There! I said it. I feel like an alcoholic finally admitting he has a problem. So desperate to cling to the ideal that Macs make the perfect development machines but I was kidding myself all along.
As a web developer/coder I used Windows and Linux (mainly Debian, Arch & Mint) for everything. I switched to a Macbook Pro in 2008 (the first unibody model) while at home.
When I first got it, I loved it. It was the best thing since getting my first computer as a kid. It made web development easier and all the major scripting languages I used were installed by default.
But now – 3 years later I’m having doubts and here’s why:
Cross platform GUI development is bad
If you want to create something in Objective C you’re fine and there’s bindings for all the major languages. However, if you want to create, say, a GTK app or QT app then you’re screwed. Especially if you want to do them in Ruby or Python. Want to use Python’s wxWidgets? ok – as long as you use 32bit mode. But this will cause problems when you package it for distribution. GTK – you’ll need the buggy, messy X11 server running on the host system. A GTK app on Windows and Linux ‘just work’ – to steal a favourite Apple phrase.
MacPorts is a Mess
I didn’t realise at first until I started getting numerous version conflicts between packages. MacPorts tries to make sure dependencies are kept in check but whenever I ran an update I hit numerous snags about active ports which required me to manually activate and deactivate things. There’s actually an FAQ entry about this but only for Perl. However, it doesn’t just affect Perl. I’ve had it happen with Python, Ruby, Lua, Perl and numerous others I’ve probably forgotten.
Lesson learnt – don’t fall into the trap of using MacPorts. You WILL regret it. It will take a while for you to notice the problems but they’ll come, especially if you want to do anything different and during upgrades.
The MacPorts alternatives aren’t much better
Although removing Macports solved a lot of problems there were still issues installing some libraries for Python and Ruby. The library would often recommend Macports because that was the easiest way to install it. Otherwise they’d provide difficult custom setup instructions that would invariably break numerous other things on your system. The whole phrase – “it just works” rapidly starts to lose its credibility after 2 hours trying to setup a Python library.
Too many versions and conflicts
There’s been so many times I’ve had the existing base installed software conflict with a MacPorts package or a binary install. I couldn’t understand why my dev web server wasn’t working. I was editing config files but nothing happened. After an hour of digging I discovered MacPorts had installed Apache as a dependency of some obscure library and I had that running instead of my usual web server – which died when it couldn’t use port 80. I’ve had the same issues with MySQL. I had the binary installed but it conflicted with a MacPorts install. I’ve got about 4 versions of Python and although virtualenv can make life easier its still a pain if you want to package anything. At one point I ran “python” on the terminal and it was version 2.5.5. Odd – I thought – Lion is meant to be 2.7. That explained that when I ran “easy_install xxx” I couldn’t access it on the Python shell. Because easy_install was installing to version 2.7 of “site-packages”. Not 2.5. Turns out “python” was pointing to the wrong version. Mac NEEDS the other Python versions for various internal things so you can’t get rid of them.
Of course I’m sure some will comment that I’m an idiot. I should have been more careful, more thoughtful, etc. However, what happened to: “it just works”? The fact is I was able to develop on a Linux box for years without having to obsessively keep track of versions and installs.
Its too similar to Linux/Unix – Some simple apps just don’t work
As an extension to the comments on GUI frameworks I mentioned I wanted to check out Deluge (a torrent client). Its built in Python so surely it’ll run? Oh yes – if you jump through numerous hoops, sacrifice a goat, pray to Beelzebub and eat a few virgins. The gods may allow you to run it fully. I wanted to use Deluge mainly to tinker with plugin development for it. I eventually used a Linux VM instead. The fact is, OSX is similar to Linux/Unix in many ways. Which is why so many Linux apps will run on it with very little change. But thats actually a hinderance. Its close but there’s just enough differences to make it really awkward to install many things. Unless you use Macports but as I’ve already pointed out that is a poisoned chalice destined to murder your sanity in the future.
Fuse/FTPFS
I’ve found it very useful to use FTPFS which enables me to link a local directory to a remote FTP location. So I can effectively edit remote code like it was local. Yes I’m well aware using FTP is frowned upon but we don’t always get a choice.
This was very easy on Leopard. Its extremely easy on Linux. However, on Snow Leopard MacFUSE broke. There’s a few new libraries trying to fill the gaping hole but none of them support FTPFS (last I checked a month ago).
I still love my Mac but I’m under no illusions that if I want to do anything remotely off the beaten path its a nightmare. I find myself switching to Linux VM’s or Linux servers to do coding work now. Because more often than not – Linux “just works”.
