Author Archive

November 21st, 2009, by alex

The Making of Prince of Persia

I just finished reading Jordan Mechner’s old journals from his time creating Prince of Persia - it’s long, but probably one of the most fascinating things I’ve read online in months. A real gem.
I loved the Prince of Persia games when I was a kid (who didn’t?), so it was great to get a [...]

October 5th, 2009, by alex

Wow. Flash CS5 will allow building native iPhone apps with ActionScript

http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/
Flash Professional CS5 will enable you to build applications for iPhone and iPod touch using ActionScript 3. These applications can be delivered to iPhone and iPod touch users through the Apple App Store.*
* Delivery through the App Store requires participation in the iPhone Developer Program and approval of the application by Apple.
This is going to [...]

September 23rd, 2009, by alex

How to get the contents of UIWebView on iPhone

Say you have a UIWebView in your iPhone application, maybe you have some JavaScript that changes its content, for whatever reason you want to access the content of the UIWebView… how do you do it?
It’s not immediately obvious from the API docs, but it’s pretty simple. Something like this should do the trick:

[myWebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('html')[0].innerHTML"]

Doesn’t [...]

September 11th, 2009, by alex

Funny thing

Preparing an app for distribution on Android:
1. Click on File/Export
2. Select Export Android Application, click Next
3. Follow the steps in the wizard.
4. Done!

August 31st, 2009, by alex

Android - binding to the Music app service to find currently playing song

For an Android app I’m working on I need to find out what song, if any, is playing in the background on the device. Turns out there’s no documented way to do this on Android - but it also turns out that using an open source platform is great. After a few hours [...]

August 30th, 2009, by alex

HNScore - another look at post quality on Hacker News

I’m not the only one to notice that some of the most interesting posts on Hacker News generate few comments - and, conversely, some of the least interesting posts generate the most comments (see here, or here). Of course, you can’t generalize too much, but it seems like an interesting metric.
I whipped up a [...]

July 14th, 2009, by alex

Weight loss… or not?

This banner ad on some random site really made me do a double-take:

I really have to wonder: did someone goof, or is it an insidious plot to make people notice the ad? If the latter, it definitely worked, although it’s not compelling enough to make me click.

July 13th, 2009, by alex

Riding a Twitter trend: #firstdraftmovies - an adventure in three days

I recently got caught in a small whirlwind, and came out the other end a few days later.  Much like startup life, but on a much smaller scale.

Day 0: The initial excitement
On Thursday, I start noticing some amusing #1stdraftmovielines tweets - at first in @donttrythis’s feed, then a few others. The idea is simple: [...]

July 10th, 2009, by alex

1stdraftmovielines

I love the #1stdraftmovielines trend, many are just hilarious.
I put together http://www.1stdraftmovielines.net/ pretty quickly - let’s see if it takes off, I would love to see which ones bubble up to the top!

June 27th, 2009, by alex

UIScrollView and UIDatePicker (or UIPickerView)

I ran into a very simple problem, but a quick Google search didn’t reveal any simple (or even functional) solutions.
Simply put, trying to use a date picker or picker control inside a scroll view leads to problems: trying to scroll the picker ends up scrolling the scroll view itself.
The solution is very simple: set [...]