An article titled Don’t Pollute User Space reminded me of something I love about Mac OS X.
Here is the default folder structure of an user in Windows Vista:
\Users\User\ (\AppData) \Local \Roaming \Contacts \Desktop \Documents \Downloads \Favorites \Links \Music \Pictures \Saved Games \Searches \Videos
And this is what user folder looks like in Mac OS X 10.5 Leopard:
/Users/Usernme/ /Desktop /Documents /Downloads /Library /Movies /Music /Pictures /Public /Sites
Sites-directory is only one that I doubt most of Mac users need, but all the other ones are really needed and they make organizing easier, not harder.
Best thing about this, however, is that Mac users tend to actually use the given structure. Maybe it’s because Windows apps are so shitty that almost every Windows user that I know don’t actually keep their data in
My Documents (or
Documents in Vista) but instead scattered around the machine. (My data was, too, when I was a Windows user, many years ago.)
Good defaults are important.
Some time ago I wrote how to set up Mac OS X Tiger for Web development. Since the entry has been a good starting point for myself, I decided to re-write it for Leopard.
One step forward, two steps back
The OS X cat has evolved hugely from developers point of view. Things like Apache 2, PHP 5, Python 2.5, easy_install, Subversion and Capistrano work out of the box. So we’re almost there, right? Wrong.
Unfortunately some aspects of the operating system are as bad as before, so in lack of working package management almost everything on top of the default setup means manual compling. And like that wouldn’t be bad enough, Leopards ingenious mixture of 64 bit and 32 bit binaries makes getting diferent programs and libraries work together unbelievably hard and complicated.
Installing MySQL from source is easy. Installing mod_python is a bit more complicated, but still possible. Trying to get Apache, mod_python and MySQL work together without segfaulting is nearly impossible — but still doable. And after that there is more PITA everywhere. Compiling things and trying to fix several dependencies by hand is just plain stupid. It’s so last decade that even a Mac-using developer shouldn’t need to do it.
And, luckily, you don’t have to!
Installing the perfect development environment
So after testing various diferent setups on my new iMac, here is the “there is no step three” formula for setting up a decent development environment for your Leopard:
- Buy VMWare Fusion or Parallels Desktop (They’re both great, just choose which one you like best.)
- Install Ubuntu on it.
- There is no step three!
Now you can mount your real Linux box disk to the crappy Finder and use it like it was the real thing. This way you make both Mark Pilgrim and yourself happy!
PS. Happy New Year!
PPS. Yes, I still love my Mac 🙂 But I hate it when it tries to make me do stuff that I really don’t want to. Like installing and configuring stuff from source. Ewww.
Setting up a new Mac as a web development workstation takes a little bit more work than just installing Textmate. These are my notes of the process (mainly for myself to make future installations faster).
- Install TextMate
- Configure Finder to open ALL possible coding-related documents with TM
- Install also the terminal extention. Test by running
mate foo.txt in terminal
- Install or sync (with other machines) all necassary bundles. They are located in
- Install Transmit
- Copy settings from other machines
- Sync bookmarks
- Install SSHKeychain
- The Universal binary is there. Just not very well in sight.
- Install Subversion
- Install MySQL
- PostgreSQL, if needed
- Install PHP for bundled Apache 1.3
Setting Up Python
- Install Python 2.4+
- Install some of the batteries that were forgotten in the “batteries included” philosophy:
- Install IPython
- Download the source and install. This is very easy for Python 2.4+
/Library/Frameworks/Python.framework/Versions/Current/bin to PATH and everything Just Works 🙂
Setting Up Django
I like to live dangerously. So:
svn co http://code.djangoproject.com/svn/django/trunk/ django_src ln -s /path/to/installation_directory/django_src/django /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django
That’s it. Django works. Now add
export PYTHONPATH=/where/you/develop to your
.bash_profile and finally copy
django_src/django/bin/django-admin.py to somewhere in your path (for example in
- Configure Terminal.app for Finnish chars
Are We There Yet?
Unfortunately that’s just the nerdy part of the setup-process. Next up is installing browsers, browser plugins (did I hear Firebug?) and all that jazz. I’m not going to get into those in this post, though.
I recenty listed all my favourite apps in iusethis.com (you can log in via OpenID). Please share your comments, suggestions or own favourite apps in the comments.