The RubeTube

Life's a cube.  Solve it.

May 31, 2007
Got this interesting email from TopCoder a few days back:
Hello punzki,

Congratulations! The results of TopCoder SRM 350 are official. You have
won $32.0 (sic).
Sweet! This was after I'd dropped to Division 2 (again) and placed 1st in my room and 5th overall in SRM 350. I was excited about finally winning some TopCoder cash, until I found out about all the paperwork I need to accomplish within 60 days, and that TopCoder will withhold 30% in taxes from my winnings. Still, $22.40 is money well-earned and I plan on using it to celebrate a bit.

After the match, I moved back up to Division 1. Part of me wishes I hadn't, because I've had success in Division 2 before, and staying in Division 2 gives me my best chance of winning more prizes. But there's no way I'm tanking intentionally; I've still got coder's pride after all.

Labels: , ,

May 22, 2007
We had PLDT myDSL installed here at home yesterday. It's the usual 999 pesos-per-month promo for 512 kbps bandwidth that they've been floating around aggressively lately. It also bundles in our residential landline (no more monthly charges), plus free IDD calls for a year!

I must say that the speed is impressive, and it sometimes even exceeds the advertised bandwidth. Results from online speed tests aren't consistent (depending on the latency to the test server), but here's the best result I've had so far:

Not bad! And PLDT gives us a public IP address as well, just in case I ever want to access my home computers remotely.

What happens to our Smart BRO subscription now? myDSL trumps Smart BRO's 384 kbps by far. Unfortunately, we're locked into their service until July, so until then, we basically have dual broadband. It's too bad that we don't have a router capable of taking advantage of both (i.e., a load-balancing router), so Smart BRO will just act as a backup until we can officially drop it.

Labels: , , ,

May 18, 2007
Two weeks after getting into the gym habit, I decided to take some measurements again. After all, I was feeling a bit lighter and healthier, and had some extra spring to my step, so I figured that meant that I'd lost a few pounds.

I measured my weight with the same machine used in our "Biggest Loser" contest, and I was elated to find my weight at a "mere" 196 pounds, even with my shoes on! You may think that this isn't such a big deal, but for me it was huge (or the opposite, actually, har har). For the longest time, I've always weighed in it over 200 pounds, and it's always been bothering me that I was that much overweight. Of course, 196 pounds is still overweight, but that 200-pound barrier was this hump that I've always wanted to get over... or under, rather. This is a great achievement for me, and it sure does a lot for me mentally as well. It gave me a huge psychological boost and it indicated that I was finally doing things right.

I've already accomplished what I wanted to achieve in our contest: to get into the habit of exercising and to start living a healthier lifestyle. Of course, actually winning the contest would be a very nice reward, so I'm definitely not slacking off!

And guess what? I've also lost an inch off my waistline! As a "consequence", I now have to tighten my belt by one notch.

To tell you the truth though, finding out I'd lost weight wasn't very surprising. I've somehow managed to maintain my weight in the 200 to 210-pound range with my regular eating habits; my weight was already very "stable". So if you just add a dash of exercise and combine that with lessened food intake, I was sure to lose some weight. All this simply proves the age old formula for weight-loss: Higher energy consumption + lower energy intake = lost pounds.

Labels: , , ,

May 14, 2007
I didn't vote in today's senatorial and local elections. Not that I didn't want to; I'm just not a registered voter.

It's tempting to justify my actions (or rather, inactions) by saying "I didn't have time to register" or "My vote won't count for much anyway", but I did have time and everyone's vote does count. I have no excuse and I will deeply regret this...

For a while, anyway.

Labels: , ,

