How to Set Up a New MacBook Pro for Development
I recently purchased a MacBook Pro and got a new MacBook Pro at work, so I had two machines to set up. Here are the steps I went through to make these machines tuned for developing iOS applications as well as doing Java, Ruby, and Groovy development. I’d love to hear feedback on things I missed, things you don’t agree with, or things that didn’t work for you.
Special thanks to Rogelio Samour, aka Ro, (@therubymug) and the rest of the folks at Hashrocket for sharing their setup steps for setting up a MacBook Pro for Rails development.
Starting Out — Basic Configuration
These are the basic items that, regardless of the languages you plan to develop in, you should do.
- Boot the machine, create your user, and use Software Update to download and install all updates.
- Go to System Preferences –> Keyboard, and on the Keyboard tab slide Key Repeat Rate all the way to the right. Check the box for “Use all F1, F2 . . . .” Click the Modifier Keys button and change Caps Lock Key to Control. Select the Keyboard Shortcuts tab and select “All controls” for Full Keyboard Access.
- In System Preferences –> Expose & Spaces –> Spaces, check Enable Spaces and Show Spaces in menu bar. Reconfigure for 1 row, 4 columns.
- Install TextExpander. Launch it and go to File –> Add Predefined Group and choose CSS Snippets, HTML snippets, and TIDBITS Autocorrect Dictionary.
- Drag everything you can out of the Dock, make it really small, auto-hide it, and put it on the left side.
Launcher
You need a launcher. I used to use QuickSilver, and I always read that you can do so many powerful things with it beyond simply launching applications. I always meant to learn what those things are, but I never have and realize that I never will. I’ve been tempted to buy LaunchBar or F10 Launch Studio, but I fear I’d never learn the extra features and just use these apps to launch applications, and I can do that for free with Namely. Install it and go into its settings to map it to Ctrl+J.
Terminal
I used to use iTerm for its tabbed windows, but OS X’s Terminal finally got tabs. You want a terminal window at your fingertips at all times, though, so install Visor, which is a dropdown, Quake-style terminal. Follow the installation instructions, installing SIMBL first then dropping the Visor bundle in the appropriate directory, and then map Visor to Ctrl+L and select its “Copy on Select” checkbox. Launch System Preferences –> Accounts –> (Your Account) –> Login Items and add Namely and Terminal. (Note: Namely has a preference to Open on Login, but that didn’t work for me).
File Backup and Sharing
Install Dropbox and either log in or register for an account. Be sure to enable Growl notifications during the installation.
Window Management
The Rocketeers at Hashrocket use SizeUp to manage windows via the keyboard, and the same company offers a mouse-driven version called Cinch. I like Divvy, though. Install it, map it to Ctrl+K, and select to start at login. Create 4 shortcuts: Left 50% (A), Right 50% (S), Top 50% (D), and Bottom 50% (F).
General Development + iOS and Mac Development
- Create a directory in your home folder called Development. This is where all your development projects will live.
- Go to Finder and drag the Development and Downloads folders to the left side under Places.
- Install the latest Xcode. As of this writing, that’s Xcode 3, and Xcode 4 is available as a Developer Preview. Install both. Note: you must install Xcode, even if you don’t plan to write iOS or Mac apps, so that you can compile things like rubygems.
- Install Accessorizer and configure it according to its quick-start guide.
Text Editor
No direction here will spark more controversy than this one, so install the editor you like best. If you’re smart, though, you’ll install MacVim, and not just because it’s free (I’ve bought licenses to and used BBEdit and TextMate). Wait to configure MacVim in the Ruby + Dotfiles section.
Ruby + Dotfiles (Don’t Skip!)
Rogelio Samour from Hashrocket has written an excellent blog post on how to set up a Ruby and Rails development environment at http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html. The instructions include steps specific to ruby and rails, but also steps for setting up your editor and dotfiles. Follow his instructions and ignore the ruby stuff if you don’t do ruby (though you should!). Note: here are my deviations from that page:
- Didn’t install SizeUp (I like Divvy better) or Teleport (I’m not pair programming in a shared-computer environment).
- Didn’t use Homebrew to install MacVim, but instead downloaded and installed from http://code.google.com/p/macvim/. I put the MacVim bundle in /Applications and the mvim command line in /usr/local/bin.
- Didn’t install RubyCocoa–I don’t use Rspactor, and I read that the latest version doesn’t require it anyway.
- Didn’t install Growl–Dropbox already did.
- Unless Ro has fixed it, he has a line that says to type
rvm gemset use 1.8.7@global
. That gives you an error. Instead, typervm use 1.8.7@global
. Thanks to Big Tiger (@jremsikjr) and Sandro (@sandrot) for figuring this out for me!
After you finish Ro’s instructions, do the following:
- Run this: echo ‘:colorscheme vividchalk’ > ~/.gvimrc
- Put this in ~/.vimrc.local:
set tabstop=2 set smarttab set shiftwidth=2 set autoindent set expandtab set number set directory=/tmp set laststatus=2 set scrolloff=3 set guioptions-=r set guioptions-=T
Some of these are redundant with the Hashrocket settings, but in case they change theirs . . . .
- Put this in ~/.gitconfig:
[push] default = current [user] name = (Your Name) email = (Your Email Address) [color] diff = auto status = auto branch = auto interactive = auto [core] excludesfile = /Users/(Your User ID)/.gitignore
Replace the parenthetical expressions appropriately
- Put this in ~/.gitignore:
.DS_Store *.swp
Java
Install Eclipse Helios from http://eclipse.org. It’s still the best Java IDE out there.
Groovy/Grails
Follow these steps to install Groovy and Grails development tools:
export GROOVY_HOME=/opt/groovy export GRAILS_HOME=/opt/grails export PATH=$PATH:$GROOVY_HOME/bin
Browsers
If you followed Ro’s instructions above, you’ve already installed Chrome and Firefox. If not, install them now. Launch Firefox and install the following extensions:
- Firebug
- Live HTTP headers
- Omnibar
- View Source Chart
- Web Developer
Open Safari preferences, go to the Tabs tab, and for “Open pages in tabs instead of windows” select Automatically.
Notes
I’ve used Soho Notes and DEVONthink, but Evernote works across platforms, including iPhone and iPad, and keeps all the notes in sync. You can also access your notes from a browser. Anywhere you go, you can take and access your notes.
I tried not to use TweetDeck so I wouldn’t have to install Adobe AIR, but Balsamiq Mockups (below) requires AIR and I can’t find a Twitter client I like better than TweetDeck anyway. After you install TweetDeck, though, go into its preferences and turn off notifications (both detail and summary). You have work to do.
Instant Messaging
I used to use Adium, but iChat is already installed on your Mac and supports Google Talk, Facebook (through Jabber), and any other Jabber services. Configure iChat but be sure to turn off the sounds for buddies logging on or off.
Finder Replacement
I know of no reasonable competition to Path Finder. Install it and turn on its dual panes.
FTP
Cyberduck is free, as is Fugu, but Transmit is worth the money.
Graphics
If you’re a designer, you’ll purchase and install the Adobe Creative Suite. If not, you probably shouldn’t spend the money. Go with GIMP and Inkscape.
Mockups
Install Balsamiq Mockups for doing mockups of web pages, client apps, iPhone apps, iOS apps, or whatever you need to mock up. Money well spent.
Screen Captures
Mac OS X comes with built-in screen capture capability, but Snapz Pro X does so much more, including video capture.
Blogging
I like to use a desktop client for blogging — it makes me feel safer, as I’ve lost plenty of text in my time to fickle web pages. I really can’t tell a difference between MarsEdit and ecto, at least the way I use them, so I went with ecto because it’s cheaper.
Office
I’m sure OpenOffice is sufficient for most developers, but I have to use certain Word templates for work and writing, and create PowerPoint presentations for external consumption, that it’s not worth fighting any inconsistencies. Besides, I need Entourage for work. The work computer got MS Office Professional and my personal computer got MS Office Home. For the personal computer, I also had iWork pre-installed. Consider it my mini-protest. I’ll probably end up installing OpenOffice as well, in case someone sends me any .odt files (I don’t think Word can read those yet), but I’m holding off for awhile.
Utility
Install AppZapper so you don’t litter your disk with unused .plist files.
Passwords
I’ve used several password managers, but I figured out some time ago that I want a command line tool so I wrote one in Ruby. To install, press Ctrl+L to drop down Visor and type:
- rvm use 1.8.7@global
- gem install safe
- echo ‘export SAFE_DIR=~/Dropbox’ >> ~/.bashrc.local
Note: when I ran this on one machine, gem install complained that it couldn’t find the crypt gem. I ran gem install crypt
and then gem install safe
. On the other machine, gem install safe
worked fine. YMMV.
You can read about safe, including how to use it, at http://grailbox.com/safe/. It’s beta software, use at your own risk, etc. I’ve been using it since 2007, though. Note that putting your safe file on Dropbox lets you run safe from all your machines, and it backs up (and versions) your safe file.
Web Site Development
I’ve looked at Coda, and I got a license to Espresso through one of the MacHeist deals, but I really haven’t figured out when I’ll use these. I want to, though, so my one concession to installing software on these machines that I don’t really use was Espresso. I’m going to make myself use it, and maybe then I’ll see the value.
What Did I Leave Out?
I’m such a software junkie that I install far more software than I use, so I disciplined myself to install only software that I’m currently using. Some software just barely missed the cut:
Conclusion
I’m still on week 1 of using these machines, and I’m sure I’ve missed plenty. These setup instructions, however, provide a rock-solid working environment. You may disagree with some of my choices — in fact, I hope you do, so I can find more software that other people are using to solve real problems. Don’t bother, though, to try to talk me into Emacs 😉
Update: 9/4/2010
I’ve added the following software this past week:
- Hyperspaces, which allows you to label and put different pictures on each of your spaces.
- OmniGraffle Professional for diagramming and interoperability with Visio.
- git-flow, the plugin to help with using Vincent Driessen’s git branching model.
- git-flow-completion — bash completion for git-flow.
- The NERD tree for vim. To install:
cd ~/.vimbundles git clone git://github.com/scrooloose/nerdtree.git
Thanks to Adam Lowe’s vim setup post (@adam_lowe).
Update: 9/6/2010
I’ve added some more software:
- I had some EPS files that I needed to resize and export to PNG. Inkscape, GIMP, and Preview proved inadequate, so I installed Pixelmator, which worked perfectly.
- I remembered DiffMerge from SourceGear. I always pay attention to what Eric Sink is up to, because he’s both bright and funny, so I installed that as well.
Update: 9/21/2010
After reading this post on vim configuration, I can’t believe I’ve been navigating split windows with
I’ve already broken down and added new software: Hyperspaces. Differentiating your Spaces with labels and different wallpaper is worth $13.
I noticed that googling for ‘xcode vividchalk’ lists this blog post first, so I uploaded my Xcode vividchalk themes (one for Xcode 3 and one for Xcode 4). You can get them on the Downloads page from this blog — http://grailbox.com/downloads
Have you tried iTerm2? I recently switched back from Terminal when they added split windows. tmux is nice for what it does, but being able to have an iTerm tab with a split console, one tailing development.log and the other running a script/console or tailing a server log is really nice. (http://code.google.com/p/iterm2/).
Looks like you wrote something similar yourself, I hadn’t seen it until now, but I recently found vim-update-bundles which made my vim life much cleaner: https://github.com/bronson/vim-update-bundles
Great post, I didn’t know about Hyperspaces, gitflow or rspactor/guard. Good stuff.
I used to use iTerm, but left it for Terminal and Visor. I was unaware of iTerm2, and see it has system-wide hotkey, which isn’t quite the same (brings it to top, but not in a specific location).
One thing I miss in Terminal/Visor is the ability to toggle transparency, which was actually my contribution to iTerm. Just downloaded iTerm2–I can’t find the ability to toggle transparency, so I’ll patch and submit 🙂
Weird–I downloaded and installed the iTerm2 binary, and the View –> Use Transparency menu item isn’t there, and command-U doesn’t work. I downloaded the source from svn, built it, and the menu item is there and it works. Hmm.