API Design is a Contact Sport

Posted by steve | Apple Software and Hardware | Tuesday 8 July 2014 2:31 pm

I was listening to one of the Apple World Wide Developer’s Conference (WWDC) 2014 videos recently. The topic was designing good APIs and frameworks. The presenter used the phrase “API Design is a Contact Sport” and I loved it.

What the presenter was talking about is that during the API development stage the internal email lists discussed in minute details all portions of the API before it gets locked down and published. The idea that the right time to express passion about method names and even argument names for proposed APIs in an all out push back and forth between team members is excellent. Once the API gets published you will need to support it for possibly years to come. Even as you enhance APIs in the future the whole need for backwards compatibility, or at least ensuring the user’s apps do not “explode and crash” is critical.

I love the notion of thinking of API design as wrestling the details out.


WWDC 2014 is coming!

Posted by steve | Apple Software and Hardware | Tuesday 27 May 2014 9:39 pm

Next week is the week Apple developers get all excited about WWDC. This is it. Apple will start their keynote on Monday and developers from all over the world will be in attendance during the week in San Francisco.

The Apple World Wide Developer Conference is the largest and longest continuous running developer conference in history. It hosts thousands of developers and the tickets sell out in seconds.

This year the keynote presentation will be live streamed. I almost feel like taking a vacation day just so I can stay online and watch as a substitute for being there. As I understand things Apple shuts down their engineering center in Cupertino and sends all the engineers on site to the conference to rub shoulders with their customer developers at technical sessions, workshops, and other conference events. I hope to get in there someday myself. It’s a pretty expensive proposition. The ticket costs money but the real killer is hotels and meals in San Francisco. Plus the flight to get there and back.

I’ll do it someday.

Last year Apple introduced iOS 7 key frameworks like iBeacon, SpriteKit and MultiPeerConnectivity that I ended up using in game apps I’ve produced this year. Apple also gave us Xcode 5 with built-in Xcode Services for Git and Testing Bots and first class Unit Test frameworks last year at the conference. All amazing tools.

In 2012 Apple introduced Passbook with iOS 6, among other things, and I did a lot of work with that. Can’t wait to see what’s in store for developers this year. I think Apple is on a roll. These are exciting times to be an iOS developer.

Apple has started to put up posters at the Moscone Center and the journalists are taking pictures and speculating wildly about the wording on posters for any hints about what lies ahead. Evidently the catch phrase this year is “Write the Code. Change the World.”

How cool is that?


The Crimea Quiz Game App

Posted by steve | Apple Software and Hardware,Education,Mobile Phones | Friday 11 April 2014 8:04 pm

Apple just sent me notification that the newest iOS App I’ve written “Crimea Quiz Game” has been approved and is ready for sale. From my past experience I think this means the App will begin to show up for sale in the Australia App Store at midnight tonight and then work its way across the global App Stores accordingly.

This is very exciting for me. Effort to get to this point has been really different than for other Apps I’ve published. But let me share some excitement by describing what this App does before I spend more time describing the interesting experience of getting this App approved.

“Crimea Quiz Game” is an iOS game that you play in your living room at home with iPhones, iPads and an Apple TV. The key feature is that this is a quiz you play using the Apple TV to present the questions and you use your hand held iPhones and iPads to vote on the correct answer. The game uses many of Apple’s new iOS 7 capabilities including the Multi-Peer Connectivity framework to automatically connect between all the devices, Sprite Kit for the graphics and text presentation, and AirPlay to send output to the TV screen.

When we play-tested this it generated a lot of excitement and was quite a bit of fun. Here is how a typical Apple TV display looks while playing the game.

Crimea Quiz Game Apple TV Display

Crimea Quiz Game Apple TV Display

On your networked iPhone are buttons matching the multiple-choice answers.

iPhone Answer Buttons

iPhone Answer Buttons

If you think you know the answer tap the matching button before one of the other players. The only thing is, see that timer up on the Apple TV display?…

Countdown Timer

Countdown Timer

If no one answers before the timer runs out (and it gets red as you get close), then no one scores.
The game then shows the correct answer, and the name of whomever got it right, on the Apple TV display for a few seconds and then the next question is presented. This cycle is repeated until the game ends and someone has the highest number of correct answers.

Game Over

Game Over

The game itself is about the current crisis in Crimea. I figure most folks, me included, don’t know much about the Ukraine and Crimea or even where the heck it is. So as a quiz topic this should be both interesting and educational. The game has 28 questions built-in. When the game is launched you can select how many questions are chosen randomly for a game round.

I also had some fun designing a setup screen with custom controls that is used by one player before the game begins. Here’s that setup display running on the iPhone.

Setup Options

Setup Options

The open source program Gimp was used to create the custom graphic elements and then I coded up some custom Sprite Kit controls for the buttons, switches and sliders.

