Hung Truong: The Blog!

  • January 27, 2009

    Offline Gmail != Revolutionary

    gmail

    So today Google wrote a post about offline Gmail.

    Whoa, amazing! Now I can use email even when I’m not connected to the internet! I can read mail, and compose mail, and it’ll send the mail when I get back online!!!

    Oh, wait. There was a solution for all that years ago. It’s called IMAP!!!!

    Now, it’s true you can’t star stuff/archive/etc in an IMAP client but c’mon, offline Gmail is not the revolutionary development that people are making it out to be!

  • January 26, 2009

    Checkin’ Out XSLT

    So at work, I’m trying to figure out a good way to make some web pages extensible and also extremely easy to edit. Basically, the people in charge need to be able to make new pages and edit the existing ones when I leave. I was trying to figure out how to do this without a CMS. Because I can’t just throw a CMS into the web server.

    I have a friend who wrote something for his portfolio that involves making an xml file, then using the xml to make an HTML page. I was curious to see if this was some kind of common paradigm, and if so, if there were frameworks I could use. The ideal situation would be if I could just set up some XML schema for people to fill in content and then somehow create the HTML from that. Then whoever was updating it would just update the XML (which would be fairly easy since they wouldn’t worry about markup, just the data).

    I came across another old friend’s framework, Onion ML, while searching for a solution. It’s pretty funny that I went to undergrad with this guy but just found his site by looking up my own keywords. The Onion ML thing led me to XSLT, which seems to be the solution to my problem.

    Apparently XSLT is a way to transform XML into HTML (or something else that’s useful). Unfortunately, XSLT seems a bit more complicated than I was hoping. It looks like the style is defined in one file, then the XML is in another, then there needs to be a way to smash the two together (at running time). I guess there are ways to do this using javascript but I haven’t gotten that far yet.

    So what’s the point of this post? I dunno. Probably just to document my thought process on how I got this far. Next step is to see if XSLT can make the job easier or make it needlessly complex (it seems to be a technology that was popular in the early 2000’s, if all these Google searches are correct).

  • January 22, 2009

    I Won a Facebook Contest!

    environmentmac

    I’ve known about this for a while, but now that it’s Facebook Official, I can make a post on it. I won a contest held by Facebook! The contest involved presenting one’s programming environment and explaining how the tools and everything were used. The contest deadline was the day after Christmas, which was cool because I had some free time to make an entry.

    You can see my entry above. Click on it to see the big version. Here’s the text that accompanied it:

    I have a shiny new Macbook Pro running OS X 10.5 for development since it’s got those command line tools I know and love.

    (I don’t use spaces normally but it’s a good way to show everything)

    Quadrant #1: vim is better than Emacs, let’s just get that out of the way (I hope the Facebook judges agree)! I use vim for most of my coding unless I’m working with something slightly complicated. For local editing textedit works well. I might also go with DashCode or TextMate if I feel like getting fancy.

    Quadrant #2: I use XCode because it’s required to do any coding on the iPhone. Just between us, XCode blows. It’s pretty retarded in the autocomplete and syntax highlighting departments.

    Quadrant #3: Firefox and the Firebug plugin are the best thing to happen to design/CSS coding since… sliced bread. I really love Firebug. Oh, and I use Cyberduck for FTPing if I’m not feeling like using scp.

    Quadrant #4: My wallpaper consists of dinosaurs with lasers. It’ the awesomest picture I’ve found so far. When I find an awesomer one, I might think about replacing it.

    As per the explanation of why I won:

    Vim + not-windows + xcode blows + dinosaurs with lasers = win

    I mean, can you beat dinosaurs and lasers?

    Yep, I pretty much won because of the awesome wallpaper I utilize. It really is pretty sweet. You should follow my example and use it as well. Maybe it’ll win you a contest someday!

    For my trouble, I get:

    I also get the privilege of having lunch with some Facebook engineers when I’m in the area. This is probably the neatest prize of all since Facebook is way cool and I’ve never been to their headquarters before. I’ve been to the Googleplex, the Appleplex (I don’t think it’s really called that) and the Microsoft Campus in Redmond, so this is pretty much the last stop in the list of software places I need to see before I die.

    Anyway, I’m way grateful to Facebook for liking my entry enough to make it the grand prize winner. I had fun making it. I’ve gotten a raincheck on having lunch with Facebookers, so maybe during Spring Break or over the Summer I’ll report back on how it went.

  • January 19, 2009

    3 (Bad) Dream Combo!

    So last night I had three dreams. They were all kinda bad. I think they went from worst to least worst, which is good, I suppose.

    The first one was pretty simple. I was dreaming that I was half-asleep. Maybe I really was half-asleep and just hallucinating. I’m not entirely sure. Anyway, I dreamed that I was sleeping in my parent’s bed. In-between both of them. Kinda funny huh? That’s not what made it bad. I also dreamed there was something flying around the room. It was kind of hard to tell what, but I sensed it was leathery. Like, say, a bat.

    Then, as I realized the flying object really was a bat, it decided to fly onto my neck and bite it! You know how in dreams you sort of do things in slow-motion? So sometimes you know something is inevitable, but you still try to stop it anyway? This was how the bite felt. As the bat bit me (I swear I felt pain), I woke up like in the movies where someone wakes up from a bad dream. I literally checked my neck to see if a bat was biting me. And to see if my parents were in my bed. Luckily neither of these things happened.

    I went back to sleep. Then I had another dream. This time, I was watching TV, waiting to leave to the airport. As I was watching some sitcom (unfortunately I can’t remember which), my dad told me, “hey, aren’t you late for your flight?” I didn’t realize that it was 3:15 AM, and my flight left at 3:30 AM! I hurried to the airport, picked up my ticket (which looked like a receipt) from a drive-up booth (apparently this was faster) and went into the airport. Somehow, I went a special way that I didn’t have to go through security! I sorta pretended to get into line from the end, just to make sure no one accused me of jumping the security. Then I think my flight must’ve left, because I was just sitting in the airport.

    I noticed that someone left a bag lying around. I thought it might be a bomb! But it turns out it was just a bunch of metal tools that the guy wasn’t allowed to take, I guess. Now that I think of it, I wonder why they would’ve been allowed into the “sterile” area. Anyway, I took the tools and for some reason there was some kind of pawn shop in the airport. I sold the tools for $8 and some change! I think it might’ve been $8.11. I’m not sure.

    The third dream I had was where I was in some kind of RPG video game. I was semi-in the game and semi-playing the game. At one point I stepped outside of a dungeon, then went back inside. Then I fought a battle in which I lost. AND I REALIZED I DIDN’T SAVE THE GAME! But then apparently I had saved it when I stepped out of the dungeon. So I guess this wasn’t actually a bad dream, just a potentially bad situation that never happened…

  • January 12, 2009

    Tropicana 2.0

    tropicana

    While I was grocery shopping last week, I noticed something incredibly awesome. Tropicana (my oj of choice) had changed the design of their box! Now, I liked the old design, but it really was looking a bit 2008. The new one looks really sweet.

    I like how the orange juice is displayed in some kind of pseudo wine-glass that no one would ever really drink orange juice in. You can’t see from the picture, but the glass also runs along the other side of the box as well. Also, kudos to whoever decided to stick the leaves next to the orange cap, making it look like an orange! So genius.

    I also really like the logo. Just a simple font in one color, no gradients. New Tropicana box designer: I salute you!