Image for post
Image for post
Photo by Josue Isai Ramos Figueroa on Unsplash

For workplace safety, the CDC publishes a “ Hierarchy of Controls” prioritizing different mechanisms for enhancing worker safety from most effective, to least effective. The principals of reducing physical risk can be mapped to reducing risk in software architecture. Even though the stakes may be lower (depending on your industry), writing reliable software is all about identifying, preventing, and mitigating foreseeable errors.


The new ES6 variable declarations let and const have been available in major browsers for several years, but when to use each still causes a bit of confusion. Although everyone has a different style and preferences, the above flowchart is how I choose which one to use. There are more in-depth guides to the exact differences between each, but this is meant to be a simplified way of how to choose without getting too deep into the nuances of the javascript runtime.

Image for post
Image for post

var was the original way to declare a variable. For a while, it had to be used for…


Image for post
Image for post

A few days ago, we had “Food Truck Day” at DealerOn. Say Cheese, a grilled cheese food truck set up shop out front of our Rockville office and word spread quickly. As a line formed, one person in the back of the truck took orders, and two cooks worked the griddle. When an order was received, they used a queue of “tickets” to track orders, and both cooks worked simultaneously to prepare a variety of grilled cheeses. For such a confined space, the system was efficient and well-orchestrated. It struck me that this was a perfect example of an asynchronous…


Image for post
Image for post
Photo by Colin Watts on Unsplash

Technical debt refers to the work that you leave for your future self when you take a technical shortcut in order to finish a project or feature sooner. This might be deploying code before it’s fully documented, tacking a one-off feature onto an existing system that it doesn’t cleanly fit into, or simply throwing in a hack in order to fix a bug. Technical debt acts much like monetary debt and is a surprisingly good metaphor.

Technical Debt Isn’t Always A Bad Thing

Imagine that you’re working on building out the new version of your company’s flagship application. It needs to go to market in a few…


Image for post
Image for post
Photo by Beatriz Pérez Moya on Unsplash

Event sourcing is a software architecture concept that’s based around the idea that instead of focusing on persisting the state of your application, you should persist the stream of events which got it into it’s current state. The classic example is a bank ledger. Instead of storing the value of each account at the current moment and updating those values, instead you store each transaction (event), and the value in the account is just a projection of those events.

Auditability is the most obvious benefit of event sourcing, but it also gives you a lot of flexibility. You can go…


Image for post
Image for post
Avoid Code That Looks Like This — Photo by Markus Spiske on Unsplash

One of the best classic pieces of advice for developers is to write your code as if the next person to maintain it is a violent psychopath who knows where you live. Having occasionally been both the person to write unreadable code, and the person to have to sift through a pot of overcooked spaghetti code, I can’t agree with this more. Readable code is code that’s easy to comprehend, quick to scan, and simple to maintain. Here are some concrete tips I’ve found to help a future developer (or a future you) understand what you’ve written. …


Image for post
Image for post
Photo by Patrick Lindenberg on Unsplash

A first step for choosing a database is to select a general paradigm to use. There are a variety out there: relational, full-text, key-value, graph, etc. Once you make this choice, it is almost invariably tightly coupled with a query language. Relational databases come with their own flavor of SQL and most non-SQL databases use their own domain-specific language, concepts, and constructs.

Despite these differences, at the lowest level, most databases share the same basic “primitives”. They handle transactions, indexes, and fetching blocks of data, all while guaranteeing reliable and safe disk reads/writes. Most databases also provide data replication and…


Image for post
Image for post
Photo of Hourglass by Aron Visuals on Unsplash

I’m a strong believer that performance is a feature and often one of the most important features a website or app can provide. There are plenty of well known statistics about how half a second of added wait time can cause a 20% drop in traffic, or even 100ms can cause a significant drop in revenue. These are good ways to sell the need to focus on performance, but when your website operates at even moderate scale, you can find some really interesting ways to frame performance improvements and see that performance isn’t just about improving your business. …


Image for post
Image for post
Photo by CMDR Shane on Unsplash

Dealing with passwords is a minefield of easy mistakes that could lead to a serious security vulnerability. In this post, we’ll first look at some mistakes to avoid, and then dive into some details of how you should store passwords. In general, the best path is to use a vetted, packaged identity solution such as ASP.NET Core Identity, or skip the need to store passwords altogether with OpenID Connect to support social media logins, but for the sake of this article we’ll assume that you have a compelling reason to build your own solution.

Down The Road Of Failures


CQRS is the concept of separation of concerns between reading data and writing data. At a system level, this can mean that you can independently scale and optimize for reads and writes. At a code level, this generally means focusing on modeling user interactions within your domain, and modeling commands and queries rather than just exposing a data model.

Image for post
Image for post
Photo by Hannah Joshua on Unsplash

This approach fits the bill when working on a major refactor of DealerOn’s “Ignition” OpenID Connect service. The application handles sign-in and sign-out, but also provides an API for creating and managing users. Different user roles have permission to see a…

Eric Damtoft

Software Architect at DealerOn

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