Software Craftsman
Posts tagged Development
Now Reading: Working Effectively with Legacy Code
Sep 16th

I’m attempting to strengthen a weakness in my knowledge, that weakness is working with legacy code or really being able to confidently change legacy code. Legacy code as Michael Feathers puts it in his book Working Effectively with Legacy Code, is simply code without corresponding tests. It doesn’t have anything to do with when the code was written or what obsolete language it was written in, legacy code is code without tests, often poorly implemented code without tests.
The concept of changing this kind of code with any level of confidence is something I’ve struggled with, in fact I’ve had to work on legacy code that was written this year, again proving that legacy code is not necessarily old code. As Feathers puts it, someone may be writing legacy code on your project right now. The amount of legacy code far out numbers the amount of new code.
You know you need unit and functional tests but the biggest problem is how to implement such tests on a system that wasn’t designed with that in mind in the first place. To introduce tests it seems you have to change code, sometimes lots of code, but if you don’t have tests already then how can you do that with any degree of confidence? I would say the current strategies I’ve learned over the years only cover about 20% of the cases, leaving about 80% to slow coding and repeated and mostly redundant manual testing and in the end a little of just hoping for the best outcome. Legacy code sucks, it drains the productivity out of you and cost the stakeholders money with slow development and and increased number of bugs with even the simplest changes.
I’ll let you know what I’ve learned in a full review I will write after finishing this book.
The Good, Bad, and Ugly of Android Market Indexing Sites
May 14th
Sites that provide web-based indexes of applications in the Android Market are very prevalent these days, with new ones popping up and claiming that they can help you sort out the good Android apps from the ones that are well, basically just spam. Some of the top contenders are AppBrain, AndroLib, and AppStoreHQ.
The Bad
From a developer perspective, AndroLib and AppStoreHQ are just outright annoying. Not only do they not keep updated and accurate information about your apps, they are very slow to update them. If you want your app listing on their site to be update-to-date you must register with them and request they update it when necessary. The processes for requesting updates are kludges at best and incomplete, requiring a manual request (email) to update aspects of the listing such as icons and screenshots. App Developers don’t have a lot of time to waste and having to keep emailing the owners of these sites to request updates and going through their kludgy processes is a waste of time, time that could be spent developing better applications.
From a consumer point of view, AndroLib is the worst of these two. Usability on this site is horrible, it performs poorly, and just looks ugly. Information seems cluttered on both AppStoreHQ and AndroLib again pointing to the usability issues of these sites. It should also be noted that AppStoreHQ does not only index just Android apps but iPhone/iPad and plain old web applications as well.
Enter AppBrain
Now here is a site that nails it perfectly, not only do they automatically update all details of your app, they do so very regularly and without any intervention on your part. This is how one of these sites should be done, not only from a developer perspective but also from the view of the end consumer. The site is very minimalistic, performs well, and really has some great market integration features allowing you to sync your installed apps and install from their web site. Not to mention the fact that they have an Android app and they have implemented techniques to filter out those many junk/spam apps that plague app markets.
Conclusion
If you are looking to build one of these sites I suggest you look at AppBrain as a model first. If you are the developer of one of the other sites then I suggest looking at them as well, you might learn something.
