• Moving to new Virtual (really) Private Server provider

    big brother is watching

    With all the post-Snowden privacy concerns I recently started to consider how much of my data was being stored on US servers, and hence fell under US legislation. It didn’t really surprise me that the answer was ‘quite a lot’, when you consider GMail, Drive, Dropbox, GitHub, Squarespace etc, but what was the alternative?

    Read more
  • Xamain.iOS – Mapping & My Location

    So, you’ve created your MKMapView in your view controller and instantiated a CLLocationManager which you’ve called RequestWhenInUseAuthorization() on. Everything tells you that this should be enough so that when the Map loads and requests the current location iOS will prompt the user whether they want to allow the device to share it’s location – but the prompt is never displayed and neither is the location.

    I watched a Xamarin University course on iOS Mapping (IOS 230) and when I followed along with the exercise using a new project (not the one provided in the course materials) the location was still not displayed. But, when I ran the Completed project in the course materials I was prompted to allow location sharing and when I clicked ‘Allow’ the location was displayed. Looking at the code it did not seem to be any different from mine (but of course it had to be).

    Read more
  • Users, you just can’t please all of them…

    fill lpg listing header

    Recently I released the new version of the FillLPG for Android application as a Beta, that is working but with the potential for a few bugs and missing features. Because of my current work load I have not been able to put as much time into what is essentially a ‘pet project’ so I was running the risk of it never seeing the light of day.

    On the whole it was received very well and there was a lot of positive feedback and feature suggestions. Then there are the ‘1 Star Brigade’ – you know, those who are so disappointed about an app that they just can’t let it go by and can give it a ‘virtual middle finger’ by leaving a 1 Star review – but frequently without taking the time to explain the reason for their displeasure.

    Read more
  • Tuples are Evil and Should be Treated as Such

    While working on a particular area of the a clients code (C#) I came across method with a signature similar to the following:

    public Tuple<bool, decimal, decimal, decimal, int, int> 
        CheckState(int aParameter)
    

    At first glace you may think that there is nothing wrong with this but think about it – what does that bool actually represent? What about the second of the decimal values? Well, the developer had obviously thought about this and had added a comment above the signature – but it only specified 5 values, not the 6 that are in the Tuples definition (that’s because code comments lie).

    Read more
  • Parsing Json Dates from MVC Controller Actions in Client-Side Javascript

    Recently I’ve been working on a couple of MVC projects where I was using jQuery to perform an AJAX call to a controller action which in turn returned some JSON data. This is pretty run of the mill stuff but each time I hit a problem with dates.

    Dates are always a problem in development, whether it’s storing them in a database or displaying them on the screen. How do you deal with timezones and formatting between cultures? As it turns out the solution to my issue was pretty straightforward and a single line of Javascript resolved the problems.

    Read more