Ask HN: How do you develop on OS X

5 points by jman1 ↗ HN
Do you use a virtualized environment or just install stuff locally on the computer. Any merits of using one over the other besides performance ? Looking to have a place to muck around in all kinds of languages and technologies, starting with Java, and eventually whatever fancies me (couch db, python, nosql etc) without messing up my main pc so that I dont have to format/re install stuff.

I ask because I know installing stuff on linux/unix 'sprays' files all over the place but not sure how it works on OS X. I have used OS X but only developed on Windows so far.

12 comments

[ 4.7 ms ] story [ 52.3 ms ] thread
I guess it depends on what you're writing. Using rbenv and bundler keeps ruby apps in check, but if you want to install a whole load of stuff, you could take a look at Vagrant (http://www.vagrantup.com).
Initially writing Java, will be using a app server (tomcat or glassfish) along with a DB (either oracle or mysql). Looking to work with their enterprise technologies.
For Python, virtualenv is the way to go.

For PHP development, I used to run a VM, but at this point I just run XAMPP.

I'd definitely recommend using a virtual machine; even if I were running Linux I'd be using one. You can install your SSH key on the VM and have an iTerm2[1] profile which connects directly to it. I also use SSHFS[2] for shared directories so that I can edit my code in MacVim and TextMate, but run code and tests on the VM (note: I run headless VMs, attempting to run two GUIs in parallel on a MacBook Air wouldn't be pretty).

[1]: http://www.iterm2.com/ [2]: http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS

I got a MBP 17 with 8GB Ram ..but I still dig the idea of a headless VM. Little surprised I never thought about it.

  > I'd definitely recommend using a virtual machine; even if I were running Linux I'd be using one.
Why?
For me, it's to keep software versions consistent between development and production. Our servers run Ubuntu LTS, whereas I'd probably be using something more up-to-date if I were running Linux locally.
Ah, yeah, that makes a lot of sense. I haven't had to deal with that sort of problem yet - thanks for the explanation!
I can't say that my setup is for everyone, but this is how I develop on OS X:

  * iTerm2 - much, much better than Terminal
  * Vim / MacVim - I use both, but most often just use the command line version instead of MacVim.
  * iTunes - music!
  * pip - ridiculously good python package manager.
  * IPython - a better REPL for Python
  
And that's it. It's very simple. If you're into NoSQL, I've gotten mongodb running very easily. I haven't had to reformat/re install anything, ever, and I've been developing on OS X for about 6 years now.
I'd use a VM if you're running things like mysql, nosql stuff, etc. OSX it seems like everyone has a different way of installing things, on a Linux it's just "sudo apt-get", plus if you have issues there's more documentation and forums for Linux users than Mac.
It would be worth checking out homebrew for installing stuff. It's pretty good.
Running postgresql on os x is a bit of a pain but brew gets it right. I don't care much for the heavy weight virtualization on mac osx. I have a separate proxmox box for that. On the mac, I use: python, virtualenv, pip, flask, postgresql, aquamacs (with emacs starter kit for python, and github mac.