In between overloading on TV

Just a quick entry to sum up the odds and ends I’d been intending to write about but kept getting distracted by a rapid succession of Veronica Mars episodes:

  • I hadn’t noticed until the latest iPhoto update broke something, but Keyword Assistant for iPhoto has been updating pretty regularly. Luckily, the author has a RSS feed (here) for updates — that’s normal enough, the feed goes into my NetNewsWire list with Adium, ecto, Saft, etc. What’s particularly cool, however, is how the Keyword Assistant feed actually uses enclosures (normally used for delivering podcasts) to include the actual software being updated. Hence, any reader checking their feed with a compatible newsfeed program can easily download the updated program like they would a podcast (instead of “our program’s been updated, click here to go to a page to download it”, as is usually the case). Coolness! Blindingly obvious, when you think about it, and an amazing use of RSS technology.
  • The rest of the life: I cleared out my desk at work on Thursday — not something one gets to do often, hopefully, much less in one’s fifth week of work. Granted, it’s because my school attachment had finally ended. At least now the kids I was teaching will resume getting a real education and not my unprepared nonsense.
  • NIE term proper starts next week (after this week’s orientation-ish activities). The timetable is nice and loose, with big gaping four-hour holes between classes perfect for afternoon naps. No free days, though, but only one day starts at 8.30, so I think I can get by without overdosing on too much caffeine. (He says now, unsuspectingly…)
  • I’ll be moving on-campus sometime soon… maybe this weekend, or earlier. Since I’ll be rooming with good ol’ Mal/Kekdil/Block, there’s really no reason not to make your way to the remotest corner of Singapore just to visit. If you have a car, anyway. If not, uhh, you can sleep on our floor and risk getting fined $7 a night, unless you’re also living in the Hall, in which case we’ll all get evicted. It’s a real rule (see 7c).

Back to more TV.

Piecing it together

So, as previously mentioned, I’d been assigned to the school my dad’s teaching at for my pre-NIE School Experience.

I didn’t make any particular effort to hide this fact from anyone, but my dad hid the family photos on his desk the day before I arrived, triggering some suspicion from a colleague (who happens to be an ex-student of my mom’s, and I do resemble my mom quite a bit). Somewhere along the way, though, most of the staff have figured it out. It’s not very hard when we arrive in the same car every morning, and I sometimes drive my dad’s car home if my mom needs a ride somewhere (although a colleague did ask him, with a bit of concern, “Did you see that trainee teacher take your laptop and drive your car off?!”).

Now, however, some of the students seem to know too — especially this one kid who works at his family’s restaurant nearby (highly recommended, it’s that cze char / seafood restaurant at one end of the block where Casuarina Roti Prata is). He must’ve seen me there with my dad before or something.

Earlier this week, he randomly asked me: “Are you Mr Soon’s son?”

“What other surname do you expect my father to have?”

It’s my third-to-last day at the school, though, and an altogether rather pleasant experience (apart from the late-night lesson planning due to my usual procrastinating habits). At the very least, it’s been quite educational, and maybe NIE classes won’t be so boring if I have real experiences to relate them to.

Failed experiment

No more: the “links for” posts just weren’t entertaining enough, even by my low standards. Also, it hurts my addled brain to have to think of whether I really want this link I’m bookmarking to appear on my blog… Still, though, best bookmarking service ever.

The “School Experience” goes well, in general, but given that it’s my last week here, I’ve given up on really preparing lesson plans or anything and settled on just making shit up in class. Hmm. Another failed experiment, perhaps.

Random things that please me

My favourite sitcom Scrubs finally got nominated for the Emmys — Best Comedy and Best Comedy Lead Actor for Zach Braff. Granted, the former is really only because heavyweights Friends, Sex and the City and Frasier have finally gone away, but it’s nice to see this smartly-written comedy finally get some attention it deserves. The latter nomination is probably an extension of Braff’s success in Garden State, but it’s a start. Pity John C. McGinley (the absurdly sarcastic Dr. Cox) didn’t get nominated in the supporting comedy actor category, instead losing out to hacks like Will and Grace‘s Sean Hayes. Seriously, what the hell is that?!

