Thursday, March 17, 2005

I bought a Mac Mini last week.  The day before I left on vacation, a tiny box from Apple appeared at my doorstep.  In a fit of boldness, I decided to take it with me and spend part of my weekend in Texas pounding away at it.  I wanted to get a feel for the kind of user/developer experience a Mac user would get as an “out of the box” experience and share it with you.

 

A few of caveats before I begin:

  1. This is a really long blog entry.  I spent an entire weekend in a love/hate relationship with my new Mac.  I want to share the whole experience with you.
  2. I deliberately avoided the “multimedia experience” of the Mac.  The features of Apple's iTunes/iDVD/iPhoto stuff are pretty well-known.  I was more interested in what kind of experience an average Windows developer would have.
  3. It's possible, especially during the development part, that I've done something that wasn't "The Apple Way."  I haven't touched an Apple since 1991, so any errors/omissions/undeserved grousing is entirely my responsibility.  If you read something in here where you think I'm just plain wrong/daft, pop in a comment and correct me.  I love my PC, but I'm also a Mac owner now, so any suggestions you can offer that would make my experience on here a better one is very welcome
  4. Yes, I work at Microsoft.  Yes, I'm an evangelist at Microsoft.  No, I'm not being paid to write this, nor am I writing this to be a shill for Microsoft's products.  I spent my own money to buy a Mac, and what you are reading is my own opinion.  I will say good things and bad things about the Mac.  You have been warned.  

 

The Out Of the Box Experience

 

Big kudos goes to Apple here.  My Mac Mini was a relatively high-end configuration. It had a 1.42Ghz G4 CPU, 80gb HD,512Mb RAM, DVD RW, built-in Bluetooth/802.11b/g, plus Bluetooth mouse/keyboard.  Microsoft employees actually get small discount from Apple, and the total “shipped to the door” cost to me was under $1000.  Looking back now, I recommend bypassing the Bluetooth mouse/keyboard combo and sticking to whatever Mouse/Keyboard combo you like (Microsoft, Logitech, etc.).  Aside from my rants about the mouse (see next section), I also noticed my Apple bluetooth keyboard occasionally didn’t send a character to the screen.  I can’t tell if this is because I’m having difficulty in typing with a “non-split” keyboard or if it was a Bluetooth problem.

 

Opening the (extremely small) box was simple, as was hooking the computer up to the monitor.  Startup was very simple, and after a short “first user setup” sequence, it hooked up to the Internet and identified several updates to install.  This procedure was simple, and each step was clear.  Other than the mouse issue, a Windows developer would have little to no difficulty getting used to OS X (and to an old Unix guy like myself, I'm quite fond of popping up a bash shell anytime I want -- of course, I can install Windows Services for Unix and get bash on my XP box).

 

The overall visual and performance, even for such a tiny box like the Mac Mini, is quite impressive.  The glass effects and visual behaviour of the dockbar is impressive, and overall visual presentation is simple.  One really cool thing is Expose, which allows you to quickly organize and look at all the open windows at once with just one button.

 

Apple’s Glaring Wart

 

In my opinion, this is a major Achille’s heel of Apple – their persistent belief that people want/need a one-button mouse.  My Mac Mini came with a Bluetooth keyboard and mouse, but the experience of a one-button mouse was nothing short of miserable.  What is ironic is that I suffered the EXACT same problem when I was first developing on a Mac IIfx running A/UX back in 1990.  You'd think that Apple would at least offer a three-button mouse as an option (although the latest news from Engadget says Apple is about to offer a two button mouse -- That would be nice -- a 21st century OS with an early 90's mouse). Fortunately, the Microsoft wireless mice/keyboards work GREAT with the Mac.  Even better, almost ALL software on the Mac is actually smart enough to understand right-clicks and the scroll wheel.  Um, Apple...if you wrote the software to support 3 mouse buttons and a scroll wheel, why not offer hardware to match the functionality?

 

Would You Like To Play A Game?

 

Let's be honest, you probably won't buy a Mac Mini for its gaming power.  That being said, I decided to give a few games a whirl.  The Marble Blast game that came with the Mac was cute (but simple).  The "Nanosaur2" game bordered on stupid (both in terms of gameplay and controls).  I also own World of Warcraft, which will install on either a Mac or PC, so I loaded that up and gave it a run.  Not pretty.  Yes, it was playable, but barely.   

 

Developers Developers Developers Developers

 

This was really the ultimate test.  What is the experience like to develop on a Mac?  How easy is it, compared to something like VB.NET or C# development?  This is my summary: In spite of Apple's XCode development tools coming for free with Mac OS X, developing on a Mac sucks like an inverted hurricane.

 

