Heat maps communicate succinctly how the distribution of a value evolves over time. Performance metrics like latency or API response time often have a complicated multimodal distributions, and summarizing them in single values like mean or 90th percentile for a visualization makes many interesting events invisible. You need to look at histograms to see the full distribution, and that’s exactly what heat maps are: histograms, plotted over time, with color intensity signalling frequency.| The Mindful Programmer
Binary search is one of the first algorithms that people learn. The idea is wonderfully simple: Yet it’s so easy to get the details wrong. In fact, nearly all binary searches are broken.| The Mindful Programmer
The usual algorithms for computing variance and standard deviation work on the full data set. What if you have a time series and want the standard deviation for a moving window? You could do the computation from fresh every time the window is advanced, but surely there’s a better way.| The Mindful Programmer
As you know, computers internally work only with ones and zeros, and everything is represented in some way using these “bits.” Using M bits you can encode 2M different values. Let’s say you’re interested in encoding the signed integers …, -1, 0, 1, 2, …. To make things simple, let’s use a fixed number of bits: for example with 8 bits you can encode 28 = 256 different numbers. One of the numbers is zero, so you are left with 255 bit patterns to be divided between positive and neg...| The Mindful Programmer
With the introduction of SEPA, the use of IBAN is now mandatory for all bank transactions in the Euro zone. This forces almost everyone to migrate their data, replacing national bank account numbers with IBANs. Fortunately this is a fairly simple task: to get the IBAN for an existing account, take the two-character country code, add two check digits, and then the national bank account number you already have. But how do you compute the check digits?| The Mindful Programmer