News for hackers. Stuff that matters.

Ask HN: How do you develop on OS X

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 | 5 points | on HN )
Re:Ask HN: How do you develop on OS X by zacharyvoase on Thursday February 09, 2012 @04:41PM (#3573225)
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

Re:Ask HN: How do you develop on OS X by peter_l_downs on Thursday February 09, 2012 @06:56PM (#3573796)

  > I'd definitely recommend using a virtual machine; even if I were running Linux I'd be using one.
Why?
Re:Ask HN: How do you develop on OS X by patrickpkt on Thursday February 09, 2012 @10:20PM (#3574345)
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.
Re:Ask HN: How do you develop on OS X by peter_l_downs on Thursday February 09, 2012 @11:49PM (#3574562)
Ah, yeah, that makes a lot of sense. I haven't had to deal with that sort of problem yet - thanks for the explanation!
Re:Ask HN: How do you develop on OS X by jman1 on Thursday February 09, 2012 @04:47PM (#3573245)
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.
Re:Ask HN: How do you develop on OS X by peter_l_downs on Thursday February 09, 2012 @07:01PM (#3573812)
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.
Re:Ask HN: How do you develop on OS X by davidthewatson on Friday February 10, 2012 @08:48PM (#3578296)
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.
Re:Ask HN: How do you develop on OS X by ralphc on Thursday February 09, 2012 @10:15PM (#3574333)
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.
Re:Ask HN: How do you develop on OS X by captainbeef on Thursday February 09, 2012 @10:22PM (#3574355)
It would be worth checking out homebrew for installing stuff. It's pretty good.
Re:Ask HN: How do you develop on OS X by mcobrien on Thursday February 09, 2012 @04:32PM (#3573189)
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).
Re:Ask HN: How do you develop on OS X by jman1 on Thursday February 09, 2012 @04:36PM (#3573206)
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.
Re:Ask HN: How do you develop on OS X by pavel_lishin on Thursday February 09, 2012 @04:39PM (#3573221)
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.