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.
31 comments
[ 2.6 ms ] story [ 70.4 ms ] threadWhen 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.
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.
http://news.ycombinator.com/item?id=199493
http://news.ycombinator.com/item?id=104977
http://news.ycombinator.com/item?id=224604
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.
OTOH, I think OS X has more usable desktop software than any other OS.
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.
* Install a good package manager
* Install all your dev packages
* Install what was missing by hand
* Install a decent terminal
* Purchase Textmate
* Find a hack to allow mouse button paste
* Realize you're spending time trying to turn your OS X install into Linux out of the box.
* Install Ubuntu.
For the record, on the Mac I use Carbon Emacs and various languages gotten from MacPorts (Python, OCaml, GHC). Back in the pre-OSX days I used CodeWarrior and Powerplant, so I'm confident I could use XCode easily enough - just don't do much C at the moment.
> 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).
Instead, there was a throw-away one-liner, which gives the impression that he doesn't know what he's actually talking about. All of which is to say that I personally think that the person you responded to had read the post, and came away with the same impression as me - that perhaps the OP needs some pointers in the right direction.
I'm not the OP, but why not try listing the total amount of packages in macports, then listing the total amount in Ubuntu universe, and then deciding for yourself?
If it doesn't, and you agree with the OP, fine. Stop trying to say it does.
Ummm, because I said that somewhere? I don't suppose you'd mind showing me where?
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.)
gcc. python. django. it's all good.
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.
[1] - http://code.google.com/p/macvim/ [2] - http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-...