Kilt and Code
Kilt and Code
Creating a Web API Using Only the .NET CLI and Visual Studio Code

Creating a Web API Using Only the .NET CLI and Visual Studio Code

Have you ever wondered if you could use the .NET CLI and Visual Studio Code to build a new .NET application, instead of relying on Visual Studio to do all of the heavy lifting?

Using MERGE in SQL Server to do an INSERT or UPDATE on a Table

Using MERGE in SQL Server to do an INSERT or UPDATE on a Table

I’ve never really made much use of the MERGE statement in SQL Server, but the other day I wanted to do either an INSERT or an UPDATE on a table, depending on if there’s a match on a particular column.

2 Years of Kilt and Code

2 Years of Kilt and Code

It’s been 2 years since I wrote the first article for this website, and nobody is more surprised than me that I’ve not got bored with it yet. Seriously - there is a shockingly high percentage of blogs that fail after the first few months, and I’m just glad this one hasn’t (yet!).

Using Verify, Setup and Callback in the Moq Mocking Framework

Using Verify, Setup and Callback in the Moq Mocking Framework

Back in 2019 I wrote an article on Best Practices for Writing Unit Tests in C# for Bulletproof Code. This has become one of my more popular articles, and despite it approaching 2 years old, the best practices mentioned are still relevant today. I touched upon the popular mocking framework Moq, bu...

Using MediatR Request Handlers in ASP.NET Core to Decouple Code

Using MediatR Request Handlers in ASP.NET Core to Decouple Code

MediatR, by it’s definition, is a simple, unambitious mediator implementation in .NET. It was released in 2014 by Jimmy Bogard and is a useful package that can be used to implement the popular mediator pattern in .NET projects. It’s available on NuGet and is also open-source on GitHub.

How to Install and Use SQLite on Windows

How to Install and Use SQLite on Windows

Unlike modern versions of macOS, SQLite isn’t installed by default on Windows. If you’re using Windows like I am, you need to complete a few extra steps before you can start using it.

Scrape the 500 Greatest Albums of All Time using Puppeteer Sharp

Scrape the 500 Greatest Albums of All Time using Puppeteer Sharp

As a keen Spotify user that is always in search of new albums and artists to listen to, I was particularly interested when I heard that Rolling Stone magazine announced a new, updated list of their 500 Greatest Albums of All Time for 2020.

Show Validation Error Messages for Reactive Forms in Angular 9

Show Validation Error Messages for Reactive Forms in Angular 9

In Angular there are two different types of forms for a user to input data: reactive and template-driven. I personally prefer using reactive forms as they seem to follow the separation of concerns principle, where the core functionality is in the component and the presentation layer is stored in ...

How to Create a Time-Based Caching Service for Angular

How to Create a Time-Based Caching Service for Angular

If you’re interested in building a caching service for Angular that will store the observable for a HTTP call in cache, there is an excellent article by Yury Katkov that will explain exactly how to do this using RxJS.

What Is the Angular Template Syntax and How Does It Work?

What Is the Angular Template Syntax and How Does It Work?

Have you ever looked for a piece of HTML in the code of an Angular app and found something similar to <ng-container *ngTemplateOutlet=”navBarTemplate”></ng-container> instead?

Play Nintendo 64 Games on Your PC Using Project64

Play Nintendo 64 Games on Your PC Using Project64

I think most gamers would say they have a favorite “all time” video game console. Maybe you don’t have one, or maybe you’ve got a few, but for me it has to be the Nintendo 64.

How to Add Bootstrap 4 to an Angular 10 App

How to Add Bootstrap 4 to an Angular 10 App

I was trying to add Bootstrap 4 to an Angular 10 app recently and it was more difficult than I expected. We’re able to add Bootstrap 4 easily using NPM (Node Package Manager), but we still need to install and configure the scripts and dependencies. This can result in a visit to StackOverflow whic...

Delete Unused Images from a Jekyll Website using Powershell

Delete Unused Images from a Jekyll Website using Powershell

When I moved my website from WordPress to Jekyll, a lot of unnecessary images were transferred over that were increasing the size of the GitHub repository by as much as 40%.

How to Create an Angular 9 App From Scratch

How to Create an Angular 9 App From Scratch

Roughly a year ago I was beginning a new job where one of the requirements was to use Angular on a daily basis. There was only one problem, I’d never used Angular before. I’d been honest in the interview, saying I’d had a brief introduction to the React framework, but not Angular. Thankfully they...

My Thoughts on Microsoft Build 2020

