Blazingly fast inserts with SQLite

As a follow up to Stir Trek, thanks to my friend and former co-worker John B., who reminded me that if you have a lot of inserts you want to do, execute this command on your database before you get started:

BEGIN TRANSACTION;

Then, after all your inserts have been sent , execute this:

END TRANSACTION;

If you do this, I promise that your users will be much more happier. (In my iOS app instance, the insert times went from about 90 seconds to 0.7 seconds.)

BTW, happy birthday to Amy Heckerling, who directed two of my all time most favorite movies, National Lampoon’s European Vacation and Johnny Dangerously.

Stir Trek: Avengers Edition (May 4, 2012)

It was a fun time today attending the Stir Trek developer event in Columbus, Ohio. I especially enjoyed the Scott Hanselman sessions on becoming more productive and on ASP.NET. And the movie was real loud.

Also, I would like to thank all the people who downloaded my Stir Trek app for the iPhone. Yesterday’s download count was almost larger than the entire download count for the Stir Trek app I did in 2011.

BTW, to continue the movie theme, Happy Star Wars day to everyone.

The Windows 8 platform for Metro style apps (CONDG meeting, April 26, 2012)

Jennifer Marsman gave a rousing and lengthy presentation on Metro and Windows 8 last night to a packed house meeting of the Central Ohio .NET Developers Group. She almost makes me want to do a Metro app.

Prizes returned, and believe it or not, my name was drawn first for the door prizes. I think that it is a conspiracy that the prizes really suck when I win something. I walked away with a version 2 Code Complete book. And a cheer went up from the audience.

BTW, happy birthday to Ace Frehley, a true rock and roll icon. It was kind of a shame that Ace wasn’t playing with Kiss when they did the Dancing With The Stars Rock Week show a couple of weeks ago.

Stir Trek: Avengers Edition app available

My 2012 Stir Trek app has made it through the review process and is available in the App Store. It is a free app and runs on iOS 4.3 or newer devices. Here is the link to the app:

Stir Trek 2012

OK, it is basically the same app as last year and does not use the iPad natively. But download and enjoy it anyway. And hopefully rate it 5 stars with glowing reviews.

BTW, a sad day today, Jim Marshall of Marshall Amplification has passed away at the age of 88. Which means that he made it to eleven 8 times. Turn it up loud in honor of Jim.

UI Automation – Testing From The Top Down (CIDUG meeting, March 27, 2012)

Jonathan Penn gave a presentation last night on using the UIAutomation classes in iOS and Instruments to do user interface testing of iOS apps. It was a very thorough presentation with lots of demos, which are always good. At my previous company, we tried to use UIAutomation to help out with entering of lots of data, but were stymied by something that sure looked like a bug in UIAutomation. Here was the Stack Overflow question I asked regarding this issue: (I accepted an answer that was not truly an answer because I wanted to get my accept rate back up to 100%)

iPhone UIAutomation button tap does not fire

I would love to get back into using UIAutomation, but it can take a long time to get it to do what you need it to do, and unfortunately I do not have the time I would like to spend on it.

By the way, if you have need of a mobile solution for your sales or work force, then please check out Routzy, an iPad only app that my current company just released last week. Here is a link to the product web site:

Routzy

And here is a link to the press release:

Coalesce Launches Routzy, iPad App Designed for Sales Professionals

Misspellings and other stuffs

It has been a while since I posted any misspelling and/or usage gaffs, so here goes something “special”.

This next one from a job posting  isn’t a true misspelling, as it would probably get past your average everyday spell checker. Check the 4th bullet point.

 And finally, I wouldn’t recommend clicking on the web story shown below if you happen to be working at a financial institution and you think that they might be red flagging certain employees for their web surfing.

Finally, Happy World Theatre Day to everyone.

WCF, it is not as scary as you think (CONDG meeting, March 22, 2012)

Last night, I was in attendance at a packed house meeting of the Central Ohio .NET Developers Group. The main topic was WCF by Paul Bahler, and the content was very informative. Almost a bit too informative, as he spent most of his time in Visual Studio showing how to do various tasks in the wonderful world of web services.

Unfortunately, there were no prizes to be had at the meeting (unless you count the Donato’s pizza), as the CONDG president forgot the prize box. There were calls for an impeachment.

BTW, happy birthday to David Tom, who I actually liked playing Billy Abbott on Y&R.

Application failed codesign verification (!?!**!)

After rearranging the components of an iOS project around, all of a sudden the archive was giving a warning at the end:

Application failed codesign verification. The signature was invalid, contains disallowed entitlements or it was not signed with an iPhone distribution certificate. (-19011)

The strange thing is that if I went to the Verification button in the Organizer, everything was happy and the app passed initial validation.

But I figured I had best clear the warning anyway. As a result, my moving items around caused a path to become too long. The way that I fixed it was to go into the Behaviors in Xcode, Locations tab, and set the Derived Data path to a custom path that was much shorter than the normal library path that shows up there. Doing this and rebuilding caused the archive to go through normally.

The key to this was looking at this Apple web page and noticing that I was getting the “Failed to load provisioning profile from” message in my build output:

Technical Note TN2250

BTW, Happy Birthday to Billy Sheehan, one of the most talented and versatile performers that I have ever seen.

Custom UISearchBar as a header view of UITableView in IB

If you add a UISearchBar to your UITableView in Interface Builder, it gives you a nice way to put the search bar as the header view of your table view, without any extra work involved such as creating the search bar in code and setting it up as a header view of the table. (OK, it is true that this is not that much more work, but I am super lazy.)

This works great if you want to use the search bar as is, without being able to customize it at all, which includes resizing it and adding additional controls to it.

My current needs dictated that I needed to add a bar code button to the right of the search bar that the user can use to scan in a bar code and kick off a search for the encoded data. I was going for the look of the search bar that is in the eBay iPhone app.

After many tries at subclassing UISearchBar and overriding drawRect and layoutSubviews in every perverted way possible, I stumbled on this Stack Overflow question and solution:

Changing the size of the UISearchBar TextField?

Basically, what you do here is to add a UIView to the table view instead of a UISearchBar. Then, you add a UINavigationBar to the UIView, and then resize it so that it only takes up a small portion of the view. After this, then you would add a UISearchBar to the empty space in your UIView, and then adjust the size of the UISearchBar to just fill up that empty space. (The navigation bar keeps the color gradient consistent across the header view.) And finally, you can then add any controls you want to the space that the small navigation bar occupies.

The only problem with this is that you have to manually manipulate the position of the new controls, as if you try to drag and drop, you might add the control as a UINavigationItem in the UINavigationBar.

On a conference note, I got tickets for myself and my co-workers to Stir Trek (The Avengers Edition) today a few minutes after they went on sale. Which is a good thing, as I understand they sold out in less than 15 minutes. I attended last year and had a good time, and I am hoping that this year’s edition has a better movie than last year’s Thor Edition. (Unfortunately, Thor does appear in The Avengers.)

BTW, happy Pi day everyone!

Apparently a distance of 198 miles away is still a “home market”

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.