Timezones

Xamarin Forms converting from one timezone to another

There is a pattern here, I think. I don’t like to work with dates and you probably know that by now. Anyway, don’t like them, got to work with them. In this episode of Pains against dates, I wanted to write about something very specific that I had the pleasure to troubleshoot last week. I have this very important and somewhat old app where all dates are saved using server local time....

March 16, 2020 · 1 min · LPains
Working with time

Overriding standard date formatting of axios for post/put/patch

Let’s start by pointing out the obvious. It is painful to work with dates. No matter the technology, it is just harder than it should be. Anyway… I stumbled across one of those annoying date related issues with axios. Just to be fair, the problem is not necessarily an axios problem, I just got to it when using axios. By default, axios will use JSON.stringify to convert an object to a json....

February 13, 2020 · 1 min · LPains
Dirty rugby match

Vue router dirty checking before navigation

Ever filled up a form with a bunch of information and then accidentally navigated away and lost all data? Well, that’s frustrating. However, as a developer, it might be tricky to implement such functionality. This post is a practical guide to implementing is dirty checking using Vue, Vue Router and Typescript. TL;DR Code is available on GitHub. Expected behavior In a Vue app with Vue Router, when a user modifies data in a form and any navigation to another route occurs, the user should be notified and have the ability to cancel navigation....

January 11, 2020 · 2 min · LPains

Simple concurrency tester

You probably know how hard it is to purposefully cause a concurrency issue so you can test your code in these edge scenarios. I ran into this issue not too long ago and found that my favorite web service tester Postman doesn’t support sending multiple messages concurrently. I’m sure there are plenty of tools out there that do a great job, but for the simplest possible way you can use a combination of cURL and scripting....

September 6, 2019 · 1 min · LPains

Simple Vue directive for hotkeys

I’m a fan of hotkeys and I use them for a lot of things. In fact, I believe that 80% of the commands I use in my IDEs (Visual Studio and Visual Studio Code mostly) I use via hotkeys. Nothing is better than CTRL + p in VS Code or CTRL + k + d in VS. Anyway, while a lot of users really don’t care about that, those that have data entry intensive use cases will probably appreciate some forethought in hotkeys in the apps they use....

July 26, 2019 · 2 min · LPains