Sit down children, and let me tell you a story.

Once upon a time, in a land far, far, away, where computers were made of gingerbread and circuits made from carefully laid 20nm icing, there existed a city of programmer fairies, ruled by a reasonable king and several queens. The fairies used to write software for their king and queens, who in turn exchanged it with other kingdoms for pizza and caffeine based drinks. The fairies coded by the age honoured techniques of old: they wrote some code, then ran it, tested it by hammering away at the ui and then, when it broke, wrote changes to fix the problem. The fairies did this day in and day out, and the amount of time they spent actually writing any code was dwarfed by the amount of time they spent hammering at the UI to check that what they wrote work. The kingdom was doing well enough, and most of the fairies had enough pizza, and almost enough caffeine.

But the fairies were unhappy. Some of them even sang a little minor-key song about how unhappy they were. The work was tedious and dull, and the fairies wanted nothing more than to get on with actually solving problems rather than having to test their code all the time.

Then one day, an especially bright fairy (who for the sake of social-justice, came from a poor family with birth-control problems) decided that they could take away some of the tedium of testing little bits of their software by writing other bits of code which would test the bits for them. With a few of these “tests”, they no longer had to worry how these bits behaved. If it broke, they were told by the test runner goblin, who was fast, efficient, and could run multiple tests at once. It took the fairies time to learn these new “tests”, and it was slow at first (slower than the old method), but the developers felt freer, and were better able to handle the change requests sent down by the king and queens.

Some of the fairies resisted the new ideas, and didn’t trust code to test other code or didn’t trust the goblins to run the code correctly and blankly refused to use the new idea. They believed in their old techniques, and carried on coding and testing by hand. “It had worked for so long, so why change it now?”, they told themselves. When the change requests came down from the king and queens, they found their code brittle, and worked longer hours to fix it. They became embittered and resented the enlightened fairies. They took to the dark, fearing the daylight and all it implied. Some became system administrators.

Then an epiphany came to an especially clever fairy (who for the sake of fairy-tale narrative, may have aspirations towards one of the kingdom’s princessess). They decided that as well as testing individual bits of the software, they could also test overall behaviours of their software. This felt like magic, as now once they had written about the behaviour of a bit of their software, they didn’t have to perform those actions again – the magic did the heavy lifting for them. This was even better, and the kingdom ran even more smoothly! The king and queen were elated, as changes were handled for customers quickly, and the kingdom ended up stockpiling pizza and trading it on the open market.

But the reclusive developers became embittered, and left the kingdom. They hid under bridges and shied away from the light and other developers. They didn’t want to share, they didn’t want to learn, and their bodies became twisted and grey, they lost their wings, and their eyes became bigger, and could no longer look at the light. They became trolls, and cursed the kingdom for what they had become, despite their fate being by their own hand.