Archive for September, 2007

“A fool dreams of wealth; a wise man, of happiness.” – Turkish Proverb

September 19, 2007 7:28 pm

Call me a fool, then!

The reason for the fool quote is that I am actually quoted on The Motley Fool about one of my favorite stocks, Gildan Activewear. The article can be found here. In that article, I’m tuzowilson, by the way. Not a big quote, but still a quote.

Sign of the Dollar

September 13, 2007 9:02 pm

I was perusing some JavaScript the other day and saw a strange notation that I had never seen before:

$("report")

"What is this?", I thought. It looks like Perl or PHP -- have I missed some big piece of JavaScript or is this some new feature? In a word: No.

It turns out that this is actually a function contained in the Prototype JavaScript Framework. The definition of the function is along the lines of:

JavaScript:
  1. function $() {
  2.     var elements = new Array();
  3.     for (var i = 0; i <arguments.length; i++) {
  4.         var element = arguments[i];
  5.         if (typeof element == 'string')
  6.             element = document.getElementById(element);
  7.         if (arguments.length == 1)
  8.             return element;
  9.         elements.push(element);
  10.     }
  11.     return elements;
  12. }

Functionally, this is nothing special: pass in a name and get back the object. Or pass in an array and get back an array of objects. The really cool thing is the simple elegance of this method and how it cleans up your code.

JavaScript:
  1. // 'Classic' way
  2.  document.getElementById('userName').value = 'admin';
  3.  
  4. // Dollar way
  5. $('userName').value = 'admin';

This is so simple, that it seems obvious! This saves on programmer typing, saves on page size and makes the code more readable.

In a word: beautiful.

Missed Concerts? Sinead O’Connor.

September 11, 2007 11:05 pm

Anyone have any regrets about concerts or shows or bands they wish they had seen?

I'm talking about shows you could have gone to but for some reason didn't make it. I don't have many but one that sticks out is Sinead O'Connor in Toronto at RPM in 1988. That was before she killed her career, announced she was a lesbian, retracted her lesbianism, became a priest, retired, and then became a reggae loving Rastafarian. Roughly in that order.

Sure, she's touring again, but at the time Sinead had just released her first album, The Lion and The Cobra, and was far from well known -- it was the perfect time to see a future superstar (at least until SNL) before she exploded into the mainstream with I Do Not Want What I Haven't Got.

"Howling like a banshee that makes Siouxie seem tame in comparison" - Now Magazine

I vividly remember seeing an interview with her on Much Music in early December 1987 (maybe the 7th) where she premiered her first video, Troy. The first thing you noticed was the hair -- or lack thereof. This was 1987 so we are still firmly in the big hair period, poodle epoch so the image was quite striking (even shocking?). They cued the video and it was also like nothing I had ever seen or heard before: I was immediately hooked. After the video, the entire studio (of off camera Much Music employees) burst into spontaneous applause which is something I have never seen after playing a video.

ExpressVu PVR Gets New 9 day Guide

6:59 pm

Stop the presses! Bell actually did something right. It seems that ExpressVu PVRs now have a 9 day guide! This replaces the measly 2 day guide we had to live. This really enhances the usability of the PVR -- good job, Bell.

Now maybe they should look at the billing system.