<?xml version='1.0'?><rss version='2.0'><channel><title>Toran Billups</title><link>http://toranbillups.com/blog/</link><description>Paradigm Shift!</description><item><title>Unit testing basics in objective-c</title><link>archive/2012/05/04/Unit-testing-basics-in-objective-c</link><description>&lt;p&gt;Tomorrow I&amp;#8217;m giving my first in depth objective-c talk on unit testing and I decided to produce a screencast of the content for those who can&amp;#8217;t make the event.&lt;/p&gt;

&lt;p&gt;I decided to keep this presentation religion free and to the point. I wanted to show unit testing in action from the very basic substring examples to parsing JSON. This along with a light introduction to the &lt;a href=&quot;http://ocmock.org/&quot;&gt;ocmock&lt;/a&gt; library proved to be more than enough content for a 60 minute unit testing introduction.&lt;/p&gt;

&lt;p&gt;As always, if you want the code from this presentation you can find it on &lt;a href=&quot;https://github.com/toranb/unit-testing-objective-c&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;video poster=&quot;http://dl.dropbox.com/u/716525/ObjCPreview.png&quot; controls preload=&quot;none&quot; width=&quot;502&quot; height=&quot;282&quot;&gt;&lt;source src=&quot;http://dl.dropbox.com/u/716525/UnitTestingObjC.mp4&quot; /&gt;&lt;/video&gt;

&lt;p&gt;&lt;a href=&quot;http://dl.dropbox.com/u/716525/UnitTestingObjC.mp4&quot;&gt;&lt;b&gt;Direct Download (mp4)&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you make it to the event please leave a comment with some feedback!&lt;/p&gt;</description><pubDate>05/04/2012</pubDate></item><item><title>Automatically activate your virtualenv</title><link>archive/2012/4/22/Automatically-activate-your-virtualenv</link><description>&lt;p&gt;Since I started writing python last year I&amp;#8217;ve spent the majority of my time developing with &lt;a href=&quot;http://toranbillups.com/blog/archive/2011/12/22/How-to-install-pip-virtualenv-and-django-on-ubuntu&quot;&gt;virtualenv&lt;/a&gt;. This is a great way to silo your python environment from system python so you run different versions of a dependency without having to worry about upgrading every app that&amp;#8217;s running on your development machine / production web server / etc.&lt;/p&gt;

&lt;p&gt;One of the annoying things about working with virtualenv on your development machine is that you need to explicitly &quot;workon&quot; or activate the python environment each time you open a new terminal window or change directories. This got me thinking -why not write a simple bash script that would automatically activate a virtualenv when it found one that matched the directory name.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/2372372.js?file=gistfile1.sh&quot;&gt;&lt;/script&gt;

&lt;p&gt;The above can be put into your .bashrc file if you want this same auto workon behavior I was looking for. The script does assume 3 things&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You only consider a directory that has a git repository&lt;/li&gt;
&lt;li&gt;You must name the virtualenv the same as the directory that contains your project&lt;/li&gt;
&lt;li&gt;You want the script to deactivate one virtualenv and workon another when you switch between different project directories&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I decided to be a little more strict about when to auto workon a virtualenv because this script runs each time you execute the &quot;cd&quot; command. So by first making sure you had a .git file and second by making sure the name even existed as a virtualenv on your system it might save some would be wasted effort trying to activate something that wasn&amp;#8217;t needed or didn&amp;#8217;t exist altogether. &lt;/p&gt;</description><pubDate>04/22/2012</pubDate></item><item><title>How to export your first signed android package</title><link>archive/2012/3/01/How-to-export-your-first-signed-android-package</link><description>&lt;p&gt;The first time I went to publish an Android app it was unclear how to export an apk. I also thought if the app was free I wouldn&amp;#8217;t need to do anything special to the final apk, but as it turns out you still need to sign the apk before the google market will let you upload it.&lt;/p&gt;

&lt;p&gt;The video below is a simple walk through showing how to version/build/sign/export your apk for the google market. It&amp;#8217;s under 5 minutes and straight to the point.&lt;/p&gt;

&lt;video poster=&quot;http://toranbillups.com/content/video/android/androidpublish.png&quot; controls preload=&quot;none&quot; width=&quot;502&quot; height=&quot;282&quot;&gt;&lt;source src=&quot;http://toranbillups.com/content/video/android/androidPublishHowTo.mp4&quot; /&gt;&lt;/video&gt;

&lt;p&gt;&lt;a href=&quot;http://toranbillups.com/content/video/android/androidPublishHowTo.mp4&quot;&gt;&lt;b&gt;Direct Download (mp4)&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I left anything out be sure to leave a comment.&lt;/p&gt;</description><pubDate>03/01/2012</pubDate></item><item><title>Making the case for native mobile app development</title><link>archive/2012/2/20/Making-the-case-for-native-mobile-app-development</link><description>&lt;p&gt;Developers seem to be in two camps these days. There are those who feel native mobile development is the way forward, and those who feel it isn&amp;#8217;t. This topic has been close to me recently because I was asked to play an advisory role for a mobile project internally. And strangely enough I found myself on both sides of the issue.&lt;/p&gt;

&lt;p&gt;So what&amp;#8217;s the problem with native mobile app development anyway? Over the last year I&amp;#8217;ve built several mobile apps across iPhone/Android/WindowsPhone and I can tell you from experience that maintaining a code base for each platform sucks. It goes against everything great programmers know and love: &lt;a href=&quot;http://codebetter.com/jeremymiller/2007/03/22/the-dont-repeat-yourself-principle-and-the-wormhole-anti-pattern/&quot;&gt;DRY&lt;/a&gt; (do not repeat yourself).&lt;/p&gt;

&lt;p&gt;So naturally software developers and vendors started to build tooling that would allow for a single code base. And the idea is spot on. Why write a feature X times when I can write it once and have a compiler build the native code for me? (Or just use html/js/css to build a webapp and tunnel it through the various browsers)&lt;/p&gt;

&lt;p&gt;The problem with this wonderful idea is that in practice it never lives up to the hype/promise. And because I couldn&amp;#8217;t find many objective posts about why to build native I thought I&amp;#8217;d take the time to compile a list that I used internally to settle the &quot;native vs web/hybrid&quot; debate.&lt;/p&gt;

&lt;h3&gt;Performance&lt;/h3&gt;

&lt;p&gt;I was reading a &lt;a href=&quot;http://37signals.com/svn/posts/3112-how-basecamp-next-got-to-be-so-damn-fast-without-using-much-client-side-ui&quot;&gt;great post&lt;/a&gt; recently on the 37 signals blog about how they got Basecamp vNext to be so blazing fast. One of the great points made in the post speaks to performance as a feature and I firmly stand behind it.&lt;/p&gt;

&lt;blockquote&gt;
Speed is one of those core competitive advantages that have long-term staying power. As Jeff Bezos would say, nobody is going to wake up 10 years from now and wish their application was slower. Investments in speed are going to pay dividends forever.
&lt;/blockquote&gt;

