Double Programming:
A Strategy for Reliable Code in Production
Want to check if your code works as expected (in production)? Think about writing the same logic twice!
No matter which kind of testings you use during development, real life often just is not that well defined like you want it to be. When you process data, this can change without your knowledge or whatever.
One idea I used already almost 10 years ago, is to write the very same logic twice. Ideally by two different developers. I once even used different programming languages for such a task. Only when both implementations delivered the same result in production, it was accepted.
Usually you won’t do that for everything. But for very critical functions that can be one way to go. Either running both all the time. Or run the sibling only for a given time after an update.
Of course, many things can go wrong. And that’s also why it does not replace other testings. It’s more to make sure that even in production things go great. I found a nice article on LinkedIn from 2015 about this.
What it can be for: Fault Tolerance, Error Detection, Diverse Redundancy, Safety-critical systems.