Blog

Below are some of my recent blog articles.

 

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…

2018-02-18

Random AlphaNumeric Generator

Recently I needed to write a simple token generator for a project. In order to make it print-friendly and easy to read, I decided to make it an uppercase alphanumeric string. The code uses the ASCII (American Standard Code for Information Interchange) numeric representation of the character. A-Z (uppercase) is any number between 65 and 90. To […]

Read More…

2017-09-21

HttpClient Performance Issues

As developers, we all have to write software at some point to talk to various RESTful APIs and end points, this usually involves using the HttpClient, WebRequest or WebClient. Each of these have their advantages and disadvantages depending on your requirements. HttpClient (System.Net.Http) was introduced in .NET 4.5 and provides the simplicity of WebClient whilst […]

Read More…

2017-08-16

YubiKey OTP Implementation

In this article, I will be focussing on YubiKeys that are made by a Company called Yubico. Yubico offer a number of different styles of hardware based on two-factor authentication devices. In my case, I have been implementing the YubiKey 4, using their OTP (one time password) authentication API. Firstly, it is important to understand […]

Read More…