• Unit Testing with the Xamarin.Forms MessagingCenter

    While we all know that Test Driven Development (TDD) is a good idea, in practice it’s not always viable. It could be a time constraint, a resource issue or the project just doesn’t warrant it.

    While TDD may sometimes be an option, unit tests themselves should really be considered to be a must. They will save you a lot of time in the long run and while they may not prevent you from going grey, ask me how I know, they will reduce your stress levels when bugs raise their ugly heads.

    So, whether you write your tests before you write the code or vice-versa, if you are developing production code you really should write tests to cover it.

    Read more
  • IR35 2020 – Thoughts from the Coal Face

    hmrc logo I’ve been contracting for over eight years now and in that time I’ve been careful to ensure that, to the best of my abilites, I operate in a manner that places me outside of the IR35 legislation. That is, to provide a service to my clients and not to be seen as an employee.

    Currently it is my responsibility to determine the employment status of a role with regards IR35. I do this by having contracts independantly reviewed to ensure that they comply with the legislation and take steps to ensure that the actual working conditions are in accordance with service provision rather than employment.

    If I get it wrong then it is down to me to justify my determination, in court if need be, and pay any unpaid taxes should I be unable to do so.

    However, in April 2020 that determination could largely be taken out of my hands and placed in those of the fee payer, e.g. the client if I’ve been engaged directly or otherwise a recruitment agency that have facilited the engagement.

    Read more
  • AppSettings in Xamarin.Forms

    If you have used ASP.NET in recent years you will probably be familiar with the appSettings.jsonfile and it’s associated, build-specific transformations, e.g. appSettings.development.json and appSettings.release.json.

    Essentially these allow developers to define multiple configuration settings which will be swapped out based on the build configuration in play. Common settings are stored in the main appSettings.json file while, for instance, API Endpoint Urls for development and production deployments are stored in the development and release files.

    At compile-time any values specified in the deployment version of the file overwrite those in the common version.

    Simple – works well and we use it all the time without thinking about it. But what about Xamarin.Forms – it doesn’t have such a mechanism out of the box so how do we achieve this and prevent accidentally publishing an app to the App/Play Stores which are pointing to your development/staging servers?

    Read more
  • Roll my own DDNS? Why Not.!

    Update: Well, there’s certainly more to Dynamic DNS than meets the eye – who knew.

    Investigations led to the decision that I should put my hand in my pocket and spend my time better elsewhere.

    Not that I opted for the overpriced offering from Oracle, signing up with NoIp instead.

    Like many devs I have been known to host websites and services behind my home broadband router and therefore needed a Dynamic DNS resolver service of some description. But in my recent moves to limit my reliance on third-party services – including those provided by Google – I wanted to see what would be involved in creating my own service.

    Read more
  • Sorry Facebook – that’s enough

    crossed out facebook logo Sometime ago I deleted my personal Facebook profile and found that I really didn’t miss it – at all. Quite liberating in fact – you should try it. My departure pre-dated the Cambridge Analytica scandal and was more to do with the garbage that ended up in my feed than anything else.

    That said, recent reports of plain text passwords and other dubious operating tactics of Facebook would have seen me making the same decision to get off the platform.

    But – there was a problem! I had a Facebook business page and it needed an active user account to be associated with.

    Read more