My Thoughts on Microsoft Build 2020

Microsoft Build 2020 is over for another year, but for those of us that didn’t get a chance to watch the live stream, now is the perfect time to watch all of those sessions recorded over the last few days.

Creating Your Own Custom Attributes in C# and Retrieving Their Values

Creating Your Own Custom Attributes in C# and Retrieving Their Values

You would think after using a programming language for years that you’ve seen it all - we all know this simply isn’t the case. Custom attributes is a feature of C# that I had seen being used by others, but had never actually used myself. Well, it’s time to change that!

The Making of Visual Studio: Channel 9 Documentary

The Making of Visual Studio: Channel 9 Documentary

If you’re like me, you’re currently in self-isolation during the COVID-19 pandemic - spending a lot more time indoors than usual.

How to Create a Blog Using Jekyll and GitHub Pages on Windows

How to Create a Blog Using Jekyll and GitHub Pages on Windows

Nearly a year ago I migrated from the popular blogging platform WordPress to the static site generator Jekyll. Why am I and thousands of other bloggers deciding to move to a static site generator? It’s a no-brainer! Why should we install security updates, manage plugins and tune the performance o...

My Journey to Becoming a Full Stack Developer

My Journey to Becoming a Full Stack Developer

Do you remember the early 2000’s when there was no Facebook, YouTube or iPhone? The technology landscape was very different at the time.

25+ Visual Studio Code Extensions That Are Worth Installing

25+ Visual Studio Code Extensions That Are Worth Installing

Visual Studio Code is a code editor that has me falling head over heels for full stack development all over again. Visual Studio’s younger sibling, Visual Studio Code is built using the Electron framework, is open source and was recently announced as the default development environment at Faceboo...

Using Angular 8 to Create a Simple Form with FormBuilder

Using Angular 8 to Create a Simple Form with FormBuilder

If you’ve chosen to use Angular to build the UI for your web application, or find yourself using it in an existing project, the chances are high that you’re going to create a form at some point. When I was searching for how to build one myself, I found there were several contradicting examples fo...

Coming to Canada: Immigrating to Toronto as a .NET Developer

Coming to Canada: Immigrating to Toronto as a .NET Developer

In January 2017 I immigrated to Toronto, Canada with my wife (a Canadian citizen born in Toronto). We met in Glasgow, Scotland where she was studying as an international student and after dating for a few years, we married in Edinburgh in January 2016. A year later we’d been told by the Canadian ...

Microsoft FrontPage: Revisiting the WYSIWYG HTML Editor in 2019

Microsoft FrontPage: Revisiting the WYSIWYG HTML Editor in 2019

In the late 1990’s and early 2000’s, before platforms such as WordPress and Squarespace offered non-programmers the ability to build websites, there were WYSIWYG (What You See Is What You Get) tools, one of these being Microsoft FrontPage.

Best Practices for Writing Unit Tests in C# for Bulletproof Code

Best Practices for Writing Unit Tests in C# for Bulletproof Code

In my experience, developers have a love hate relationship with unit testing. I don’t know if some find it tedious, or some just don’t see the value in writing code to verify if other code works.

Puppeteer Sharp: Crawl the Web using C# and Headless Chrome

Puppeteer Sharp: Crawl the Web using C# and Headless Chrome

Puppeteer Sharp is a port of the popular Headless Chrome NodeJS API built by Google. Puppeteer Sharp was written in C# and released in 2017 by Darío Kondratiuk to offer the same functionality to .NET developers.

Azure Logic Apps: How to use Microsoft’s Serverless & Codeless Integration Platform

Azure Logic Apps: How to use Microsoft’s Serverless & Codeless Integration Platform

Azure Logic Apps is a powerful serverless integration platform released by Microsoft in 2016. The definition of a 'Logic App' is open to interpretation (in my opinion), as the user defines what the Logic App is by integrating many different applications and services to accomplish their goal.

How to use Azure Batch Job Schedule

How to use Azure Batch Job Schedule

This is a follow-up to the article ‘Using Azure Batch to Orchestrate and Execute Code at Large-Scale’. If you are unfamiliar with Azure Batch, you may find it useful to read this first.

Using Azure Batch to Orchestrate and Execute Code at Large-Scale

Using Azure Batch to Orchestrate and Execute Code at Large-Scale

Azure Batch is not a new technology by Microsoft, but for some reason it doesn’t seem to be receiving as much attention as similar Microsoft cloud platforms: Azure Functions and Logic Apps.