March 5, 2012, 2:36 pm
Well, I was just about to pull the trigger on the MLB.TV Premium subscription for 2012 at a not so small cost of $125, when I saw the blackout warning on the subscription page. Just out of curiousity, I clicked on the link thinking that the Indians and Reds would be blacked out in Columbus, Ohio. Imagine my surprise to find out after clicking the IP detection link (and using the zip code lookup just to see if the results were different) that even though it takes me about 3 to 3.5 hours depending on traffic to get to PNC park, I am in the Pittsburgh Pirates home area, and as a result, all their games (home and away) are unavailable for live viewing.
Nice job MLB, you just cost yourself $125.
BTW, thoughts and prayers to the family and friends of Ronnie Montrose, who just passed away this past weekend.
EDIT: Also, I forgot to mention that it is only 180 miles to Comerica Park from here. Awesome.
February 29, 2012, 4:40 pm
I logged into my bank’s account to pay a bill this morning and discovered that some people have trouble with that extra 0.24 of a day that it takes the Earth to make one complete circuit around the sun…

Click on the image for the full story about March 1st and it’s twin brother.
BTW, a fond farewell to Davy Jones of the Monkees.
February 20, 2012, 1:58 pm
Sorry about the delay in between posts kiddies, I have been very busy at work with Routzy and playing baseball at Pirates Fantasy Camp. Hopefully soon the Routzy app will be approved and I will be able to return to a more normal pattern of posting.
In the mean time, if you have a Windows Azure web site or services, and you want to secure them with an SSL certificate, I found this blog post to be indispensable:
Windows Azure: Secure Site with SSL certificate
BTW, a big shout out to Ohio’s own John Glenn, who, 50 years ago today, orbited the earth for almost 5 hours, a tremendous feat for the time.
January 11, 2012, 4:14 pm
I’m storing birthdays in Core Data, and now I want to get a list of entities sorted by the day of their birth. However, I just cannot sort by the date, since the year of their birth would take precedence, I just need to sort by the month and day of the NSDate stored as the birth date.
The big problem that I faced was trying to find out how to get the Julian date from an NSDate. Well as it turns out, Julian date does not correctly describe what I was looking for, I needed to look for ordinal date.
After a bit of investigation, I was able to put together this category that I have hung off of NSDate in my app:
- (int)ordinalDate
{
return [[NSCalendar currentCalendar] ordinalityOfUnit:NSDayCalendarUnit
inUnit:NSYearCalendarUnit forDate:self];
} |
- (int)ordinalDate
{
return [[NSCalendar currentCalendar] ordinalityOfUnit:NSDayCalendarUnit
inUnit:NSYearCalendarUnit forDate:self];
}
This, along with a sortUsingComparator of my NSMutableArray of contacts, is exactly what the doctor ordered.
BTW, Happy Birthday to the Grand Canyon National Monument, created this day in 1908, which eventually became the Grand Canyon National Park. (Yet another must see place.)
January 4, 2012, 1:52 pm
I found this one out the hard way.
If you are doing simple attribute additions when you transition from one Core Data model version to another, you can just create a new model version, set your overall data model’s default to the new version, and add the needed attributes to the entities as you need. When you fire up the app, the new fields are magically added to the table without any additional work.
However, when you want to rename an attribute, if you follow the above series of steps, the data that exists in the fields corresponding to the old attribute name is now replaced with a shiny new nil. Outstanding!
I guess I didn’t read the Apple Core Data docs well enough. Make sure that, when you add your model version and rename the attribute, make sure that you can see the Utilities view on the right side of the Xcode 4 window, click on the attribute you are renaming, click on the Data Model inspector (the third icon in the Utilities view, looks like a little database cylinder with an eye patch on it), and for the Renaming ID entry, type in the old name of the attribute. Once you do this, the data in the field should migrate forward.
Luckily, I didn’t blow away too many beta user’s data discovering this one.
BTW, a posthumous Happy Birthday to James Bond, the ornithologist whose book Ian Fleming had on his bookshelf and reportedly named his super spy character after.
December 31, 2011, 11:25 pm
Yup, yet another “year in review”.
There was the good. I finally got my Batter vs. Pitcher app into the App Store, and found my way to a new job that was way better than the one I had previously.
There was the bad. The passing of Steve Jobs, Dennis Ritchie, and unfortunately my beloved male schipperke Kirk hit home for me, and the Pirates turned a June first place NL Central tie into yet another sub-.500 season.
There was the ugly. My November presentation to the Columbus iPhone Developer User Group comes right to mind, and then of course there was that whole thing with being able to play MP3 files on my brand new Samsung Charge Android phone.
Here’s hoping that all of you out there have a safe and happy new year, and that 2012 is better than your 2011.
December 9, 2011, 10:08 am
Samidip Basu gave a very informative presentation on OData as it applied to the Columbus M3 Conference that took place in November of 2011, and how he put together a Windows Phone app that consumed the Azure hosted data.
As it was at the December CONDG meeting two years ago, I won a totally crappy T-shirt, and gave it to a former co-worker. Which made the evening that much more successful.
BTW, Happy Birthday to the Petrified Forest National Park, established this day in 1962. The petrified logs and the Painted Desert are fantastic, I highly recommend a trip there.
November 28, 2011, 10:31 am
Just in case you were wondering how to use a UIButtonTypeInfoLight (or UIButtonTypeInfoDark) as a UINavigationItem (a la UIBarButtonItem), here is what I threw together. Put this code in your view controller’s viewDidLoad method:
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeInfoLight];
button1.frame = CGRectMake(0.0f, 0.0f, 40.0f, 32.0f);
[button1 addTarget:self action:@selector(aboutButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *aboutButton = [[UIBarButtonItem alloc] initWithCustomView:button1];
self.navigationItem.leftBarButtonItem = aboutButton;
[aboutButton release]; |
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeInfoLight];
button1.frame = CGRectMake(0.0f, 0.0f, 40.0f, 32.0f);
[button1 addTarget:self action:@selector(aboutButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *aboutButton = [[UIBarButtonItem alloc] initWithCustomView:button1];
self.navigationItem.leftBarButtonItem = aboutButton;
[aboutButton release];
Adjust the frame to your taste, and supply the aboutButtonPressed method with an (id)sender parameter, and you are good to go.
November 23, 2011, 11:42 am
Thanks to everyone who turned out on Tuesday night for my CIDUG presentation on utilizing open source iOS projects. The presentation went a bit longer than I was hoping, largely due to the volume of demos that I had.
If you would like to download a PDF of the presentation, here is a link:
Open Source iOS Projects presentation
Also, if you would like to download a ZIP file of all of the demos that I did, here is a link for that:
Open Source iOS Projects demos
I realized this morning that what I should have done was to create a workspace, and then drag all of the individual projects into that one workspace for the demo. I have done this in the code that I uploaded, so when you unzip the demos file, just open the Demo projects.workspace file and then just use the Scheme selector at the top of the Xcode window to select which demo you want to look at or try out.
Please let me know if you have any questions or suggestions on the presentation or the demo code. I hope everyone out there has a safe and happy holiday season.
November 11, 2011, 4:01 pm
It has been a while since I have made a post, so I figured I would take this opportunity to point out that, if you are ever putting together a UITableViewCell (such as in the cellForRowAtIndexPath delegate method), there is a big difference between this:
cell.backgroundColor = [UIColor redColor]; |
cell.backgroundColor = [UIColor redColor];
And this:
cell.contentView.backgroundColor = [UIColor redColor]; |
cell.contentView.backgroundColor = [UIColor redColor];
Or, if you are creating an NSSortDescriptor, there is a big difference between this:
sortDesc = [[NSSortDescriptor alloc] initWithKey:@"sortOrder" ascending:YES]; |
sortDesc = [[NSSortDescriptor alloc] initWithKey:@"sortOrder" ascending:YES];
And this:
sortDesc = [[NSSortDescriptor alloc] initWithKey:@"sortOrder" ascending:YES
selector:@selector(localizedCaseInsensitiveCompare:)]; |
sortDesc = [[NSSortDescriptor alloc] initWithKey:@"sortOrder" ascending:YES
selector:@selector(localizedCaseInsensitiveCompare:)];
Happy Nigel Tufnel day and Last Binary Day Of This Century (11/11/11) to everyone!