BDD vs TDD in Android

Posted: April 7, 2011 in Android, Java
Tags: ,

Several firms including PivotalLabs have advocated choosing TDD for android development. Thus, one has to ask what have they forgot to mention is part of the android platform that will force most developers the other way?

Yes, TDD is faster if you execute the process as TDD..no that is not it. Android right now is a slightly crusted fragment platform. What is the most obvious choice to cope with that fragmentation? Let me put another way.

Do you have $1000 per month extra to pay deviceanywhere for their VirtualLab access? Show me the hands!  What can act as a sieve to allow you to make the correct performance, etc choices to target a majority of android OS versions in the market in users hands?

It is these things; the android sdk emulator and some smart programming choices. Think about it, the emulator does not emulate multiple core cpus or gpus which means it perfectly mirrors the low end android device.  Than by choosing BDD over TDD you are forcing yourself to examine those performance choices more closely as you will see them daily in operation as you execute all those BDD tests.

And to be blunt honest running BDD tests while coding in other areas is not that damn hard to make happen. Yes you kind of have to learn how your IDE operates so you can script some tasks, but so what?

Now lets go back to one of the first games on the G1, Replica Island. Guess what sieve they used to force them to make some performance and programming choices that happen to benefit the performance of the game? The sieve they used as the emulator and one G1 device which happen at the time to be very low end.

Now than look in the svn of ReplicaIsland you will see a game engine with very simple but powerful programming choice at its core. A modified mobile java singleton. With that and some other programming choices they got over 30fps on the G! devices.

Its not the agile process. Its going through every tool and process and asking does this tool or process fit within the constraints I have to work with. Now having stated that does an artificial sieve guarantee that you will make the right programming choices? NO, but you will see what happens if you do not right away right before your eyes as visual cues in that the application or game will run slow.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s