Now, a little bit about the process to get to this point. The game was written and submitted to Apple for review on March 24th. Then on April 2nd the App was rejected with a reason that I’ve never encountered before “Metadata Rejected”. Apple provided details about the rejection and it turns out they didn’t find some problem with the App. Rather, they asked me if I would create a video showing how to work it. This was something new but then I figure, maybe the written text description I had given was not enough. After all, this app uses the Apple TV in a manner that I have not seen much in other App Store games. So setup might be confusing. And I figured if Apple said they needed a video showing how to setup the game hardware, then anyone would. So I created a video using the iOS simulator, and Quicktime and iMovie for editing and submitted that to Apple the very next day. In the mean time I was busy enhancing by adding features and cosmetic improvements so I decided to create a whole new version and resubmit.

Apple rejected it again on April 3rd. This time they wanted me to make the video again but using real Apple hardware and not showing it running on the simulator. Okay. That was a little more effort. I had to dig out our old Cannon video camera and threw together a few short clips showing the game being played on some iOS devices we have at home. I also did some editing in iMovie to see if I could make up for the lousy video skills. The app was resubmitted with a link to the first and second video. A new binary was readied on April 6th.

Then I didn’t hear anything for a few days. This morning (April 11) at 3:05 AM I received a text message that the game was in review! My first thought was, wow that’s early. Apple must have a pretty decent size staff running day and night for App reviews. I figured that maybe in an hour or two I’d get notice that the App was approved. The previous App I created took only 2 hours to approve once they began the review. But, this one is a lot more complicated because it has networking and uses the Apple TV. Around 1:00 PM I received a message from Apple saying that they needed more time to test it. Now I was secretly hoping this meant that maybe Apple found the App pretty interesting and was playing around with it. Just a fantasy, I know. Around 5:00 PM this evening I received a message saying the App was approved for sale in the App store. That was quite the journey. But like I said, I’m real excited. I think this App is a pretty neat idea, it’s fun to play, and it’s both timely and educational.

Here’s honestly hoping this game is a success. It’s just like those trivia games you see in some bars except this one you play at home with your friends.

The App is in the App Store at this link. I have also created a support web site which also shows off what it does and provides links to the setup and playing videos that were created for Apple during the review process.

So go check it out. I’m quite proud of it and also have a lot of plans for where I will take this idea in the future.


Updated Xcode 5 Unit Test Tutorial

Posted by steve | Apple Software and Hardware,Education,Mobile Phones | Wednesday 5 March 2014 11:43 am

This morning I received a compliment via email from someone I’ve never met before about my Xcode Unit Test tutorial. I was instantly motivated to read through it again and check it for typos. So, after about an hour’s worth of careful reading and edits I have updated the tutorial this morning.

If you have an interest in learning how to write good Unit Tests for iOS and Mac application development, check it out. The tutorial can be found here.

And thanks again to everyone that provides feedback on my tutorials. I’m especially curious about how folks stumble upon or find them since I make no special effort to market the material.


An iOS tutorial on writing unit tests with Xcode 5

Posted by steve | Apple Software and Hardware | Friday 24 January 2014 2:59 pm

I recently took a few moments and cobbled together a “workflow” tutorial that shows how to use Xcode 5 to write Unit Tests. Apple has done an excellent job in integrating Unit Testing into their iOS and Mac developer IDE. I wanted to write an introductory tutorial that walks through how you write these kinds of tests with this environment.

Here is the new tutorial.

I’ll probably push out updates with typo corrections and maybe some added goodies over the next few days.


Apple’s 50 Billion App Downloads Counter

Posted by steve | Apple Software and Hardware | Sunday 5 May 2013 1:50 pm

Apple has a promotion going on to celebrate the on-going success of the iOS App Store. They are approaching 50 billion downloads and intend to give a pretty substantial award to the person purchasing the 50 billionth app.

By itself, that’s pretty remarkable how well this new digital distribution of software is working. Here’s the countdown counter: 50 Billion Downloads Counter

But what just amazes me is the sheer scale of what we are seeing. That counter seems to be indicating that they are distributing about 1000 Apps per second.

As an iOS developer that’s pretty amazing to see and exciting to be a part of. I realize that “downloads” does not equal “sales” since quite a few Apps in the App Store are free, but still, that’s a lot of people using their iPhones and iPads accessing the Store for something to download.


MacBook Pro died

Posted by steve | Apple Software and Hardware,General Commentary | Thursday 19 July 2012 7:34 am

The apple notebook computer I use for developing iOS software had some kind of graphics and network failure a few days ago. I was just in the process of installing the latest iOS SDK beta when the display changed to a repeating pattern of tiny splats of color. And for some reason the network capability, at least the wireless 802.11n, also failed. The system thinks there is no more wireless hardware installed. Very strange.

I shouldn’t complain much. The computer was one of the first Intel MacBook Pro models and is about 6 years old. There’s consistently been an issue where the computer ran unreasonably hot and I guess that is what eventually led to failure. The hard drive in the computer was upgraded to a 750GB capacity internal drive about 18 months ago and I will obviously want to extract the drive and install it in an external enclosure. But I’ve tried a number of troubleshooting techniques and diagnostic runs and it appears to be a pretty messy problem to resolve. It also appears to be a real hardware problem, not software.

