Sunday, June 29, 2008

Ancient Wisdom

However, the fact that you are graduating from Harvard suggests that you are not very well-acquainted with failure. You might be driven by a fear of failure quite as much as a desire for success. Indeed, your conception of failure might not be too far from the average person’s idea of success, so high have you already flown academically.

About a week ago, famed British author J.K. Rowling gave a commencement address at Harvard University where she shared her own humbling experiences on failure and framed the concept of imagination as a powerful tool to influence reality.

While some thought that Rowling wasn't worthy of the honour of giving the commencement address, Rowling's address is perhaps a better one than Oprah Winfrey's at Stanford. Both gave moving anecdotes and pressed into the graduates the matter of failure and finding happiness, but Rowling's account was more compelling as she balanced candour with grace and formality.

To that end, Rowling also dished out valuable advice about life:
Given a time machine or a Time Turner, I would tell my 21-year-old self that personal happiness lies in knowing that life is not a check-list of acquisition or achievement. Your qualifications, your CV, are not your life, though you will meet many people of my age and older who confuse the two. Life is difficult, and complicated, and beyond anyone’s total control, and the humility to know that will enable you to survive its vicissitudes.

She ended her speech with an overarching quote on life from the Roman philosopher Seneca:
As is a tale, so is life: not how long it is, but how good it is, is what matters.

Wisdom, no matter how ancient, is never late.

Friday, June 13, 2008

Firefox 3 - 17 June 08

I received this email today:
Dear Add-on Developer,

Firefox 3 will be released June 17th. If you have a Firefox 3 compatible version of your add-on, we recommend you upload it to addons.mozilla.org at this time. If you are waiting until the final release day, we suggest to upload into the sandbox and nominate for addition once Firefox 3 has been released.

Full details of the final release can be found here:

http://developer.mozilla.org/devnews/index.php/2008/06/11/coming-tuesday-june-17th-firefox-3/

Thank you for helping build one of the most amazing software releases in history.

Best Regards,

Firefox Product Team

With the release of Firefox 3 also comes the chance to set a new world record - a chance to prove the Firefox 3 is not only better but more popular than IE 7 or any other web browser in the history of the Internet.

Take back the web on 17th June!

Monday, June 09, 2008

Solutions to Google Treasure Hunt

About a month ago, Google launched the Google Treasure Hunt challenge with the following code:
aHR0cDovL3RyZWFzdXJlaHVudC5hcHBzcG90LmNvbS8=
Solution: base64 decode

Note: The Google Treasure Hunt page is built on Google's App Engine platform.

Solution to Problem 1:

Problem 1 is a standard pascal's triangle kind of problem involving big numbers.
My solution is in C.

Solution to Problem 2:

For this problem, you need a bash shell. Modify this script accordingly...

Solution to Problem 3:

Problem 3 is relatively easy, once you get the definitions right. It can even be done using pen and paper! You need to understand that "A.B.C.D=>W.X.Y.Z" means if your destination IP is A.B.C.D, then your next target IP is W.X.Y.Z. Also, "A.B.C.0/24" means "A.B.C.*"

This is my solution in C.

Solution to Problem 4:

I used the bigint class for this problem. This question is the toughest among the 4 questions. You may even need to generate up to 90000 prime numbers to solve it. (if you have a better solution, please share...)

This is my solution in C++. Takes minutes to generate the solution. So pls be patient.

Saturday, May 31, 2008

Mozilla Add-ons T-Shirt

I was having lunch when the postman came with a "mysterious" bag meant for me. When I saw that the sender address indicated that the bag was from the UK, I wondered if it could be a friend from the UK. However, when I touched and felt the flimsiness of the content inside the bag... it suddenly occurred to me that it was Mozilla T-Shirt (for my work on making Fireclip compatible with Firefox 3b4)!


Wow. I never received news that Mozilla will be sending this t-shirt to me, so it came as a surprised. This t-shirt is definitely cool! Thanks to Mozilla! and thanks to all who helped on Fireclip!

Sunday, May 25, 2008

Flickr Photo of the Day: Roller coaster planet

...attached a Ferris wheel. At Tokyo Dome City.
It's stereographic projected version of this pano.

See where this picture was taken. [?]
[MAP by ALPSLAB]

Roller coaster planet
, originally uploaded by heiwa4126

The Howling of the Gods

It was so loud it was so quiet we didn't sleep we slept.
We didn't dream. We dreamt of panthers and hatpins, orchids and ashbins.
There was no moon; no moon was there
Ever so magnificent. Even the dogs were mesmerized.
Make that: the gods—even the gods were mesmerized.
There were no dogs; no dogs were there.
Even so, sleep was impossible—
All that howling! We dreamt of panthers and hatpins, orchids and ashbins.
Didn't we? No; and if we did,
We weren't dreaming.

-- The Howling of Gods, A New Book of Common Days by Jay Hopler

