Troy, lead developer at IniTechMobile, should have known better.

The company was moments away from launching an Android port of their popular app, WereWolfTasks. The task management app plays a video of a transforming werewolf if the user doesn’t complete his to-do list before a full moon. Because IniTechMobile was an iOS shop, they outsourced the Android port to VampMobile, an eastern European company that specialized in iOS to Android ports.

The app launched on Google Play. Almost immediately, complaints flooded Support’s ticket log. "The werewolf video is all smushed when I rotate my phone!" "My tasks keep getting erased every time my phone restarts!" "Why are the tooltips all in Romanian?"

When Troy emailed VampMobile to troubleshoot the issues, he found they had vanished like Dracula transforming into bats.

Well, I know a little Java, Troy thought, as he settled in for a weekend-long debug session. First I’ll look at some of the interface bugs to get my bearings.

The code was as barren and foreign as a vampire’s keep: no code comments, lots of spaghetti logic, and half the method names written in Romanian. He did find a few variable in English, such as "activity_home_854." Digging around, he found the sole instance it was used:


WindowManager w = getWindowManager(); 
Display d = w.getDefaultDisplay(); 
int height = d.getHeight(); 
if(height != 854){ setContentView(R.layout.activity_home); 
} 
else{ setContentView(R.layout.activity_home_854);
} 

Why didn’t they use Android’s built-in scaling utilities? Troy wondered. And what device with a screen height of 854 pixels would need a separate interface?

By the end of the weekend, he felt as though his blood had been sucked dry. WereWolfTasks for Android would get an update that morning, fixing most of the bugs. For some reason, vampires seemed scarier to Troy than werewolves after that.