I’ve looked, using my trusty iPad, at used models and it looks like the least expensive resolution is to purchase an identical 6-year old model for between $350 and $600. It may also be possible to get it repaired and I need to write to one of those Mac repair sites for an estimate.

It’s weird. When your “daily driver” computer fails, it can be really disruptive in your life. I never realized how much the use of the computer, especially programming activities, are part of my regular day. The only thing that has kept this issue from being a high priority for me right now, I think, is that that I’m currently on vacation from work and enjoying playing board games with my friends and family for quite a bit these past few days.

My usual routine of getting up early and coding some iOS software before everyone else gets up has been disrupted. I seem to get this unbalanced feeling for most of the morning these past few days and I think it is my mind being confused about not doing any coding in the morning.

Oh well. I do seem to have more time for reading and writing Blog posts right now.


Laser Table Game on the App Store

Posted by steve | Apple Software and Hardware,Mobile Phones,Smalltalk | Monday 4 July 2011 10:10 am

I decided last Fall to take a crack at writing an App for the iPhone and iPad to be included in the App Store. Using my Laser Game published as a tutorial for Squeak as a starting point, I rewrote the App using Objective-C. The idea was to keep as much of the initial design and Smalltalk object models as possible.

Now I had seen Objective-C many years ago, 1993 I think it was, when I was investigating NeXT Step on Intel computers. And I knew it was a “cousin” to Smalltalk, having been launched by Brad Cox as an attempt to make Smalltalk-like programming on top of C. That may just be a poorly formed opinion of my own about Objective-C’s roots. I had not programmed in C since maybe the late ’80s.

So with a few books and tutorials on learning Objective-C in hand I dove in. At first, not unexpectedly, I was very frustrated with the tools and libraries because of a lack of familiarity. On the other hand, I can see why there’s developer loyalty about Objective-C. It is actually enjoyable coding once you get use to things.

Okay, long story short, I’ve published my App in June 2011 after many interruptions and typical other distractions — including being very busy at my regular Smalltalk professional work. After that initial hurdle of getting the first App finished and published, it’s been quite enjoyable to add new features and also polish up the code. As I’ve gotten smarter about coding in Objective-C I’ve been changing the implementation, refactoring and replacing code here and there.

Without any real attempt at marketing the App, I’ve had some success in sales. That was a real surprise. My purpose was to gain the experience of writing an App for the iPhone and iPad and to have something to point to as a “notch on my resume” for technical skills. It didn’t matter to me at all if the game sold. But I am delighted to see people have been downloading it and playing the game. In fact, what’s really cool is that people all over the world have downloaded and installed my Laser Game App. Apple makes publication of Apps worldwide very easy to do.

I just submitted Version 1.2 to Apple for approval. Considering the Fourth of July holiday I suspect it will be approved around mid-to-late-week coming up. The V1.2 update is a significant improvement over the previous designs. I feel like I’m just starting to get on a roll here.

The App has it’s own web page for news and support. I recently published some screenshots showing how the new release appears.

All in all, I really prefer working in Smalltalk and am much faster at developing there than in Objective-C. And that’s to be expected since I’ve been doing Object Oriented work with Smalltalk since the late ’80s. But I can say that developing for the iPhone and iPad with Objective-C is quite enjoyable and I hope to keep getting better. Also, it really is cool having my own App running on my iPhone and iPad.

More to come, I’m sure.


In praise of Apple’s iBooks reader

Posted by steve | Apple Software and Hardware | Tuesday 13 July 2010 8:30 pm

As I’ve posted before, I was recently given an iPad. And I am very impressed with this device. The screen is fabulous and the speed is fantastic. I am fortunate enough to have an iPad 3G with 64GB memory thanks to my lovely wife, Melissa.

I originally began to use it for my regular web surfing and to watch movies. And with the really great battery life I have been seeing and high portability, the iPad is excellent for that. However I never expected the free Apple book reader application iBooks to be so compelling. I have already read 2 books and have several in process.

The other day it hit me that I have already begun to utilize books differently. For starters, Apple makes it so easy to find books and purchase them that it is difficult to resist adding several at a time to your personal library. I’m sure that’s the general idea. But here is what surprised me. First some background. I tend to, when purchasing real physical books, select hardbound over soft cover. And I also tend to treat the books with great care. I never write in my books or fold pages over.

With the iBooks app that all changed. Besides the fact that I can carry around a library of books effortlessly, I now routinely highlight and annotate sections of the ebooks. The app makes that easy and, just as importantly, highlights are simple to find because they are all indexed as you create them. Here is an example from a recent book I completed reading.

That feature alone is pretty neat.


iPad – pretty nice

Posted by steve | Apple Software and Hardware | Tuesday 6 July 2010 11:01 pm

Melissa surprised me with an early birthday gift. I came home from work today and discovered an iPad 3G 64GB waiting for me on the kitchen table.

Just started playing with it tonight. Damn this thing is fast. The display is crisp and amazing.

Next Page »