For Good

I’ve heard it said
That people come into our lives for a reason
Bringing something we must learn
And we are led
To those who help us most to grow
If we let them
And we help them in return
Well, I don’t know if I believe that’s true
But I know I’m who I am today
Because I knew you.

– “For Good” from Wicked Musical

It’s beautiful :).

This is the solo version (original is duet), sang by Kristin, one of the original singers/actors. She played Galinda, the pretty witch =P.

One of my favourites from Wicked.

It’s weird. Quite a few people have changed me throughout my life. Yet most of them probably don’t know it (I have a feeling the hamster does…). Some of them aren’t even good friends.

It’s just something about them that makes me want to emulate. To change.

And then there are people I never knew, but keep hearing about. Makes me very curious.

Like BIG Kerri’s lilbro*

They just go on my list of 100 things to see before I die =P.

* Tiny font as required by the Underage Protection Act. If you can still see it, your eyes are breaking the law (by the DMCA).

Making your own PCB

To my non-ECE friends: Sorry this post won’t make any sense. Please stop reading now :).

My next project – a 100Msps/20-40MHz USB Oscilloscope.

I’m making it mainly to learn about a few things – high speed circuitry (EVERYTHING becomes a capacitor + inductor, and 45 degrees bent traces are better than 90), some more VHDL with FPGA, and making my own PCB!

The PCB making part I’m most excited about. If you don’t know already, some companies will make “prototype” PCBs for you for ~$20-$30. Just need to draw your PCB in an electrical CAD program (gEDA, EAGLE, KiCAD, etc), and send them the file along with your credit card details. Wait a few days/weeks, and you’ll get your little green board in the mail, professionally made.


There are ways to make your own PCBs at home, using smelly chemicals and hand drills, but for $20-$30, I would just get someone to make it for me. No need to deal with nasty chemicals, and MUCH higher quality.

One very popular and the cheapest prototyping service is BatchPCB. $10 setup/handling + $2.5 / sq in for 2 layers board (you can have traces and components on both sides). Apparently quality is pretty good. Downside is it takes forever (up to more than a month).

The other one I’m considering is Olimex. EUR 30 (~$40) for a 16cm*10cm panel (HUGE!). You can divide it up any way you want. Cheaper if you are making bigger boards, or need more than one board. 3-5 days turnaround time. If you want to make some PCBs too maybe we can share a panel?

One major advantage of making a PCB vs breadboard/prototyping board is surface mount chips. All the fun chips (FPGAs, newer microcontrollers, USB interface chips, etc) are only available in surface mount packages. Contrarily to popular beliefs, it IS possible to hand-solder SMD chips. I’ve successfully soldered a 28-pin TSSOP. It’s pain in the rear end, but doable with a clean, fine soldering tip with a lot of flux, and mad soldering skills of course :). QFP should be similar (same lead spacing, just on 4 sides). I wouldn’t try QFN, though, I heard they are very hard due to the lack of extended leads. SOIC should be very easy due to huge lead spacing.

That’s about all the common chip packages.
DIP (the kind we used in labs, very easy to solder) –

As you can see, most ARE actually hand solderable. Just need to make your own PCB.

Some chips with hundreds of pins (huge FPGAs, microprocessors, etc) use other packages like BGA or LGA (where the pins form a “grid”). I’m not worrying about those yet =P. Even the newest FPGAs are available in QFP (at least the smaller ones).

There are many tutorials online for SMD hand soldering.

Coincidentally, there’s an article in IEEE Spectrum about this exact same topic.
(The picture above was stolen from there shamelessly :)).

Have fun!

(BTW, the segway project has been put on hold until I learn more about control theory next year… right now it’s able to balance itself for a second or 2 before falling down. I think it’s to do with the large delay in the PID feedback loop, but I don’t know what to do with it yet =P)

Mostly Harmless

I have been involved in an alarming number of religious debates over the past few weeks. With people in “real life”, on random forums, etc. It seems like the world just likes to disagree with me =P.

I think I have learned quite a lot about religions, and spirituality in general, and have been enlightened on many accounts.

I have always been an atheist, and still am last time I checked.

However, my view on organized religions have changed drastically. It makes a lot more sense now that I have a deeper understanding of what it entails to be a believer.

I have always secretly despised organized religions in the past, dismissing them as superstition, and occasionally hypocrisy.

Fortunately, I’ve had the honour to talk to some very wise religious people (which I thought would be contradictory), and learned a few things.

1. By definition, faith is a choice to believe. It’s no different from believing, say, general relativity. Many scientific theories we believe today cannot be proven. They are hypothesis taken as truth, perhaps temporarily, for convenience, to explain something we can not yet explain. They form the axioms of our scientific “knowledge”. We accept them as truth, and build on them. If you believe in general relativity, everything else can be deduced – time dilation, black holes, relativistic mass, etc.

But all that is bullshit if you don’t choose to believe in general relativity in the first place.

It’s the same thing for religions. For example, if you accept the existence of the Christian God, all the teachings follows logically.

Science is really no more “scientific” than religion.

Existence of God doesn’t need to be and cannot be proven, because you either choose to believe it or you don’t.

2. … there is really no 2). Everything else follows logically from 1).

Believers are just people who choose to have faith because it helps them become a better person, have a more satisfying life, gives them a purpose or motivation to do good, or a brazillion other reasons. There’s nothing superstitious about that.


As you may remember, a few weeks ago, I set my summer goal to be learning La Campanella.

2 of my musical friends (as opposed to Subway friends, KFC friends, A&W friends, etc) soon very subtly, with their usual elegance and politeness, told me it’s way beyond my reach. And after seeing the score for the first time, I wholeheartedly agree :D.

New goal – Debussy’s Arabesque #1. Delicious impressionism. For real this time!

One cool thing about this piece is that everyone plays it very differently. I don’t think there is a “standard” interpretation. If you go down the youtube result list, and listen to 5 different ones, you’ll get 5 drastically different interpretations. The one above is my favourite. One of the faster ones. And I also observed that the amount of rubato (varying tempo) is inversely proportional to age =P.

The notes are considerably easier to get right, but of course, simpler notes means music must come from elsewhere.

I’m on third page already! The notes are pretty easy, except for the eighth against triplets. I can never get them remotely close to even :(.

I’ll worry about musicality later =P.

bool WantHug() const {

     return true;

One good thing about game programming – randomly browsing the code makes you chuckle =P

I was reading through code for some NPC managing class.

I think I saw functions that try to determine whether a NPC is drunk (using something like mAlcoholContent member variable), whether he should be puking, or passed out.

and an IsEmoting() or something to that effect.

Way too much fun =P.