Alex Pooley's Blog

Hello there, my name is Alex Pooley and I'm a freelance web developer residing in Perth, Western Australia. My passion is in the development of web sites that solve everyday problems. Here's a gallery of some of my notable work. If you need a web site designer or developer, contact me with further details. Lastly, you can read more about me.

Complexity

March 27th, 2006

I have been thinking about complexity for a while now as a measure of “difficulty”. Typically the more complex something is, the more difficult it will be to solve. Naively, complexity is a measure of the amount of stuff you have to solve at the same time. I think mathematicians would call this the number of “degrees”. Anyway, here’s a real world example:

* Brick laying is hard work, but not complex. You have a lot of bricks to lay, but a clear, obvious, and defined path to lay them in.
* Software writing is hard work too, but it is also complex. You have a lot of code to write, but the path is never defined until it’s done. Most of what you do at any one time has an impact on multiple parts of your code base.

Ray Ozzie, CTO of Microsoft says this about complexity:

“_Complexity kills. It sucks the life out of developers, it makes products difficult to plan, build and test, it introduces security challenges and it causes end-user and administrator frustration._” (”nytimes”:http://www.nytimes.com/2006/03/27/technology/27soft.html?hp&ex=1143435600&en=482f269e6e35b1c3&ei=5094&partner=homepage)

From my experiences, most people don’t acknowledge complexity. This is a worry as most of my experiences have been with software. I don’t think problems come much more complex than those found in software. Anyway, understanding the difference between complex work and hard work is important. If you don’t, some day you will end up looking like upper management at 95% of software companies.

Array.push() in IE

March 26th, 2006

Damn it, I spent an hour on this. I was working on some code and it was working nicely in FireFox so I switched over to test out the code on IE. Big surpise (sarcasm intended), it didn’t work in IE. Anyway, it turns out that IE doesn’t support the push() method on Array objects in Javascript. At least, this is the case for me using IE 6.0.

Arrays in Javascript are dynamically resized. This is similar to Vectors in Java if memory serves me right (I haven’t used Java for a long time now). The solution to my problem was to simply define the next element in the array to the value I wanted. Memory allocation is handled magically. To mimic the ECMAScript Edition 3 spec you can do something like:

//Define the next element in array (model).
this.model[this.model.length] = p;
//Return the new length of the array.
return this.model.length;

It’s not hard now that I know. But what a pain!

More!

March 26th, 2006

My honeymoon in New Zealand’s south island was awesome. Allison and I travelled 2035 Km’s which equated to a large portion of the south island. I was able to absorb a lot from the experience but nothing that I can succinctly note. A large part of the experience was standing outside their society as a foreigner and looking in. This gave me a very unbiased view and I was able to see crap television, corny marketting, and human personalities as I had never been able to before.

For a while now I have been aware of the rat race but have not able to really see it. Since returning from my cruisy tour of the south island I have “noticed” the rat race. I think this has been a result of my continuous questioning of society before the honeymoon, my perspective as a foreigner in New Zealand, and then my temporary out of sync perspective after the honeymoon when trying to return back to “normality”. It’s a strange feeling, watching the rat race, and then realising you’re entirely wrapped up in it despite thinking otherwise previously. At least I’ve finally noticed I guess. So here’s what I’m going to focus on:

* Build stuff that people need/want.
* Build stuff in a way that I can be proud of.

Obviously I need to eat, but I think satisfying market demand will solve that issue. The real change will be trying to build something *I* can be proud of. In the past I have simply build stuff out of necessity. That’s a pretty depressing way to live in my opinion, though I know not everyone has the luxury of doing something they enjoy. So here’s to quality software, helping people, and improving quality of life… or something like that.