Terminator 2

I recently re-watched my “Extreme Edition” of Terminator 2. This is an interesting DVD, in that it’s more instructive than entertaining. The default presentation of the film includes all sorts of extra footage that pretty much ruins the movie, but the commentary track and bonus features provide an unusual amount of insight into both how a movie comes together, and how important the editing process is. In particular, I gained a new respect for Cameron based upon his ruthlessness in cutting out all sorts of expensive, tricky, and cool stuff (that killed pacing) from the theatrical release.

Continue reading

Posted in Jack Handy | Comments Off

Six Word Stories: Virgins

D.C.’s virgin sacrifices appeased the sun.

Posted in Six Word Stories | Comments Off

Twitter, OAuth, and Custom URL Schemes

If you want to access the Twitter API from your iPhone app, you’re going to have to use OAuth. (Twitter is turning off Basic Authentication support at the end of June.) To use OAuth, you need to follow these basic steps:

  1. Get a request token from Twitter
  2. Send the user to Twitter (via Safari) to authorize the request token
  3. Exchange the request token for an access token
  4. Use the access token to interact with the user’s Twitter account

The sticky part comes between steps (2.) and (3.): How can you gracefully restart your application after the user has authorized the request token? The answer lies with Custom URL Schemes.

Continue reading

Posted in iPhone, Web stuff | Comments Off

Hagler vs. Antuofermo I

East Side Boxing had an interesting article up the other day: a “retrospective fight report” on the first fight between Marvin Hagler and Vito Antuofermo. The best part of the article was that the author provided YouTube links to all 15 rounds of the fight, which I gleefully reproduce below.

(Incidentally, I scored the fight wide for Hagler, 147-140.)

Continue reading

Posted in Jack Handy | Comments Off

Six Word Stories: Famous

Steve was famous for being unknown.

Posted in Six Word Stories | Comments Off

Medals of Honor

Of the 3,468 Medals of Honor so far awarded, 1,522 (44%) were awarded during the Civil War. By way of comparison, only 464 (13%) were awarded during WWII.

Posted in Jack Handy | Comments Off

99.999999999%

I got some junk mail from Amazon the other day, in which they mentioned, in passing, that “Amazon S3 standard storage is designed to provide 99.999999999% durability”. My immediate, and somewhat contradictory, reactions were:

  • No way!
  • What does that even mean?

Below, I expand on those reactions.

Continue reading

Posted in Jack Handy | Comments Off

Six Word Stories: Snake

Encoiled, the snake dreamt of gophers.

Posted in Six Word Stories | Comments Off

NSURLConnection Helper

Jeff has got a good post up on the importance of using the iPhone’s built-in asynchronous communication classes and methods in lieu of threads:

Don’t spawn threads for asynchronous communications unless you would have used threads in the same situation if there was no network code.

Jeff argues for this position on the basis of overhead. I would make another argument: threading is too hard to get right to be worth the trouble most of the time. (I say this as someone who likes writing multithreaded code.) The difficultly of getting multithread code right is exponential in its complexity, and software has a way of always turning out a bit more complex than you might have expected.

Today I want to present a little helper class for NSURLConnection. If you’re going to use this class asynchronously, you’re going to need to supply a delegate, and it can be a minor nuisance to come up with one when you start working with this class. The MyNSURLConnectionDelegate class presented below should get you started.

Continue reading

Posted in iPhone | Comments Off

Kinetic Energy Weapon

Ever since I read “Count Zero”, I’ve had a weakness for the idea of kinetic energy weapons. So, when I read about the latest (more-or-less) successful test of the X-51A hypersonic demonstrator, I immediately started to wonder how much damage it could do if you smacked it into something.

Continue reading

Posted in Jack Handy | Comments Off