If only I were not Aquarius

So now you showed interest in me
Though I never felt it when we were near
Did not want to be bribed by your glittering necklace
Coz you know why we broke up

Foolish as I am
Knows who is the one
Tried to lie to myself but could not endure before long
I envy those who spent all for what they pursue
So bravely blind that they see no consequences

Like the most endurable castle
I crumble bit by bit, piece by piece
Strong as I am
Still finds it so hard to carry on
I feel the pain pretending to be happy each day

Let me go home and don’t make my tears drop
Since you know Aquarius have wet eyes
Keep your words back to you
If the next dialogue is about farewell
Forget about reunion which is destined to be even sadder
There is no painkiller at my home
Yet I had the Long Island Ice Tea as cure for half a night
Seeing you leave now or ten years later make no difference
If only I could be a bit more resolved
I would give myself a way out

How to Enjoy Old Songs

With many years of experience listening to a remarkable amount of digital music, I suddenly realized what the best way is to listen to your MP3. Most people categorize music files by singer, e.g. naming folders with “Vivian Chow”, “Michael Jackson”, “S.H.E” etc. Ask yourself this question: are you building a database? or are you going to add 200 Stefanie Sun’s songs to your playlist and fill your brain with her voice for a whole day? A more proper way: naming folders with data and time, e.g. “2007.10”, which means songs in this folder were your favorites in October 2007, or those you played the most during the time. Then, these songs not just sound bytes anymore; they’ll be you memory stimulator. Years later when you play it again, you’ll find even the slightest bit of memory, mood and attitude is flushing like irresistible. Joy or sadness, they all come back as if they happened yesterday. A fantastic thing really.

– Written by me in 2010

Sampling can be Evil

I was stranded in a problem for a couple of hours this afternoon due to trusting too much in sampling. As usual, I used the following query to get some flavor of the MySQL table I was interested in.

select * from some_table limit 10;

Super huh? Short and quick, tells you something both about the schema and data within seconds. It worked well until this afternoon when I saw a string typed column across the 10 rows has the same value “AAA”. I took for granted (without even thinking) that all the hundreds of thousands of rows would have “AAA” in this column. I tried desperately (yup, putting logs everywhere) to figured out why my program saw “BBB” instead of “AAA”. In the end, I saw the light and removed “limit 10” in the query and those “BBB”s flew across my screen like crazy.

Lessons Learned – Recipe for Entangling Classes

To share a piece of weird code I saw today – design pattern name should be “I just wanted everybody to have everybody sweetheart”

class A(var b : B, var c : C) {
 b.a = this
 b.c = c
 c.a = this
 c.b = b
}

class B {
 var a : A = null
 var c : C = null
}

class C {
 var a : A = null
 var b : B = null
}

val b = new B
val c = new C
val a = new A(b, c)