Ask HN: What & how do you code on your Mac?

Virtualized linux (windows)? VMWare, Parallels? Dual boot? XCode, native APIs?

What languages, IDEs, text editors? What do you build?

I'm looking into a Mac (Air probably) for coding and I'm wondering what all the options are. I know they are widely used by people here and I'm curious as to your coding experiences. Personally I will be doing alot of systems/network programming for school, so I'm most concerned about socket programming and accessing network functionality through virtualization and/or portability (in C) from the BSD subsystem to linux/solaris school systems.

Of course I dabble in alot of other things as well so whatever and however you build on your Mac, it would be great to hear about it and how you feel about coding on a Mac.

  • If you need to do Linux-specific coding and I do mean _specific_, like using libraries or kernel apis that are Linux and not "unix" (e.g. epoll() or inoitify()) then you will probably want to compare VMWare and Parallels and pick one for your virtualization engine. This will also give you access to windows, which can be useful at times.

    Otherwise, you will find a Mac to be an very nice BSD box. Get macports and you will have access to just about every open-source project and library you might want.

    For editing I use Emacs for Erlang, Eclipse/PyDev for python, and Coda for web/javascript. Textmate is also highly regarded, especially in the Ruby community. The only language that you will find yourself lacking will be c# and other CLR variants, but if you really need them you can try Mono or run Windows in VMWare/Parallels.

    The only other suggestion is less of a Mac tip and more of a coding on a laptop tip: get a more ergonomic keyboard and a larger monitor that you can use at your primary coding desk. It really makes a difference for long coding sessions.

  • I was very excited to buy a Mac Mini the other day. I was very disappointed to learn over several weeks that, despite what Paul Graham and DHH and others say, OS X sucks for hacking.

    I experiment with a number of languages, I pull in many different libraries, I use various different tools and scripts and programs from the command line. Frankly, installing any one of these things onto a Mac is a pain.

    In Ubuntu, I simply do apt-get install. On a Mac, I have to download a tarball and compile it (their package management systems have many fewer packages, many of which are out of date). If I wanted to compile things, I would use Gentoo. Actually, Gentoo is much better since I think the portage package management system is very well-developed, up-to-date, large, fast, handles dependencies brilliantly, and has the option for some binaries.

    As for the general use of the Mac: if you want to do anything that is not the default, good luck. Learning all of the different ways you can do something non-standard on a Mac is like learning black magic. You have to Google around to find out the secret incantations. For example, to ask for the boot menu, you must psychically know to hold down ALT as it boots. The other day, I wanted to test out how well my site worked with Flash off, only to discover I couldn't. I found a site with some complicated instructions about how to go about disabling Flash on OS X. I just gave up and rebooted into Ubuntu.

    Basically, hacking on OS X is exactly like working with linux 5 years ago, when I had to be an expert on esoteric systems to do what I want.

    Just do what I do: dual-boot into Ubuntu. I boot into OS X when I want to use iTunes, watch TV/movies using the cool Mac remote, or develop iPhone apps.

  • I have a MacBook and a MacBook Air (both fine laptops for coding) and I use mostly vim running inside iTerm (far superior to OS X's Terminal imho) for my IDE and C and Python are my languages of choice.

    When I write Objective-C w/ Cocoa, its X-Code all the way. It has a lot of excellent features.

    Socket programming with C would be no different than writing it in FreeBSD. I had some network daemon that I wrote under FreeBSD that compiled and ran under OS X with absolutely no modification. You have a full GCC build chain on OS X either by default or with the X Code package, don't remember exactly. That same code will probably also run under Linux, with slight or no changes; and those changes will probably be only about including the right headers.

    I love coding on my Mac. I generally used to code under FreeBSD at home (MacBook is my current `everything' computer) and currently code in Linux at work. Feels fairly similar between environments since I have a full screen terminal most of the time.

    I didn't quite gather what you wanted to do with virtualization, but Parallels and VmWare Fusion work great. You can also get a qemu frontend.

    If you have any other specific questions, don't hesitate.

  • My oft-repeated slightly OT 2cents: don't code on any notebook (including an Air) for extended periods of time: they're very unergonomic.

  • Aside from software others have mentioned, I find myself using Coda frequently.

    When I'm working on a variety of different websites via SFTP, and it allows me to quickly log into a website, make a few changes, hit save and be done. No fiddling with another client or syncing.

    You can create a preview pane to the right of the code, so when you hit save, it auto-refreshes the website. That's snazz-tastic.

    For all out quick changes, I haven't found anything that beats it.

    It has a great CSS editor, too. (If you haven't played with it, give it a serious try. I like to hand-edit CSS, too, but for playing with pixel perfect alignments, it can be quicker.)

  • So - I code on stuff for my startup (http://www.bionicbooks.com) across all 3 of a g5 mac, an xp pc and ubuntu on a thinkpad. I use java and the major downside of OSX is that you cant use the sun jdk, you have to wait for apple's version which is inevitably at least 1 major release behind (and generally forces you to pay up for the new OS release if you want it). Additionally you have to deal with the odd keyboard arrangement and unconventional home and end key things which might be a hassle if you're not used to them. Package management on the mac is more of a nuisance than ubuntu; installing mysql, php, whatever, is always much more of an effort (of all 3 machines the mac is the only one where i keep notes of how I installed things).

    I've seriously considered getting a Mac Air but for my stuff I couldn't live with OSX full time, I'd have to install Linux. And if you're going to do that then you might want to look at other SSD laptops; rumor has it that Lenovo are going to launch an X400 based on Centrino 2 (Montevino) which came out this week. Whether they do or not, the X300 is still an option.

  • I'm not really a "Mac" developer, since I don't (yet) code for the Mac APIs, but I'll respond anyway:

    I primarily code in Python and Javascript, but also some C/C++ non-GUI stuff. I tried a few different cross-platform Python IDEs, but nowadays I just use TextMate. I use iTerm for the terminal.

    TextMate's a great app for a lot of different things... Markdown, Python, C++, Javascript, Mail... it has a lot of plugins to help write code and text in different languages. That's great, and it allows you to be really productive. My only gripe is that it hasn't been updated substantially lately; while it's a great product as-is, I'd like to see a few improvements to the interface.

    My network programming has been mostly just from Python, but I haven't run into any problems with OS X's sockets. I'd imagine it'd be nearly identical to BSD systems, and I'd also suspect that it you would not encounter much difficulty shifting between OS X and Linux compiling. Someone else might know more specifics.

  • My toolset is Firebug for Firefox and Smultron for my text editor. Photoshop for visual aspects of design. For software dev, a LAMP dev environment running on an EC2 instance connected to my local SVN repository.

  • Most of my work is in Python as of now - I use MacVim [1] along with a bunch of plugins (see [2]). I was using Eclipse with PyDev for the longest time, but I just got tired of the bloated memory usage, especially when I wasn't using many of the things Eclipse is famous for (I still swear by it when I do Java development).

    [1] - http://code.google.com/p/macvim/ [2] - http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-...

  • emacs via ssh

  • textmate. vim.

    gcc. python. django. it's all good.

  • aw come on. Someone has to have an answer to this, I'm quite curious.