Hung Truong: The Blog!

  • August 04, 2013

    Getting Back Into Video Games

    Glorious PC Master Race

    In terms of gaming I feel like I’m pretty inconsistent. There are times that I only played the big name games (like Grand Theft Auto and Skyrim) and basically ignored all the other smaller games. My interest in gaming ebbs and flows.

    I think that a few recent events have gotten me back into gaming fairly regularly. About a year ago I subscribed to PS Plus, which provides monthly installments of games for your PS3 and PS Vita/PSP if you have them. I was introduced to a bunch of cool games that I probably wouldn’t have bought otherwise like Saint’s Row 2, Borderlands. As a result, I ended up buying Saint’s Row 3 and Borderlands 2.

    It was also about a year ago that I built a PC for gaming. It’s kind of ridiculous how much cheaper it is to play games on a PC than to buy them for consoles. Plus, my PC has the added benefit of a better graphics card and more RAM (how the heck can the PS3 only have 256MB of RAM in the first place?).

    During the 2013 Steam Summer sale I went a little crazy and bought more games than I can possibly play. It’s just way too easy to buy them when they cost $5 or less and provide a lot of entertainment, even if they’re kinda old. I ended up buying Fallout New Vegas (the ultimate edition or whatever) even though I originally bought it for PS3. Luckily, it’s a lot faster and less buggy now.

    I’ve been playing a lot of video games in my free time for the past few months. While I sort of feel guilty that I should be working on web stuff or mobile stuff like side projects, I think it’s sort of necessary to avoid burnout. Plus I naturally tend to lose interest in games once I find a new piece of technology that I’m interested in learning.

  • June 05, 2013

    Open Sourcing Stuff on Github

    A common piece of advice to developers that I often hear is that they should try to contribute to open source projects. One thing that I haven’t really been good at before is having actual code that I’ve written out in the open for people to see and maybe even use. I’ve started to rectify this with a few public Github repos.

    The killer feature of Github really is the social aspect of it. I could either have a mediocre piece of code that sits around and keeps sucking, or I could post it to Github and anyone who wants to use it and possibly improve on it can. Not only does having code out there help your rep, but the act of putting it out there raises your standards quite a bit.

    What follows are a few projects I’ve posted on Github under “freeish” licenses. I don’t know too much about them, but a pal once told me that the MIT one is pretty open. Most of these are things I’ve used in my own code or things I used to learn a language (like the Chef recipe). I’ve learned to not care about perfection and just let people try it. I’m sure they’ll let me know if it sucks (especially if it hits Hacker News).

    • ObjTweet – a helper class for Twitter related stuff on iOS (now deprecated in favor of the official integration.
    • LinkedIn Password Leak Checker – some people made a web based form version of this, which I thought was a really, really bad idea.
    • Weathergram – an example of an “award winning” Twilio contest app. Some super low quality code here, folks.
    • Google TTS CLI – I wrote more about this Google hack here.
    • Chef recipe for Duo Unix – I was learning Chef so I thought I’d make a recipe for a cool startup in town.
    • Runscope iOS – This is a subclass of NSMutableURLRequest that makes it easy to use Runscope, which is a cool product for helping you analyze and debug API requests.

    These are mostly one-off simple hacks or convenience classes, so hopefully one of these days I’ll release something more substantial and open source it.

  • April 26, 2013

    Hacking Google’s Text To Speech “API”

    When I was at my previous job, one task I had was localizing a large set of phrases to multiple languages, both in text and audio files. I did this by using the awesome Google Translate API.

    The Google Translate website has features for translating text and playing audio of it in the translated language. There’s no official API for getting audio, though. Luckily, I’ve never let a lack of an official API stop me before.

    More …

  • March 15, 2013

    Google Reader and Skating to Where The Puck Used To Be

    I just wrote a couple of tweets about this, but maybe this is a better blog post subject.

    Google Reader is shutting down, apparently because its user base is shrinking and Google wants to focus on fewer products. Because of the huge void this will leave, many startups are rushing to fill the space that Google Reader took up. So far I’ve heard of plans from Digg, Flipboard, Zite (whatever that is), Feedly, and maybe some others.

    While this might be a good opportunity for those startups, it strikes me as odd. There’s a concept called being a “fast follower” where you copy some innovative company’s product immediately after they release it. Think of Facebook’s clone of that Snapchat app. What we’re seeing now is sort of the “slow(est) follow.”

    I suppose it makes sense to go into a space that you know is going to swell up with demand, but honestly, how much longer does the classic Google Reader style app have left? How much of the original Google Reader market are you going to get? Will you be able to re-create the community that the sharebros loved so much? On top of that, do any of these new products have a solid plan on monetization?

    To put it another way, what is the opportunity cost of rebuilding Google Reader (even if it’s a “reimagined” version) versus putting time into another product that might actually be new and useful? At this point, it’s probably not worth it considering how many others are eager to clone Reader.

  • January 23, 2013

    iOS Photo Editing Controls With A Custom Camera Overlay

    This is one of those blog posts that’s basically for me and anyone else who cares to Google these search terms, so yeah.

    I’m currently working on an app that does camera capture. Instead of using the normal Apple control, I’m using a custom overlay. Typically to do this, you do two things: set the UIImagePickerController’s “allowsEditing” to YES and add your overlay view to the controller’s “cameraOverlayView” view. Oh, and you also set the sourceType to UIImagePickerControllerSourceTypeCamera, obviously.

    I learned through searching about 10 StackOverflow questions and doing my own testing that the custom photo editing control only shows up when you show the normal apple camera controls. So unless you want to do some weird hacking to get your overlay to show up over the normal controls and then have them disappear when the photo is taken, it’s not possible to use a custom overlay and still get the built in photo editing tool.

    Unless someone wants to correct me…

    The annoying part is this is not captured in Apple’s official documentation (or anywhere, really). So hopefully this blog post helps someone who is trying to use a custom overlay and the built-in Apple photo cropping tool.