Archive for April, 2006

What I hate in Javascript

April 28th, 2006

The thing that gets on my nerves the most about javascript, is it’s silent deaths. I have a function XpathAttr that if you don’t pass it the correct parameter, In this case a XMLHTTPRequest object, it dies. No error, no Exception, no nothing.

Now I realise I could throw my own exception, or check that the xml parameter is actually the right type of object. But I really don’t care. I just want it to let me know execution has halted, here. Grr.


PHP – Getters and Setters

April 27th, 2006

There is alot of talk about Getters and Setters being evil. The major argument is encapsulation, basically if you need that information outside the class, maybe that class should be doing the work on the information, not you. This sounds reasonably valid to me in a pure OO sense but in reality, sometimes we want to be able to just set a variable’s value.

In PHP, it seems alot easier to leave the variable public and set it directly rather than using a setVar() method. I’m of the belief that using the setVar() method will save you time later on when you want to start creating fluid interfaces. If you set a value directly, you can’t choose what you want to return. Consequently, hiding setters and getters with the use of the __get and __set magic functions can also make fluid interfaces hard to implement.


Dave Winer a Notorious Curmudgeon

April 20th, 2006

In the recent Fortune Article about Microsoft, they refer to Dave Winer as a notorious curmudgeon. I wonder if Dave is honoured or offended about this branding.

I know I would take it as a compliment.


Kindness

April 18th, 2006

Two acts of kindness.

  1. After being given a train ticket for not enough zones by the ticket lady, the policeman who is inspecting my ticket lets me go without a fine.
  2. The bus driver on the way home from work let’s me go on the same ticket, still without the right zones.

Sweat

April 11th, 2006

It doesn’t happen normally, whether it’s the air pushing back the tide, or just keeping you cool. It always happens when you stop, the sun beating down and your body temperature rises. Then you feel it, it starts as a stinging in the corner of your eyes, but by the time the light turns green you can hardly see. You push off and halfway across the intersection you are thinking about how to wipe your eyes but you know your arms are covered in sweat too.


Vegetarian or not

April 5th, 2006

I have a number of friends who are vegetarians. They don’t eat meat, because they don’t like the idea of killing animals, yet they eat fish. Apparently, fish are not animals or they deserve to die.

Fish and Chip-o-crits.


The Dangers of Nakedness

April 3rd, 2006

I saw this and thought I would bring it to the attention of any of my readers. I know alot of us enjoy getting a little naked and these are the things you need to watch out for.