July 2, 2007

Links for 6.29.2007 through 7.2.2007

permalink


July 4, 2007

Hans Rosling - I would pay 1000 USD to charity and conference fee to hear his talk

He’s a prominent player in the area of data visualization. This is one of the best talks I’ve seen on TED. Watch out for the finale.

permalink


July 5, 2007

Alvin Woon, the Korean Pop Star

So I was asking for opinions in my workplace internal IRC chat room about whether I should shave my head. Erica didn’t seem to like the idea and instead thought I can up my cuteness barometer by at least 10-fold by making my hair looks like some random Korean pop star image she pulled from the web.

She even went as far as to try and convince me by quickly photoshopping an after-effect image and showed it to everyone in the chat room.

hair.jpg

I really don’t think that’s going to work.

permalink


not too shabby, eh?

short1

permalink


July 6, 2007

Links for 7.3.2007 through 7.6.2007

permalink


July 7, 2007

YUI datatable advance sort and dojo.lang.hitch

I’ve decided that Saturday is a good day to pollute the coding world with my bad code.

YUI datatable is a javascript library that provides a simple yet powerful API to display screen-reader accessible tabular data on a web page. One of the features it has is sorting. However, there’s a bug in the code that prevent you from implementing a sort on a column of links (hrefs) using existing markup. You can do that with remote data such as JSON or XML by utilizing the custom formatting, but not with local, existing tabular data.

So what you can do is to implement a custom sort by manipulating the strings. You need to tell the YAHOO sorting engine the position of the string you want it to start sorting. So for a column of links, it would be after the > character. Go to my movie section for live example.


// Custom functions to sort by Column2 then by Column1
var mySortCol2Asc = function(a, b) {
    var val1 = a.title.substring(a.title.indexOf('>')+1);
    var val2 = b.title.substring(a.title.indexOf('>')+1);
    // Use the built-in comparator
    var compFnc = YAHOO.util.Sort.compareAsc;
    var comp = compFnc(val1, val2);
    return (comp !== 0) ? comp : compFnc(val1, val2);
};

var mySortCol2Desc = function(a, b) {
    var val1 = a.title.substring(a.title.indexOf('>')+1);
    var val2 = b.title.substring(a.title.indexOf('>')+1);
    // Use the built-in comparator
    var compFnc = YAHOO.util.Sort.compareDesc;
    var comp = compFnc(val1, val2);
    return (comp !== 0) ? comp : compFnc(val1, val2);
};

