Setting Up Mac OS X Leopard for Web Development (in just two steps)

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:

  1. Buy VMWare Fusion or Parallels Desktop (They’re both great, just choose which one you like best.)
  2. Install Ubuntu on it.
  3. 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.

It Could Be Worse

After a long-awaited summer vacation (including an unforgettable visit to Norway) I’m back to sitting indoors during these amazingly beautiful summer days.

This monday felt truly a monday until I saw this blogpost revealing the code for Facebook home page. Man, that gives one perspective. It’s been only about eighteen months since I dropped PHP for Python. The switch has been almost as fulfilling as the switch to my first Mac back in the day. Seeing that ugly and messy PHP code just made me smile; at least I don’t have to put up with anything like that anymore!

This is not to bash PHP or PCs (although they both suck) but to remind me that it’s really great to be able to work on interesting projects with Python and Django. It could be much worse. I just forget it much too often.

Setting Up Mac OS X Tiger for Web Development

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).

The Basics

  • 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 ~/Library/Application Support/Textmate
  • Install Transmit
    • Copy settings from other machines ~/Library/Preferences/com.panic.Transmit3.plist
    • 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

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 /usr/local/bin).

Localization issues

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.

Hello (English-Speaking) World!

Hello folks. I am a twenty-something year old IS (Information Systems) student from Finland. I’ve had this WP.com account since October last year but I really haven’t had anything to say. Recently, however, I’ve found myself playing with new web development frameworks like Django and Code Igniter (well, yes, RoR, too) and I feel that discussing about these kind of things in English might just be the thing for this blog.

In addition to that, it will be fun to write for nobody. I haven’t told anyone about this blog, and I will not promote this in my other (Finnish) blogs. I’ll just sit back and watch what happens. Maybe no one will ever read a single entry I’ve written here, who knows. I don’t really care. I’ll just write for fun!

Speaking of fun, today was my first day with Code Igniter. It’s a very young lightweight web development framework for PHP. After coding a couple of hours with it, I’m definitely going to write some more about it here. Soon.