Thursday, 26 April 2012

Why Linux is better than OSX for software developers

NOTEBefore I begin please note that this is purely based on my experience with these OS's and by no means should be taken as gospel.

I've been a web developer for 5-6 years professionally and about 10 years total. In my time I've developed on all 3 major platforms, Windows (4 and half years), OSX (1 and half years) and Linux (Ubuntu, 3 months).

Ok, so the first thing you'll be thinking is that I don't have much of a basis for comparison having only used Ubuntu for 3 months. However, let me tell you, that's all anyone will need to see the benefits.

Discussing Windows is (well) beyond the scope of this post so I'll leave the Windows stuff behind from this point on.

Lets get one thing clear OSX isn't a bad environment to work with, purely because it's unix based. There are a lot and I mean A LOT of editors/IDEs available including some top notch ones like Sublime Text 2 (which is by far my favourite), TextMate and Coda - though all paid for you could still opt for a comprehensive IDE like NetBeans.

There are lots of tutorials out there that mainly focus on OSX as the platform of choice. Since switching to Ubuntu I often wonder why this is the case and these are the reasons why:
  1. Creating a file in OSX is far too involved unless you use the command line - which not everyone is comfortable with, rightly or wrongly;
  2. The PHP installation is tied into the OS preventing easy upgrades and forcing the use of 3rd party apps to run a PHP stack;
  3. Since the advent of the 'App Store' I would have thought package management would have improved. Shamefully, I think it has actually made things worse! You can either download an app from it's website and have it manage it's own updates OR download an app through the app store (a central point) and have the app store manage updates. Prior to the app store the former option was the only one available. Now, Apple seems to think it's a good idea to fragment things by introducing an app store which not only forces the apps developer to subscribe for $99 per year just for the privilege of including their app on the app store but fragments package management. Way to go Apple!
Ubuntu on the other hand, now I know I said I'd leave Windows out of this but I have to throw some kudos their way. Ubuntu has recognised that there should be an easier way to 'point-and-click' and create a new/blank file and adopted the same.similar method to Windows - right-click in a blank space and click create new file. How simple is that?!

Ubuntu may have issues similar to the PHP one in OSX but with other languages (somehow I doubt it) like C or python but from what I have experienced these languages install and setup independent from the core OS - unlike OSX. Which means you can do what you like with that installation and not worry about it wiping out you OS. On a related point, upgrading PHP is unbelievably easy...

Package management, OSX can only dream of having package management like Ubuntu or even Linux distributions in general. Remember how I said OSX's package management it fragmented, well, whilst you can fragment it in Linux if you want to (take note Apple 'if you want to') the package management in Linux as a whole is managed via a central point. If you can't grab a piece of software via this central point it's usually because it doesn't know where to find it. But guess what, you can help it out by telling where to find it. Then simply install it and the system will tell you when there's a new update available and manage it all through a single point. Seems like a no-brainer approach to package management, right? Well, try telling Apple (and for that matter, Microsoft - yes, I know!) that they're doing it wrong.