Modulo arithmetic in everyday life and code

Despite its scarily maths-sounding name, I suspect that you have already come across modulo arithmetic, even though it probably didn't have that name. In this article I'll go into a few examples of modulo arithmetic in the everyday world, and how the practical limitations faced by computers cause modulo arithmetic to crop up when you … Continue reading Modulo arithmetic in everyday life and code

Balanced trees

In a previous article on complexity, i.e. performance trends in code, I said that trees can be useful ways of storing data, but they only work if they’re reasonably well balanced. In this context, balanced means that no path from the root node of the tree to a leaf node is much longer than any … Continue reading Balanced trees

Building computer systems via problems rather than solutions

When it comes to building computer computer system, even something as simple as storing the name and address of universities can be surprisingly complicated and messy.  While the mess and complication often can’t be avoided, knowing what the end user needs are can help you come up with the best way of tackling them. “Just” … Continue reading Building computer systems via problems rather than solutions

Fuzzy matching – context and testing

This is the third article in a short series on fuzzy matching:  Introduction  Example algorithms  Testing and context  In this article I will consider the difference between context-dependent and context-independent fuzziness, and think about how fuzzy matching systems can be tested.  Context-dependent and context-independent fuzziness  If you are trying to do fuzzy matching of strings, … Continue reading Fuzzy matching – context and testing

Fuzzy matching – example algorithms

This is the second article in a short series on fuzzy matching:  Introduction  Example algorithms  Testing and context  In this article I will go into three algorithms that are examples of fuzzy matching – Levenshtein distance, Dynamic Time Warping (DTW) and Hidden Markov Models (HMMs).  Levenshtein distance  The Levenshtein distance is a way to do … Continue reading Fuzzy matching – example algorithms