Editorial Note: I originally wrote this post for the SubMain blog. You can check out the original here, at their site. While you’re there, check out some of the products that they offer, including GhostDoc and CodeIt.Right.
If you write software, the term “feedback loop” might have made its way into your vocabulary. It charts a slightly indirect route from its conception and into the developer lexicon, though, so let’s start with the term’s origin. A feedback loop in general systems uses its output as one of its inputs.
Kind of vague, huh? I’ll clarify with an example. I’m actually writing this post from a hotel room, so I can see the air conditioner from my seat. Charlotte, North Carolina, my temporary home, boasts some pretty steamy weather this time of year, so I’m giving the machine a workout. Its LED display reads 70 Fahrenheit and it’s cranking to make that happen.
When the AC unit hits exactly 70 degrees, as measured by its thermostat, it will take a break. But as soon as the thermostat starts inching toward 71, it will turn itself back on and start working again. Such is the Sisyphean struggle of climate control.
Important for us here, though, is the mechanics of this system. The AC unit alters the temperature in the room (its output). But it also uses the temperature in the room as input (if < 71, do nothing, else cool the room). Climate control in buildings operates via feedback loop.
Appropriating the Term for Software Development
It takes a bit of a cognitive leap to think of your own tradecraft in terms of feedback loops. Most likely this happens because you become part of the system. Most people find it harder to reason about things from within.
In software development, you complete the loop. You write code, the compiler builds it, the OS runs it, you observe the result, and decide what to do to the code next. The output of that system becomes the input to drive the next round.
If you have heard the term before, you’ve probably also heard the term “tightening the feedback loop.” Whether or not you’ve heard it, what people mean by this is reducing the cycle time of the aforementioned system. People throwing that term around look to streamline the write->build->run->write again process.