Escort Missions Logo

Escort Missions

You ever get the feeling that life is just one long series of Escort Missions?

“App Accomplished” Nearing Accomplishment

It’s been a long time since I’ve done much (really any) blogging, but hopefully that drought will be coming to an end soon. I’ve just turned in my 13th (of 14) chapters of my upcoming book, App Accomplished.

It’s been a lot of work. I knew it was going to be a huge time commitment, and I wasn’t wrong. There were many times I wondered if I would ever be done, but now that I can see the light at the end of the tunnel, it feels really good.

I’ve learned a lot in the process. Much of which I’ll be writing about here, since a) I’ve gotten used to doing a lot of writing, b) I won’t be spending all my writing time on the book, and c) blogging about the book will hopefully help people find out about the book.

So now it’s time to finish the final chapter (which, if you’re curious, is about submitting your app and planning the next version), and start the editing (and marketing) process.

It should be fun.

I Am Now Officially Writing a Book

I’ve been working on writing a book for some time now. It’s been through many stages, conversations, outlines, contracts, etc., etc. But for some reason, it never felt real, until now.

Oddly enough, the thing that made it feel real was that I found out the book has been issued an ISBN number. I’m not exactly sure why that made such a difference – maybe it’s all the years I’ve spent writing applications for which the unique ID in the database was the de-facto proof of existence. But in any case, it feels real now. I’m no longer worried that it’s going to fall through or that by announcing it I might be setting myself up for failure.

So there it is, I’m writing a book for Addison-Wesley Professional called App Accomplished: Strategies for App Development Success. The book has its own companion blog as well.

Although I’m a developer by trade and have spent my last few years as an iOS developer for hire, it’s not a programming book. It’s a book for a group I call App Creators: people that have an idea for an app that they want to have built, and are willing to take responsibility for making sure it ends up in the app store. Sure, some of them are coders, but many, if not most, are entrepreneurs or managers that don’t program. This book is for them.

I’m writing it because I’ve seen too many projects that failed because of a lack of knowledge or understanding. I’ve seen too many apps that could have been so much better if only requirements had been clearer, or features communicated better or decisions had been made earlier in the process.

I hope that, through it, I can keep some projects from failing that otherwise would have, and I can contribute to making some apps better that otherwise would have been worse.

There’s a lot of work between where I am (having just turned in my second of fourteen chapters) and the book being completed and published. But I’m very excited to go through that process, and I’m grateful to the folks at Addison-Wesley Professional for giving me the chance and helping me make the book a better one that what I could have written by myself.

Migrated From SquareSpace to Octopress

I’ve moved my blog from Squarespace to OctoPress.

I’ve gotten more and more frustrated with SquareSpace over the last couple of years. They moved to their new version 6 product, but it has no API access. This is a real annoyance for me, but SquareSpace doesn’t seem to care.

So my only options for adding content there are their buggy web interface, their even buggier iPad app, or stay on their old version 5, which is very buggy, and not getting any development resources.

So, I went in search of another blogging platform, and I decided on OctoPress. I tried a couple of others first, notably WordPress (via WPEngine), but trying to import my old blog content and have it show up at the correct old URLs was just too much work.

So I wrote this ruby script to convert my old content from SquareSpace to Octopress. There might be some glitches (like, I haven’t gotten comments set up), but I think I like it so far.

Finding Relevant WWDC Videos

As I’ve said before, I find the WWDC videos to be invaluable and I try watch all of them eventually. But there are a lot of them, and it can be hard to find what’s relevant. And a lot of them I go back and watch again when I start working with a different part of a project.

So I’ve developed a trick, and I thought I’d share it with you all.

I go to the site where the videos are hosted and click on the “view all in iTunes button”. From iTunes, I download all the slides (Click a track like “Essentials”, then click “Slides” just above the list, and then click the “Get Tracks” button in the header).

I keep all the slides for WWDC 2010, 2011 and 2012 in subdirectories of a folder named “WWDC slides” in my Documents directory. It’s indexed by Spotlight on my Mac.

From then on, when I’m working on a project, and I’m having trouble with something, or trying to remember something I might have seen, I open up that folder in Finder, and type the Class or Method names of the Classes I’m working with, and Spotlight will tell me the session names of the videos I might want to watch.

So, for example, if I type ‘NSFetchRequest’, the first result is “Session 214 – Core Data Best Practices” from WWDC2012. I type ‘registerNib:’, and I get “Session 125 – UITableView Changes, Tips, Tricks” from WWDC2011 (among others).

Then I just go to iTunes or the website, and I know which video to go watch.

It’s a handy trick (and I use it to search through all my eBooks on programming, as well), and when I’ve recommended specific videos to people, I’ve had several of them ask me how I keep the videos straight.

So hopefully it’s useful to some of you.

New Work in Progress - Million Words: Multiplayer Crossword Game for Parents and Kids That Grades on a Curve

Although I do iOS Contracting to pay my bills (at least to date), I hope one day to earn a living from my own apps, and, although it’s not ready for release, the time has come to unveil my new project.

