It’s natural for developers to write code from an optimistic standpoint. We write code that doesn’t work, and then we adjust it repeatedly until it gives us the result we want. Hopefully, we also write tests that allow us to verify that the code still works in the future and tests to check that we are handling any edge cases that we’ve become aware of correctly. We can never write tests to cover problems we haven’t thought of yet, so being disciplined with how code is divided and handles the small problems it encounters is the best strategy we have for writing software that behaves ...
11. Fault tolerance
Get Advanced Python Development: Using Powerful Language Features in Real-World Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.