YAHOO.example.enhanceFromMarkup = function() {
    this.columnHeaders = [
        {key:"title",text:"Title",sortable:true,
         sortOptions:{ascFunction:mySortCol2Asc,
         descFunction:mySortCol2Desc} },
        {key:"director",text:"Director",sortable:true},
        {key:"rating",text:"Rating",type:"number",sortable:true}
    ];

The next one I’m going to talk about is a slick API from the dojo library - dojo.lang.hitch . There’s no bug here but I thought it might be useful for a lot of people coding javascript. I find little documentations for it on the web but what it does is to run a function within a given context and can be used to preserve context. In short, it let’s you specify the scope of this in your codes.


var _this = this;

dojo.event.connect (id, 'onclick',
      dojo.lang.hitch(_this, function(){
         alert(this);
      })
);
permalink


July 8, 2007

Oh my gawd, oh my gawd

alvin_and_the_chipmunks

permalink


July 9, 2007

Great Northern

greatnorthen.jpg

If I’m stuck in an island and I can only bring one thing with me, it would be a Great Northern’s album.

permalink


July 10, 2007

Links for 7.9.2007 through 7.10.2007

permalink


July 14, 2007

First they came…

Reading jeffooi.com, I found this poem by Pastor Martin Niemöller (1892-1984).

When the Nazis came for the communists,
I remained silent;
I was not a communist.

When they locked up the social democrats,
I remained silent;
I was not a social democrat.

When they came for the trade unionists,
I did not speak out;
I was not a trade unionist.

When they came for me,
there was no one left to speak out.

So true. so true.

permalink


July 15, 2007

Links for 7.11.2007 through 7.15.2007

permalink


July 16, 2007

My Little Dead Dick

Don’t worry, he’s fine.

I am referring to this wonderful, moving photoblog chronicling the love and life story of Patrick (Taiwan) and Madi (China).

patandmadi1.jpg
这些照片让我想要出走——没有特别目的地,只是单纯的想要为了喜欢而冲动的收拾上路…

note: Some of the photos are NSFW.

permalink


July 17, 2007

Scala and Kolacny brothers

sk.jpg

S&K is a youth choir from Aarschot, Belgium, roughly sixty teenage girls, directed by two talented brothers.

Their latest album is one of those rare CDs that you can press play and just sit back or do your own and let the album finishes itself. No skip or forward, but possibly many repeats. It’s remarkably angelic.

permalink


July 19, 2007

Santa Clause doesn’t exist, honey

JK Rowling rails against spoilers

Someone from Baltimore Sun (one of the few US newspapers who printed reviews ahead of the novel’s publication on 21 July) appeared in MSNBC just now talking about how they took a long and hard thought and internal discussion before deciding to publish the unwelcome review. Towards the end of the interview, she said the paper received an email from a 15 years old telling them she can’t type properly since she can’t see the keyboard clearly because it is covered with her tears. My advise, take a longer time to think next time.

Asshats.

Say I’m really excited about the final series of the Lord of the Rings trilogy. It’s ok if someone who has already watched it during the premier night wants to be an ass and tells me all the details in my face knowing well I’m going to watch it the next day. I will be pissed, probably will chew his head off, but it’s ok. Because I’m a 25 years old with a long line of mid-life crisis to worry about.

But these are 5 to 16 years old kids we are talking about here. They followed the story religiously. They probably dreamed about it a million times. Most of them grew up wrapping themselves around with a Snoopy comforter at night looking forward to be teleported into Hogwarts before the sun rises again. IT IS THE FINAL BOOK! YOU DO NOT NEED TO THINK THAT LONG AND HARD.

“Our feeling is that once a book is offered up for sale at any public, retail outlet, and we purchase a copy legally and openly, we are free to review it,” a NYT spokeswoman said.

Just because you can freely, legally and openly do something, it doesn’t mean you should. You don’t go and tell your 7 years old Santa Clause doesn’t exist, do you?!

Maybe you do and I’m really really sorry.

Sorry for the all caps sentences. The little child in me is bursting in flame.

permalink


July 21, 2007

Best. Slashdot’s Comment. Ever

Best. Project Name. Ever.
by Skevin (16048)

Bill: [with a Fed-Ex delivery of the new version of Windows] Linus, I never got to tell you how much I admire you and your operating system.
Linus: What’s in the box, Bill?
Bill: When I saw your operating system, I wanted all the features in it. Everything from the widgets on the desktop to the exhilarating smell of its security policies.
Linus: I said, what’s in the box?
Bill: And when I implemented them into my commercial operating system, I realized I had committed the sin of Envy, for which I must pay.
Linus: [Shaking] Aurgh! What’s in the the booooxxx?!
Stallman: [voice suddenly crackling over the radio] Torvalds! Do not open the box! I repeat! Do not open the box!

permalink


July 22, 2007

The Epic Search for a Tech Hero

August edition of Wired’s magazine has an article chronicling the search and rescue mission of programmer, database guru, Turing Award recipient, Jim Gray who remains missing until this day. It’s a sad and tragic story.

His disappearance prompted, according to an interview given by a veteran deputy of the Coast Guard to Mercury News, the largest strictly civilian, privately sponsored search effort ever seen. Microsoft, Google, Amazon, NASA, Oracle and a dozen other tech companies contributed to the resources and efforts to find him.

Ironically, some of the crucial technologies being used to find him were of his researches and inventions. Unfortunately in this case, it still wasn’t enough. 

Update: You can read the online version of the Wired’s article here.

permalink


July 23, 2007

God

So here’s the story.

As a child, I used to go to this Buddhist temple with my parents. I love that place. It is situated by the river and has a majestic interior with the marbled floor, flying dragons on the wall and all. Definitely a prominent landmark in my town. When I was 19 or 20, I converted to Christianity and have been ever since. It wasn’t like I didn’t like dragons anymore and Buddhism has nothing at all to do with dragons as I later found out. It’s just that I’d been spending so much time with my girlfriend that time and she went to church semi-regularly, so might as well. And I did all of this while living in a Muslim-dominant country.

Such unique experience is hard to come by. If anything, it teaches me about the fundamental notion of religious pluralism and that it’s ok to share a tooth brush with someone of a different religious faith. Ok maybe not the later. When I see a leader from a nation talks, swears or acts by the name of God, I smirk. When I heard from my ex-gf the first question her Caucasian roommate’s parents asked her, upon knowing she’s from Malaysia, was whether she’s a Muslim. Before she could answer, they said they don’t want their daughter living with a Muslim. That I smirked too.

The way I see it, if there’s one thing out of the many that remains absolutely the same about Buddhism and Christianity, besides from the obvious fact that they both (and Islam, surprise! surprise!) teach and preach on the notion of love, peace and care, is my prayer. Throughout the years, my prayer has always been the same, every single word. I pray for the safety and happiness of my family and friends. Of course, I had to change some of the words like ‘Lama’ to ‘Jesus’ and I had also noticed the difference in the way you cup your hand during prayer.

I believe in God, make no mistake of that. But I’d learned from experience that that statement is different from ‘I believe in God and you should too’. And that itself is very different from ‘I believe in God and you should believe in MY God too’. And then (ok, last one), that itself is very very different from ‘I believe in God and you should believe in MY God too or else you can’t go to heaven after you die’.

There’s this guy - Owen. He lives by the simplest faith - do no evil. He is as close to a saint as a living man can be. He cares for his family, makes pancakes every morning for his 2 and 6 years olds, married for 30 years, is planning to have a third honeymoon with his wife somewhere in Ireland, joins Red Cross and been to countries like Kosovo, Iraq and Darfur on humantarian mission. But there’s this problem, he is not a Christian, Jew, Muslim, Hindu or a Mormon. He’s spiritual, but not religious. In this world, he would be what we called an atheist. Can he still go to heaven after he dies? Oh did I tell you how he would eventually die? Let say a stray bullet went right through his head while on a mission to distribute food in a refugee camp on some remote areas in Sudan. That’s also the day when his eldest daughter turns 7.

We are living in a society where people look at you differently because you believe in a different God from theirs. Hell we can’t even talk about these things without screaming at each other. And if you believe in religion as my father and mother and friends and girlfriends had taught me to believe it, then maybe you will smirk too. Because then you will start to see the irony of all these connerie.

permalink


July 25, 2007

Links for 7.17.2007 through 7.23.2007

permalink


July 26, 2007

Alvin’s celebrity crushes..

I figure I should keep a list of all my celebrity crushes for nostalgic reason.

Confession: I should probably also confess that Britney Spears was on my original list. I was totally going all ‘ga ga’ over her many blue moons ago. I had to take her off the latest list because I don’t want to risk losing all my friends and family even my dog hates her over some misguided judgment in the past.

So, who is on your list?

permalink


July 27, 2007

This Is Sparta England

I can’t tell you how much I look forward to watching this movie.

permalink


July 28, 2007

It’s confirmed: God hates this world.

spicegirls_468×447.jpg

permalink


July 29, 2007

Wow, Battlestar Galatica on earth

This is crazy. Never would have thought such place exists on earth.


…These are the Sea Forts, that were used to defend London in World War Two. They are off the North Kent coast in the Thames Estuary.
For full set, please visit the flickr page.

permalink


July 30, 2007

You big crying baby

To all my friends who work in the software tech field.

dilbert

permalink


July 31, 2007

Links for 7.24.2007 through 7.31.2007

permalink

Archives/related

© 2008 Wonderful dreams demand a beautiful mind.