Archive for September, 2008

In Honour of Austin Bernard Hemmings

Friday, September 26th, 2008

Yesterday an ordinary husband and father of three was leaving work for the day in downtown Auckland. As he headed home to his family he spotted a woman being punched by a man and did what any ordinary person would (and should) do; he intervened. The man attacking the woman then turned on him and stabbed him to death.

I’ve never met Austin Hemmings before and I can’t possibly begin to imagine what his friends and family are going through right now. But I count it as a great honour to live in the same city, country and world he lived in.

There are people who act to our detriment and there are those, like Austin, who, just by being themselves — by being ordinary — benefit us all. There will likely always be people who act to our detriment and there will likely always be terrible things that happen to good people for absolutely no reason at all but there will also likely be many good, ordinary people who we don’t notice on a day-to-day basis but who hold the very fabric of our society together by just being themselves.

So, Austin, I’m sorry I wasn’t able to recognise and appreciate you while you were living but I will try to make up for that by appreciating more the people who continue to go unnoticed everyday who carry on the valueable job of acting to the benefit of society. You are honoured. And you are extraordinary.

Disable WSDL caching in PHP

Monday, September 22nd, 2008

If you are finding that your SOAP web service isn’t updating when you make changes you have to add the line ini_set("soap.wsdl_cache_enabled", "0"); to both the Server and the Client.

i.e.

<?php
class SoapController
{
 function HelloWorld($name)
 {
  return "Hello ". strrev($name) ;
 }
}
ini_set("soap.wsdl_cache_enabled", "0");
$server = new SoapServer('http://example.com/soap.wsdl');
$server->setClass("SoapController");
$server->handle();
?>

and

<?php
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient('http://example.com/soap.wsdl', array('trace' => 1));
print_r($client->HelloWorld("Damian"));
?>

Escaping a Plus in Javascript

Friday, September 19th, 2008

I got stuck trying to send a string that contained a “+” via Javascript to a Flash component. Using “escape()” didn’t help as it continued to come through as a space. The workaround I discovered is to use “encodeURIComponent()” instead.

New Caledonian Crows

Thursday, September 18th, 2008

I’ve just become aware of some research being done at Auckland University in the area of tool use in New Caledonian crows. I know next to nothing about animal cognition but the fact that there is a non-primate species that makes use of tools raises a lot of interesting questions. A while ago the ability to make use of tools was touted as one of the defining characteristics of humans but it wasn’t long before other primates were found to be able to use tools. What makes these particular crows interesting is 1. the fact that they are so far removed from primates, 2. they don’t have the “kind of brain” you’d expect for tool use (which means our expectations are wrong), and 3. they are (as far as anyone knows) alone among not only crows but all other birds in their ability to use tools in this way.

Russell Gray on the New Caledonian crows:

Russell Gray on metatool use:

Alex Taylor on the trap-tube experiment:

Pointy

Tuesday, September 16th, 2008

I do web development for a living. Almost two years ago I made the switch from being almost exclusively Microsoft and .NET to open source and along the way had to learn PHP (and a bit of Python for a while there too).

I’ve played around with many different web frameworks and been frustrated that they often force you to learn an alternative to SQL and/or some kind of restrictive templating language as well as the fact that most of them are too cumbersome for the types of sites that I’m generally required to produce.

So, for the last six months or so I’ve been refining my own MVC web development framework with the goal of keeping it lightweight, high performance and only using standard PHP and SQL where needed. And most of all, open source.

I present my baby, Pointy (the tiny but sharp development framework), which I’ve made available under a Creative Commons license. If you’re a PHP developer and you want to dabble with Pointy, please feel free to pay a visit, download it, play with it and if you find it useful go ahead and use it. I hope it’s as useful to you as it has been to me.

Teach The Controversy Tees

Wednesday, September 10th, 2008

I love these t-shirts! I’m going to have to order a couple.

Check out the full range here.

Reading List

Tuesday, September 2nd, 2008

Prior to 2005 I was reading mostly the kind of books that make the Whitcoulls Top 100 list along with the occasional classic by the likes of Dostoevsky, Hardy and others. And, of course, Iain [M] Banks whenever a new book came out.

In early 2005 a friend recommended Bill Bryson’s A Short History of Nearly Everything. It was this simple book that, to my great surprise, allowed me to clearly see the fact that my view of reality didn’t match what we can observe of the universe around us. Subconsciously I’d been aware of this fact but had managed to ignore it for 14 years or so. I decided that I would be better off with truth rather than a comforting fantasy and decided to investigate further. I watched a lot of documentaries, visited a lot of websites (and blogs) and talked with a lot of interesting people. I also read a lot of books – here are the ones that have influenced me the most over the last three years:

The Bible – Various Authors
The Mind of God – Paul Davies
A Brief History of Time – Stephen Hawking
E=mc2 – David Bodanis
Deep Simplicity – John Gribbin
Pale Blue Dot – Carl Sagan
The Selfish Gene – Richard Dawkins
Climbing Mount Improbable – Richard Dawkins
The Origin of Species – Charles Darwin
The Demon-Haunted World – Carl Sagan
The God Delusion – Richard Dawkins
Letter to a Christian Nation – Sam Harris
The Richness of Life – Stephen J Gould
The Creation – E O Wilson
The End of Faith – Sam Harris
Various Writings – Thomas Paine
Breaking the Spell – Daniel Dennett
Why People Believe Weird Things – Michael Shermer
God is not Great – Christopher Hitchens
Infidel – Ayaan Hirsi Ali
Freakonomics – Levitt & Dubner
The Blank Slate – Steven Pinker
Consciousness, An Introduction – Susan Blackmore

And I have the following books waiting to be read:

Guns, Germs and Steel – Jared Diamond
How The Mind Works – Steven Pinker
The Ancestor’s Tale – Richard Dawkins
Freedom Evolves – Daniel Dennett

I’m not sure where I’ll go to from here but I feel I’ve done the topics of religion, superstition and pseudoscience to death. Evolution, cosmology and the workings of the mind still fascinate me so I’ll probably carry on down that path for a while.