&lt;p&gt;If you have ever used an app built with one of the web/hybrid tools you know what I&amp;#8217;m talking about. You click a button and it seems to be less responsive than the native counterpart. You scroll a list view and notice the lag as new items are presented on the page. You transition to another part of the app and you see what looks like frames dropping.&lt;/p&gt;

&lt;p&gt;Anyone who thinks performance isn&amp;#8217;t a feature in the mobile app eco-system isn&amp;#8217;t part of one. For our sake devices are getting faster with each hardware rev, but clearly native code will always be a step ahead of anything else. (Isn&amp;#8217;t that why most game development is still done in c/c++)&lt;/p&gt;

&lt;h3&gt;Consistent User Experience&lt;/h3&gt;

&lt;p&gt;I downloaded my banks iPhone app recently and the moment I opened it I could tell it wasn&amp;#8217;t a native app from the look of the buttons and other navigation elements. Turns out they just tunneled their mobile website through a UIWebView so it didn&amp;#8217;t have any of the usual iOS buttons/date picker/tab navigation/etc. But naturally I thought to myself &quot;I&amp;#8217;m not the average iOS user, so this astetic is surely something only hardcore iOS geeks like myself look for in mobile apps&quot;. &lt;/p&gt;

&lt;p&gt;But that illusion vanished recently when I started working with a group of business people to design our companies first mobile app. They not only recognized native iOS and Android components, but asked for them by name/description. One specific example is the UIDatePickerModeDate for iOS. It spoke volumes that normal iOS users loved the native look and feel of controls like this.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s no secret native controls provide a better user experience but how can you justify writing a code base for each platform? You can justify this because the goal of your mobile app should be to provide a great user experience. Initially this may sound like fluff or something your &quot;UX guy&quot; might say around the office, but in reality if you aren&amp;#8217;t the app consumers &quot;want&quot; to use, they won&amp;#8217;t use the app at all. Or worse -they will go to a competitor (me and my banking app for example).&lt;/p&gt;

&lt;h3&gt;Close To The Metal&lt;/h3&gt;

&lt;p&gt;I was talking with a friend recently who is big into the web/hybrid app ecosystem and he was showing me an issue he ran across with one of these popular frameworks. It was a simple cosmetic bug that didn&amp;#8217;t effect the functionality of his app in any way, but it bothered him regardless.&lt;/p&gt;

&lt;p&gt;Now that issue specifically could be found in the open source code base and fixed because it&amp;#8217;s javascript or css related. But this did get me thinking about what level of control the web/hybrid solutions offer today. On the iPhone for example you are doing everything inside of a UIWebView. Because you are working on a layer above the native stack you only have so much control over the micro optimizations you are allowed to use when your app needs it for example.&lt;/p&gt;

&lt;p&gt;I always find this interesting because one part of me says this is no big deal and you could do any optimization in javascript if needed. But the reality is you are already working in a sandbox and in the case of the iPhone you can only go as fast as the UIWebView will let you. If the complexity of your app starts to grow and you find that you need to optimize something you&amp;#8217;ve already given up a great deal of options because you only have the UIWebView available to work with.&lt;/p&gt;

&lt;p&gt;Another great example is when you need access to the platform specific features like location, camera, photos, native maps, gyro, address book, etc. Unfortunately I can&amp;#8217;t speak about how easy/or hard it is to access these from web/hybrid solutions because I don&amp;#8217;t have any experience first hand. I can say conceptually these things should be easier to work with from native code because you don&amp;#8217;t have to work with a generic / lowest common denominator api that may limit platform specific functionality.&lt;/p&gt;

&lt;p&gt;At first glance, this may appear to be a minor issue on my list but as I started to think about how applications grow over time I realized the more options you have on a technical level the better. And with mobile apps, native development offers the most control today.&lt;/p&gt;

&lt;h3&gt;Better online support&lt;/h3&gt;

