Test Driven Development

It is a buzzword that has been around for ages now, and when I first heard it I thought it was more hassle than it was worth. That was because management had decided to introduce it into an already established project. That doesn’t work. It is better to start to implement it when a project starts.

Ideally you have a design which separates the “business logic” from the interface. For example, with WebcomiX, the whole Comic and navigation and refreshing was in a stand alone library. It was easy to add unit tests to check that …

  • A GenericComic loaded its config data correctly.
  • The ComicCollection loaded a lot of GenericComics correctly.
  • The StatusRefresher refreshed the favourite GenericComics correctly.

If every on screen button just calls a method on one of your models, then it is easy to simulate the app in use without actually having an app yet. You do this iteratively as well. You start with your basic classes and get them working in tests. Then you add the more complex ones and get them working in tests. You know at any time that if the unit tests start failing then you have broken something. It is much easier to debug tests than it is to debug a full application.

Of course, if you change how something works, you have to change the tests as well. Don’t let tests stay broken for too long or you might as well forget about them. If they are not passing then they aren’t doing their job.

Symb*!!*cks

Is “symbolicating” really a word? Apple seem to think so. When you get a crash log back form them they have removed all the symbols (names of your classes and methods) and replaced them with numbers. To find out where your app crashed, you have to replace the numbers with their original symbols. They give you a tool but it is not easy, and they call the process “symbolicating”. Personally I would call it “symbolizing” as you are replacing one thing for another that represents it.

WebcomiX 3 Released

It has taken a couple of months but I clicked the publish buttons on iOS and Android yesterday and … it turns out there was an #IFDEF DEBUG section that I had forgotten about. So, Apple politely informed me it wasn’t working and a quick rummage through the crash log told me why. Resubmitted it with an updated android version as well. They hadn’t mention ed it was broken but it would have been.

Then there was an issue with M$ AppCentre. This handles analytics and crash reports for your app. The Android version worked fine. The iOS worked fine on the simulator and my devices. When Apple installed it though it crashed. Turns out I was using the Xamarin method of starting the appCentre rather than the Xamarin.Forms method. It took a while to re symboilize the crash logs but once I had done that I could see where the problem was.

As I speak, both apps are live in their respective stores.

Hello to the new redfivesoftware.com

So, new website. Went for WordPress in the end. Not sure that is wise as it seems to be written in PHP, the one language I swore would never sully my CV. Still, I have got something up and running n an hour, so that’s good.

Contact Info

Copyright 2019 Red Five Software Ltd ©  All Rights Reserved