iPains

Seasoned Windows power user acquires MacBook Pro. Switches cold turkey. Was it worth the iPain?

Sunday, April 30, 2006

What non-Mac users think they know about Macs (is probably wrong)

Apple computers five years ago are not what they are today. I mentioned in an earlier post that I was left with no fond memories when I had to use one at a job in 1997, which I think was running System 7. From what I hear, things didn't improve too much until the first version of OS X arrived.

A lot of people I talk to still presume that Macs are just as crash-prone, irritiating, and limiting as they were when I first used one. I've been gathering these various popular beliefs and will share them here in an attempt to debunk or validate them. I will constantly update this post as I learn more. So, in no particular order:
  • Mac laptops are expensive, compared to, say, a Dell counterpart.
    A: This is true for most Apple products, but I don't think it holds much weight against the new Intel-based machines. From a company's point-of-view: $400 or $500 difference over the life of two years for a development machine = $30/month. If this is an issue for your company, it's not treating its knowledge workers (i.e. the developers) as it should; find a job that does.
  • Comment: "Point one [above] would be debatable in my book. Most of us aren't lucky enough to have work buy our computer. I'm not convinced 500 bucks more (out of my pocket) for a similar machine isnt worth it."
    Response
    : Your employer doesn't buy you a work computer? That sucks. ;) Anyway, I'm mistaken regarding the $500 price difference: I just spec'd out a top-of-the-line, equally powerful Lenovo ThinkPad and it costs the same as a top-of-the-line, MacBook Pro. Don't need top-of-the-line? A less powerful MacBook Pro will roughly cost the same as a less-than-primo ThinkPad. MacBooks are arguably better engineered too: thinner, lighter, bigger and brighter monitor, and sexier. Pricing is just not a valid argument anymore.



  • You can't play games on Macs.
    A: Untrue. Take a look at the top 10 best sellers, which includes Quake 4, Civ IV, Call of Duty 2, and Jedi Academy. However, not all games that come out for PC are ported to work on a Mac, but this will change since Macs are Intel-based now. And if you must play something that works only in Windows, install XP on your Intel-based Mac using Boot Camp.
  • Since 90+ percent of your users will be using Internet Explorer on Windows, you really need to be making sure your pages look right in that browser. Seems like you would need to keep a Windows machine around. So really you can't replace your windows box with a Mac, now you are just *required* to have two computers. (add another $1000 to that already higher cost).
    A: True, sort of. Microsoft no longer provides Internet Explorer for Macs, at least not IE5.5+. However, you have a few solutions regarding this issue, and since this issue is work-related they all are likely to be viable:
    1. Use Remote Desktop Client (RDC), created by Microsoft, to connect to any Windows machine from OS X. Point IE at your Mac (or wherever you've deployed your web app) and test away. Switching back and forth between your IDE and RDC is trivial when testing, especially if you have a dual monitor setup. Obviously this solution requires one to have a separate Windows machine, which is likely at your place of business.
    2. Use VMWare, such as Parallels.
    3. Install Boot Camp; develop using Firefox, then reboot in XP to test in IE. This is the least productive solution.
    Whether these solutions work for you is subjective; in my case using RDC is ideal (we have a server running Windows 2003 server that I have access to). VMWare is a good solution too. Oh, and regarding the "add another $1000": you can get a Dell desktop running XP with IE for at most $600, and likely much cheaper.
  • Macs are primarily used for high-end multimedia processing/manipulation.
    A:
    Perhaps, but I thought that Silicon Graphics machines usually fit that bill. I know several developers that primarily use Macs, and they're not editing movies, images, and sound. They're writing and compiling code for various web technologies.
  • It must suck using just one button on your mouse.
    A: It sure does, that's why I'm using a five-button mouse right now.
  • Macs will drive you nuts as a development platform, since you will likely have trouble getting all your development software, configuring your development software, and then tweaking & debugging the OS when something needs fixing.
    A:
    I had no trouble. I prefer JDeveloper, SmartSVN, SQL Developer, Firefox (or using RDP for IE 5.5+), Ant, MySQL/Oracle, and Tomcat. A friend of mine prefers working with EMACS. Another prefers Eclipse for his IDE. We're all happy, and no one had to tweak or debug the OS to get that way.
  • Cross your fingers for a Mac version of your favorite software. Be prepared to compile source code for open source apps.
    A: For OSS, use DarwinPorts or Fink. Both are package managers that simplify and standardize the process completely. In fact, this kind of package management system absolutely kills anything in the Windows world. DarwinPorts so far has provided me with everything I've needed: Subversion, Ant, Apache Tomcat, any many others.
    As for other software packages, this might be true, and you should take this into consideration before switching. Keep in mind that many software alternatives that Apple provides are often equivalent or superior.
  • OS X assumes the user is more of an idiot than with Windows, requiring an understanding of BSD in order to get to the bottom of what assumptions some tool made about various OS & app configurations.
    A: I disagree. I've been using this Mac for a month now and have configured the hell out of it, most of which didn't force me to use the Terminal. While the default interface usually has the simplest options, a lot of the time if you hold down the option key as you open a menu, you get the Advanced settings.
  • Macs require special considerations when purchasing hardware, because many device drivers are not written for Macs. Mac tries to guide you toward their hardware, bottom line.
    A: I have had zero problems with device drivers. I use a Microsoft Mouse and Keyboard, a Dell LCD monitor, a USB drive and USB key; none of these are Apple products. I've also connected other monitors and mice to it, plus various digital cameras. Not once has OS X had a problem. 100% flawless. In fact, one of those digital cameras wasn't recognized by Windows XP SP2, but OS X recognized it immediately.
    So, What hardware do you want? All mice work. All keyboards work. All external drives (firewire/USB) work. All monitors work. (OK, preface all of these with almost). You might need a different mouse driver from a 3rd party for mice with >3 buttons. The Macs bundle everything else you need out of the box.

  • Spyware and viruses are 99% a non-issue on Macs, but this is slowly changing. It will never be as bad as Windows due to maturity of BSD, though.
    A: True.
  • Macs have an annoying lack of VGA jack on their laptops.
    A: Macs come with DVI ports. They also all come with a DVI -> D-SUB converter cable, so no issue here.
  • Macs crash all the time.
    A:
    True five years ago. It's now built on FreeBSD and it's stable.
  • The keyboard layout will drive you nuts, particulary the command, option, home, and end keys.
    A:
    True, but learning the command and option keys will only take a few days, and I recommend remapping the home and end keys to work similar to Windows (home goes to the beginning of a line instead of the top of the document, etc.. Going to the top of the document is limiting and much less useful... bad Apple; type ctrl-home to go to the top.).

Toggle Screen Saver AppleScript

Most Windows power users are familiar with "locking" their computers when left unattended. This is achieved by waiting for the screen saver to start (which can be set to require a password upon return) or by typing windows-L. This is especially important if you work with those possessing a mischievous sense of humor*.

So naturally I wondered how to do the equivalent of windows-L in OS X, and to my surprise no such equivalent exists. The closest thing one can do is set a "hot corner" to trigger the screen saver, which means if you move your mouse to a specific corner of your display the screen saver will start. Since I think this is lame as it is prone to misfire, I hunted down a cool AppleScript that does what I desire (toggles the screen saver with a shortcut key), as follows:

try
tell application "System Events"
set the process_flag to (exists process "ScreenSaverEngine")
end tell
if the process_flag is true then
ignoring application responses
tell application "System Events" to quit
end ignoring
else
set the target_app to ((path to "dlib" from system domain as string) &
"Frameworks:ScreenSaver.framework:Versions:A:Resources:ScreenSaverEngine.app") as alias
tell application (target_app as string) to launch
end if
on error
beep
end try
I placed this script under ~/Library/Scripts, named it "Toggle Screen Saver.scpt," and using Quicksilver I was able to run this script with a trigger of option-L. Obviously one should check "Require password to wake this computer from sleep or screen saver" under the System Preferences -> Security settings.


* The CEO of my company has caught my computer unlocked twice, and one time changed my language settings to Russian. That took a while to fix. The other time he made a smiley face with my desktop icons. Bastard.

Monday, April 17, 2006

"Click Through Focus"

This one is best explained by example. In Windows, let's say I have two applications open, side-by-side: Notepad and Firefox. Currently, I'm typing in Notepad so the Notepad window has "focus." Suddenly I decide to refresh the Firefox page that is currently displayed so I move the mouse away from Notepad and onto the Firefox window, click the refresh button, and the page reloads.

Now, let's analyze how this works in OS X. When I leave Notepad (TextEdit in this case) and click on the refresh button in Firefox, the page doesn't refresh. What really happens is the Firefox window was given focus, so I have to click again to get the page to refresh. Now, to be fair, this isn't really a Mac problem at all, because if I do the same thing in Safari things work the same as in Windows. But wait? They don't, because if I try to click a link in Safari I have the same problem.

The problem lies with however Firefox and Safari (and any other applications in OS X) were implemented. Unlike Windows, it appears that it's up to the software developers to decide what happens, whether or not the user can "click through focus" or just "click to focus." That sucks, I prefer the Windows way where all Windows use click through focus.

Can anyone shed more light on this? Apple, please provide me with a "click through focus" option in the next version of your OS.

And please don't tell me to just use "alt-tab," as that's missing the point.

First Impressions

First and foremost I feel I must do a general "first impression" brain dump before moving onto specifics:

The MacBook Pro was ordered, processed for four days, then shipped from Shanghai, China, went through Alaska, and arrived in one day's time. In the end the thing cost about $3200. It's widely considered that Apple products are more expensive than their competitors, but I think this has changed for their laptops with regard to the price to earnings ratio now that they're Intel-based. A fellow co-worker ordered himself a $2600 Dell laptop, and my MacBook Pro outperforms it and is better engineered (the Dell is quite thick). Not a big price difference, especially when it's for work.

It arrived in a square, ~18" X 2" black box. Everything, from the box that contains the power supply, to the laptop itself seems to slide open with just a little bit of pressure applied to just the right area, and that area is always obvious. This is some nice engineering; from the outside, this svelte laptop is so sexy.


***

Upon hitting the power button I was greeted with what I now call the "heavenly choir" startup chime. I'm sure many Mac users love and hear this chime in their dreams, but I find it jarring to my ears since it starts and ends so abruptly. A nice fade in and out would fix this, and would fit in with the overall style of OS X (everything seems to visually fade in and out beautifully on start and exit).

Anyway, this chime can't be disabled without installing some third party hacks which I'm leary of trying, especially since these Intel-based systems are so cutting edge at the moment. The last thing I want to do is disable the chime along with the rest of the system.

The volume button doesn't seem to have any effect either. This isn't that big a deal, I know, but at some point this will embarrass me when I'm in a quiet situation (like a meeting or on a plane) and I boot the laptop. It won't happen that often; I almost always just "sleep" it instead of shutting down.

***

During initial setup (OS X (10.4 "Tiger") was pre-installed) I was asked for the usual credentials and then, at the end, it took a picture of me: 3...2...1... and the screen flashes white and snap. Nice. I need to get more sleep according to the picture...



***

Without a doubt the biggest iPain when making the switch is the keyboard layout. It's subtle; almost all of the keys are the same. However, certain key commands in Windows such as copy (ctrl-c), paste (ctrl-v), cut (ctrl-x), undo (ctrl-z), and redo (ctrl-y) are now command-c, command-v, command-x, command-z, and shift-command-z. (The command key is the Apple key, by the way, and the Windows key is replaced with the "option" key.) Due to the arrangement of these keys I must use my thumb to hit the command key instead of my pinky to hit the ctrl key. In other words, I must relearn the power-user keys that are so ingrained from my using Windows operating systems for 14+ years. This is quite maddening at first.

The "Home" and "End" keys are also driving me nuts in OS X; I'm so used to hitting them to go to the beginning and end of a line/sentence. On a Mac, though, it scrolls to the top or bottom of the window. Even worse, the MacBook Pro laptop keyboard doesn't even have the home/end/insert/delete/page up/page down keys, unlike the ol' ThinkPad. Well, at least not all of them, and they're not at all arranged like the standard PC keyboard. So, instead it's command-leftarrow and command-rightarrow to move to the beginning or end of a line. Argh! Must...re-learn!



Now you might be thinking: "Dude, why don't you just remap your keyboard to work like it did in Windows?" Yes, this is an option, but currently I'm against it; I'm dealing with the Mac standard, and if I'm going to be using a Mac, I should adjust to these recommended standards. I'd rather suffer for a week learning new habits than have to adjust every Mac I sit down to use, in order to use it. This would happen often enough at work when I "drive" someone else's Mac when troubleshooting or whatever.

Update: I'm starting to lean towards remapping the home and end keys to work like a PC. Since these keys don't exist (or, at least don't exist in the same place) on the laptop keyboard I'll just resort to the Mac standard when using the laptop keyboard. Any "real" keyboard I choose to use will have those keys. We'll see...

***

When setting up my wireless access to work's wireless access point I was only prompted for a "password" field. Unlike Windows, I didn't have to specify that it's 128-bit hex passphrase or anything like that, it just took what I gave it (which happened to be 128-bit hex). That's a good abstraction; why should I be required to tell the computer which kind I'm using when it can figure this out on its own? I was able to connect (wirelessly) without any issues at home as well.

OS X is relatively silent about its network status when things are fine. Windows XP is fairly noisy about it, and is often popping up notification bubbles in my system tray whenever anything slightly changes. Not a criticism of either, just an observation. I think I prefer the OS X methodology more, though.

***

Everything hardware-wise really does just seem to work as promised, and flawlessly. I plugged in my 22" NEC CRT (yeah, no LCD yet) and I immediately had a dual-monitor shared desktop, and somehow it knew the NEC was on the right side (it was just luck). It was easy to hunt down the settings that configure the resolution and refresh rate on the monitor; it knew what model it was too (not that Windows XP can't do this accordingly, I'm just sayin'). USB Hub, USB HDD, and other various peripherals all recognized perfectly.

OS X recognized my Microsoft Explorer 4.0 mouse as well, but I installed the OS X drivers Microsoft makes available (does that seem kinda odd? Maybe not...) so I can get thumb button support. The wireless Microsoft keyboard I currently use seemed to work fine too, but I also installed the official drivers to be complete. In a future post I (or Ryan) will discuss the status/situation with Bluetooth keyboards and mice that are available in the market currently. In a nutshell, don't buy anything yet.

***

OS X provides many nice, high-res backgrounds for the desktop. One can assign different backgrounds to each display. Currently I'm using "Zen Garden" and "Tiger."

When arranging how my dual displays are positioned, I can fine tune the vertical location of each display in relation to each other. My laptop lies on a lower plane than the monitor and I was able to specify this. Very smart, and I don't think Windows XP provides this.

In situations when the lights are dim or there is no light, a white light under the keyboard will glow accordingly. The LCD will also dim and brighten when needed as well. So cool.

***

Adium is the best instant messaging client I have ever used, and it's free. It's a lot like Trillian but easier to manage, and doesn't cost me $25 every time a new version comes out. The encryption support has a much better design, the UI for chats is superior, tabbed windows function better (by default, anyway), and the list goes on and on.


***

OS X handles application "activity" in a cool way. For example, when an application is loading it hops up and down in the "Dock" (the Dock is similar to the Start bar in Windows) until it's loaded. When an application that doesn't have focus requires attention from the user, it will hop up and down until the user tends to it. Adium will do this if someone IMs me while another application has focus. The icons will hop high enough to be noticed if the Dock is hidden, which I prefer (though I never hide the Start bar in Windows since it does not notify me). I really like this notification feature; for some reason an occasionally hopping icon doesn't bother me as much as a flashing tab in the Start bar.



***

The minimize/maximize window animations rock. Functionality like this is provided through Apple's Exposé window management tool, built into OS X. The next version of Windows (Windows Vista) will have similar capabilities.



***

Another cool Exposé feature is seen when I hit F9. It toggles an "All Windows" view where all applications currently running are tiled on the desktop and resized accordingly so the user can see everything at once. Hitting it again returns things back to normal. Wow, so useful; now my Windows XP brain just need to remember to use it.


The equivalent to the Windows "show desktop" (Windows -D) is F10. The result is the same, but all visible windows will slide out of the way with a very smooth animated effect, with only their edges showing around the sides.

Try holding down shift when hitting these function keys for a completely useless slow-motion version of the same effect (though it allowed me to screen cap them more easily).

***

I can have the Mac announce what time it is on the hour, half hour, quarter hour, whatever, in a variety of different voices. "It is 10 o'clock." Useful for me, but definitely not for everybody.



***

When in sleep mode, a small white light on the front of the machine slowly fades in and out, at a perfect "snoring" pace. Kinda stupid, kinda cool. It's nice to know that the laptop is asleep just by looking at it, but I have to look longer than a glance to see if it is indeed "snoring" or not.

***

OS X Tiger has extensive support for screen capture: Hitting Command+Shift+4 then the space bar pops up a small camera icon for my mouse. I can then choose to capture a window, menu, desktop icon, or the menu bar and it's automatically saved as a PNG to the desktop. This is just one of many alternative keyboard shortcuts, as well as a fully-featured "Grab" application. Unfortunately I can't screen cap a screen cap in progress. :)

***

There is no shortcut key (hotkey) for quickly locking the laptop or putting it in screensaver mode, allowing me to securely leave the machine on when I leave my desk. This is important, otherwise pesky co-workers might change my homepage to that Peter Pan guy's site or worse when I'm using the whizzery.

In Windows, to lock the machine one simply types windows-L. The closest thing OS X provides is a "hot corner" option, where I can move the mouse to, say, the lower-left corner of my screen and the screensaver will start. As I think this sucks, I will discuss in a future post an AppleScript (which can be mapped to a hotkey, such as option-L) that will start the screensaver.

***

This is pretty well known, but there is no concept of "Add/Remove Programs" on a Mac. One just selects the application (most installed under the "Applications" folder by convention), and hits Command-Backspace (move to trash). Removed. Hard to beat that...

***

One can move parent-modal windows around. This is best shown with a screen capture:



The window on the right is the modal window, and while the window on the left is "disabled" I can still move it around, unlike in Windows. This occasionally is useful when one wants to see something underneath the disabled window to aid in responding to the modal window.

***

One problem with these MacBook Pro laptops is they're so bleeding edge. Not all software available for Macs will work on them (yet), as the underlying architecture of the computer is Intel based as opposed to their PowerPC predecessors. For example, I can't friggin' sync my Blackberry with Address Book.app because:
  1. iSync doesn't support it
  2. PocketMac intended to support it, but can't due to some Intel-based issues.
Oh well, it'll get fixed in time, and all of these problems will disappear. Software compiled to work on either architecture involves what is known as a "Universal Binary." A lot of software that is compiled for only PowerPC architectures will often still work, transparent to the user, via Apple's Rosetta software, which translates it at noticeable speed reduction. One can tell how an application will run (Intel/Universal vs. Rosetta) by selecting the application and typing command-I.




***

The Activity Monitor is equivalent to the Windows Task Manager (ctrl-shift-esc in Windows), but it's a lot better. Just having a monitor of HDD usage puts the Task Manager to shame.


One can kill frozen applications here, or use an alternative, less heavy-weight approach: Force Quit (command-option-esc):


***

Lots more to write about as I find the time: Terminal & DarwinPorts, Quicksilver, "focus" issues, Keyboards & Mice, Desktop Manager. A buddy of mine, Ryan MacG, might chip in as well.

Thursday, April 13, 2006

What's this all about?


IBM ThinkPads are great laptops. I acquired one two years ago when I began working for my current employer, based in Chantilly, VA. Those IBM engineers (hardware and software) really designed their hearts out and came up with a near-perfect package. Just look at what you get:
  • A standard keyboard layout, including the hard to find insert/delete/home/end/page up/page down configuration (upper right corner of the image). This means the laptop keyboard feels the same as your standard PC keyboard, assuming you don't have the Microsoft configuration, which is more vertical.
  • A nice LED night light that shines down on the keyboard.
  • Great software, including one that detects if the laptop is tilting or falling, and locks down the hard disk drive accordingly. It actually works, and works well.*
This laptop has served me well as I design and implement my various web applications, which is my profession (Software Engineer, mostly Java-based web applications). I am a seasoned Windows user, and have passing knowledge when it comes to UNIX platforms; I prefer Windows as my development environment though. I've been using it since Windows 3.11 back in 1992 when I was in 10th grade at Robinson High School in Fairfax, VA. I consider myself a veteran power user and might know some shortcuts you don't (we'll find out).

Apple computers are a different story. I used a few Apple computers running OS 7 at a job back at Virginia Tech in Blacksburg, VA (1997) and honestly have no fond memories of it at all (I remember the machine would crash at least twice every shift; Windows 95 wasn't too great either, but it definitely didn't crash as much). Oh yeah, and my Uncle Mark had one of the first Apples and I remember trying out PaintBrush on it, then going back to the Commodore 64 in the basement which had better video games.


So, why on earth am I writing this on not only a different laptop, but one engineered by Apple, running OS X Tiger? My reasons are mostly personal, and I'm guessing common as well:
  • It was time to upgrade my laptop, and my choices were to get a new PC from IBM (now Lenovo), or a cutting edge, dual core MacBook Pro, either choice completely maxed out to the fullest (note: IT employers, always treat your knowledge workers well, above all else).
  • Many people I respect, either personally or in the blogosphere, have already made the switch.
  • Using one will make me smarter (I'll be forced to think differently as I'll not only learn one new OS, but two (OS X is built on a version of FreeBSD). This will carry over into how I design my own applications.
  • It can be fun to try something new; and as a programmer I'm always trying to improve my productivity with a computer.
  • The MacBook Pro is roughly four times faster than my old IBM ThinkPad. Before I acquired mine I had a co-worker compile one of his applications on the ThinkPad running Windows XP (2G RAM, 1.4 GHz CPU, decent HDD), and the same application on his MacBook Pro (2 G RAM, 2.1 dual core CPU, decent HDD): 12 seconds on the ThinkPad, 3 seconds** on the MacBook Pro! That's huge, especially for a programmer...
My intention for this blog is to archive, in detail, my experience with the switch, hopefully help others decide to make the leap (or not), and perhaps get some answers for the things I just can't figure out on my own. I'm confident I will accomplish at least 1/3 of these.

Thanks for reading.
"If you want to attract hackers to write software that will sell your hardware, you have to make it something that they themselves use. It's not enough to make it 'open.' It has to be open and good."

- Paul Graham

* MacBook and MacBook Pro both support this feature as well: "Your MacBook Pro has Sudden Motion Sensor technology, built-in protection for the hard disk that is designed to help prevent disk failures if the computer is dropped or experiences severe vibration." If you're an uber-dork, you can leverage this technology to emit lightsaber sound effects from your MacBook when you shake and wiggle it by downloading the MacSaber.
** I'm guessing the latest ThinkPad will perform just as well (update: it does if it has a 7200 RPM HDD).