Photo by Stephen Kraakmo on Unsplash

What are Filters?

There are five types of filters in .NET Core

  • Authorization — First to run, determine whether a user is authorized
  • Resource — Runs before after Authorization but before all other pipelines
  • Action — Run code immediately before or after a method is called
  • Exception — Global policy to handle exceptions
  • Result — Run before and after the action is executed successfully

If you don’t know about filters, I encourage you to learn more here. For this article today, we will be…


Photo by Matthew Henry on Unsplash

What is an Immutable Object?

The definition above is fairly straightforward, but I will elaborate. Once an object is created, you cannot change any of the object’s properties. This is essentially creating a read-only object that can’t be updated.

Why do I need to use Immutability?

Leveraging an immutable design can provide many benefits such as

  • Thread Safety
  • Easier Debugging
  • More Maintainable code

In regard to Thread Safety, making mutations to objects that are being accessed by multiple threads can result in unexpected and incorrect results. If you have…


Photo by Mick Haupt on Unsplash

Sorting arrays should be simple right? If I have an array of strings, I want to sort it alphabetically [‘apple’, ‘banana’, ‘cucumber’…]. If I have an array of numbers, I want it to go 1,2,3… and so on. While sorting strings in an array is simple, it gets a little more confusing after that. Let’s walk through sorting an array alphabetically, then dive into sorting numerically and some of the gotchas you can run in to.

Sorting Alphabetically

Lets say we have this array with the names of some produce. To sort an array alphabetically, it’s pretty simple. …


Managing a large set of unique ids for an application is quite daunting, especially as the application grows and scales. HTML element ids are a perfect example, as they are typically scattered across many files and with little coordination. When a couple more developers are added to the mix, bug reports become less of a question of ‘if’, and more a question of ‘when’.

A recent use case I had for this was tracking testing ids in Cypress. …


In my previous article, I demonstrated how to maintain a unique set of ids. While that is extremely helpful, we can take it a step further and incorporate TypeScript IntelliSense to boost our test writing productivity and relieve some of the stress of error-prone copy and pasting.

Using “const assertions” in TypeScript

In TypeScript 3.4, “const assertions” were added as a dynamic new feature that allow us to define read-only string literals from an array.

Using this new TypeScript syntax (don’t forget the ‘as const’), we can export a String Literal Type derived from our array. What does that mean? In simpler terms, if…


I’ve been a Web Dev for awhile now, and one pain point I’ve faced repeatedly is front-end automated testing. I have used Jest and Mocha, and while they are useful, they don’t scratch the itch that my application is being tested well-enough

Luckily, Cypress has come into the fold as of late, providing a solution for end-to-end testing. What is end-to-end testing? In a nutshell, Cypress will click around your web application for you, and if you so desire, will send actual network requests to your server or database and wait for responses. It’s pretty amazing.

After writing a few…


This article is not an introduction to Svelte or TypeScript. If you are unfamiliar with either of these technologies, I urge you to do some individual research before diving into these topics. With that out of the way, let’s get started!

Why Svelte Store

As a React developer in my day job working on larger React applications, I have grown more and more frustrated over time with the scalability of React applications. Lifting state in large nested components was always confusing and repetitive, especially when components were 3+ layers deep. …

Doug Hill

Developer with 5+ years of experience with JavaScript and Frontend Frameworks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store