PowerShell module starter kit – updated for 2019

A couple years ago I wrote a PowerShell module starter kit (here). The goal was to provide an example for organizing a module using best practices and provide a live repository you could clone and play around with.

I’ve taken that starter kit module and updated it for 2019. Incorporating some new best practices and new usage patterns that I find helpful. Head over to the GitHub link to check it out!
Continue reading

How to highlight blocked work items on a Visual Studio Team Services sprint board

Today we are going to walk through a helpful modification to the Visual Studio Team Services (VSTS) process and style templates; with the goal of making it easier to find and visualize blocked work.

Note: This post was written right before VSTS re-branded as Azure DevOps. For new instructions for Azure DevOps, visit this link: https://keithbabinec.com/2019/10/08/how-to-visually-highlight-blocked-work-items-on-an-azure-devops-sprint-board/
Continue reading

How to capture and debug .NET application crash dumps in Windows

It is important for software engineers to understand how to analyze process dumps so that they can determine why their application is crashing or behaving unexpectedly. However, it can be hard to know where to start with the process. This post aims to be a starting point for a very common situation: debugging a crash dump for a .NET application running on Windows. A crashing application is easily detected in the Windows Event Log when the .NET Framework logs the error, “The process was terminated due to an unhandled exception.”
Continue reading

Azure WebJobs: Scheduling and Scaling

Why Azure WebJobs?

Azure WebJobs are a great resource included in Azure App Service plans. They provide a way for you to run binaries or scripts that perform scheduled or event-triggered job processing for work that isn’t suited to be done during a normal web request. Have a monthly cleanup task for your website? Sending a big batch of emails? Need to process some user uploaded files? These are all great examples of things you can throw into a WebJob.
Continue reading

How to find users near a central coordinate (spatial nearest neighbor queries)

Scenario

You have a database table of users who have a location specified. Given an input location point, coordinate, or city – find the top N (or all) of the nearest neighbors in range. So for example, if I am in Seattle, return 15 nearest users to my location within a 50 mile range. This is a classic spatial/geography scenario with many applicable uses. I used this technique when building some Tourvival features.

Setup

Our example uses Microsoft SQL Server, or SQL Azure database. Let’s start by making an example users table.
Continue reading