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

Recursion and iteration – an introduction to iteration

This is the first of a series of articles about recursion and iteration Introduction to iterationIntroduction to recursionMutual recursion and tail recursionBlurring the linesLoop unrolling Recursion and iteration are both techniques for doing some work (or similar work) repeatedly, so that you can solve a bigger problem. This could be things like summing all the … Continue reading Recursion and iteration – an introduction to iteration