Blog

Below are some of my recent blog articles.

 

2020-02-23

Improving MVVM INotifyPropertyChanged

With a project that uses MVVM (Model-View-View Model) design pattern, INotifyPropertyChanged is often used to detect a property value change in an object. This is particularly pertinent as far as creating a two-way data binding. Typical Implementation Normally, the INotifyPropertyChanged is implemented in a similar pattern to the code below. This is something that makes […]

Read More…

2020-02-23

Time-based One Time Password

A nice easy-to-use RFC-6238 based algorithm, that provides a HMAC-based One-Time Password authentication. The algorithm is based on one outlined in this article here. The interval is in seconds. It dictates how long before a TOTP expires. For example, if a TOTP is generated at 14:20 and the interval is 120 seconds. The TOTP will […]

Read More…

2020-01-10

Windows 10 stuck at loading screen under Apple OS Bootcamp

Recently, I had to tackle an issue with my Apple MacBook Pro that is running Windows 10 under Bootcamp, which I thought I would share in case anyone else finds themselves in a similar situation. Especially with the prospect of starting from scratch. One night I booted-up my MacBook and held down the shift key […]

Read More…

2018-10-16

UK National Holidays API

The UK Government have a useful web page for all of the UK’s National Holidays, such as Easter and Christmas. This can be found with the link here https://www.gov.uk/bank-holidays. In addition to this, there is also a really handy public API, which is the JSON representation of the web page (Just add .json to the […]

Read More…

2018-03-08

Get Substring by text in SQL

In Microsoft SQL, the SUBSTRING allows you extract part of a string using a start index and length. For example: SELECT SUBSTRING(‘hello world’, 2, 3)   Results in an output of ‘ell’. However, there is no ability to select the start and end of the sub-string using known letters or words. The SQL example shown below […]

Read More…