• Working with blocks

    In Mac OS X 10.6 and iOS 4, Apple added blocks to Objective-C. When I first started looking at them because various APIs used them, the syntax confused me, and I pretty much ignored them as I was still doing work that ran on iOS 4 and Mac OS X 10.5.

    This spring, all my projects moved to iOS 4 and Mac OS X 10.6 as the minimum requirements, so I took another pass at learning blocks. This time, however, I could actually use them and read all I could about them. The more I started looking at them, the more I became enamored with them. I started using blocks in my own APIs and just finished rewriting a significant chunk of code using blocks. Using blocks has made my code more readable and has greatly simplified certain aspects of our app.

    One of my co-workers cautioned me to not use blocks just because they were the shiny new tool which I admit was what I was looking at doing. However, after using them, we found that using blocks was pretty much vital to making our code more readable.

    For developers that aren't familiar with blocks, I'd suggest learning them. With most iOS apps having a minimum OS of 4.0, there is no reason to avoid them.

  • Siri and a 4 year old

    I've been playing a lot with Siri on my iPhone 4S and am finding it pretty neat. I add reminders when running and when in the car. I'm also asking it the weather, temperature, etc. My 4 1/2 year old son saw me asking it "What's the weather?" and he tried to do the same. Unfortunately he doesn't enunciate well, so Siri gets very, very confused. He's managed to get Siri to respond to something this evening; he asked it "What's the weather in San Jose?" and it responded correctly.

    So, while Siri works pretty well for me, I wonder how well it works for people that don't speak clearly, have speech impediments or have thick accents. I know that Apple is still working on it, but right now, don't expect Siri to work for a 4 year old!

  • iOS 5's most useful feature

    Now that my wife and I both have iPhones running iOS 5, the single most useful feature for us is Reminders. I've used to do lists on and off for years, but never found anything that was always accessible and easy to use. With iOS 5 and iCloud, I have access to my reminders on my desktop, iPhone and iPad. Furthermore, with Siri on my iPhone 4S, I can add reminders when I'm running or when I'm driving.

    To top off my personal use of reminders, with iCloud, I can share reminder lists with my wife. I've setup a grocery list that we can both see. The other day I added an item to the list while I was in Portland and when I arrived home later that day, my wife had been to the store and purchased everything on the list, including what I had added!

    There are lots of other useful iOS 5 features, but so far, this feature could be something that helps restore my sanity. Yes, I know that other apps can do this, but this is simple to use and just works.

  • Repurposing an iPod touch

    Now that my wife has an iPhone 4, I decided to take her old iPod Touch and repurpose it. For the longest time, I wanted to be able to control the thermostat from upstairs, however I never found it economical solution to do so. That is until now.

    At the beginning of the year I changed out my thermostat for a WiFi enabled thermostat. This allows me to control the temperature in the house from anywhere in the house or in fact anywhere in the world. Since I already had the big pieces in place, all I had to do was reconfigure the iPod touch to be a dedicated device for controlling the thermostat. In addition to controlling the thermostat I figured that I could put the Squeezebox software on it so that I can also control the music from upstairs without having to go downstairs or to bring my iPhone upstairs.

    With the iPod Touch all configured now when I wake up I can just roll over and turn the heat on without getting out of bed. While it may sound funny to have to turn on heat in San Diego it does get a little chilly in our house so I like to turn the heat on in the morning just to knock off a little bit of the chill.