The challenges of running Visual Studio on a Mac
In the week since I got my Mac Pro I have made a conscious effort to transfer everything that I knew I would need over from my Windows XP machine. I've even powered off the Windows XP machine - something I rarely do with a computer - because I wanted to make sure I didn't try to use it as a crutch. My goal was to see if I could really switch to Mac completely and one week in that has been the case, though there has been some compromise.
I use VMware Fusion to run Windows XP in a virtual machine. It works really well for the most part and when it is running in full screen mode I really feel I'm running a Windows machine, with a couple of major exceptions:
Keyboard Shortcuts: Visual Studio makes heavy use of function keys, especially for debugging. By default the critical ones I use most are F10 (Step Over) and F11 (Step Into) and F9 (Toggle Breakpoint). On my Mac's keyboard the F9 key advances the song/track in the player, F10 mutes the speaker and F11 lowers the volume - these are special feature keys for OS X and work in any application you happen to be in.
You can flip a toggle in the System Preferences to allow the Functions to operate as standard keys, in which case they will not work as special feature keys unless I hold down the fn key on my keyboard. Likewise if I have the option in System Preferences unchecked I need to hit fn in order to access the keys as standard F keys.
There was also one other layer of complexity added to all of this: by default OS X ships with some keyboard shortcuts of it's own that also conflict with things. This threw me for a little while because by default some of those F keys are mapped to Spaces and Expose.
What I ended up doing was eliminating the Spaces, Expose and Dashboard use of the F9 through F12 keys; I use the mouse for that stuff anyway. I also keep the option to use the special key feature enabled, meaning that if I want F10 to be passed down to my application I need to hold the fn key too. It's a pain in the ass but I really like having the special keys enabled. Too many functions for too few keys.
I really do wish the fn key was a toggle, not a modifier key though. That would make it so much easier. I spent a couple of hours researching how to make it work that way but had no luck.
Using the Keyboard to Navigate Text
I've mentioned before that the text navigation keys between Windows and Mac are different. On Windows you use Ctrl-Right, Ctrl-Left to move the cursor one word at a time to the right or left. On Mac it's Option-Right, Option-Left. Well, this creates a little conflict when using VMware Fusion and Visual Studio.
By default OS X uses Ctrl-Right to move to the Spaces window to the right, Ctrl-Left to the Spaces window to the left. As a big time Spaces user I've found this excellent, unfortunately I've had to disable the feature since I really need the ability to Ctrl-Right and Left arrow through words in Visual Studio. This is not something I'm terribly happy about but I'm trying to get used to it.
Other than these two issues, so far it's been excellent. My development performance has actually increased a bit because all of the applications I've come to count on are now on the Mac Pro.
Comments
My favorite use of hot corners is dragging images from a web browser, pull it to a corner to show the desktop, and drop the image on the desktop
You can scroll in other windows without changing window focus. Just hover your mouse over a background window and scroll! Very handy
@Eric: Losing the F keys for spaces really hasn't been an issue for me because I use the additional buttons on my mouse for that, but thanks for the tip! On the window scrolling, I use that all the time and love it. The only problem is when I move to my VM with Windows running it (obviously) doesn't work there. Argh!
@Charles: I've given some thought to spending time with Xcode, having played with it very briefly. I actually would just like to create a little utility or even a hack that would convert the fn key into a toggle instead of a modifier. The problem for me is that I'm already spending my weekends working on my core product (when I'm not working on this blog). Since I work out of my home office I have no excuse not to work. Someday perhaps...
Last night, I had the same problem with Spaces interfering with my Ctl-right, etc. I just remapped Spaces to use Ctl-Option-arrow and now everything is better.
You can do this through the Spaces prefs.
When you say the fn key in not a toggle, I assume you are talking like the caps lock key. So that with the fn key in one mode, the media function keys and such work and when the fn key is in the other mode, the function keys work as normal function keys.
I suppose that would be nice, but if you really need the Fkeys to work as normal, I would suggest enabling that option in the keyboard preferences and just use the fn-Fkey combination to use the media keys when needed. That's what I would do if I were in Parallels more than OS X. I suppose if I get this job I am interviewing for, I'll probably be considering it since it would mean working more closely with Windows as well as Mac and Linux.
As always, great post!
However, Parallels does have some in-built keyboard remapping, although F-keys aren't among them. But you can simulate the Windows version of those keys from the menu. Also I did just see Windows has a virtual keyboard in the Accessories/Accessibility menu which I'm sure you already knew about.
Another feature I like of Parallels is it can assign in Windows and Mac which program to open files with. eg you could have all your PDFs, whether in Windows or Mac, open with Preview.
And it has the Coherence mode which sounds the same as Unity mode.
The latest MacUpdate promo bundle includes Parallels plus 9 other apps for only $65, which is $15 off the normal price for Parallels alone. (thos there's only one day left in that sale. http://www.mupromo.com/)
I don't have any experience programming for Mac OS X (yet!), but I would imagine it wouldn't be too hard to implement something like your fn toggle feature. Create an applescript (or some similar program) to check/uncheck the box you mentioned in System Preferences. Then map a keyboard shortcut to that script (maybe through Quicksilver?), and you have your toggle!
I'm thinking about taking the leap myself but am dithering over hardware requirements.
Do you have any thoughts upon RAM requirements which would be appropriate for a Parallels setup (VS 2008 on the PC side)?
Thank you.
On the memory front keep in mind that the stuff is really cheap. I paid $97 for 4GB of memory for my MacBook and the price has dropped quite a bit in 3 months. My belief is that there's no such thing as too much memory.
The only downside is that you have to release the input from the VM in order to switch to another application, i.e. instead of Cmd-Tab, you press Cmd-Option followed by Cmd-Tab. Likewise for Spaces but that was the entire point, right?
By the way, on keyboards which do not have dedicated Home, End, Page Up and Page Down keys, for example on the MacBook Pro, you can use fn-Arrow instead in the VM. fn-Left is Home, fn-Up is Page Up etc.
And I happened to try Parallels, but on my VT-enabled Mac mini, VMWare Fusion delivered 3 times the single-threaded CPU performance, plus it supports two virtual processors as was already mentioned. In my opinion, Parallels may be ok for casual users or the ones who just want to run their Windows-based office apps, but Fusion really blows Parallels out of the water when it comes to more demanding applications.