Monthly Archives: July 2010

Bookmarks for July 21st through July 25th

Recommended reading

Bookmarks for July 20th

Recommended reading

Steve Jobs

I hope amix will forgive me for copy/pasting his blog post wholesale, just a really nice collection of Jobsian moments.

Design is not just what it looks like and feels like. Design is how it works.

Steve Jobs 1

Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of other’s opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

I was lucky — I found what I love to do early in life.

Steve Jobs 2

You can’t just ask customers what they want and then try to give that to them. By the time you get it built, they’ll want something new.


I’m the only person I know that’s lost a quarter of a billion dollars in one year. It’s very character-building.

I didn’t see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.

Next logo

Being the richest man in the cemetery doesn’t matter to me. Going to bed at night saying we’ve done something wonderful, that’s what matters to me.

I was worth over $1,000,000 when I was 23, and over $10,000,000 when I was 24, and over $100,000,000 when I was 25, and it wasn’t that important because I never did it for the money.


People think focus means saying yes to the thing you’ve got to focus on. But that’s not what it means at all. It means saying no to the hundred other good ideas that there are. You have to pick carefully.

We don’t get a chance to do that many things, and every one should be really excellent. Because this is our life. Life is brief, and then you die, you know? And we’ve all chosen to do this with our lives. So it better be damn good. It better be worth it.

Steve with Apple

Updating your dev environment after a Snow Leopard upgrade

I’ve avoided upgrading to Snow Leopard for ages for a number of reasons:

  • didn’t want to spend ages re-setting up all my ports, I’ve heard SL creates a havoc
  • wanted to maintain java apps that stop working in SL, like Zend 5.5 (it may be old but still has the best debugger around)
  • wasn’t crazy about tinkering with my Cocoa dev environment

Finally I was forced to upgrade, in a panic in fact, as it’s the only way to build iOS apps for iPhone and iPad for version 4 or later.  And since the iOS 4 update broke a lot of our 3.1.3 apps, I had to get fixes out asap.

So what’s involved?  Well on the database side, forget about downloading the dmg for MySQL, it’s poorly setup.  And forget about globally upgrading your ports, the various approaches suggested here and here simply don’t work.

Unfortunately you have to take the advice on the official Macports page and uninstall everything, then selectively re-install the ports you want.  The suggestion labelled “Automatically reinstall ports” refers to a script that collapses almost instantly when it fails to find Tcl libs which certainly don’t exist in my bog standard ports setup.

So one thing you need to keep in mind is to reinstall your ports with the +universal option which specifies 32 and 64 bit architectures will be accommodated.

For a basic PHP+Apache install this page has some good suggestions but is not up to date.  And you need to go herefor advice on installing MySQL, which obviously needs to be done before you install PHP.  I’ve summarise the steps required here:

Apache 2

Install apache as follows:

sudo port install apache2 +universal

Then run the following, as advised, to get it to startup automatically after reboots:

sudo port load apache2

Just installing apache installed 16 ports including all the deps.  For tweaks the config the file is here:


MySQL 5.1

To get the ball rolling with MySQL, the following:

sudo port install mysql5 +universal

Then you need to issue you a

sudo port install mysql5-server +universal

which just takes a few secs and the server is setup.

To start the server on reboot do

sudo port load mysql5-server

and if you wanted to setup a new db from scratch you could issue

sudo -u _mysql mysql_install_db5

If you want to change any of the configuration the file is here:


PHP 5.3

Now that you have your Apache and MySQL installed, it’s time to install PHP and link to them:

sudo port install php5 +apache2 +universal

To enable PHP in Apache, run

cd /opt/local/apache2/modules
/opt/local/apache2/bin/apxs -a -e -n "php5"

then add the PHP modules you want after:

sudo port install php5-mysql

Then, to get MySQL working with PHP you need to edit /opt/local/etc/php5/php.ini and set

mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket to /tmp/mysqld.sock

And that should do the trick!

edit /opt/local/etc/php5/php.ini and set
mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket
to /opt/local/var/run/mysql5/mysqld.sock