They cannot be 100% sure of a bug free system. They can increase their confidence that the system is bug-free by use of [static analysis][1] and testing. Some people advocate [bebugging][2] as a way of estimating how many bugs remain in a system. There are at [least two forms of static analysis][3]. If the system goes wrong then it goes wrong. There are assorted methods to reduce the impact of failures. Having code that checks for consistency and then abandoning a transaction or even restarting a process or the entire system is common One way of doing this uses [assertions][4]. To ensure systems restart after some types of failure [Watchdog timers][5] are frequently used. [1]: https://en.wikipedia.org/wiki/Static_program_analysis [2]: https://en.wikipedia.org/wiki/Bebugging [3]: https://sqa.stackexchange.com/a/16165/6752 [4]: https://en.wikipedia.org/wiki/Assertion_(software_development) [5]: https://en.wikipedia.org/wiki/Watchdog_timer