When Terry Weaver wants to create .Net applications, he fires up Visual Studio and types away like any other .Net programmer. The setup gets a bit weird when he wants to test how the .Net application might appear to a Mac user visiting the Web site. Instead of starting up another machine, asking a colleague with a Mac, or simply ignoring those crazy followers of Steve Jobs, Weaver just pops over to the browser in another window. That's easy because Visual Studio is running on Windows inside a Parallels virtual machine, which, in turn, runs on his Mac. He has a PC, a Mac, and a Unix development box all in one.
"I set up the networking so that I can type the IP address of my dev Web server to test my ASP.Net pages to see how they look and behave on Mac systems," said Weaver. "I think that's a good thing since I don't believe many developers of .Net take the time to test their applications on browsers in other operating systems."
InfoWorldTest Center review: Why the MacBook Pro is still the best laptop you can buy.
See InfoWorld's special report on how to make the Mac fit as a business desktop.
Stories like Weaver's are increasingly more common as the Mac's popularity among programmers continues rising. Apple's decision to move to Intel chips and embrace virtualization of other operating systems turned the platform into a very flexible tool for programmers. Macs let coders work with most of the software standards that live in boxes that range from the smallest smartphone to the biggest cluster of computers.
This newfound success has been evolving for some time. One team manager interviewed for this article said that his programmers started switching from Dells and ThinkPads at least three years ago. Now 80 percent of his group uses Apple laptops.
X marks the spot
The explosion of interest in smartphones is helping the trend. The Miami-based Weaver says the fact that he's using a Mac made it simple to start experimenting with the iPhone development kit, available only on the Mac. Google's Android SDK and RIM's BlackBerry SDK both run in Java, a language that's usually well-supported on the Mac (though Java releases for Mac tend to lag behind those for Windows, Linux, and Solaris). Developers for the Palm OS also seem to gravitate toward the Mac OS X. All the major handheld operating systems except Windows Mobile run directly on Mac OS X, and Windows Mobile runs in Parallels Desktop or VMware Fusion.
Programmers who concentrate on enterprise development and server applications are often devoted to Apple's hardware, although they're usually able to cite several dozen glitches and incongruities that annoy them. Developers building code for the Unix-dominated world of servers naturally feel more at home on the Mac. Although the surface layer is dripping with consumer-friendly eye candy, the underpinnings are close to those of BSD. This makes OS X a kissing cousin to Sun's Solaris and many versions of Linux. If you're developing for Sun servers, a Mac laptop offers a portable environment that's comfortably familiar.
Each developer, though, will curse at some difference that drives them insane. The Mac, for instance, insists on using a carriage return to end lines, a historical anomaly that clashes with both Unix (line feed) and Windows (carriage return and line feed).
Problems like these are disappearing as more developers grouse, but change is slow. The newest versions of the file system on the Mac, for instance, are now both case preserving and case sensitive, but you can still type "ls /library" in a command-line window and get the same results as typing "ls /Library" -- not so in most versions of Linux or BSD.
Others complain about what they see as poorly tuned performance and generally sluggish behavior. One programmer who refused to be named because he's on the other side of a negotiation table with Apple says that OS X often feels like it's "wading through mud." In his experience, the virtual memory system does a poor job paging data in and out of memory, and the default-network file system, AFS, is engaging in some kind of passive-aggressive torture. This programmer does, however, use the Mac frequently, no doubt enjoying the snappy performance of music and video, which get a high priority in the OS X kernel.
Java development on the Mac is also very popular, in part because all the major Java development environments are written in Java. Therefore, Eclipse, IntelliJ, and NetBeans all run about the same on Windows, Mac, and Linux boxes. While there is a bit of native code, most software -- including all the server applications -- compiles and runs in almost the same way on all three systems -- well, at least until you try to run some shell script that relies on case sensitivity.
Shouldyou develop apps for Android or iPhone? See Neil McAllister's SDK shoot-out.
Java is not the only language for server applications that flourishes on the Mac. David Heinemeier Hansson, the creator of Ruby on Rails, and his colleague Jason Fried, one of the co-founders of 37signals, are featured on Apple's Web site endorsing the machine. A beautiful and tastefully undercolored video describes the joys of building Web applications on the Mac.
"Working on the Mac really inspires me to do great work," says Fried in a voice-over to the video. "When you work on something great, you're generally going to build something greater."
While this may seem like pure hype at first glance, Fried explains in the video that his company is developing Web software with many of the same design objectives as those of Steve Jobs.
"37signals is all about doing less software," says Fried. "Simpler products that do less than the competition. A lot of people think that in order to beat the competition, you need to one-up them or outdo them. We think we can underdo and one-down people."
So the same design elixir that built the iPod and the iPhone can seep into your own code by some bit-based osmosis.
Many software developers also cite the proliferation of graphic design tools on the Mac. As good artistic effects become more and more important to software, using Macs helps programmers find a bond with the stylishly dressed, visually obsessed designers across the office.
The design and quality of Mac hardware is also cited by many. Aaron Mulder, the chief technology officer at Chariot Solutions, uses a Mac laptop and a Mac Mini for developing. He says he will sometimes take a Mac Mini along with a big-screen monitor because it's the most portable way to work with a screen that's larger than 17 inches.
"Mac OS 10.5 ships with a ton of development tools, including Subversion and Rails -- so it's very easy to get started. All you need is a proper text editor or IDE," he explains.
The sting of ka-ching
While the price of Macintosh hardware continues to be competitive with the best commodity laptops and desktops, Apple offers nothing in the rapidly expanding lower tiers. It's possible to build a quad-core PC running Eclipse and Gimp for less than $400 with refurbished hardware. At the time of this writing, the Mac Pro with one quad-core CPU begins at $2,300. Adding Photoshop and other tools can push the bill closer to $4,000. While the Apple machine is much prettier and quieter, the price makes it harder for people to justify.
PCs are also available in greater variety. Although Apple's laptops are highly regarded and craved by many developers, the line is limited. Apple doesn't make a Netbook or a 12-inch machine. Although underpowered Netbooks like the Asus Eee PC and HP Mini-Note aren't really suitable for resource-intensive development work, they can run both Linux and Windows.
There are indications that the Mac is finding itself in a tighter race with other Unix distributions for the hearts and minds of programmers. James Gosling, vice president at Sun Microsystems who leads the Java development team, was once very devoted to Apple. But last year, he announced on his blog that he wasn't carrying an Apple laptop as frequently. OpenSolaris was running well enough for him on commodity hardware. "Java, NetBeans, and GlassFish go like the wind!" he wrote of Sun's products. "It's amazing how fast things run."
The creators of some Linux distributions, such as Ubuntu, are just as aware of good visual design as Apple. All of the Java-based tools for developing on smartphones and the server work as well on Linux and commodity hardware. The new visual improvements to Ubuntu, though, are leading some to feel that it's getting slower, something that's borne out by recent benchmarks.
Others' objections are more political. Apple's decision to drop the word "computer" from its name is part of a trend that is rubbing some developers the wrong way. They note that the company's pursuit of the wider marketplace is hurting the spirit the company once celebrated in its famous commercial in 1984.
Apple is now becoming notorious for deliberately not giving customers what they want: iPhone users can't cut and paste. Simply reading the iPhone developer's documentation requires agreeing to an onerous licensing agreement. Just about when the T-Mobile G1 smartphone arrived with Google's open source Android operating system, Apple loosened the agreement significantly.
Some of the newer products are locking out uses that programmers expect. Although Apple TV is clearly running on a version of OS X, users can't even pop open a browser window, let alone use a command line in the living room. Apple is pushing heavily for stiff control over what happens inside its beautiful shells, knowing full well that most customers could care less about checking their cron jobs in a command-line window while watching a movie.
Apple has defended itself against these accusations, pointing out that new markets like cell phones require more control. There's little damage that a desktop programmer can do beyond crashing an application, but the cell phone world is new and evolving. If a programmer leaves an endless loop in an iPhone application and the battery dies quickly, Apple will get the blame, not the programmer.
Some even half-joke that the Mac's place in the center of the programming universe is more a surprising accident opened up by the transition to Intel's chips. The company's real focus is on the unwashed who think that the word "Perl" is a misspelling. The lament is just like when the once cool, independent rock band makes it big. The money, the fame, and the adulation are impossible for the new star to ignore, especially one that is a profit-maximizing corporation beholden to the shareholders.
Naturally, the coders hope that Apple will somehow find a way to play to the nonprogrammers while the Mac continues to be the most beautiful and least-flawed solution for turning keystrokes into bug-free code. After all, the programmers are responsible for much of what the nonprogrammers love about the machines.
This story, "Why developers prefer Macs" was originally published by InfoWorld.