A lot of developers use Macs these days because it's the hot new thing. Unfortunately Macs are not the greatest development platform in the world out of the box. You need to do just a little bit of work to take your fancy new Macbook and turn it into a lean, mean, bug-crushing machine.
- Homebrew: OS X's missing package manager
- iTerm: A better and more powerful terminal
- Slate: or another window manager
Homebrew is the missing package manager of OS X. It's drastically better and more actively developed than its two competitors fink and ports. If you are coming from a Linux world you can think of brew as
To facilitate its installation we're going to update our path to make sure that
/usr/local/bin is always ahead of
/usr/bin. This means the shell will look for homebrew installed packages before looking for the system packages. This is desirable because OS X's system packages are often old or frustratingly modified. It also gives us a happy sandbox to work in that won't bork our system!
So open your
~/.SHELLrc where SHELL is bash, zsh, etc. and change the path like so:
Make sure you're not exporting the path a whole bunch of times (might have happened if you've had the machine for a while and installed some silly things).
Now we just install homebrew as documented here: http://brew.sh/#install
We can then install a package as simply as:
brew install python.
We can see what options a package exposes with
brew info python.
This one is easy to do. Download.
I find it useful to set a global hotkey for the terminal and I typically use
CMD+~ because I have a habit of using that hotkey from years of videogames.
But why is the default terminal on OS X not sufficient? Have a link or path in the terminal you want to open in Finder or your browser? CMD+Click will do that. Autocompletion for everything in any context? iTerm has you covered. These are just a few of the many reasons to use iTerm. I'll Just leave this link here for more highlights.
You can also open anything with whatever OS X thinks the default tool is with the
Do you frequently use your mouse to move windows around? Stop it. Every time you do that you're wasting time trying to get the OS to do something that it should be smart enough to do on its own.
With slate you can move windows around like a pro. Tile 3 windows next to each other? One key combo. Use one quarter of the screen? Done. Center a window and make it a certain size? Done.
To get you up and running with slate quickly checkout my dotfiles: https://github.com/ranman/dotfiles/blob/master/.slate
To move a window:
CMD+E will bring up a task switcher and
CMD+SHIFT+G will bring up a window drawer.
What I've outlined above is enough to save you cumulative hours a week. If you'd like to go further here are a few tools I find speed my development:
- sublime: a great and full featured editor (get package control! right away), almost as good as vim.
- silver-searcher: a better ack that's aware of your sourcecode.
- oh-my-zsh: ZSH is a cool shell and oh-my-zsh has a lot of nice plugins.
- alfred: indispensable application launcher and multi-tool. It also can store your clipboard history!
- textual: IRC client.
- adium: IM client.
- ipython: iPython is a great python repl and the notebook feature is indispensable.
- dash: an offline documentation browser, great for a developer on the go.
I've also collected a well documented list of OSX hacks over the years that make things a lot easier (key repeat rate, autocorrect, etc.). You can look at all of those here: https://github.com/ranman/dotfiles/blob/master/.osx