23 Aug 2011. comments
A feedback loop is when information encountered by a system is fed back into the system so that it can respond and make decisions based upon it.
Feedback loops are important for a system since they allow the system to evolve and adapt to change. A great example of this seen in nature is the human body’s temperature regulation. When the body senses the temperature is too high it instructs the body to produce more sweat to cool it down. Without feedback the body would have no way of making the adjustments it needs.
Feedback loops turn out to be extremely valuable in software development as well. Agile development practices all relate to the notion of a feedback loop:
- Unit tests to capture when the system breaks.
- Pair Programming to find out early about a different way to accomplish something.
- Short sprints working closely with customers.
- Stand-up meetings to discuss yesterday/today.
- Code reviews to correct oversights and refine designs.
You may notice something else about these practices; The feedback loops are very fast. Feedback loops that are slow are of little value because by the time you respond to one set of feedback the next may have already arrived which would render your initial response meaningless. In the example of body temperature regulation it’d be pretty useless to have the body react with sweat hours after a temperature change occurs. We want feedback loops to be as fast as possible so that we can find out whats working, whats not working, and what needs to change right now.
- Change something
- Find out how it went
- Learn from it and adjust
- Rinse and repeat
Automation is a great way to achieve our feedback loop goals in software development. In addition to the agile practices above we can also try to implement the following whenever possible:
- Continuous integration
- Increasing the frequency at which code is released
- Automated acceptance tests
- Automated code analysis
A set of tight feedback loops like these can allow us to respond to change rapidly. Every time someone checks in code the automation can tell us immediately whether we are in a healthy state which will allow us to immediately correct any problems if they occur.