There are two primary paths a developer can take when writing code for OS X:

1)    Carbon: This is the C/C++ interface for writing Mac OS X applications

2)    Cocoa: This is the Objective-C/Objective-C++ interface

 

Unlike the managed/unmanaged demarcation Microsoft has with .NET, the Carbon/Cocoa difference is more about preference and background more than execution environment.  For instance, you can call Carbon APIs from Cocoa, and vice versa.

 

Performance-wise, Carbon apps are (theoretically) a little slower because they use a more object-oriented framework.  As a comparison, one game programmer indicated that a file management component took 800 lines of code in Cocoa, versus 18,000 in Carbon.  Generally speaking (from what I can tell), newer apps should be written in Cocoa, while older apps (C/C++ based) will benefit from using the Carbon APIs (Office for Mac is written using Carbon).  I will focus on Cocoa app writing for this entry.

 

I wanted to start with a simple window that had a few controls, just to get a feel for what my development would look like.  When you launch XCode and create a new project, you’re faced with a large array of startup options, generally either Cocoa or Carbon apps, but also including the ability to develop Java EJB or Swing applications (I'll skip over this part except to say this -- if you want to write a Java app, forget about XCode and use Eclipse).

 

After you select a Cocoa application, the XCode project window opens with a set of pre-populated files.  Although it looks nothing like Visual Studio, I didn’t find the layout to be too arcane/overwhelming.  One thing that was VERY different, however, was the process to create and wire up a GUI.  To begin with, you must launch a separate Interface Builder tool.  The tool is laid out rather oddly (from my prespective), but a quick read of some developer documentation helped. Unfortunately, playing “drag and drop” with the controls was the only easy part of the task.  The process of wiring up outlets and actions (similar to properties and events in .NET) is nothing short of wierd.  What would take a .NET developer a scant few minutes to do takes easily three to four times as long with the Interface Builder.  Compounding this is the fact that generating the code is effectively a one-way trip.  You really can't go back and add/change things without a lot of pain (According to the Apple docs, “Once you have created .h and .m files for a new class…, you should not use the Interface Builder Info window to add more actions and outlets to the class.”).Once the code is generated, you're back in the XCode development tool, and you begin "filling in" the code stubs generated by the Interface Builder tool.  This process is also quite painful, as the XCode editor has only redimentary code sense and contextual help (again, I emphasize I'm comparing to Visual Studio).  In addition, there is little to no help to warn you about potential errors in your code (I didn't turn on the "predictive compilation" feature though, so maybe that would have changed things -- XCode has some interesting features that appear to be turned off by default).  Once you've managed to write your Objective-C code correctly, you go through the standard "compile and run" cycle.  Debugging is also a challenge, but if you're familiar with gcc/dbg, you should be somewhat comfortable.

 

My Final Thoughts

 

Apple has a nice hit here with the Mini.  It's definitely lowered the bar for people wanting to bring a Mac into their lives, and it boggles me why PC manufacturers can't offer something in as small of a form factor as Apple has done.  For a non-gaming Mac user experience, the Mini delivers in a nice package.  For a developer experience though, the Apple developer tools have a long way to go.

3/17/2005 2:22:20 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [2]  |  Trackback
3/21/2005 7:47:12 AM (Pacific Daylight Time, UTC-07:00)
Was going to send ya this:

http://www.amazon.com/exec/obidos/tg/detail/-/0672325861/qid=1111416055/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/104-4165890-6596738?v=glance&s=books&n=507846

From a development perspective, I'm used to developing in a full Unix environment. I like having the whole unix shell, X11 built-in, things like that. Yes, there are some major differences, but not insurmountable ones. Is it possible it's not just because it's a very different development environment? i.e. I still haven't had any luck developing on windows - I've found it too.... clunky and difficult to get anything simple done.
3/31/2005 2:07:32 PM (Pacific Daylight Time, UTC-07:00)
All said and done - would you buy it again?

I'm in a similar boat - been a PC/Windows guy my whole career, with a brief entry into Apple-land with a Newton - but the Mini-Mac is attractive as a general use home entertainment machine. Plus it will fit in my component-rack and connect to my TV with the DVI input - so...

And - it does work with the MS Bluetooth keyboard/mouse combo?

One of my goals is a "shared family" calendar, my wife has a bluetooth phone, I have a bluetooth PDA and we could in theory sync to the Mini-mac, and display a common, combined calendar.

I haven't bought it yet, next month perhaps - but I am seriously looking into it.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Theme design by Jelle Druyts

Pick a theme: