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
Author: Bob
Testing your view models
In this article I’m going to talk about view models and similar behaviour-free containers of data. I’ll go over why you might want one, and then talk about testing them (yes, really). I use the name view model to make it clear that I'm not talking about models from e.g. machine learning. What is a … Continue reading Testing your view models
Imagination
Imagination might not be the first quality you think of when you think of people who build computer systems. However, I think it’s really helpful for many parts of the process – designing, building and testing it. Old English Digression First, a digression into Scandinavia via UK primary schools. This is my friend Tim Eagling … Continue reading Imagination
Your tests are code too
Imagine if someone submitted some production code for review, which had lots of magic numbers and magic text, lots of repetition, long methods etc. Would you say that code was OK? How much of your unit or integration test code is like that? Seeing the wood for the trees Part of the problem with test … Continue reading Your tests are code too
Tests as sheep dogs for your code
Tests can act as constraints on your code, a bit like sheep dogs herd sheep into a pen. One sheep dog stops the sheep from straying to the left, another stops them from straying to the right, and another moves them forwards towards the pen. The sheep are free to roam where they wish, if … Continue reading Tests as sheep dogs for your code
Competence vs. Tribalism
There is a sometimes tangled relationship between what we can do and how we think of ourselves. I'm going to look at a part of this below. I can't do X because I'm a Y Have you heard someone (or yourself) ever say something of the form "I can't do X because I'm a Y"? … Continue reading Competence vs. Tribalism
Performance optimisation – for machines or people?
I recently watched a video and listened to a podcast that form an interesting pair of opinions about performance. The video is Patterns for high-performance C# and the podcast is SE-Radio Episode 357: Adam Barr on Software Quality. There are two things where the podcast and video have no differences: the system must behave correctly, … Continue reading Performance optimisation – for machines or people?
Unit testing database queries
In this post I will try to describe an approach to unit testing database queries. It happened to be inspired by some testing I was doing of some C# code, but you could apply the same ideas to other languages. Note that if you’re unit testing stored procedures then I recommend using something like tSQLt, … Continue reading Unit testing database queries
Software Engineering Radio Podcast on Web Scale
I'm still working my way through the back catalogue of Software Engineering Radio. I recently listened to a particularly good episode, with Pat Helland. There were a few things specific to web scale, but generally it was good because he explained general concepts very well. I'll mention two of his explanations here, but I recommend … Continue reading Software Engineering Radio Podcast on Web Scale
Mutation testing
Mutation testing is a way of judging the quality of your tests, just as tests are a way of judging the quality of your code. Usually, the tests that mutation testing works with are automated unit tests. In theory it could apply to manual and/or higher-level tests like integration or system tests, but I hope … Continue reading Mutation testing