Calvin and Hobbes said that there’s treasure everywhere. For a sad geek like me, there’s also computer science everywhere. Doing the washing up the old school way involves a metaphor for the computer science concept of queue, if you think of people collaborating around the draining board. Quite a lot of this is a statement … Continue reading Computer science while washing the dishes 1: The Queue
Category: Computer theory
Complexity: Performance trends in code
Introduction If you hang around programmers for long enough, you might hear people use terms like complexity or Big O notation, or say that performance is of the order … such as of the order N squared. I hope that this article makes those terms a bit less confusing. The basic idea is seeing how … Continue reading Complexity: Performance trends in code
Optimisation part 2: Hill climbing and simulated annealing
In the previous article I introduced optimisation. In this article I will go into two optimisation algorithms – hill-climbing and simulated annealing. Hill climbing is the simpler one so I’ll start with that, and then show how simulated annealing can help overcome its limitations at least some of the time. Hill climbing To explain hill … Continue reading Optimisation part 2: Hill climbing and simulated annealing
Optimisation
This post and the next are inspired by episodes of the podcast Linear Digressions. In this post I will describe general stuff – what kind of problem is suited to optimisation, and an overview of what optimisation is. In the next post I will go into some details – two related approaches to optimisation, with … Continue reading Optimisation
Counting – fence panels or fence posts?
Introduction This is a post about fences, but not in the good fences make good neighbours sense that you might expect. (This could be the way into lots of good things about interfaces, encapsulation and so on.) In this post I'm not interested in the things that the fence is separating, but in the fence … Continue reading Counting – fence panels or fence posts?