Browsed by
Category: Software Development

Why Most Unit Testing is Waste

Why Most Unit Testing is Waste


Brian reposts Why Most Unit Testing is Waste by James O Coplien

Note the word “Most” in the title.  The article does seem to argue against unit tests except in certain contexts but seems to mostly describe bad unit tests.

I think there is a place for unit tests but they should not be relied on as much as they are, and they shouldn’t be mandated in all circumstances.

I believe writing and maintaining unit tests can be a much bigger effort than the code they are written to test so the return on investment may make them prohibitive when other types of testing can be sufficient for the amount of effort required.


Be humble about what tests can achieve. Tests don’t improve quality: developers do.

Software engineering research has shown that the most cost-effective places to remove bugs are during the transition from analysis to design, in design itself, and in the disciplines of coding. It’s much easier to avoid putting bugs in than to take them out.

Developers should be integrating continuously and doing system testing continuously rather than focusing on their unit tests and postponing integration, even by an hour. 

For the type of mobile apps I write, with background asynchronous data fetches and event driven flow, I’ve only experienced one solution that worked well and that was a QA team that was well versed with Appium and was able to get a high level of automated regression test coverage in our Android AND iOS application.  There was only a small amount of special coding I had to add to make their job easier such as setting the contentDescription value for a custom view so the value of the view could be determined.

My 3 Monitor Development Workstation

My 3 Monitor Development Workstation

I’ve been working at home with my new company DigitalHarmonyGames.  I picked up a 2nd 23in monitor adding to my work Macbook Pro 17in I now have a triple monitor setup.  I have Unity3d running on one external, MonoDevelop on the other external and I do mail, skype and web surfing on the Laptop screen.  The 2nd external monitor was made possible by the $50 Cirago USB Display Adapter.  The USB adapter works great.  As long as I don’t run full-screen video or run anything that is too demanding on the usb connected monitor the setup works perfectly.

Android’s Fragmentation Problem

Android’s Fragmentation Problem

I like what Nick has to say about the complaints of having to support multiple devices/OSs/screen sizes on Android.

…Just like developing for iOS had an initial adjustment period, it takes time to learn the Android way of doing things. Developers and designers who are unwilling to invest that time just end up creating crappy clones of their iPhone apps.

To those folks, I can only say: remember when you bristled at seeing second-rate Mac ports of popular Windows apps? Remember how you felt about companies that treated your choice of OS as an also-ran?

Sure if I had a choice I’d prefer not to have to worry about different configurations, but that is the appeal of Android. Just like Windows gave users more choices compared to Mac, so does Android compared to IOS.

Android REST client applications

Android REST client applications

The Qliq Android application uses an architecture described in this Google presentation.

A ContentProvider gives access to data retrieved via REST services and cached in a SQLite database.   It is a pretty elegant solution though at times it seems to suffer some performance issues in terms of timely screen updates.

There is a lot to learn about Android.  There is more than one way to solve a problem and the Android SDK provides many patterns and components to get the job done.  The best way to learn is to see how others have solved problems and to simply dive in and try things out.

I recently came across ORMLite as an alternative to SQLite.  Don’t know much about it. I wonder how much use it has on the Android platform.

Android Development

Android Development

I’m sticking my toe into Android Development

Here are some reference links

How to install non-market apps

What version of Android should you develop for?  Many say develop to the oldest version that you can in order to support the biggest market share.  However the older versions are only in a small % of the phones.  The newest versions of Android are not supported in many phones yet.  The sweet spot in my opinion starts at 10% coverage which today is 2.1.  Visit this site for the latest stats.


Setting up application with multiple tabs

UI/Application Exerciser Monkey

Traceview for app profiling

Creating custom title bars

High CPU Utilization and Threads

High CPU Utilization and Threads

If you implement an infinite loop in a thread you may see 50% to 100% CPU utilization. This is because even though your thread may not be doing anything waiting for some event, you are still getting CPU slices unless you make a call to give up the CPU. This is easily done by calling a sleep function such as Thread.Sleep(5000) // milliseconds