Hung Truong: The Blog!

  • April 28, 2007

    Craigslist and Google Maps Mashup Thingy: Day 10 – Custom Controls and Housekeeping

    I guess this should count as the project’s 10th and 11th day, though I didn’t really spend too much time on either day, so let’s just roll them into one. After doing some CSS to overlay some divs over the Google Map, I found out there’s another way to do this: with “custom controls.”

    The way that the custom controls work is both pretty sweet, and not that great. I don’t like having to add content to them by using javascript. It just doesn’t seem “correct” to do so, since I’m just overlaying normal html. So I’ll be using some custom controls, and some divs. The good thing about custom controls is that the map knows not to open infowindows under them when they’re opened up.

    Besides that, I just did a lot of random work on getting the app to look a little better. Like showing the correct area based on which city’s listing you want to see. Overall, the project is coming along really smoothly, with very few roadblocks. I’m happy that it’s nearing completion. I really enjoy doing these one-man projects, since it lets me get experience in everything from database schema planning and optimizing, to php backend development, to designing the css for the content, and even maybe a little tweaking in the Apache server. I think once I add this project to my “real” server, I’ll need to get a ram upgrade.

    I think the project should probably be ready to go live within a week. I dunno if I’ll actually try to get the word out, or just release it and see if people find it via Google or something. That’d be cool. Since there’s already a site that does a similar thing (though there’s a smaller number of supported cities), I don’t think what I’m doing is really that noteworthy. I think it’d be useful, though, so we’ll see if there’s any reaction at all to it.

  • April 28, 2007

    Punch Out on Wii Virtual Console!

    punch-out.jpg

    I’ve never bought anything using Wii Points before since I don’t really like the idea of micro payments. I mean, Nintendo should give us free NES games just for having a Wii, right? Anyway, when I was on the Wii Store channel today, I noticed that Punch Out was on the VC!

    Punch Out is one of those games that I can still enjoy playing, even after like 20 years! I can’t believe it’s that old! I can’t believe I’m that old! Anyway, I used my credit card to buy some Wii Points and downloaded Punch Out! This is the version with Mr Dream, not Mike Tyson… Speaking of changes, I was on Wikipedia like last week looking at Punch Out stuff (totally unrelated). Apparently “Soda Popinski” used to be called “Vodka Drunkenski” in the arcade version. How awesome is that!?

    I got to Bald Bull before I actually lost. That dude is a bitch. I remembered how to defeat his bull charge, but let’s just say I was a little rusty. I finally beat him, but then I couldn’t beat Piston Honda in the next league or whatever. I’ll try again later. I remember that when I was a kid, that was also the part I gave up. I guess some things don’t change…

    Also, the new Wiimote isn’t the best controller to play Punch Out on, but it sure as hell beats the original NES controller. I like to call that old controller “The Blister Machine!” Seriously, it hurt.

    I hope they release Super Punch Out for the SNES for the virtual console soon. That game was really awesome, too. Back in the days where all SNES games were prefixed with the word “Super!”

  • April 27, 2007

    Whos Says Myspace’s UI Isn’t Good?

    myspace-user-interface-improvement.jpg

    I have a Myspace account, mainly to keep in touch with people who don’t have Facebook accounts. It’s sort of like making a deal with the devil, but hey, people use it.

    Anyway, I was reading some stupid “bulletin” that one of my “friends” posted. It was just some lame spam. Then I noticed that Myspace actually does keep the user in mind in some cases. See the above screencap? Whoa, there’s a “Delete From Friends” button! Genius. It saved me like 10 clicks to do it the hard way. Sorry Slevin, it’s time we went our separate ways.

    Maybe this means that Myspace really isn’t all about the $$$. Okay, probably not.

  • April 25, 2007

    Craigslist and Google Maps Mashup Thingy: Day 9 – CSS Foo and CakePHP Helpers

    Today I did a bunch of CSS, making the mashup thing actually look kind of nice. Later, I may add some more “Web 2.0” features such as drop shadows and gradients. I was having a hard time getting the map to show up in the div with a few of the css layouts I downloaded, so I just decided to code it by hand. I think it looks pretty neat; the map stretches across the whole screen and then the other content is shown in absolutely positioned divs.

    I also did some stuff with the CakePHP helpers. CakePHP’s inferiority to Rails is really starting to show to me. I think it’s all a product of PHP having not been created for this kind of MVC design. CakePHP tries to follow the conventions of Rails, but it does so in a sort of copycat manner. As such, the result does not meet or exceed the original.

    In the case of Helpers, Rails automagically links the named helper to the controller. In CakePHP, you must specify that a certain controller uses a certain helper. It’s kind of annoying. There also isn’t any support for the Rails convention of “partials,” which is why I’m using their helpers to begin with… It’s annoying.

    Also, I find it annoying that CakePHP finds an objects associated objects by default when using “find()” or “findAll().” It’s useful when I want it, but when I don’t, it wastes a lot of memory! Now that I think of it, I’m not sure if Rails does this by default or not. The only reason I mention it is because I kept getting out of memory errors (or more accurately, memory limit errors) with my application. It’s a big waste when all I want is the name of the area and CakePHP fetches ALL of the associated listings for that area…

    I must sound really whiny right now. I guess it’s just from some frustration in learning a new language/framework instead of using one that I’m used to. It’s good for me, I won’t argue against that. It’s just a bit disappointing to see all of these flaws when a framework is purported to be things like “stable” and “good.”

    Oh, and also, I should say that I think my actual mashup is coming along pretty nicely. It should be ready in a few more “days,” where a “day” is one I am actively working on the mashup. I could probably “release” it pretty soon, but usually when I release something, it means I won’t work on it much anymore, moving to something else I find interesting. So I should probably actually have it done before I release it…

  • April 22, 2007

    Jonathan Coulton: The Other, Other, Other John

    jonathan-coulton-me.jpg

    For some reason or other, today I was inspired to check out The Areas of My Expertise again, and I remembered that besides John Hodgman, there’s another John on that CD: Jonathan Coulton. He’s the musical guy behind the theme song for the audiobook, which I wish was available in a higher quality recording.

    Previously, I had heard him do a cover of Baby Got Back in acoustic guitar, but I didn’t realize it was him. Only when I went to his website, which has a bunch of MP3s, did I make the connection. He also has a bunch of other really neat songs, like Skymall, which is about those catalogs you find in the airplane seats that feature gigantic crossword puzzles, and Ikea, which is about the bitchin’ furniture store that my entire family loves. I read somewhere that Sweden trusts Ikea more than their own government. Which means that either Ikea is awesome, or the Swedish government is horrible.

    The coolest song I found so far (I haven’t listened to all of the MP3s yet) is a mashup of “25 or 6 to 4”, and “When I’m 64.” The vocals of the latter spliced with the background of the former makes for a really cool, melancholy sound. I like it a lot. Check it out:

    And also check out his other songs too!