Hung Truong: The Blog!

  • February 02, 2007

    Google Phone Interview Get!

    logo.gif

    In last semester’s Software Engineering class, I had a classmate who was an intern at Google. We both went to the Google Information Session a while back, where I got a sweet, sweet Google shirt. Anyway, he was awesome enough to offer to forward my resume internally. After a few weeks and some other paperwork, I’ve been offered a phone interview!

    I’m not too sure how many people get to this point, but I’m pretty stoked about it. I’ve read that the interviews are pretty hard, though they really should be. I mean, it’s Google, after all! I should be getting a date for the phone interview very soon. Until then, I think I’ll try and brush up on my algorithms, asymptotic analysis, probability, and combinatorics! Don’t fail me now, Introduction to Algorithms!

    I’m feeling lucky!

  • February 01, 2007

    Nintendo Wii Component Cables: Impressions

    wii-cables.jpg

    After getting my Wii, I immediately noticed that the cables that came with it were only the normal RCA crap ones. I have an HD capable TV, so I was pretty peeved. I went to Play-Asia.com and ordered the cheapest component cables. I ordered ‘em on the 23rd and they came on the 31st, so it took about a week.

    So far, I’m fairly impressed. After switching the Wii from 480i to 480p, the difference is pretty noticeable. Before, I could see the picture getting blurry where the cursor was moving. It was kinda weird. With the component cables, that doesn’t happen anymore.

    I tried playing Zelda: Twilight Princess. There’s a huge difference with the cables. Before it was super blurry, and now it’s somewhat jaggy. Sure, the antialiasing could use work, but it still looks 100% better.

    If you have a Wii and a TV that takes component input, you MUST get cables. These ones were like $13, shipping included.

  • February 01, 2007

    Installing The RMagick Rubygem On Media Temple’s DV

    framed_clown.jpg
    Damn you, RMagick Clown! You haunt my nightmares!!!

    Oh boy, so once I got rails actually running on my dv, I figured out that my applications needed the RMagick ruby gem. RMagick does graphics stuff, like resizing and creating captcha images and whatnot, so I really need it. I ran into a few gotchas while trying to install RMagic (well, installing ImageMagick) so here’s what I did:

    First, you must install ImageMagick. This involves installing a bunch of dependencies first. I did all of the ones listed on the Rmagick ImageMagick installation guide, but the ./configure command still wouldn’t see the jpeg delegate library.

    The error message I got when trying to install RMagick was like this: “No decode delegate for this image format.” I found out from this page that I needed to run: “./configure –enable-shared” for it to register properly. When I tried running make and make install, I got some error like this:

    Magick::ImageMagickError: unable to read font `…/ghostscript/fonts/n019003l.pfb’

    It turns out the font directory set up for ImageMagick didn’t have any fonts… So I downloaded the GhostScript fonts (I had already installed GhostScript) into that directory. And it worked. The end.

  • January 31, 2007

    Panflute Flowchart T-Shirt: Ordered!

    gallery-panflute-500.gif

    I’ve had my eye on this handsome panflute flowchart t-shirt from Toothpaste For Dinner for a while. I just didn’t feel like spending $21 on it. The sheer awesomeness of it won out in the end, however. I’m happy to say that Panflute Flowchart will be arriving any day now.

    And no, you don’t need a panflute.

  • January 30, 2007

    Ruby on Rails on Media Temple’s (dv) on Plesk on…

    rails.png

    So I’ve been fiddling around with trying to get my rails applications installed on Media Temple’s (dv) 3 server. It’s a pretty nice setup; basically a dedicated server (though virtual) that you can play around with to your heart’s content.

    While they “support” Plesk 8.1 which in turn supports ruby on rails, they do not offer support for ruby on rails installation. Since I’m a pretty hardcore CS guy, I don’t mind learning stuff. It is easier when there’s support people to help you though.

    At first I had tried using rails with fastcgi, but that’s apparently a bad idea. The dv supports fcgid anyway. Media Temple’s support told me it was already installed, but guess what? It wasn’t. I had to go into plesk and get the updater to install it.

    I’ve been trying to get my apps to run for more than a week now. I’ve been working on it in my free time, and I finally got one of them to actually start doing something. There were a bunch of hurdles I had to jump over just to get it to work.

    Here’s the last thing I needed to do:

    I was getting some “Application error: Rails application failed to start properly” errors. The rails log wasn’t too helpful. The httpd one wasn’t either. I looked in the /var/log/httpd/suexec_log file and it said stuff like:

    [2007-01-30 15:36:58]: file is writable by others: (/var/www/…/public/dispatch.fcgi)

    I thought, “well okay, it's just a warning.” Who cares if it's group writable? After doing some other random stuff, and changing the permissions accidentally, I got this:

    [2007-01-30 15:32:30]: file has no execute permission: (/var/www/…/public/dispatch.fcgi)

    Okay, so now it’s complaining that it has no execute permission. Whoops. I chmodded it to something like 775 and I get the “file is writable by others” thing again, along with the application error. So I thought, “what the heck” and chmodded the file to a safer 755. It seems that did the job, so now I can execute the app!

    I never knew that apache (or suexec or fcgid or whatever the heck is running dispatch.fcgi) really cared so much about permissions. I’ll have to be more thoughtful of logfiles from now on…