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.
I'm a Linux guy who is saving up his pennies to get an Apple machine (probably a Powerbook) for when my PC at home (AMD850 w/ 768 MB RAM) is finally far enough behind the curve I will need to upgrade.
I have to admit that this isn't a machine for serious coders, but I'm doing it to get my hands on OS-X, which I feel is just "UNIX on the desktop done right".
I also agree with you about the "Apple Attitude", as I've experienced that with my Mac using friends. Apple makes great hardware, and Mac users (much like Windows users) are used to the idea that they can't change anything to make their use of the machine better.
I think that as more Linux people move to Mac (the ones who have money anyway), the customization of OS-X will get better.
You're really comparing the Titanium laptop to Linux laptops in your blog. I'd be curious to hear your experience with OS X, per se, for Java development.
The only problem with comparing a Titanium laptop with Intel notebooks is that the specs might be widely different. For instance, I suspect that JVM startup (or loading any application, in general) greatly depends on the system's total I/O throughput capacity. Many laptops still run really low-throughput hard disks, which gravely handicaps those systems' overall performance.
Indeed, the only problem I find with Apple laptops is their price/performance value. I understand that most people don't buy a Ti book for its raw processing power... But, then again, the Intel-based laptop world just keeps coming up with better and better value propositions. For instance, you can now buy a <a href="http://www.zd7000forums.com">laptop</a> with a 3.2 GHz CPU, 512 MB, 17' display, 64MB of video RAM, 60GB of storage, etc., for a little over $2,000. As a development machine, speed matters a lot, IMO (you can run your unit tests more often...).
On the other hand, I always look at Artima proprietor Bill Venners' shiny Ti book with envy...
I wasn't going to respond, since this is mostly a "It isn't just like what I'm used to using" tirade, but regarding keyboard access... in the Keyboard control panel, there is a tab named "Full Keyboard Access." That tab reveals a pane with a check box to turn it on and off, and a pop-up menu to choose three suites of character combinations to control a Menu, the Dock, a Window, a Toolbar, or a Utility Window (palette). The third suite is "custom" where you can choose which keys-combinations you want to use.
So with this turned on, I can do control-m to active a menu, and use the arrow keys to highlight menu items or other menus, and the return key to select the highlighted menu item. Not that I would WANT to...
Unlike on Windows, a Mac user can whip the mouse up to the top of the screen, where it stops automatically, and then click and drag to select the menu. A Windows user can whip the mouse up to the top of the screen, but clicking in that position will not activate a menu -- he has to drag the mouse down 16 or 20 pixels and THEN click to activate a menu.
Observers with stop-watches can confirm that the mouse-whip-click-drag-release is often faster than some keyboard-only equivalents, even though the keyboardist THINKS he's going faster.
There are lots of ways for Mac users to customize their environment. See VersionTracker and elsewhere on the web for "haxies" and other shareware and freeware.
I totally concur with your disdain for keyboard-phobic software on the Mac. On the other hand as of this morning (!), the TiBook is no more as it has been replaced with an all aluminum case which (I suspect) has no paint on it (just aluminum; please correct me if I'm incorrect). IOW, all three PowerBooks (12", 15", and 17") are aluminum now (the 12" and 17" have been aluminum since their introduction in January). Also, I'm not sure the pricing on Apple portables is off at all. The various PowerBooks provide a full package (e.g., Bluetooth, USB2, Firewire800, Airport Extreme (802.11g), illuminated keyboard, Radeon 9600/64M, etc.) in a compact package, so you pay for what you get.
The mouse-centric nature of the Mac is regrettable (as is the chronically impaired one-button mouse). At least with the mouse, you can just buy whatever mouse you want and use it with OS X since OS X will happily entertain multi-button (etc.) mice.
I can't comment one way or the other. Despite twenty years in the computing business (financial and engineering systems), I've never actually come across an Apple computer since I left college.
I understand they are de regueur in the advertising/graphics sector, where looks/coolness/cred (and a pervasive fear of not being seen as 'with it') are everything. To me, firmly ensconced in engineering, that says it all. An Apple computer has always ever been a fashion statement
I'm in the process of building my next PC, to my own specs (and financial limtations). Has anyone ever built their own Apple?
> I understand they are de regueur in the > advertising/graphics sector, where looks/coolness/cred > (and a pervasive fear of not being seen as 'with it') are > everything. To me, firmly ensconced in engineering, that > says it all. An Apple computer has always ever been a > fashion statement > > I'm in the process of building my next PC, to my own specs > (and financial limtations). Has anyone ever built their > own Apple? > I believe Steve Wozniak did, so it is possible.
> So with this turned on, I can do control-m to active a > menu, and use the arrow keys to highlight menu items or > other menus, and the return key to select the highlighted > menu item. Not that I would WANT to...
My point exactly, Keith. However, Apple could give us something that people do want: the capability to type the first letter of the menu option. Right now, hitting a letter key does NOTHING. Seems cruel and unusual to me.
> Observers with stop-watches can confirm that the > mouse-whip-click-drag-release is often faster than some > keyboard-only equivalents, even though the keyboardist > THINKS he's going faster.
That may be so. I have read one report to that effect (by Tognazzini, I think) and none to contradict it. But my concern was wrist effort. It hurts my hand to move from the keyboard to the mouse.
Apple has in the past (not so much lately) tried to avoid putting third-party software providers out of business, so not supplying a full QuicKeys-like product built-into the OS is a part of that tradition.
In regards to ergonomics, none of the laptops (PC and Mac) I've seen are any good. I use a Goldtouch keyboard with the PC I use everyday, and used to use a Goldtouch mouse with that PC until the mouse died. I use a trackpad with the other PC I use everyday. The weird pointer device the IBM laptops have is extremely hard for me to use.
I use a third-party keyboard with my desktop Mac (I haven't liked any Apple keyboards in a long time), and I use Apple's optical mouse.
With my Titanium laptop, I use the built-in trackpad. I sometimes use a portable Kensington mouse (two buttons + scrollwheel) with the laptop, but rarely. I don't use the laptop for extensive keyboarding, so I haven't bought an external keyboard for it.
I suggest buying an ergonomic USB keyboard and mouse if you're planning to use a laptop for long coding sessions.
It also helps to do pair-programming, since then your partner can do some of the typing.
> Observers with stop-watches can confirm that the mouse-whip-click-drag-release is often faster > than some keyboard-only equivalents, even though the keyboardist THINKS he's going faster.
What?!? Was this study done by Jane Goodall?
There is no way that a mouse can compete with keyboard, except in first-person shooter games. In many cases, a single keystroke replaces several mouse movements and clicks, so comparing a "mouse-whip-click-drag-release" to hitting a keyboard combination is specious.
Not long ago, I was peering over the shoulder of a coworker who was editing a script using the mouse and menus for everything. It was horrible to see and endure. To switch the order of one word consisted of the following labor: select the word and the space character after it, move the mouse up to the File menu... oops, wrong menu, over to the Edit menu, then down to click on Copy, then back up to the Edit menu again and down to click on Cut (apparently unaware that "cut" == "copy" + "delete"), then back to click in the right place in the text (was is before or after the space character of the follwing word that we should insert? Hmm... fifty-fifty chance...), back to the Edit menu, down to Paste and finally up to the File menu, down to Save (wouldn't want to lose all this hard work!). (I am not making this up and it is not an exaggeration.) At this rate, he could compose entire paragraphs in a single day. Maybe.
I don't know what silliness or contrived tests were manufactured by the stopwatch-holders mentioned above, or what their agenda was, but not even Devo can whip it fast enough to compete with a competent keyboard wielder. The mouse and menu adventure chronicled above could be handled in four very quick keystrokes.
Speaking of stopwatches, just last week I wrote a little stopwatch program in C# (which was amazingly simple with the DateTime and TimeSpan objects, I must say) to do a little measuring of startup times of applications. Naturally it has shortcuts as well as buttons. Maybe you are a lot faster than I am with a mouse, but when I click "start" then "stop" as quick as I can, the best I could do was 26 milliseconds. Using the keyboard shortcuts, I can manage 3 milliseconds handily. You do the math.
...Ah ha. I just previewed this post and noted a small but crucial word in the original quote "...mouse... is often faster than some keyboard-only equivalents..." which, of course, leaves wiggle room to find one or two cases where the mousing is more efficient. (However, I suspect the use of the word "often" is unsupportable). Of course there probably are such cases, but on the whole there is no competition, so they are meaningless.
Since I had put in some postive comments about Mac OS X a few months back, I thought I'd balance that with some comments about Linux. I have only recently begun actually using my Linux client, a WinBook laptop, which I've had set up for six months or more. I in the process of moving Artima.com to a new server, and in the process I've configured my client as closely as possible exactly the same as the server, so it can serve as a testbed. (The server running Artima.com is and has always been Linux.)
I must say I've been really having a great experience using this Linux laptop. One of the main reasons I got OS X was that it also runs some commercial software I want to run, which isn't available on Linux. But now that I've gotten things rolling on this Linux laptop, I'm going to experiment with more open source desktop app and see how it goes.
The main app I wanted the pushed me to OS X was FrameMaker, but I also bought a bunch of Adobe apps and MS Office (which I got at a steep discount while at MS in Redmond). People send me Word docs and Excel spreadsheets all the time in the mail. These are potential advertisers asking for proposals in Excel. I can't just say, sorry. I need to be able to run Excel. But perhaps OpenOffice would open most of those.
Of course, there are a handful of apps that I really need Windows to run, and so I still use Windows (also on the WinBook) for those things, and for testing. None of these OS's solve all my problems. Like Cay, I also miss the keyboarding style I used on Windows when using my Mac. I certainly feel faster doing certain things on Windows than on the Mac, but on the whole I'm much happier and more productive on the Mac. The Mac gives me a combination of Unix with the ability to run both commercial and free software out of the box. The Linux client can do a lot, but some things just don't work, like opening and closing the lid to put it to sleep and wake it up. Maybe I could get that to work with some creative system administration, but time is money. Part of the reason I feel the extra expense of a Mac laptop is worth it compared to setting up a Linux laptop is that all the hardware is already configured out of the box.
I have to say that I thought there were some cheap shots at those who offered you potential solutions to your problems, when you had already made up your mind that the only solution was for them to get on the batphone and tell Steve Jobs to make Mac OS X more like Linux ASAP but further help in that vein:
First, small arrow keys, yes, your right they are stupidly small and I have no idea why but if you're an emacs user (or even if not) you can reduce your reliance on them and keep your hands on the keyboard as all Cocoa apps implement the equivalent emacs shortcuts for the cursor keys in text areas etc.
Familiarity with advanced Mac mousing technique should help as well, for example, most people know that double-clicking selects a word, but few know that if you hold and drag on the second click you can select text that will grow to include the whole of the words you start and finished on. Triple-click does similar for paragraphs.
You may *feel* that keyboard access is faster and more ergonomic but I'd look for some hard evidence before accepting that as anything more than a highly subjective opinion.
I'll finish by saying that I think impying that there is not " a community of users that are generally helpful" is a bit of a slur on the Mac community known not just for it's rabid zealotry, but also for it's warm welcome for new users of any ability, a concept certain members of the Linux community have yet to grasp, though I'm glad there are many who do .
Now what I would love to see is a more thorough examination of your Java/Mac OS X/TiBook experiences broken down so different factors can be clearly separated.
* How is Mac OS X for server-side development? * How is Mac OS X for client-side development? * How good is the TiBook running Linux? Compared with similar price Intel laptop running Linux and TiBook with Mac OS X) * How good are laptops for development in general? * How good is the Mac for running cross platform apps (Eclipse, emacs, Word, etc)? * What *can* you get on the Mac you can't get elsewhere, and is it worth it from the point of view of a Java developer? * A comparison of Mac community versus Linux community and Mac salesmen, evangelists and astroturfers versus Linux salesmen, evangelists and astroturfers.
(sidenote: And does it make sense to speak of an exclusive Linux community when Java and most Java tools as well as many Open Source projects now run happily on several Unix type OSs (and often windows too)? Aren't several major Open Source projects developed at least partly on Mac these days (Perl6?)).
I hope you give yourself enough time with your TiBook and Mac OS X to see if you really like them or not and get the most out of them. There is an undeniable momentum surrounding the platform at the moment (which I often tell Linux guys is *good* for Linux and alternative platforms in general, just as I have to explain the exact opposite to Mac guys about Linux's momentum). Surely they aren't *all* falling for the Reality Distortion field?
Flat View: This topic has 28 replies
on 2 pages