Archive for November, 2007

Chocolate Cake

Note: This is a recipe for chocolate cake that my mother made us often when I was younger. It is posted here so I can easily find it.

 

Put everything into the one bowl and beat for about 3-4 minutes on MEDIUM. May take a bit longer with a wooden spoon. Mixture goes into a greased (sprayed) ring pan for about 30 mins.

  • 1 cup S.R. flour (sifted)
  • 1 cup sugar (can use a bit less)
  • 1 tablespoon butter/margarine (melted)
  • ½ cup milk
  • 2 tablespoons Bourneville cocoa
  •   vanilla essence

Variations

Add an extra 2 tablespoons flour and add

Orange
orange rind
juice of ½ an orange
Lemon
lemon rind
juice of ½ a lemon

China Road

Over years of living in China, I have spoken to dozens of Chinese professors and experts, intellectuals and urbanites who give the impression of having their fingers on the pulse of the nation and an ability to interpret it for foreigners. Sometimes they do it very well, but if you really want to know about China, real China, there are few better ways to find out than a long conversation with an ordinary long-distance truck driver, barreling across the Gobi Desert.

Rob Gifford’s book, China Road, tells a lively story giving rich insight into the Chinese nation as he travels along Route 312 from Shanghai to the western boarder. Along the way, he educates the reader on the state of China today, gives snippets of its grand history and adds his own perspective.

Fixing per-user web directories on Leopard

I do most of my web testing and development on localhost/~gmwils. Unfortunately, the upgrade to Leopard made this very broken.

Apple kindly updated apache from v1 to v2, and as a result the configuration directory moves from /etc/httpd to /etc/apache2. The log directory also moves, from /log/httpd to /log/apache2.

Mike isolated the problem:

When a user is created on your system, a small Apache configuration file is created that enables Apache to serve content from their ~/Sites/ directory. Under Tiger, these files were stored in /private/etc/httpd/users/. From what I can tell, if you’ve done an upgrade from Tiger to Leopard, those files do not get migrated over to the new /private/etc/apache2/users/ folder.

So, in order to make your sites work again, make sure to copy your Apache per-user configuration files from /private/etc/httpd/users to /private/etc/apache2/users.

The History of Haskell

The history of Haskell has recently been published. It is a rather long read (55 pages), but a rewarding one. It covers how Haskell formed, decisions around why language constructs were introduced and surveys where it is at today.

Haskell was the second functional programming language I learnt. Miranda, my first, was the language used for first year programming at Melbourne Uni. Reading back on how Haskell split and evolved from Miranda filling in a lot of gaps for me.

There is also discussion on how Haskell has matured, stats on community growth, and case studies of commercial use. There is even a glimpse of the future:

One day, Haskell will be no more than a distant memory. But we believe that, when that day comes, the ideas and techniques that it nurtured will prove to have been of enduring value through their influence on languages of the future.

Safari on Windows

Safari has been available on Windows for a while. This provides Apple with a wider development platform for iPhone apps. It also gives Windows one of the fastest browsers around.

The 3.0.4 beta release adds a few new features that improve its usability:

  • Ctrl-num keys now work. For example, Ctrl-1 launches the first URL in your bookmarks toolbar. (I love this feature)
  • Improved stability
  • Improved compatibility
  • Spell checking
  • and heaps of others…

The other nice feature is proper font rendering.

I find that I still use Firefox for lots of development, but have started to use Safari more as my main browser on Windows. It is simply faster and more pleasant.