TouchDraw Code Reuse - Updated

As we just seeded the third beta release of TouchDraw for Android to our testers, I thought it would be a good time to publish some updated statistics on the code re-use in TouchDraw since we now have near final statistics for the Android version.

For those of you that didn't read the first post (and the associated disclaimers related to how these statistics were calculated), you can find it here.

As always, here are the pretty pictures first:

Next, here is the raw output from the script that calculated those statistics:

app      t       u      s       u%      s%
Mac 121114 28945 92169 23.90% 76.10%
Android 128036 35867 92169 28.01% 71.99%
iOS 141949 55363 86586 39.00% 61.00%

t is Total lines of code
u is Unique (platform specific) lines of code
s in Shared lines of code.

At a first glance, it seems like the Android version requires quite a bit less code than the iPad version; however the statistics don't tell the whole story.  What's not accounted for in the numbers is all of the things (layouts, menus, etc...) that is managed in code in the iPad version vs managed via resource files in Android.  

If we take into consideration all of the resource files, then platform specific "code" (term used loosely in this case) jumps up to around 35% for the Android version.  If our expectations hold true then the platform specific code in TouchDraw for iPad should drop to around 30 to 35% once we get version 2.0 finished.

I'm sure we would not have been able to build and deliver the first Android beta version in less than 3.5 months if we wouldn't have been able to re-use so much of our code base, and if we didn't have great tooling (MonoTouch, MonoMac and Mono for Android) at our disposal to enable this.