&lt;p&gt;When I started building mobile apps the first thing I did was bookmark stackoverflow (as if it wasn&amp;#8217;t already the defacto). As someone who has spent the last 18 months learning 5 platforms I can tell you from experience that the dedicated people on stackoverflow can really provide a way forward when you get stuck learning a new language or platform.&lt;/p&gt;

&lt;p&gt;A simple search for questions about objective-c turns up 72,825 results. The same search for &lt;a href=&quot;http://phonegap.com/&quot;&gt;phonegap&lt;/a&gt; questions results in 4,184 results. This metric alone makes me want to stick with native app development for the simple fact that it has the most online resources available.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s not to say other open source tools/vendors won&amp;#8217;t have great support but from the numbers it&amp;#8217;s clear the majority of mobile development is done in native code today. &lt;/p&gt;

&lt;h3&gt;It&amp;#8217;s an eco-system not just a language&lt;/h3&gt;

&lt;p&gt;If you want to hear a developer throw something/cry/punch you in the throat just ask them to learn objective-c. The programming language has a bad name in the community that doesn&amp;#8217;t know much about it. I&amp;#8217;m guilty of this myself. Before I even started learning objective-c I was prepared for the worst programming experience known to man. &lt;/p&gt;

&lt;p&gt;And I spent a great deal of time learning how to build my first iPhone app, but looking back it wasn&amp;#8217;t because of objective-c. It was the entire eco-system ...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cocoa Touch&lt;/li&gt;
&lt;li&gt;Objective-C&lt;/li&gt;
&lt;li&gt;Xcode&lt;/li&gt;
&lt;li&gt;Interface Builder&lt;/li&gt;
&lt;li&gt;Learning the iOS 3/4/5/vNext apis&lt;/li&gt;
&lt;li&gt;Provisioning DRM to get my app into the store&lt;/li&gt;
&lt;li&gt;How to avoid rejection in the App Store&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would argue that most people who just want to avoid objective-c might find that a great deal of time is spent on the iOS platform/ecosystem and that isn&amp;#8217;t necessarily something web/hybrid frameworks get you out of completely. Especially if you are using a cross compile (non web) based solution like &lt;a href=&quot;http://xamarin.com/monotouch&quot;&gt;Mono Touch&lt;/a&gt;, you may get to write everything in c# but you still need to learn all the apis / front-end components to build an app.&lt;/p&gt;

&lt;h3&gt;Learn from my mistakes&lt;/h3&gt;

&lt;p&gt;When I started my recent project I thought that maintaining 2 or 3 codebases for a single app was nuts. A large part of the reason I feel this way is that on a personal project I was rewriting core domain logic in each app. This wasn&amp;#8217;t a good idea because any time the business logic changed I found myself in 3 code bases.&lt;/p&gt;

&lt;p&gt;Looking back now it&amp;#8217;s clear I should have abstracted that core logic to some type of REST api so I could avoid rewriting the same code 3x. This way the bulk of the native code I write in each code base is platform specific user experience / like front-end code. The stuff that provides the true value add for mobile in the first place. If you don&amp;#8217;t need this type of application experience and your business can compete with &quot;just another app&quot; then maybe native app development isn&amp;#8217;t the right fit. But for those of us who want to make a run away hit, native app development is the best option today.&lt;/p&gt;</description><pubDate>02/20/2012</pubDate></item><item><title>The year I thought I wanted to be a mobile developer</title><link>archive/2011/12/31/The-year-I-thought-I-wanted-to-be-a-mobile-developer</link><description>&lt;p&gt;Just one year ago I ended my journey on the Microsoft stack and decided it was time to play on the &lt;a href=&quot;http://en.wikipedia.org/wiki/Java_virtual_machine&quot;&gt;JVM&lt;/a&gt;. I thought about writing the ever &lt;a href=&quot;http://whatupdave.com/post/1170718843/leaving-net&quot;&gt;popular&lt;/a&gt; &lt;a href=&quot;http://mutelight.org/articles/comments-on-leaving-dot-net&quot;&gt;blog&lt;/a&gt; post about why I left the .NET community but in all reality I just wanted to see how the other half lived. Most of the people I looked up to in the community were writing software on some other platform and it was time to see what I was missing.

&lt;p&gt;Unfortunately after only a few weeks at the new job, it was clear I wouldn&amp;#8217;t be writing much code for a variety reasons so I decided to spend my time outside of work learning something different. This was unusual for me because in the past I&amp;#8217;d spent most of my time outside of work on the &amp;#8217;technology treadmill&amp;#8217; learning the latest frameworks, tools, etc so I could keep up with Microsoft as they pushed out every enterprise piece of software you could think of. The big problem with this approach is that it increased my burnout rate dramatically for obvious reasons. But after talking with a friend of mine about how to deal with burnout he suggested writing software for fun (again). To be fair it was the reason I got into this industry in the first place so I took his advise and decided it was time to code for fun in my spare time.

&lt;p&gt;At the time &lt;a href=&quot;http://developer.apple.com/technologies/ios/&quot;&gt;iOS&lt;/a&gt; development was the hot new thing so I started spending most of my &quot;free time&quot; learning about &lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html&quot;&gt;objective-c&lt;/a&gt; and &lt;a href=&quot;http://developer.apple.com/technologies/ios/cocoa-touch.html&quot;&gt;cocoa touch&lt;/a&gt;. What started out as a simple hobby soon became the reason I got up in the morning. And when I say &quot;got up&quot; -I&amp;#8217;m talking early. I was working 7 - 4 at my day job so I started getting up at 2 or 3 am to write objective-c until I had to leave for work. It was about 2 months into my first project that I started waking up on my own at this time without an alarm clock. My life started to revolve around this simple &lt;a href=&quot;http://www.blueflixapp.com/&quot;&gt;mobile app&lt;/a&gt; that I was building and soon I found myself wanting to write objective-c full time. 

&lt;p&gt;I started to look back at the seemingly big shift developers made in the early 2000&amp;#8217;s when web development hit the scene. I was just out of college and web programming was all I knew about the world of software development. So to me at the time it was the only way software was built (in my little world). What I didn&amp;#8217;t realize was how the entire industry was making a shift away from legacy (non-web that is) tech and the developers who didn&amp;#8217;t jump in got stuck maintaining systems that no one else wanted anything to do with.

&lt;p&gt;For some reason I applied this idea to mobile development and took it to an unrealistic / unhealthy extreme that got me thinking the personal computer was dead. That some how people would quit using computers altogether and only use software that was available on a phone or tablet. I still remember an interview this past year where I said &quot;consumers have quit using desktop computers, if your software isn&amp;#8217;t built on a mobile platform your business is dead&quot;.

&lt;p&gt;Not to say you shouldn&amp;#8217;t be doing mobile development but in reality people are still using desktop computers. The majority of that time is during work hours but at 5pm ish most consumers unplug from work and fire up the tablet / smart phone. Yet for some reason I was obsessed with this idea and decided that if I was still writing web apps in 2012 my career was over. At this point I should have realized my dogmatic view of mobile development was flawed but for some reason I kept moving in that general direction.

&lt;p&gt;It was about this time my first iPhone app was approved by apple and made it into the app store. This only fueled my sick passion for mobile development further so I started learning Android. I spent the next 7 weeks building my first Android app. When this app was finished I went on to the Windows Phone platform. I couldn&amp;#8217;t get enough of the mobile development story. With each app I felt closer to landing my dream mobile gig.

&lt;p&gt;Then it happened. The dream job I was waiting to interview for finally landed in my lap. But for some odd reason I had the opposite reaction about the job in question. I decided writing apps for iOS might actually limit the amount of other work I would get to do. Instead of writing back-end services to communicate over http I might be told that was someone else&amp;#8217;s job. Instead of writing web apps that would have me doing html/css/javascript/sql I might be stuck dragging and dropping table views and wiring them up with objective-c.

&lt;p&gt;I realized that instead of having to specialize I wanted to get back into a more general web development role working with a small team where I could see a direct impact from my work. I was writing a batch application at the time on a very dysfunctional team and decided it was time to move on.

&lt;p&gt;Just a week after I finally decided to move on, I heard about a small team that was looking for a &lt;a href=&quot;http://python.org/&quot;&gt;python&lt;/a&gt; web developer. Not having any experience with Python and limited experience with Linux it was a long shot but somehow I was able to express my passion for learning and got a job offer.

&lt;p&gt;Without a doubt 2011 will be known as &quot;The year I thought I wanted to be a mobile developer&quot; because of my insane drive and passion for mobile development. But through that experience I found that the mobile web isn&amp;#8217;t going away anytime soon. And since then web development has become my passion all over again. &lt;/p&gt;</description><pubDate>12/31/2011</pubDate></item><item><title>How to install pip, virtualenv and django on ubuntu</title><link>archive/2011/12/22/How-to-install-pip-virtualenv-and-django-on-ubuntu</link><description>&lt;p&gt;I recently started developing on linux again, but this time I&amp;#8217;m doing &lt;a href=&quot;http://python.org/&quot;&gt;Python&lt;/a&gt; professionally. And with any new platform, you learn how to setup your development machine on day one. Initially I just installed Python 2.x and started writing code without a care in the world. But it turns out most of the real-world Python developers are working with this thing called &lt;a href=&quot;http://pypi.python.org/pypi/virtualenv&quot;&gt;virtualenv&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The short version -virtualenv allows you to silo a development python environment from system Python. So without further ado -the steps below will get you up and running from a fresh install of Ubuntu 11.10&lt;/p&gt;

&lt;p&gt;This install assumes you are a normal (non root) user who has sudo access to install packages (but please don&amp;#8217;t do something like sudo -i before starting this install)&lt;/p&gt;

&lt;pre&gt;sudo apt-get update&lt;/pre&gt;

&lt;pre&gt;sudo apt-get install python-setuptools python-dev build-essential git-core -y&lt;/pre&gt;

&lt;pre&gt;sudo easy_install pip&lt;/pre&gt;

&lt;pre&gt;sudo pip install virtualenv&lt;/pre&gt;

&lt;pre&gt;sudo pip install virtualenvwrapper&lt;/pre&gt;

&lt;p&gt;At this step type pwd **to make sure this is your home dir -ie /home/toranb. If you are not cd ~/ and you should be.&lt;/p&gt;

&lt;pre&gt;mkdir ~/virtualenvs&lt;/pre&gt;

&lt;pre&gt;echo &quot;export WORKON_HOME=~/virtualenvs&quot; &gt;&gt; ~/.bashrc&lt;/pre&gt;

&lt;pre&gt;echo &quot;source /usr/local/bin/virtualenvwrapper.sh&quot; &gt;&gt; ~/.bashrc&lt;/pre&gt;

&lt;pre&gt;echo &quot;export PIP_VIRTUALENV_BASE=~/virtualenvs&quot; &gt;&gt; ~/.bashrc&lt;/pre&gt;

&lt;pre&gt;source ~/.bashrc&lt;/pre&gt;

&lt;p&gt;The above is a great start, but if you want to use the best Python editor known to man keep going. If you don&amp;#8217;t want a bulky IDE or you just don&amp;#8217;t have the hardware to run it, install vim the right way as the vanilla install of ubuntu won&amp;#8217;t have anything installed.&lt;/p&gt; 

&lt;pre&gt;sudo apt-get install vim vim-scripts vim-doc vim-latexsuite vim-gui-common vim-gnome -y&lt;/pre&gt;

&lt;p&gt;If you decided to install the Pycharm editor -it requires the JDK so let&amp;#8217;s get started!&lt;/p&gt;

&lt;pre&gt;sudo apt-get install openjdk-7-jdk -y&lt;/pre&gt;

&lt;p&gt;Next go &lt;a href=&quot;http://www.jetbrains.com/pycharm/download/&quot;&gt;download&lt;/a&gt; Pycharm from jetbrains. Once this is finished cd into your downloads directory&lt;/p&gt;

&lt;pre&gt;cd ~/Downloads/&lt;/pre&gt;

&lt;pre&gt;tar xvzf [name of the tar.gz]&lt;/pre&gt;

&lt;p&gt;Now cd into that new directory after the extraction is finished.&lt;/p&gt;

&lt;pre&gt;cd bin&lt;/pre&gt;

&lt;pre&gt;./pycharm.sh&lt;/pre&gt;

&lt;p&gt;Now you have a full python stack so lets create our first virtualenv and install django! (back to the terminal)&lt;/p&gt;

&lt;pre&gt;mkvirtualenv blog&lt;/pre&gt;

&lt;p&gt;This will create a new virtualenv (very minimal install). To install django use pip.&lt;/p&gt;

&lt;pre&gt;pip install django&lt;/pre&gt;

&lt;p&gt;Now you can develop, install other packages using pip,etc (go to town people!)&lt;/p&gt;

&lt;p&gt;If you want to get out/off your virtualenv use this command&lt;/p&gt;

&lt;pre&gt;deactivate&lt;/pre&gt;

&lt;p&gt;If you want to jump back on the virtualenv we just created and installed django use this command&lt;/p&gt;

&lt;pre&gt;workon blog&lt;/pre&gt;

&lt;p&gt;And finally if you want to remove the virtualenv altogether&lt;/p&gt;

&lt;pre&gt;rmvirtualenv blog&lt;/pre&gt;

&lt;p&gt;Now you should have a fully functional Python/Pip/Virtualenv/Django development environment!&lt;/p&gt;</description><pubDate>12/22/2011</pubDate></item><item><title>Talking mobile development on Hanselminutes</title><link>archive/2011/12/17/Talking-mobile-development-on-Hanselminutes</link><description>&lt;p&gt;When I started doing web development years ago I found podcasts were a great way to learn about different facets of software development. If I wasn&amp;#8217;t exposed to different ideas I might never have thought to innovate on my own projects and keep learning. And if you are at all familiar with the .NET community one of the most respected podcasts in existence today is &lt;a href=&quot;http://hanselminutes.com/&quot;&gt;hanselminutes&lt;/a&gt;. This weekly podcast features &lt;a href=&quot;http://www.hanselman.com/blog/&quot;&gt;Scott Hanselman&lt;/a&gt; doing what he does best - speaking with interesting people in the software community to get a different perspective on popular (and sometimes unpopular) topics in the software industry.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://hanselminutes.com/293/developing-a-mobile-app-for-iphone-windows-phone-7-and-android-with-toran-billups&quot;&gt;Recently&lt;/a&gt; I was fortunate enough to talk with Scott about my experience developing mobile applications across iPhone/Android/Windows Phone and thought to mention it on the blog. The actual interview covered my previous blog post about the &lt;a href=&quot;http://toranbillups.com/blog/archive/2011/10/06/The-Mobile-Development-Report-Card&quot;&gt;mobile development report card&lt;/a&gt; but Scott did take it a bit further at times. The most entertaining part without a doubt was when Scott asked about memory management and I said to ignore it initially (I was then given the &amp;#8217;opportunity&amp;#8217; to dig myself out of that hole rather quickly).&lt;/p&gt;

&lt;p&gt;But even with this misstep I think the show ended up a huge success! If you are interesting in the podcast give it a &lt;a href=&quot;http://s3.amazonaws.com/hanselminutes/hanselminutes_0293.mp3&quot;&gt;listen&lt;/a&gt;, and if you just want to read about it you can find a full transcript &lt;a href=&quot;http://s3.amazonaws.com/hanselminutes/hanselminutes_0293.pdf&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description><pubDate>12/17/2011</pubDate></item><item><title>How to publish your first iPhone app</title><link>archive/2011/11/07/How-to-publish-your-first-iPhone-app</link><description>&lt;p&gt;When I finished my first &lt;a href=&quot;http://www.blueflixapp.com/&quot;&gt;iPhone app&lt;/a&gt; earlier this year, I just assumed the hard part was over. But it turns out learning objective-c wasn&amp;#8217;t the worst part of my transition to the iOS development eco-system. The most difficult part was figuring out the crazy certificate/provisioning profile madness that had me ready to throw in the towel.&lt;/p&gt;

&lt;p&gt;I actually phoned a good friend for help the first time around just so I could get my product into the &lt;a href=&quot;http://www.apple.com/iphone/from-the-app-store/&quot;&gt;app store&lt;/a&gt;. But recently I had to pave my workstation and re-install OSX from scratch. After doing so I realized I would have to go through this painful setup again, so instead of the guess work I did last time around I decided to record it so I could share the actual steps required with others who might be struggling to publish an iPhone app for the first time.&lt;/p&gt;

&lt;video poster=&quot;http://toranbillups.com/content/video/xcode/publishing.png&quot; controls preload=&quot;none&quot; width=&quot;502&quot; height=&quot;282&quot;&gt;&lt;source src=&quot;http://toranbillups.com/content/video/xcode/PublishingIphoneApp.mp4&quot; /&gt;&lt;/video&gt;

&lt;p&gt;&lt;a href=&quot;http://toranbillups.com/content/video/xcode/PublishingIphoneApp.mp4&quot;&gt;&lt;b&gt;Direct Download (mp4)&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I skipped anything that should be covered in more depth please shoot me an email or leave a comment. I hope this helps guide someone else through the nightmare that plagues all new iOS developers (at least this one anyway).&lt;/p&gt;</description><pubDate>11/07/2011</pubDate></item><item><title>The Mobile Development Report Card</title><link>archive/2011/10/06/The-Mobile-Development-Report-Card</link><description>
  &lt;style&gt;
#hor-minimalist-b
{
	font-family: 'Lucida Sans Unicode', 'Lucida Grande', Sans-Serif;
	font-size: 12px;
	background: #fff;
	width: 550px;
	border-collapse: collapse;
	text-align: left;
}
#hor-minimalist-b th
{
	font-size: 14px;
	font-weight: normal;
	color: #039;
	padding: 10px 8px;
	border-bottom: 2px solid #6678b1;
}
#hor-minimalist-b td
{
	border-bottom: 1px solid #ccc;
	color: #669;
	padding: 6px 8px;
}
#hor-minimalist-b tbody tr:hover td
{
	color: #009;
}
  &lt;/style&gt;
  
  &lt;p&gt;I&amp;#8217;ve spent the last 9 months building mobile apps in my spare time. I honestly needed a hobby project that would re-introduce me to the fun side of programming. I found joy in the early &lt;a href=&quot;http://developer.apple.com/&quot;&gt;iPhone development&lt;/a&gt; I was doing and by the time my &lt;a href=&quot;http://www.blueflixapp.com/&quot;&gt;first app&lt;/a&gt; was finished I decided it was time to learn another mobile platform.&lt;/p&gt;

&lt;p&gt;I kept learning and soon found that I was having fun at the keyboard again. I had finished my first &lt;a href=&quot;http://developer.android.com&quot;&gt;Android&lt;/a&gt; app and decided to give that &lt;a href=&quot;http://developer.windowsphone.com/&quot;&gt;Windows Phone 7&lt;/a&gt; thing a shot (despite what others had said about the market). It was about this time that I started to see the &quot;my iPhone/Android experience&quot; like &lt;a href=&quot;http://greensopinion.blogspot.com/2009/07/android-versus-iphone-development.html&quot;&gt;blog&lt;/a&gt; &lt;a href=&quot;http://whereoscope.wordpress.com/2010/12/07/android-vs-ios-a-developers-perspective/&quot;&gt;posts&lt;/a&gt; showing up on &lt;a href=&quot;http://news.ycombinator.com/&quot;&gt;Hacker News&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;I found these interesting and decided I would write a little about my experience on all 3 platforms. But instead of a simple post about my likes/dislikes, I thought a &quot;report card&quot; like comparison with a letter grade would give other developers interested in learning mobile a high level view into the platforms from the view of an aging web developer who started on the .NET stack and recently turned to the JVM.&lt;/p&gt;

&lt;p&gt;To be clear I&amp;#8217;m far from an expert on any of the platforms listed below. At the time I was far more intersted in building a product and having fun again to get caught up in deep SDK hacking so what you see below is simply my thoughts about how the platform felt as a newbie. I could very well be wrong so please feel free to let me know in the comments :)&lt;/p&gt;
  
  &lt;table id='hor-minimalist-b' summary='Employee Pay Sheet'&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;iPhone&lt;/td&gt;
&lt;td&gt;Android&lt;/td&gt;
&lt;td&gt;WP7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#helloworld&quot;&gt;Hello World&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;D*&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#learningcurve&quot;&gt;Learning Curve&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#tddfriendly&quot;&gt;TDD Friendly&lt;/td&gt;
&lt;td&gt;B+&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#navigation&quot;&gt;Navigation&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#globalstate&quot;&gt;Global State&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;B+&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#multitasking&quot;&gt;Multi Tasking&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#persistence&quot;&gt;Persistence&lt;/td&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#debugging&quot;&gt;Debugging&lt;/td&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#layout&quot;&gt;Layout&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#images&quot;&gt;Images&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#tooling&quot;&gt;Tooling&lt;/td&gt;
&lt;td&gt;C&lt;/td&gt;
&lt;td&gt;B+&lt;/td&gt;
&lt;td&gt;A*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#emulation&quot;&gt;Emulation&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#localinstall&quot;&gt;Local Install&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#devicetesting&quot;&gt;Device Testing&lt;/td&gt;
&lt;td&gt;B+&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;A-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#publishing&quot;&gt;Publishing&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;B+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#sales&quot;&gt;Sales&lt;/td&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;B-&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;

&lt;h2&gt;&lt;a name=&quot;helloworld&quot;&gt;Hello World&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to get a working app out of the box for someone with zero experience using the platform.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; Even with no experience developing on OSX I found it brain dead simple to get my first iPhone app up and running in the simulator. After downloading and installing Xcode you simply open the IDE and select new view based app, compile and away you go.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; I hesitate to open with &amp;#8217;don&amp;#8217;t get me started&amp;#8217; but honestly this was the worst experience of all the mobile platforms. I should clarify that I didn&amp;#8217;t get started with eclipse and didn&amp;#8217;t want to. I wanted to work with Intellij and build using Maven so my experience might be the exception for Android development. Either way I had one heck of a time trying to get my first project up and running. After I got a working app built I did a &lt;a href=&quot;http://toranbillups.com/blog/archive/2011/05/10/Setup-your-Android-development-environment-using-Maven-and-Intellij&quot;&gt;screencast&lt;/a&gt; to help others get up and running with Maven and Intellij (hopefully with less pain). I did put an asterisks here because if you are down with using Eclipse this might not be a total failure as it was for me.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; Much like the iPhone experience you simply download the tools and away you go&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;learningcurve&quot;&gt;Learning Curve&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to honestly grok the platform and be productive.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; To say the learning curve was steep would be the understatement of the year. To be fair I wasn&amp;#8217;t an OSX user, had never used Xcode, and I&amp;#8217;ve never written a line of C in my life (unless you count a semester of c++ 7 years ago). It took a good 2 months of writing code daily for 2-4 hours to become productive. I should mention this was by far one of the best learning opportunities I&amp;#8217;ve had in the programming space since college so it wasn&amp;#8217;t a bad thing (just wanted to be honest about how long it took me to feel productive on the platform)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; I&amp;#8217;ve been writing java/groovy since January this year so I had some experience with not just the language, but the platform. I didn&amp;#8217;t incur much of a cost, if any at all when I started coding. I felt super productive out of the box until I hit layout (described in more detail below). &lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; My first real programming gig out of college was writing aspnet web applications. In addition I&amp;#8217;ve spent the better part of my career since then working in c# and .net so I can safely say the learning curve was non existent. I&amp;#8217;ve also done a little with Silverlight 3 so the front-end XAML wasn&amp;#8217;t a big deal. Productivity started high and remained that way throughout the development process.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;tddfriendly&quot;&gt;TDD Friendly&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to get your software under test on the platform. (excluding front-end testing)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; When I started writing objective-c last year Xcode 3 didn&amp;#8217;t ask you if you wanted to create a unit test project along side your production app like it does today in Xcode 4. So I spent a great deal of time trying to figure out how to unit test my code, but with the support coming out of the box now I couldn&amp;#8217;t help but say this is a decent experience today. I still run into the occasional issue and thrash around a little but it&amp;#8217;s a decent experience for someone new to the platform.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; Because I was using Maven this was by far the best experience of all 3 platforms. I just added the junit dependency and away I went.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; To say the community and Microsoft itself don&amp;#8217;t value unit testing would be an unfair statement, but this is how it felt when I started my first WP7 project. For starters if you are using the free tools you aren&amp;#8217;t allowed to use a plugin like resharper. And because I only write my tests in .net with nunit I&amp;#8217;m not sure how you can run tests with just the free tooling. If you decide to pay for a full blown commercial license you can use a plugin like resharper of course, but even with the tooling I had to first find an nunit assembly that was Silverlight friendly, and then work through a few other issues (shown in yet another &lt;a href=&quot;http://toranbillups.com/blog/archive/2011/07/24/Test-Driving-My-Windows-Phone-7-App&quot;&gt;screencast&lt;/a&gt; I published to help developers who might follow)&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;navigation&quot;&gt;Navigation&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to build a project with multiple views that can be navigated to.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; I found hooking up an app delegate (main controller) for any given project difficult at first. And along these lines I found adding multiple views and having them wired up to this app delegate difficult to get right for the longest time. Looking back most of the pain came from having to write a few lines of code, and then having to drag n drop references around inside the interface builder (UI) tooling. Now that I&amp;#8217;ve been working with the platform for some time this is practically muscle memory but I still find it to be the worst experience across all the mobile platforms currently.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; To navigate between activities you simply create a new object (intent as it&amp;#8217;s called) that knows about the current activity and the type you plan to invoke next. Then you start it - done&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; Although I liked how simple Android made this task look it had nothing on WP7. To jump between pages (views) on the platform you simply ask the Navigation Service to navigate to a given url -done&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;globalstate&quot;&gt;Global State&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to store something globally for use across the application.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; Once you figure out the wonky app delegate wire up process on the platform it&amp;#8217;s very simple to share global state. Typically I would create a new controller to start up inside the app delegate object during a navigation event and during the init process I would pass any state required for the next view.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; In android you simply inherit from a base class (Application to be exact) and in doing so you can push/pull state from this object at almost any point. The only thing I didn&amp;#8217;t like about this passing data between activities directly is that it felt painful so I often used this global class instead (for better or worse)&lt;/p&gt;	

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; Very similar to the Android story here, except you don&amp;#8217;t need to create your own class. A global class named App already exists and you can push/pull data from this almost anywhere. For small bits of data you could pass along a url like param to share data between controllers, but everything else I just pushed into the app object and pulled it back out inside the next view when I needed it.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;multitasking&quot;&gt;Multitasking&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to save state and restore the application when a user switches between your app and the next. *(not necessarily the effort to program the app to work well with this paradigm)*&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; The reason I gave iPhone the best in class is that you have the option to support or not support multitasking. And if you do support it you don&amp;#8217;t have to do anything special to keep the global state of your app &amp;#8217;as is&amp;#8217; - so the restore process is painless&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; Multitasking on Android is required so if you are cool with this you have no worries. When a user restores the app you shouldn&amp;#8217;t find any surprises when you attempt to display the view that was just up.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; At the time I was working with WP7 you had to explicitly save / restore that state you cared about manually. This wasn&amp;#8217;t a huge deal but it was painful because the other platforms already do this for you.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;persistence&quot;&gt;Persistence&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to store something long term and retrieve it (using SQLite for example)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; At the risk of sounding incompetent I have to say my experience with SQLite on the iPhone was more difficult than I had hoped. To this day I&amp;#8217;m still afraid (code fear) to touch the binary file that holds the database itself because I never really understood how the darn thing worked. I had no trouble writing SQL statements or getting general data in/out of the database once it was setup correctly, but this is still the #1 area I avoid on the platform today.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; Aside from a few fragmentation issues (I&amp;#8217;ll talk about this later) and a ton of incorrect blog posts I found the general SQLite setup easy enough on the platform. The only part of the persistence work that was painful is that the code itself was in java.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; When I started building my first WP7 app I was under the impression that I would be releasing after Mango was released so I built my persistence with LINQ to SQL. This experience was by far the best on all platforms. But when I decided to ship a little sooner I had to revert everything to LINQ to XML instead as Mango was still not out and I wanted to get my product in the hands of paying customers. Even this wasn&amp;#8217;t a painful process as LINQ provides a low friction way of working with XML/SQL/etc.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;debugging&quot;&gt;Debugging&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The experience using a debugger to find problems on the platform.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; In the latest version of Xcode the debugger has improved a great deal. I still don&amp;#8217;t enjoy the experience because it feels light years away from debugging in modern IDE&amp;#8217;s like Visual Studio/Intellij. In the future look for a jetbrains product similar to Intellij (but for objective-c) called AppCode. I&amp;#8217;ve been using the beta and if it gets released at an indi dev friendly price point I&amp;#8217;ll be sure to pick it up and never look back.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; I&amp;#8217;ve used Intellij exclusively throughout my Android development and love the IDE. The debugging experience is about the only thing that could be improved greatly. Not to say you can&amp;#8217;t find the state of an object during execution, but once you have used Visual Studio the bar for debugging is a little higher. One big example of this is that I can&amp;#8217;t drag a break point around in Intellij. Beyond this I&amp;#8217;m being a little more critical by saying it just doesn&amp;#8217;t feel polished. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; Hands down the best experience in mobile today. Very polished product built for debugging (after all Microsoft is a product company). The only thing I would ask for (if it&amp;#8217;s not already available) is the ability to execute a LINQ statement in the debugger.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;layout&quot;&gt;Layout&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to build a view on the platform.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; When I built my first hello world app for iPhone I remember building the layout by hand in objective-c. This was in part because I was afraid to learn the drag n drop interface builder style of front-end development. I had this misconception from my early webforms days on the Microsoft stack that drag n drop would eventually cause me a great deal of regret. This wasn&amp;#8217;t the case with interface builder on the iPhone stack. I found the ability to drag a given control on the form and wire it up a time saver long term. The only learning curve was how to wire up the stuff I was dragging around, but even that wasn&amp;#8217;t much of an issue for view specific work.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; If I said Android layout was the IE6 of mobile development it still wouldn&amp;#8217;t fully describe the pain I felt building xml based layouts for the platform. For starters the tool I was using, Intellij, offered no preview of what the xml I was working on would actually looked like on a phone. This made the feedback cycle painful because I would change some xml, push it to the slow emulator (more on the emulator below) and pray it worked. Other tools do exist to help build layouts but to this day I still use an older unsupported tool called DroidDraw to get the general structure in place. Lots of work could be done to improve this process as it&amp;#8217;s typically the slowest part of the Android development process for me personally.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; If you are not familiar with XAML it&amp;#8217;s yet another XML based markup language of sorts. I found it fairly simple to build even the most complex layouts. In addition the preview tooling inside Visual Studio was rock solid. I never once had something look one way in the preview and another on the phone itself.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;images&quot;&gt;Images&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The level of comfort I had using images in my commercial apps.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; At the time I&amp;#8217;m writing this the iPhone has 2 resolutions to support. When you build your images you need 2 versions, one in 326 dpi *(iphone 4 / 4S) and one in 72 dpi for the other iphone models. To get this for free in your app you mark the 72 dpi as foo.png and the 326 dpi as foo@2x.png (the phone takes care of the rest)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; As someone new to the platform I froze like a deer in the headlights when I noticed a separate layout folder for small/med/large displays. I instead decided not to use custom images for my buttons,etc and just use native buttons with colors (sadly). The app still looked decent when I had finished, but I honestly didn&amp;#8217;t have enough Android devices to test all the different resolutions. Fragmentation to the max ...&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; The best part of WP7 is that one resolution exists, so you only need one image and if it looks good on a single phone you are good to go. This was a nice change from the Android development I was doing at the time.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;tooling&quot;&gt;Tooling&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The quality of tooling used to build my first app on each platform.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; I could bash Xcode until the end of time but instead I will say that they are making solid improvements and the product will eventually be something I can use on a daily basis. But to be clear for anyone new to the platform - it still has a long ways to go before I can recommend using it for objective-c development (again much prefer AppCode from jetbrains). From the Xcode 3 days I still fear any automated refactoring in the IDE.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; As I stated in the above debugging section - Intellij is a rock solid IDE and It&amp;#8217;s very TDD friendly. I use this at my day job and love it for Android development - nuff said&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; I put an asterisks next to this grade because if you are using the free tooling it&amp;#8217;s sorta limited. You can&amp;#8217;t use any plugins for example - and in my experience this is a HUGE limitation because I personally can&amp;#8217;t use Visual Studio without Resharper. So if you have the $$ for a professional/ultimate version of Visual Studio 2010 and another $200 for ReSharper this is by far the best tooling for mobile development hands down. If you are stuck with the &amp;#8217;free&amp;#8217; tooling I can&amp;#8217;t say the same ...&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;emulation&quot;&gt;Emulation&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The quality of the platforms emulator/simulator (does it match a real device/actual speed of the emulator/etc)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; One of the best parts of developing for the iPhone was how quickly the simulator launches apps. Even though this isn&amp;#8217;t a direct emulation of the app on native hardware I&amp;#8217;m yet to find something that didn&amp;#8217;t work on the phone but did on the simulator and vice versa (excluding gps like features of course).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; Worst part of android development next to building layouts. The emulator started with a great idea &amp;#8217;lets match exactly what Android will be like on a phone&amp;#8217; - but in practice they sacrificed speed. This effected my development because it caused my feedback cycle to be very long, meaning even the smallest change was painful to verify. In addition I had the emulator cover up a SQLite problem when I was working between 2 physical devices (more on this below). In the end a good work-around for this was to plugin a real phone and use this directly instead of launching the emulator to verify my work.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; The simulator is blazing fast so feedback was quick and painless. I was able to test multi-tasking and even gps location code with the new GPS tooling in the Mango SDK. I Never found a single problem between what a phone would render/do vs the simulator I tested with, except on GPS issue. On a real phone you can toggle off the network services and use this to see how your lack-of GPS error handling works. But on the simulator you don&amp;#8217;t have the option to toggle this setting (caused me some grief as I don&amp;#8217;t own a real device currently).&lt;/p&gt;	

&lt;h2&gt;&lt;a name=&quot;localinstall&quot;&gt;Local Install&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The ability to install your app on hardware locally (without paying $$ to do so) and the effort required to do this as a n00b&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; I started developing for the iPhone when I only had the first generation device. I&amp;#8217;ve been a fan of jailbroken phones for some time and found this process to be easy enough. I didn&amp;#8217;t want to pay the $99 until I had a great app that would in turn make money so I simply pushed the compiled app over to my phone via scp (more on this technique at &lt;a href=&quot;http://stackoverflow.com/questions/37464/iphone-app-minus-app-store#37522&quot;&gt;stackoverflow&lt;/a&gt; if you are interested). I did drop the grade here because to pass along your app to a beta tester over the air would require you do 1. spend the $99 or 2. jailbreak their device and scp it over on a local network (and most of my friends don&amp;#8217;t want to be jailbroken)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; The best option by far on all the platforms. No need to spend any money (not that $25 is a large amount) - just plugin a phone and push the apk over to see if it works. For beta testers just email them the apk directly (if they have an SD card it can be installed directly -how could this get any better right?) **note does increase the ease in which your app can be pirated sadly so be careful if you do this with people you don&amp;#8217;t trust&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; I decided not to rate this category for WP7 because I never owned an actual device. I borrowed a device for 6 days to verify everything was rock solid before I shipped the first 2 apps I built on the platform but because it wasn&amp;#8217;t my phone I just paid the $99 and opted not to jailbreak it (as I&amp;#8217;ve heard you can). But because I didn&amp;#8217;t take the time to side-load an app myself I&amp;#8217;m not sure about the level of effort required to do so.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;devicetesting&quot;&gt;Device Testing&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The issues I ran into when I tested my apps on a phone directly and how many are required to make sure they were RTM ready.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; Just before I finished my first app Verizon had released the iPhone 4 and I had bought it. Prior to this I had the first generation hardware so for me testing the app on both phones was a non issue (as I had both a 3.x and 4.x phone at the time). Also as I had a device for each supported resolution this helped me prove each app was ready for 3.x and 4.x customers. The only thing I really couldn&amp;#8217;t test in the simulator (aside from how do they look on each resolution) was gps specific features. In the future I might only support the 4.x devices so testing on a device with iOS 3.x (and older) might be a non-issue.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; When you talk about physical device testing for Android you have to start with the f-word. Fragmentation to the max sadly. I knew lots of resolutions/versions existed in the wild so I found 2 phones on craigslist for less than $100 to test with. The first was a popular phone I figured tons of people had (the Droid 2) and the other I was unsure of but for $25 I figured it was worth it (the Droid Eris). Both had different versions of Android and both seemed to display things the same (visually anyway). But I did find a few issues programming -one with GPS lookup and the other with my SQLite code. So I fixed these issues and assumed all was well with my app. So after finishing what appeared to be a rock solid v1.0 of my app, I shipped the app in both the (Google) Android Market and the Amazon Android Market. I soon found that my app had 2 other issues when the Amazon Android app store review process started. So I had to call on friends/family to verify and fix the new bugs in question because I couldn&amp;#8217;t reproduce them on any of the devices I owned. Long story short - it was very very painful to make sure the app looked/functioned exactly the same across all devices.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; As I don&amp;#8217;t own a device I went to craigslist and found someone willing to let me borrow a device for 6 days. I spent $50 and verified a few GPS things as the rest of my development was an exact match with the simulator. The only real issue I had with the simulator as my sole development phone is that persistence is reset once you push a new xap over or re-launch the simulator directly.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;publishing&quot;&gt;Publishing&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of effort required to publish your app in the AppStore/Market/Marketplace&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; I still remember almost giving up when it came time to publish my app in the AppStore for the first time. First you had to create a valid cert for this, and another cert for that. Then locally you had to get your project configured correctly to use the distribution cert and build it /etc. Assuming you got all that figured out and pushed the app to the next phase (review) ...good luck. The first time you submit expect a rejection for something. Work through it and keep your spirits high (remember you learned objective-c for this moment). They do a good job of finding everything in 1 go and its usually done within 2 weeks the first time you submit a new app. Updates to an existing app take between 2 and 4 days usually. By far the most complex/painful part of the iOS development experience *(and you thought learning objective-c would be the hardest part)*&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; Very simple process (with the current DRM process I used -not the new licensing model). Put a min Android version in your xml file, add a version or bump it up and build the project. Ask your IDE to take a keystore and build the final apk for the Market. Upload it - done (no review from what I&amp;#8217;ve experienced). One small note about the Amazon Android Market -- don&amp;#8217;t waste your time. I&amp;#8217;m yet to have a single sale here and find that most customers only download this to get the &amp;#8217;free app of the day&amp;#8217;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; Change your compile options from debug to release and do a build. Pay the $99 and push your xap into the Marketplace. The review process took about 5 days for a new app. I&amp;#8217;m yet to do an update so I&amp;#8217;m not sure if it gets better/worse. Overall not a bad process to get your apps in the store.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;sales&quot;&gt;Sales&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Definition: The amount of people willing to pay $$ for your app (in my experience)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;iPhone:&lt;/b&gt; By far the most lucrative app market you can be a part of without a doubt. If you have a product be sure to launch on this platform first. Without talking numbers directly I usually have 500% more iPhone sales than Android in the same period. People don&amp;#8217;t mind paying money for apps and that is a good thing if you like to get paid building apps on the side as I do.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Android:&lt;/b&gt; A few months ago I would have said stay out of this market altogether. But recently I&amp;#8217;ve seen an upswing in sales that makes me think it just takes time to get off the ground. I actually got into mobile dev in the first place because a good friend of mine make some serious $$ with an Android app that was much needed at the time. I would recommend you build your commercial apps for this market last because the ROI just isn&amp;#8217;t their yet. That said, the Android market it is still a place you can make money if you have the right app. Also people seem to find apps in this market without much effort (glad Google got that much right).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;WP7:&lt;/b&gt; I&amp;#8217;ve only had my apps in the WP7 Marketplace a few weeks now but I&amp;#8217;m happy with sales so far because I know the install base is much smaller. I also have 2 apps that I feel are much needed in the Marketplace today and as with anything you must have a great idea to sell your product (along with some rock solid software to get the word of mouth sales). In general the sense I get is that people on the platform are willing to pay for apps (similar to your average iOS customer).&lt;/p&gt;</description><pubDate>10/06/2011</pubDate></item><item><title>My Love-Hate Relationship With Mock Objects</title><link>archive/2011/08/30/My-Love-Hate-Relationship-With-Mock-Objects</link><description>&lt;p&gt;I first learned about &lt;a href=&quot;http://martinfowler.com/articles/mocksArentStubs.html&quot;&gt;mock objects&lt;/a&gt; when I started wrapping unit tests around a &lt;a href=&quot;http://www.objectmentor.com/resources/articles/WorkingEffectivelyWithLegacyCode.pdf&quot;&gt;legacy system&lt;/a&gt; back in 2007. In the context these mock objects helped me isolate tricky behavior that I wouldn&amp;#8217;t have otherwise been able to test. &lt;/p&gt;

&lt;p&gt;I still remember spending a great deal of time learning about the various mock frameworks available for .net. Strangely enough this was also the time I became obsessed with &lt;a href=&quot;http://codebetter.com/davelaribee/2009/11/13/code-coverage-what-is-it-good-for/&quot;&gt;code coverage metrics&lt;/a&gt;. And like a perfect storm these two concepts pulled my attention toward writing a test &quot;just to write a test&quot;.&lt;/p&gt;

&lt;p&gt;After the project ended I remember thinking to myself&lt;/p&gt; 

&lt;blockquote&gt;&lt;p&gt;wow this testing stuff is awesome, heck I was able to test everything in that darn system!&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;It wasn&amp;#8217;t long after this triumphant moment that a co-worker had to make a slight modification to that legacy code base. And just minutes after reviewing the change it was clear the tests I had written didn&amp;#8217;t help the development process in any way. In fact it looked as if all new feature development would take twice as long because each test would need to be rewritten as the mocks I riddled all over the code had made the tests extremely brittle.&lt;/p&gt;

&lt;p&gt;So from what I considered a &quot;learning opportunity&quot; I took away this notion of mocks causing more harm than good. I came to this conclusion because of my own (mentor-less) experience writing unit tests after the implementation was already in the wild.&lt;/p&gt;

&lt;p&gt;And in the test-after sense I was feeling a lot of pain around mocks not because mock objects are intrinsically bad, but because the code itself was rotten. You start to see this pattern emerge when you adopt true test-first practices and it&amp;#8217;s a sign that you need to refactor. But in my early test-after experience I didn&amp;#8217;t understand this pain point so I never refactored enough to improve the design of the legacy system I happened to be working on.&lt;/p&gt;

&lt;p&gt;At this point the problem I had with mock objects was that when I tried to refactor the code under test each test itself had to be rewritten because the test knew very explicit details about the implementation. So when the implementation changed it caused the tests to fail for no good reason. And the more I learned about test-first development the more importance I placed on &quot;tests should know what, not how&quot;&lt;/p&gt;

&lt;p&gt;This caused me to reflect on how I was writing my test code and I had decided that the #1 goal (at the time) was &lt;a href=&quot;http://langrsoft.com/blog/2008/07/realities-of-test-after-development-aka.html&quot;&gt;regression testing&lt;/a&gt;. So with this I decided to avoid using mocks altogether in hopes that my implementation could be refactored without having to worry about brittle tests.&lt;/p&gt;

&lt;p&gt;During the year that followed I spread a great deal of negativity about mock objects. I rarely wrote a mock object and when I did need some form of mock/stub to help me isolate behavior I hand rolled it to prevent what I called &quot;mock abuse&quot; or &quot;overmocking&quot;.&lt;/p&gt;

&lt;p&gt;But earlier this year I started to see a strange pattern emerge in my production code. No longer did I see dependencies mixed in with logical statements, instead classes either delegated to a dependency or they performed a calculation of sorts directly.&lt;/p&gt;

&lt;p&gt;With this new pattern in my implementation I soon found my test code easier to read because classes were smaller and did just one thing. It was at this point that I noticed a shift in what I valued about tdd. It was moving from regression testing to the &lt;a href=&quot;http://toranbillups.com/blog/archive/2011/06/14/Test-Driven-Development-Is-A-Design-Activity&quot;&gt;design process&lt;/a&gt;. (not to say that regression testing is worthless)&lt;/p&gt;

&lt;p&gt;So with this revelation (ah-ha moment if you wish) I began looking at the delegation classes I was writing. These classes had gone without any tests up to this point because I refused to write a mock object for &quot;interaction&quot; based testing. Beyond the dogma that was a sickness all its own I realized that if I was writing these &quot;delegation heavy&quot; controller like classes the mocks would tell me when I&amp;#8217;m adding to many dependencies. So I put aside this blind hatred of mocks and embraced the test friction as a symptom of &quot;it&amp;#8217;s time to refactor&quot;. &lt;/p&gt;

&lt;p&gt;When I look back at my own &quot;love/hate&quot; relationship with mock objects it&amp;#8217;s hard not to ask the question &quot;what&amp;#8217;s your relationship with mock objects like today?&quot;&lt;/p&gt;</description><pubDate>08/30/2011</pubDate></item></channel></rss>
