mac versus linux for a jvm developer



This post details the thought process I went through when trying to decide on a platform for my next development laptop. I develop on the JVM with Java and Groovy being my core work languages while Clojure is my current home and hobby language.

For whatever reason I spend a lot of idle cycles thinking about the 'best' development platform for my line of work. I'm open minded when it comes to operating systems. I've had a go with the three primary desktop offerings. From 2005 -> 2010 I did my development on Sony Vaios running a varity of Linux distros: Ubuntu, Suse, Mandriva and Fedora. My favourite combo from that period was definitely Mandriva running on a VAIO Z Series (Boooo to Sony for cutting that line of machines).

After that I decided to give Windows 7 a go on a ThinkPad T530. I only lasted 6 months on this combination. I really missed ZSh and a good terminal program. Office worked really well though. As the title of the post suggests I am not going to do any comparisons with Windows. It is a good operating system but not for me.

The event that ended my short run with Windows was that one of my fellow developers wanted to sell his Mac Book Pro. It was a couple of years old at the time but I am still using it now and after switching in a Solid State drive it has been a very reliable and perfomant machine.

So having run OSX for a year on what is now a three year old laptop I'm looking to enter the market again for a new machine. Absence makes the heart grow fonder and the free wonderland of Linux is looking quite appealing again. The purpose of this post is to drop the rose coloured glasses and do a completely unscientific comparison of the two platforms. Each section below is assigned a score, highest total for the win.

The two machines I am using in this post are listed below. The Linux machine is a desktop and the Mac is a laptop but I'm not benchmarking build times or FPS, I'm just comparing the usability of the 2 environments.

  • OSX 10.8.4 on Mac Book Pro Mid 2010
  • Intel® i7 CPU 2.80GHz x 2
  • 8 GB RAM
  • 256 GB SSD
  • Ubuntu 13.04 64-bit
  • Intel® i7 CPU 930 @ 2.80GHz × 8
  • 11.7 GiB RAM
  • 256 GB SSD

stability - 4 points

Stability is the most important factor for me and this section is weighted more heavily than the other categories. If your machine isn't working you can't bill any hours.

And this one isn't close. The Mac wins hands down. In my experience OSX is easily the most stable desktop operating system I have used. The sleep/resume works flawlessly, often I won't shut the machine down for weeks at a time. The desktop itself is very responsive and even when using all my memory hungry Java apps the performance doesn't falter.

As for Linux it is fair to say I have had my share of stability issues, especially on laptops. Most of those around wireless and graphics drivers. Eventually I get the hardware running but I get no pleasure from the experience. I'd rather spend my time working on code than trying to nut out which combo of bios settings and kernel modules will get my dedicated NVidia card to powerup.



development tools, gui apps - 2 points

The main gui development apps I use in order are:

It is pretty much a wash here, 2 of them are Java based and work well on either OS. Probably a slight nod to the Mac for Java as the widgets are more slick. Emacs 24 seems more stable on Linux but it is still one arcane piece of software regardless of the OS.

There is a Mac tool called Dash that I use for snippets and quick documentation. Nothing as nice exists on Linux that I know of so that tips the scales in favour of the Mac.



development tools, command line apps - 2 points

Most JVM developers spend a lot of time at the command line especially in devops type shops like my current client. Most of the tools exist on both platforms but the ease of installation on Linux puts it ahead in this category. Both Brew and Ports for the Mac are good options but they aren't native like the Linux package managers. My main CLI Tools:



the keyboard - 1 point

When I started with OSX I found the Mac keyboard frustrating. Now I am over a year in and I still find it average at best. The laptop keyboard, due to the placement of the 'fn' key, gets on my wick. One of my workmates points out that separating the copy, command+c, versus control+c for killing a process works well at the terminal but it is a small win.

The ctrl, alt and shift keys on a standard PC keyboard give me more than enough options for program interaction. The addition of the command key on the Mac keyboard just seems to confuse my poor fingers. In my mind there is better hardware on the market for PC keyboards as well, especially the Razer line, they really blow my hair back.



os utilities - 2 points

There are a few additional, non development, tools on the Mac that make my life easier. Top of the list is the app launcher, Alfred, it is the best way of interacting with an OS I have found. Another useful tool is Pathfinder, it is a great file browser with plenty of quick shortcuts that make life easier in a devops style environment. Other notable mentions on the Mac are:

Linux doesn't really compete in this category, the OS tools are passable but nothing really stands out.



hardware - 1 point

The Mac Book Pro hardware is excellent in the facets relevant to standard business development. Fast Quad Core processors, 16 Gigs of RAM and large SSD drives. The slight downer are the dedicated graphics cards. At the price point the NVIDIA GeForce GT 650M isn't particularly powerful. I do hope the rumors of a lack of a discrete GPU in the upcoming Haswell refresh of MBPs prove to be false. They are sold as high end machines and a high end machine needs a meaty graphics card.

Technically I can get better hardware in the PC Laptop market. The upcoming Dell Precision M4800 and the Lenovo ThinkPad W540 can both be spec'd to a higher level but I'm wondering about the ability of any Linux distro to handle the 3200 x 1800 resolution displays. Hardware is all well and good but if the OS can't drive it optimally there is not a lot of point in paying for it.



the cost of your soul - 1 point

I do feel better about myself working on a Linux box. The bulk of the populace are trading privacy for convenience when it comes to their computing (e.g. cloud everything). I like the idea of open source, security conscious operating systems existing as alternatives to the established tech giants. Unfortunately, that being said, it does look like most JVM devs at the conferences I attend are all switching to Macs.




An easy win for the Mac really and that is without factoring in the rest of the Apple ecosystem. I think it could be a tough few years for Linux on the Desktop as the complexity of Laptop PC hardware increases. I guess when the new Haswell Macs are announced this month I'll be having a kidney removed to help prop up Apple's bottom line. Maybe I'll get lucky and one of my workmates will be keen to onsell one of their last gen machines as they upgrade.