Software Release!

The application I've been writing was approved by Apple right before Thanksgiving and is available in the App Store right now. I haven't really talked about this much with anyone but I was contacted back at the beginning of the summer by some folks who wanted to do an application. It's called HawkeyeSpecs and you can see it in the App Store if you are set up for those sorts of links. The idea is one of those "I can't understand why this hasn't been done before." utilities. (Well I have some idea why now, but that's a digression :-)) The rough idea is this: take a picture of something small (we focused largely on text) using the built-in camera. After you have the image provide a magnifying glass as well as a suite of simple digital enhancement tools. There are a whole set of recent applications that provide some sort of "digital eyeglasses" but they all do the same thing: a digital zoom on the live video feed from the camera. This works OK on the 3GS but on the 2G and 3G iPhones it's really a poor choice. The camera on those phones is fixed-focus, meaning you have to hold the phone a very specific amount away from the target to get an in-focus image. This isn't that difficult to do, but trying to do that while reading the screen is very tricky. Imagine trying to read a menu in a dimly-lit restaurant: you need to hold up the menu, hold the phone about a foot away from the menu, and then read from the screen. With Hawkeye you still have to hold the phone about a foot from the menu but you only hold it there for a moment, snap a picture and then you can put the menu down hold the phone where you can best see it and scroll around the image to your heart's content. You can also adjust the obvious parameters - brightness, saturation, contrast, as well as apply a sharpen filter. I was actually surprised to realize how good the camera in the 2G phone was for this sort of thing when you don't limit it in weird ways. It's actually pretty easy to get a shot of an entire sheet of paper and if you keep the whole 1600 x 1200 image there's plenty of detail to read fine text. So yeah. If you have an iPhone and a pair of reading glasses you might find Hawkeye a useful program to pick up. Plus you'd be supporting little old me! :-)
Read more

Direct Droid/iPhone 3GS Comparison

Andy Ihnatko took a good series of shots where he took the same image with a 3GS and a Motorola Droid. If you care about phone cameras it's worth a look. My super-short capsule summary of the comparison? The Droid has a light and it has more megapixels and those save some shots. In general tap to focus is super-useful and the Droid pictures are really washed out saturation-wise. I think I would prefer having a 3GS for most occasions where I want a camera. Although I'd admit I could envy that light pretty easily .... And of course nobody is selecting a phone based on the camera built-in anyway. You pick the phone with the feature set you want and then that dictates which crappy camera you have anyway. On either of these the point is not that they are great cameras, the point is that it's a mediocre camera that you happen to have in your pocket all the time.
Read more

Quick Note for iPhone Upgraders

Here's a quick tip for people who are upgrading their iPhone: when you restore from backup it doesn't restore your Keychain so you need to re-enter all of your passwords. You may say "Well, duh Tim! Everyone figures that out fairly quickly!" And yes, you probably put your email and your WiFi passwords back in fairly quickly. If you use MobileMe though, it might not occur to you to go re-enter that password. If you don't then the the iPhone just silently stops syncing. Eventually this will cause you a problem if you think that entering appointments on your phone puts them on your main calendars. Once you get into the proper screen you'll see that the Password field says "Required" instead of a series of dots, but Calendar or Contacts will NEVER say "Hey, you know we haven't been able to sync for the last week."
Read more

Cocoa collections, an advisory note