May 13, 2007
(Skip ahead three paragraphs down if you don't care about the back-story.)

This edition of TechBits involves a very scary episode with the backups that I made from my dead office laptop's hard disk. I couldn't open one of the backup folders so I decided to run Chkdsk to check for errors on the external drive; it found a number of errors, but nothing that couldn't be fixed.

After running Chkdsk, I could finally access the inaccessible backup folder, but I ran into a bigger problem: the entire folder of videos I had stored on my external hard disk was gone! 100+ GB of downloaded animé and TV episodes, gone in a flash! (I also lost entire folders of work-related files, but strangely enough, I was more concerned about the "Videos" folder.)

I found out some time later by checking the properties window that the missing files were still taking up space on the hard disk; I just couldn't find them! I did my research and it turns out that Chkdsk was the culprit; it had hidden the recovered file fragments somewhere. Here's how to find them:
  1. From any Explorer window, go to the Tools menu and select Folder Options.
  2. From the Folder Options window, go to the View tab.
  3. Under Advanced settings, make sure that the Hide protected operating system files option is unchecked:

  4. Go to the root folder of the hard drive, (e.g., G:\). There you will find a previously-hidden folder or a series of folders named found.NNN, where NNN is some three-digit number. You might have many of these folders if you've run Chkdsk multiple times before. In my case, since I only had one Chkdsk recovery operation, I only had a found.000 folder.
  5. Under the found.NNN folder, you'll find a series of folders named dirNNNN.chk, where NNNN is some four-digit number. You might also find a similar series of files called fileNNNN.chk. These are the files and folders that Chkdsk has recovered:

  6. The files in the dirNNNN.chk folders should still be intact and properly named. You should be able to figure out from its contents what the dirNNNN.chk folder originally was and where it was originally located. Copy/move the folder back to where it should belong.
  7. As for the fileNNNN.chk files, you'll just have to figure out on your own what they originally were. A free tool called CHK-Mate can examine the content of these files and determine what type of file it originally was (e.g., .doc Word document) so that you can open the file in the appropriate program and put it where it's supposed to belong. (Unfortunately, CHK-Mate wasn't able to identify what my file0000.chk was, but it's okay since it probably wasn't important.)
I still shudder at the thought of downloading all those videos again. Fortunately, I didn't have to. I wish Chkdsk was a bit more informative about where it hid my files though.

Labels: , ,

May 10, 2007
I'm very proud of my performance on today's TopCoder Single Round Match 348. First place in my room, and 7th overall in Division 2! How I wish today's match had cash at stake...

I would've ranked higher (at least 3rd overall, in fact!) if I hadn't resubmitted for the 1000-point problem, which got me a huge deduction. I had to recheck my solution because I noticed that the return type was long and my code only counted ints. And it later turns out that none of the system tests had a return value that exceeded int's capacity...

After dipping down to Division 2 for the past three matches, I'm now back to Division 1 with a blue rating! The competition is going to be tougher but at least I can really feel that I'm improving and that I'm more prepared for the harder problems.

Labels: , , ,

May 08, 2007
It's been a long time since the last edition of TechBits, so I promise that this one is really good. If you use iTunes, here's how to control iTunes (play/pause, previous/next track) without having to up the iTunes window! Yes, even if you don't have a multimedia keyboard!
  1. Download and install AutoHotkey. AutoHotkey is a handy-dandy free utility for programming keyboard hotkeys. Don't worry; it takes up very few resources and it's safe!
  2. Fire up the text editor of your choice and create a text file called AutoHotkey.ahk in My Documents, with the following contents:

  3. DetectHiddenWindows, On
    IfWinExist, ahk_class iTunes
    ControlSend, ahk_parent, {SPACE} ; Pause/Play
    IfWinExist, ahk_class iTunes
    ControlSend, ahk_parent, ^{LEFT} ; Previous
    IfWinExist, ahk_class iTunes
    ControlSend, ahk_parent, ^{RIGHT} ; Next

  4. Run/double-click on AutoHotkey.ahk. This will start up AutoHotkey with the script running.
  5. Copy the Start Menu shortcut to AutoHotkey to the Startup folder in the Start Menu so that AutoHotkey automatically runs on startup. AutoHotkey will automatically open and run AutoHotkey.ahk in My Documents when it runs.
  6. If you don't want the AutoHotkey system tray icon to be shown, add a new line to the start of AutoHotkey.ahk containing "#NoTrayIcon" (without the quotes).
The AutoHotkey script configures the following global shortcut keys (note that iTunes must be running first!):
  • Play/Pause: Win + / (slash)
  • Previous Track: Win + , (comma)
  • Next Track: Win + . (period)
Feel free to tweak the script yourself to configure your own keys. AutoHotkey is really fun and easy to learn and the documentation contains everything you need to know. Also, if you use a different media player for your music, feel free to contact me or leave a comment so we can come up with an AutoHotkey hack for you!

Labels: , , ,

May 06, 2007
With Spider-Man 3 being shown in roughly 99 percent of all cinemas throughout the Philippines (not an exaggeration; take a look!), you are left with little choice if you want to catch a movie in these here parts. I mean, what about all those people who want to watch Pan's Labyrinth (great movie, by the way)? Or--God forbid--what about Firehouse Dog (no plans of watching)???

Even if you've been itching to watch Firehouse Dog ever since you saw the trailer, I still think you ought to take time to watch Spider-Man 3. I thought it was a fantastic movie, for a number of reasons:
  • The action is just plain awesome. 'Nuff said.
  • It becomes hilarious at the right times. This keeps the movie from becoming too dragging.
  • The dialogue is downright cheesy, especially in the dramatic parts... and I love it!
  • And it ends the trilogy like it should. But I bet they'll still make a Spider-Man 4 just to see how much more money they can milk out of the franchise.
With regards to its place in the Spider-Man movie trilogy, I thought it was on par with the first one. Some people thought there was too much drama, but Spider-Man is really all about the extraordinary superhuman guy with very ordinary human emotions and problems. (Of course, not a lot of us have had our girlfriends hanging from a hundred-story building in a web, but it could happen to you, you know.)

Can someone explain to me the whole point of Spider-Man 2?

P.S. I also think that everyone should watch Toei's 1978 classic Supaidaman. Think Spider-Man meets Shaider, but minus all the plot of Spider-Man, plus Spider-Man has his own transforming giant robot and new giant monsters in every episode! If you haven't yet, catch the first episode on YouTube now!

Labels: , ,

May 04, 2007
With just four weeks remaining in our "Biggest Loser" office-edition contest, I decided to try to get into our limited-slots, first-come-first-served fitness program (free one-month's access to Gold's Gym). As you can probably guess, a lot of people attempt to enroll in this program and very few make it, so I was very surprised when I found out that I made it in.

I marked off Friday morning (earlier today) as gym work out time. It was the first time I had ever worked out at a gym, and I was very confused at first with all the machinery and things that I could do. So I made an arrangement to have officemates/gym buddies with me on my first work out: GM and Ryann. I probably wouldn't have survived without them, and I would've been discouraged from working out in the future. They acted as my trainers and tour guides. I never knew there were so many ways to exercise and muscle groups to target. Thanks so much, guys!

I had a lot of fun even though I hadn't pushed my body to its limit in such a long time. I'm feeling fine, except that my legs are killing me after doing squats. Tomorrow I will probably have the worst time trying to get out of bed.

Labels: , , , ,

May 03, 2007
(This will be a long story, I promise.)

My work laptop died last night. Well, not completely. It could only boot Windows part of the way; it goes up to the black boot-up screen with the Windows XP logo and the animating bars, but then the hard disk just stops reading all of a sudden while the bars just keep scrolling along. None of the three supposedly-safe modes worked either; at some point I get in the boot-up process, a BSOD flashes briefly and causes my laptop to restart.

After all that, I gave up on trying to get Windows to boot and focused instead on getting my important files (work-related files, downloads, Outlook data, and some personal stuff) to a safe location, and repairing my Windows installation. I had hunch that my Windows installation just got corrupted but the rest of my files were still intact; this hunch would later prove to be correct. The easiest way would've been to call the help desk and get my laptop repaired, but that's for wimps. I figured I could solve this on my own.

Step 1 was to backup my files to my external hard disk; I needed to do this just in case everything is wiped out in the process of reinstalling Windows. I had to find a way to get my files directly to the external hard disk because my personal laptop didn't have enough space. As you can probably imagine, I tried many methods to get this done:
  1. I already had a burned CD of Ubuntu Linux 6.06 (Dapper Drake). From the Live CD, it could read from my laptop's hard disk (the files were still intact). Although writing to NTFS (my external hard disk's file system) from Linux was still risky, I didn't have much of a choice. I did some research and found NTFS-3G, a stable read/write driver for NTFS partitions. However, I couldn't get it installed properly even if I added the proper apt-get repository.
  2. I installed Samba on Ubuntu so I could set up a file share on my mounted laptop hard disk. I tried the best I could, but I wasn't able to find the file share from my personal laptop, even if my work laptop could be seen in the Windows workgroup.
  3. I set up the IIS default FTP web site on my personal laptop to have a home directory directly on the external hard disk. After disabling the firewalls (and unplugging the Internet connection), it worked! But only for a while. I got some weird write-speed issues after a few gigs were copied over.
  4. Finally, I decided to download the latest version of Ubuntu, 7.04 Feisty Fawn, which had NTFS-3G in it's Ubuntu universal repository. I had to download it overnight and burn the image to disk, but it worked! I got it installed properly and both drives were mounted successfully. All of my important files were safely copied over to the external hard disk.
After I felt confident that my files were safe, I went about reinstalling Windows. I had a Windows XP Pro with SP2 CD lying around at home. But as you can guess, it wasn't so simple:
  1. I put the CD in the tray and restarted my laptop. My heart stopped for a few moments when I got to the part where I'm supposed to pick an installation to repair, but Windows told me it couldn't find any hard disks! W. T. F. I soon realized that my laptop had a SATA hard disk and the Windows CD didn't have any SATA drivers for it.
  2. I downloaded the SATA driver from the HP website but for some stupid reason, it would only extract to a floppy disk! Last time I checked, most laptops don't have floppy drives anymore so I had to extract to a "virtual floppy disk"; I'd heard of virtual CD/DVDs before, but a virtual floppy disk???
  3. At the start of Windows setup, you can press F6 to provide setup with third-party drivers for your hard disk. Unfortunately, it could only read those drivers from a floppy disk. W. T. F.
  4. Using the instructions detailed here, I used nLite to create an installation CD with the SATA driver included. But just when I thought there was light at the end of the tunnel, Windows still couldn't detect the hard disk.
In the end, I just decided to give up, while I still had my sanity (and my files!) intact. Even if I had somehow managed to repair Windows, I still couldn't know for sure if it would finally boot. I called the help desk, somehow managed to explain my situation to an Indian call center agent, and had someone get on my case. I still went to the office, but I spent the rest of my day extremely unproductive. I got very little sleep (two hours, while Feisty Fawn was downloading) and spent half a day acting like a hacker.

If you managed to read through this whole blog entry, then I'll have spared you some trouble if you ever experience this exact same problem. Two words: reformat, reinstall. (Or possibly: use Ubuntu.)

Labels: , , ,

About me

Mark Punzalan
a.k.a. "Punzki"
Location: Redmond, WA
Occupation: Softie

Current tag-line:
I'm alive!
Now reading:
The Bible (really!)
Latest obsession:
NBA playoffs (via streaming)

Around the web:
punzki @
punzki @ Blogger
punzki @
punzki @ LinkedIn
punzki @ Friendster
punzki @ Bloglines
punzki @ YouTube
punzki @ Multiply

Email me:


RSS feed

What is RSS?


Et cetera

Locations of visitors to this page

Pinoy Top Blogs
Fantasy Sports Live!
Firefox 2

Creative Commons License
This work is licensed under a Creative Commons License.

Powered by Blogger
and Blogger Templates