The Coding Curmudgeon Is Apple's OS X The Best (or even A Good) Platform for Java Development? by Cay Horstmann September 15, 2003
Apple has touted the Mac OS X as The Best Platform For Java Development. In this article, I argue that Apple's marketing hype greatly distorts reality, and that Java developers should focus on Linux instead.
Apple positions OS X as the best platform for running and developing Java applications. Curious about the hype, and in the process of ditching my remaining Windows machine, I bought a Titanium laptop about 18 months ago. Apparently, I wasn't alone. The Titanium laptop is quite the status symbol among the coding cognoscenti. James Gosling, Tim Berners-Lee, Tim O'Reilly and Tim Bray all have one.
Should you do the same? I don't think so, and here's why.
Apple touts a nifty feature of shared JVM memory, and indeed this is an excellent concept. As a result, Apple promises that the startup time for Java applications is greatly reduced after the first one has started. Maybe so. But even with that boost, JVM startup time is miserable compared to Windows and Linux.
The port to the OS X graphics system is flaky.. For example, if you run my mini UML editor, Violet on a Mac, you will find that the initial dialog is blank. Ugh. This is a result of JOptionPane.showInternalMessageDialog, hardly an exotic feature. Switch to the Swing L&F, and the problem goes away. But the icons are still messed up. This is version 1.4.1, not some early beta. Sigh.
If the mouse hurts your hand, don't get a Mac. Apple claims "Mac OS X Jaguar gives a great computer experience to everyone. The system goes beyond the requirements of the U.S. federal governments Section 508 Accessibility statute to provide smooth, elegant features to those with difficulties using computers." To test that claim, walk up to your friendly Apple representative at the next trade show, casually grab the mouse, and ask for a demo of the development environment, with only the keyboard. Every time I try this, the poor person can't even launch the app. Windows and Linux have keyboard shortcuts to select all menu options quickly. The Mac doesn't. What pains me most is that the Mac folks don't even see the problem. They tell me that I can use any keyboard shortcut that the developer provides, such as FunkyKey+O for "File Open". How about "Tools Options". Oops--no predefined shortcut. I can't select Alt+T O, like in Windows or Linux. As it turns out, there is a key to get into the menu, and you can even redefine it. Can you then hit T to open the Tools menu? No way. You have to hit the cursor keys many, many, many times. That may be enough for the federal government, but it isn't enough for a mouse-weary coder.
Do you enjoy cute cursor keys? Then a Titanium laptop is for you. The cursor keys and function keys are tiny. There is plenty of space for larger keys, but it is all taken up by that cool looking silver surface. Other laptop manufacturers seem to be able to put decent keyboards into their products, but then of course, theirs are a boring black or gray.
The laptops are shoddily manufactured and don't withstand abuse well. The snazzy silver is actually paint, and it peels easily. The power adapter is flimsy--mine is on life support and my son managed to break two of them in short order. My IBM ThinkPad power adapter may not have won any fashion awards, but I've never had to worry about breaking the connector and being out another eighty bucks.
What's most annoying, though, is the Apple Attitude: Any problems with your Mac are Your Fault. Any perceived shortcomings are Your Bad Attitude that Needs Changing.
Flimsy power adapter? You bent it, so warranty won't cover it. (Apple Store staff person)
Tiny keys? If you must have larger keys, plug in an external keyboard! (Another Apple Store staff person)
No keyboard shortcuts? Install Emacs! (An Apple trade show rep). I actually did that. OS X renders its window decorations so beautifully!
Slow VM startup times compared to Linux? You must be wrong. (Another Apple trade show rep)
Swing flakiness? Maybe the early betas, but now OS X is the best platform for the Mac.(Yet another Apple trade show rep)
It looks as if Steve Jobs' reality distortion field is really working, at least inside Apple stores and show booths.
What do you get from the Mac that you can't get better on Linux? Java runs very nicely on Linux. It is fast and reliable. Just like with OS X, you can get a command shell, Eclipse and Emacs. And, most importantly, if you need to tweak something on Linux, there is a community of users that are generally helpful, instead of corporate drones telling you to change your attitude. There is just one thing that you give up: A piece of hardware that instantly tells everyone that you don't run Windows. Oh well...just get one of those tacky Penguin stickers at your next trade show and slap it on your laptop.
Have an opinion?
Readers have already posted
about this weblog entry. Why not
If you'd like to be notified whenever Cay Horstmann adds a new entry to his weblog, subscribe to his RSS feed.
Cay Horstmann is a professor of computer science at San Jose State University. He is an experienced professional programmer and was VP of Technology and CTO at Preview Systems Inc. He wrote many successful professional and college books, including Core Java (with Gary Cornell), Big Java, Big C++ (with Tim Budd), and OO Design & Patterns.