Now that I'm doing actual useful iPhone development work I'm running into a few… shall we call them quirks? Talking about the iPhone specific stuff possibly needs to be [redacted] because of what's known on Twitter as the FUCKING NDA, but I think if something is also part of the OS X libraries then it is fair game. I had cause in my recent application to use a NSDictionary (well a NSMutableDictionary but let's not quibble, shall we?). A NSDictionary is quite straightforward, it stores key-value pairs. Imagine that you have a Person class and you have some other data (not part of the Person directly) that you want to keep on a per-person basis. You might well decide to use a NSDictionary and store (as a value) a NSArray for each Person (as a key). That way you can quickly retrieve the data for any Person. Now the documentation says pretty clearly that it's going to copy the keys but the obvious implication isn't stated: that means you need to implement a copy operator for any class you plan on using as a key. The thing is, nothing tests to make sure you do that. There's not even a warning if you don't but whatever default copy you get won't pass the comparison function. That means you can never say "Give me Bob's data" because the key for "Bob" won't be the same as the "Bob" object you're using. (And as an aside, yes I realize using the entire Person object as the key is slack. This was a temporary thing I was doing just to get the code running. In the particular case the "Person" object only consisted of a NSString anyway, so it wasn't that terrible.) You can happily stuff data in the Dictionary for "Bob" all day long but you'll get a nil when you try to retrieve the data. So. If you're going to use a NSDictionary with custom key classes you'll want to implement the NSCopying protocol. I suspect you want to implement the isEqual message, and the documentation for that also mentions you need to implement hash. It's not that this isn't in the documentation exactly, but it's not front and center. If say you're writing code on your laptop in a car while driving to a Hooters where you plan on drinking a lot of beer. Hypothetically speaking. This is pretty obvious, but I was surprised that I didn't get some sort of compile-time warning or error. Since the fix it make sure that object passed for the key was of a class that implemented NSCopying I still think the compiler could have detected this. (I'll admit it seems a little non-Objective-C-like but in my still newbie opinion Objective-C suffers from two much "try it it a runtime and see if it works" sort of behavior.) But it's just the sort of the thing you need to check yourself.
Read more

With Technology Figit

Good Lord, I've been as criminally negligent of this blog as it's possible to be criminally negligent of a personal blog. It's time for Technology Catch-Up(tm). Part the first: I bought Wii - I've had it about a month now. One part the Penny Arcade guys gushing over Boom Blox, one part some other technology fooling about making me realize that if I reconfigured the home theater just *SO* I could squeeze a Wii to the existing input and cables, and one part it finally being in a local store when I called and asked them. Verdict? Well, it turns out I can improve the sloppy control I complained so much about - set the sensitivity to "5" (the max) and it helps a lot. I still feel very strongly that you don't feel like you're pointing at the screen due to the ergonomics of the remote and you're driving a pointer around. The visceral "I'm pointing at the screen" doesn't work right, and whenever you need to do that it seems like there's a fair amount of "Just wave the remote until you get a cursor and then adjust from there." Boom Blox is a lot of fun despite that, and I've played an awful lot of Super Mario Galaxy in the last month. I still think it's a gimmick overall and I can't see it ever dethroning my 360 as my main console. But as I said in the comments here I don't think they are even competing really. I don't regret buying one, but I don't regret not having one for the last 1.5 years either. I haven't bought Zelda yet, but by the end of the summer I'll have blown through the back catalog and then the Wii will be like the Gamecube - hardly ever used except when Nintendo released a game every six months or so. That's not all on the technology parade. I'm going on vacation next week and I decided I wanted a new laptop before I went, so I got a 15" Macbook Pro. It's smaller and lighter than Kool-Aid, both of which will make it more airplane friendly. Kool-Aid needed at least a new battery, and it couldn't run the iPhone development software (needs an Intel Mac), and it was just getting a bit old for what I wanted to do. I'm still installing and configuring software but I like it a lot. As an odd aside Karin bought it with her educator discount and we got a free iPod touch in the bargain. Which brings us to the iPhone 2.0 software. I don't have any real desire to upgrade to the iPhone 3G as I already own a GPS and most of my iPhone network usage is via WiFi anyway. But the new software is full of awesome. The App Store is great and a lot of new applications are fantastic. I should post more about this. My biggest surprise so far is to realize I actively prefer reading RSS feeds on my phone and I opt for it even when I'm at home and could use Tiny God and the twin 24" screens. The phone forces me to triage more from article title and so far I'm not missing anything but getting through more items in less time. There's a lot of good stuff in the App Store. A metric shit-ton of crap as well, but there it is. The phone seems much less stable as well. I crash it several times a day now, as opposed to less than once a month. Most crashes seem to be right around app launch and it recovers gracefully but it's still a sour note.
Read more