Thursday, October 13, 2011

iOS 5 upgrade issues

I updated my iPhone 4 yesterday to iOS 5. I just wanted to say, what a frustrating experience. I first did a system update on my mac to get the latest iTunes. I synced my phone to get all the photos and recent purchases off of it. Then when iOS 5 became available I went ahead with the update. iTunes took a backup of my phone and away it went. iOS 5 downloaded without any issue and once complete I went ahead with updating my phone. It seemed to be proceeding without any problems, it wiped out my phone and attempted installing iOS 5. During the "Verifying restore with apple" stage it failed to connect to the apple update servers and it took a turn for the worse. It seems apple was unprepared for the number of people trying to update on day one and the update servers were timing out. Because the update had started, I was left with a blank iOS-less phone, basically a pretty black paperweight. It took several attempts over several hours to finally get iOS 5 installed but the fun didn't end there.  Next was the restore of the backup that was taken just before the update process began.  This too failed (with error -34).  Several attempts seemed to solidify to me that the restore option was not going to work.  Fortunately I had synced and imported everything before I began so I wasn't really worried about losing any data. My phone was in a usable state, it just wanted me to do some preliminary setup.  So I went ahead with the setup but because it had only partially restored things all of my apps that were not bundled with the OS would crash.  I had already set up iCloud on my Mac and so I decided to just set up the phone and re-sync it from iTunes.  I had to reconfigure all my sync rules but after syncing everything seems to be working fine again.  The only complaint so far is that it doesn't let me sync contacts,etc. with both iCloud and Google.  I can see possible conflicts arising if trying to sync with multiple sources but it would be nice to have both...

A little frustrated and I still haven't had much time to appreciate having iOS 5.  So far all I can say is the new notification centre is nice and I'm not yet convinced having music and videos separated into two separate apps is the better way to go.

Friday, October 7, 2011

Teacup Programming

Teacup Programming is a variation on pair programming.

Why teacups? While sitting around a round table during a team retrospective where we had mentioned pair programming the conversation drifted a little when someone said it felt like we were sitting in a teacup ride or something.  Naturally, this led to combining the two ideas and teacup programming was born.

The idea is based on amusement park rides where the rider spins a wheel in the centre of the ride to increase the spinning velocity of the rider's individual car.  The most widely known example of this is the Teacup ride at Disneyland.


Requirements

  • An even number of programmers 
  • a table (round is preferred but not necessary and a rotating table is even better)
  • one computer for every two programmers

Steps


1. Sit the programmers around the table with a computer in front of every other programmer.
table setup
2. Each programmer with a computer begins working with the programmer on his or her right.


pairs with person to the right
3. After a designated period of time, say 30 minutes, the pairs switch.  This is done by either rotating the table one spot to the right or having everyone move left one spot so the programmer on the right from each previous pair is now sitting in front of a computer.

rotate the table one spot
after rotation
4. Again, each programmer with a computer then begins pairing with the programmer on their right (this is a consistent rule for creating pairs) and the timer is reset for another 30 minutes.

again pair with person to the right
5. Goto 3.

The key point in this rotation system is to always have the one programmer from a previous pair remain working on the same computer and thus on the same problem to help reduce lost time due to context switching.  Also, everyone at the table gets a look at each problem which means more eyes looking at the code.  The drawback is that one programmer only ever works with two others at most.

Variant
programmers "leap-frog"
A variation to increase the number of pairing combinations is to have the person relinquishing control of a computer get up and "leap frog" positions one direction or another.  This adds more complication to the rotations but allows an individual to pair with more people in the group.

We have yet to actually try this out and so cannot say whether it is a viable technique or not but I think it does have some merit and there may even be some specific situations where it might be best applied such as at a hack-a-thon where there is a long list of problems or bugs trying to be solved none of which are too lengthy or difficult or for practicing for a programming contest where people are just trying to solve as many problems as possible.

If anyone gets around to actually attempting this please post a comment with the results.

Remaking the bed...

I follow @unclebobmartin on twitter and was also getting caught up with his blog posts and have been enjoying his rant-like video posts.  I particularly liked this one about Architecture Deference and even tweeted saying so.  I found it to be a good pre-cursor to this post on Screaming Architecture which I'm sure came partly as a result of the first.

I've been dealing with issues in some of our apps and haven't been able to put my finger on where they stem from and these posts really seemed to highlight for me what it likely was in the approach that caused these issues.  From the running of tests taking too long to too much focus on the aspects that don't really matter and should be deferred, I think I know where many of the issues lie.  The only problem now is figuring out how to fix it once it's been done... or is it too late?  Would it be too much to decouple the model, or the architecture, from the frameworks and tools to make it not worth the effort?  Do we just say lesson learned and take a more correct approach the next time around?

How tired am I?  Do I just want to go to sleep in the bed that's made or do I remake it?  Can it be remade?