Friday, May 16, 2008

Debian-OpenSSL Fiasco

I couldn't comprehend today's XKCD comic...


... so I decided to google around for answers.

So what is this Debian-OpenSSL fiasco? I was surprised when I read that openssl's random number generator had a vulnerability that has affected the security of RSA keys since September 2006. This bug has gone unnoticed for more than a year!

However, surprise turned to shocked as I began to understand the bigger picture in layman's terms.
Instead of using random data to generate basic "seed" values for keys, the OpenSSL PRNG used the current process ID, a unique process identifier. The problem is that, in Linux, the default maximum process ID is 32,768, meaning the seed value could be overcome by brute force, or systematically applying different values in the range 0 to 32,768.

This is a security catastrophe. The experts are saying that "ANY cryptographic material created on vulnerable systems can be compromised."

Sunday, May 11, 2008

Time saver for Ubuntu: Gnome Do

I just installed Gnome Do on my Ubuntu Hardy and I am impressed. Gnome Do is inspired by Quicksilver.



$ sudo aptitude install gnome-do gnome-do-plugin-rhythmbox gnome-do-plugins
I love the fact that you can open apps and stuff right from the comfort of your keyboard. This is an immense time saver and it is a must-have for an serious Ubuntu user.

After installing, remember to read the user guide.

Tip 1:
Get gnome-do to run at startup by going to (Menu)System->Preference->Sessions and adding the command gnome-do -q
Tip 2: I didn't like the shortcut "Super + Space" so I changed it to "Control-Space" as the control key was the left most button. You can do this by opening Configuration Editor (run gconf-editor) and changing the key binding to "<control>space" in "/apps/gnome-do/preferences" inside gconf-editor.

Friday, April 25, 2008

Fastest way to upgrade to Ubuntu 8.04 within 24 hrs of release

Yes... the long awaited Ubuntu 8.04 is finally out... but everyone is trying to upgrade their system through the Ubuntu Update Manager. Why get stuck with the Ubuntu Update Manager and a sluggish Ubuntu server when there is a faster way? Even, the Ubuntu mirrors take time to get the latest release.

Note: This guide is meant for the impatient...
  1. Get the alternate cd iso bittorent file. Get it. (Note: this ONLY works with the alternate cd, and NOT with the Live CD.)

  2. Use a bittorent client such as transmission to download it.
    (Tip: sudo apt-get transmission if you dont have transmission.)
    This will take anywhere from 30 minutes to 1.5 hours. Depends on your luck.

  3. Verify the iso file you downloaded using a MD5 check. (Get the MD5 file from the same place where you got your bittorent file.) (This step is optional but recommended.)

  4. Mount the iso file. E.g.: (note: /cdrom is similar to /media/cdrom) [Time saver: no need to burn CD!]
    sudo mount -t iso9660 ubuntu-8.04-alternate-i386.iso /cdrom -o loop

  5. Hit Alt-F2, type in and run the following:
    gksu "sh /cdrom/cdromupgrade"

  6. Sit back and relax. Go and grab a cup of coffee. Restart your computer at the end of the upgrade. The upgrade takes about 30 mins on a Intel C2D 2.0GHz.
    Enjoy a game of classic minesweeper while the installer runs in the background.
    Don't panic if your system does not function "normally" during the upgrade.

    Note: if you encounter the "exclusive lock" error associated with aptitude, hit ctrl-alt-backspace and re-login.

  7. Say "hello" to Ubuntu 8.04 LTS! Congrats for making it through!
    Note: some programs may appear to "crash" when you first login. Don't panic. Simply click away the error messages, logout and re-login and most of your problems will be solved. (For me, I had to coax my wireless to work.)

  8. You may now remove the CD entry to the image found in the file: /etc/apt/sources.list
    Tip: Hit Alt-F2 and run gksu "gedit /etc/apt/sources.lst" and comment the following line:
    deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080422.2)]/ hardy main restricted (or something similiar, with the "8.04")

  9. Total time I took ~ around 2.5 hours.

Thanks to Albert Bicchi's guide for insight into this matter.

Saturday, April 19, 2008

Fireclip


This blog has been very quiet for almost a month. The primary reason is that I have been busy writing an extension called Fireclip for Firefox.


Fireclip is a nifty tool which allows you to clip out portions of webpages and reload them later to check for updates. The latest version is 0.2.1 and it is a stable release.

This blog post is a CFC (call for comments) or rather, call for reviews on Mozilla's Add-ons Page. Fireclip is currently labeled "experimental" and reviews are needed before it can go public. So, to all those out there, please get a Mozilla account and write a review here (on the right)! Thanks!

If you are interested in trying out Fireclip without registering an account, download fireclip-0.2.1.zip, extract the xpi file, and drag and drop it inside your Firefox browser.

More Resources:
- Official information
- Short video tutorial