GamePlay ExampleMillion Words is a turn-based crossword game where you’re scored not by what letters you managed to get into your word, but by the grade level of your word, relative to your age. This way my six-year-old daughter could play “HELLO” and I could play “HELICOPTER” and we would get the same number of points (more or less).

My Top 5 Factors for iOS Contracting Success

About a year ago now, I was contemplating leaving my day job and becoming an indie* iOS developer. My last day working in a cube farm was June 30th, 2011. Now, as I pack to leave for WWDC in the morning, it occurs to me how much my life has changed since I made that decision.

When examining my finances in preparation for this trip, I determined that in my first year as an indie I’ve made within $1000 of the amount of money I made in salary my last year as an employee, while spending more time with my family and enjoying my work so much more. Personally, I consider that to be a success.

Looking back, I can think of 5 things that I did that I think contributed most to that success, and I wanted to take this opportunity to share them with you all.

What I Learned During My Mac App Store Review

Two things happened on Thursday that made it obvious to me what I should write about this week. Mountain Lion was announced, and my first Mac App was approved for the Mac App Store.

Even though iDevBlogADay is about iOS programming, more and more of us are moving from iOS to the Mac. With the announcement that GameCenter will be coming to OS X, I’m guessing that more iOS developers might be thinking about coding for the Mac now than might have been last week.

So today I’m going to talk about my experience in getting my first App on the Mac App Store and specifically the differences in the approval process between the Mac App Store and the iOS App Store.

HTTP Testing to the Edge on iOS: the School of Hard Mocks

I’m a big fan of Automated Testing, even on iOS projects, but even when I was doing mostly Ruby, Java and C# work, I was never a big user of mock objects.

Now, I’ll admit that Mock objects can be useful under some circumstances, but I’ve seen them used too often in cases where a bunch of different developers each build their own little fiefdoms of their own code surrounded by Mock Objects where they interact with anything else. Each developer’s code runs perfectly when being tested against Mock input, but when you put all that code together, you can’t get a transaction working end-to-end, because the real world doesn’t obey the assumptions inherent in the Mocks.

So the Automated tests I write have more of a tendency to be more like what are called “Integration Tests”, even though I use “Unit Testing Frameworks” to write them.

When you combine that with the fact that I write a lot of iOS apps that talk to web servers, I want a way to test how my code talks to HTTP. And I want to know that my code handles things even when any library I happen to be using hands me errors to deal with.

When I first solved this problem years ago, we were using the Google Toolbox for Mac as our unit test framework, because SenTest didn’t work well back then. So, at the time, I built a solution based on GTM, but I went recently to try to recreate that solution for a new customer, and I realized that the files I had used had been deleted from GTM.

So I went spelunking back in the history of GTM, and pulled out the last version of the the files I needed before they were removed, and put them up on github in a new repository I’m calling SyntheticServerTest.

The way you use it is to look at the example test file.

You just have to run:

[testServer startServerWithDocumentRoot:]

With a document root directory that contains web content (I usually use ‘curl -O’ to pull known pages (either good or errors) from the server and write them to that directory), and have a mechanism so, that, while your test is running, the host part of the URL gets replaced with

@“localhost:%d”,[testServer port]

and the test HTTP server, running in the background (in the simulator or on the device), will get the HTTP request and hand you back the test data file in response.

This way, you can test your App’s entire HTTP stack, including any parsing libraries you may be using, with both real data (that doesn’t require you to be on line) and with bad data, to make sure you are correctly handling whatever errors your parsing or network library is throwing off.

Using Regular Expressions Part 2 - the Cocoa Connection

Last time, in Part 1 of this series, I wrote about the basics of regular expressions, and the phrases I tend to use. Today, I’m going to talk about the mechanics of how I use Regular Expressions in Cocoa.

But first, an historical diversion

In my opinion there are, two different ways that programming languages implement Regular Expressions: The perl/ruby way, and the Java/C#/Python/Cocoa way.

In ruby and perl, regexes are implemented directly on the String type, whereas in the other languages, there a separate object that contains the functionality. Here’s what you need to know to do a regex substitution on a string in ruby:

myString.sub(‘pattern’,‘replacement’)

clean, easy, and immediately useable if you know what pattern you want to use.

Here’s what you need to know to do the same thing in Cocoa:

1
2
3
4
5
6
+[NSRegularExpression regularExpressionWithPattern:(NSString *) pattern
options:(NSRegularExpressionOptions)options error:(NSError **) error]

-[NSRegularExpression replaceMatchesInString:(NSMutableString *) string
options:(NSMatchingOptions)options range:(NSRange)range
withTemplate:(NSString *)template]

which is not clean, not easy and contains a bunch of stuff you have to go look up to be able to get started. What are NSRegularExpressionOptions and

NSMatchingOptions? What’s a template? Do I really have to create an

NSRange for this? And that leads to the obvious question: Is all this effort really worth it?

Now I don’t know about you, but I don’t want to spend any effort remembering any of those option parameters, and I don’t want to take the time to look them up any time I want to use a regular expression. To me, the beauty of Objective-C is that it gives us the ability to build most of what you need to know directly into the method signatures.