Other random thing: Baybeats tomorrow will actually feature Concave Scream, my favourite local band. Holy shit! I thought they’d disappeared years ago. I remember buying Erratic in JC, and I couldn’t get enough of their post-punk-tense-rock (or however you’d describe it — somewhat New Model Army, I say). After I got back from the US, Eek and I spent hours trying to locate their MP3s because I’d lost my original CD. Finally, I managed to order it again through before it shut down, and also found their next album, Three, at Audiophile. Excellent stuff still.

Somewhat drained from the week, really. One has to take the random pleasing things as they show up…

The new Javascript countdown timer

I got a couple of requests for a version of the bond countdown timer that’d work with Blogger or any other non-self-hosted blogging system.

Here it is, with comments and all too. See, two years of teaching programming style haven’t gone down the drain. Much.

<script type=""text/javascript">

function formatAsMoney(mnt) { mnt -= 0; mnt = (Math.round(mnt100))/100; return (mnt == Math.floor(mnt)) ? mnt + '.00' : ( (mnt10 == Math.floor(mnt*10)) ? mnt + '0' : mnt); } // from


Simple script that writes out a line of text with how many days of bond left to go, and how much it's worth right now if paid up. E.g. "1870 days and $496250.40 left to go". Extremely depressing.

Variables to change:

enddate: The end date of the bond, assuming a full (4/6/8-year) bond.

enddate_discount: The end date of the bond assuming it's completed. Applies only to those who serve full-time NS and have half of that counted towards the bond (usually 10 months), or teachers whose NIE term isn't counted unless they complete the bond.

startdate: First day of work.

bond: Bond value with interest and LD. Assumes a linear depreciation of an already-compounded bond value with liquidated damages. The amount signed on the contract can be used as a rough estimate.

OPTIONAL -- nowdate: Change to a date in the future e.g. nowdate = new Date("June 20, 2009"); to see how much to pay at that point of time.


var enddate = new Date("June 20, 2011"); var enddate_discount = new Date("August 20, 2010"); // Uncomment this following line if end date is fixed: // enddate_discount = enddate; var startdate = new Date("June 20, 2005"); var bond = 500000;

var nowdate = new Date(); ms1 = enddate_discount - nowdate; days = Math.floor(ms1 / 86400000); // from millisecs to days

document.write(days); document.write(" days and ");

total = enddate - startdate; ms2 = enddate - nowdate; rem = formatAsMoney(ms2 / total * bond);

document.write("$"); document.write(rem); document.write(" left to go");


To use, copy and paste the entire section into anywhere you want the words "x days and $y left to go" to show up, making sure to customise the variables for your own situation — bond value and the start and end dates. If there’s an error, let me know by email or on the comments.

Enjoy 🙂

The new countdown timer

Only tangentially related to this post, but interesting nonetheless, are various online responses to Szemeng’s letter to the ST forum about social mobility and the scholarships system in Singapore: two from From a Singapore Angle ([1], [2]), another from Zuco.

As possibly part of his statistic (that 75% of scholarship-holding Singaporean students at Stanford who don’t live in HDB flats), I feel that I should demonstrate how truly ungrateful I am for having had the chance to study overseas for free by being able to remind myself of how long more I’m bonded for. The new countdown timer on the sidebar shows exactly how many days I have left until my bond is up, and assuming a base value of $500,000 for the bond with interest (I think that’s what was stated on my contract, higher than usual because of NIE), how much I’d have to pay back if I broke it right this second.

If anyone else wants to use it, here’s the pluggable PHP code to put in your HTML. The two end dates are for those who’ve completed NS — I’m assuming 10 months of it counted towards the bond, although is only the case if the bond is completed.

$end_date_break = "20 June 2011 00:01";
$end_date_endure = "20 August 2010 00:01";
$start_date = "20 June 2005 00:01";
$bond = 500000;

$seconds = strtotime($end_date_endure) - strtotime("now"); $hours = $seconds / 3600; $days = floor($hours / 24); echo $days . " days and \$"; $total = strtotime($end_date_break) - strtotime($start_date); $seconds2 = strtotime($end_date_break) - strtotime("now"); $remaining = $seconds2 / $total * $bond; echo number_format($remaining, 2, '.', ',') . " away from freedom\n"; ?>

The depressingly large debt I seem to have signed myself into aside, it’s mildly amusing to keep refreshing the page to see the bond value go down by a few cents. Edit: Stupid blogging software, "smartening" all the damn quotes. Gah!

Actually, the real reason I thought about coding that little snippet up? A good friend is moving on from being bonded to hopefully much greener pastures. Good luck, you.