In this short series I describe how I created a Simple Moving Average (SMA)) calculator in C# for a project at work. I start by describing the SMA concept, and build out a simple implementation. In the second post I describe how to make the implementation thread-safe, and in the final post, I show the final implementation used to keep track of the drop-rate for distributed traces.