Ever wondered why performance of MySQL on OS X was so much worse than a Linux or windows counterpart – especially when doing DROP/CREATE statements (ie in the setup of unit tests etc)? It turns out Mac OS has a safer file creation function than is available on other operating systems and the use of that slows down performance of file operations in MySQL.

You can fix this quickly by adding the following to your my.cnf file in the [server] block. It’s probably best not to do this in production, but who actually uses OS X as a production web server anyway?

skip-sync-frm=OFF

Source: The original MySQL bug report (although it’s not really a bug).

 

I’ve recently upgraded to MAMP Pro and I like how I can easily add virtual hosts in its UI – something I had previously done in code in the free version and on older machines running windows, Linux etc. I ran into a strange problem with MAMP though.

In the project I’m working on, I expect to have the default behaviour for unmatched host names go to the first virtual host (a default behaviour of the apache virtual host system) and to have some custom virtual host configurations for my Zend Framework app to work (namely “SetEnv APPLICATION_ENV development”). After pulling my hair out for a while, I found out why my environment variables weren’t being sent through to apache and PHP when I was getting the default virtual host: MAMP Pro adds an extra first virtual host above your collection of virtual hosts (trying to be helpful, I assume) which doesn’t have the custom virtual host directory settings in it and as such, requests will fail. Continue reading »

 

It seems Apple have done it again, breaking the menubar font antialiasing with OS X Lion.

This time, it all seems to be around the translucent menubar.

Turn it off in System Preferences > Desktop & Screensaver > Desktop
- Untick “Translucent menu bar”

 

Do you work on old, shitty code? Does it stink? Each time you have to work on that same file that drives you nuts, does it make you question your sanity?

In my day job, if there’s something that’ll bring tears to a developer’s eyes, it’s being given a story to work on that involves touching a 6~7 year old file called sales.php. This file is a monstrous 7000+ lines long and is a gigantic state machine that is confusing and highly prone to malfunction. It also loosely forms the “C” and the “V” of a fairly broken MVC structure. To make matters worse, over the years, there have been ~10 different developers ‘work’ on it and it’s a delicate debacle of different coding styles, motivations and business desires. Continue reading »

 

After a fresh install of Lion, getting up to speed with my normal MAMP dev setup + memcached wasn’t as easy as on Snow Leopard. I ended up seeking inspiration from the following articles:

In hindsight, it was quite easy: Continue reading »

 
Cooked bread

This is a recipe originally found on Mother Earth News. It’s easy, kinda fun and delicious. I’ve not had a batch that ever came out looking like the pictures on Mother Earth News, but what I have made is awesome.
Continue reading »

 
Cous Cous and Pumpkin Salad

This is the recipe for a simple but delicious salad that can be served as an entire meal such as lunch. I’ve never seen an official recipe for this. I just made this salad up after eating something like it when I was out one day.

A lot of the ingredients can be swapped out for something else to suit your personal tastes.

Continue reading »

 

In high school, our class of 20 computers all shared 1 33.6kbps modem connection. Browsing was painful and slow. Years ago, I left my company-provided dial-up account connected for ~4 days so that I could download a Linux installer ISO. Torture.

These days, fast broadband is cheap and reliable. Moments like the screenshot below remind me of how far we’ve come and how awesome the internet is these days.

High speed download

Jul 042010
 

I was reading a post over at Frugal Dad the other day about creating a CD ladder. This idea is interesting and amazing. Here in Australia, we don’t have certificates of deposit, but we have a thing called term deposit which sounds like the same thing.
Continue reading »

 

In a walk with the kids today, we came across many beautiful and extravagant homes. This one is under construction and is going to look so awesome when it’s complete. From the side you can see a lot more detail with exposed beams etc.
Continue reading »