concept failure in category python

appears as: failure, failures, failure
Practices of the Python Pro

This is an excerpt from Manning's book Practices of the Python Pro.

Planning out a software system will help you uncover areas that present risk. You can identify where sensitive user information might be exposed to a vulnerability. You can also see which pieces of the system might be performance bottlenecks or single points of failure.

Chipping off pieces of an application to put them in new locations introduces new, exotic modes of failure. All applications may be running properly, but the network connection between them may fail. Most applications may be able to access a database, but one may not. Distributed systems techniques seek to withstand and recover from these modes of failure.

Hello! Python

This is an excerpt from Manning's book Hello! Python.

That covers all the potential things I can think of can go wrong, but it’s important to note that testing failures like this is an ongoing process. In other words, the failure tests aren’t final. Especially with more complex functions, there may be bad input or data which will cause errors you haven’t considered. When you find input like that, you should consider it a bug in your program. But the fix is easy: add either another unit test or an extra case to your failure test that will cover the failure, and then fix your code so the test passes.

Although reading data directly from the web is a useful tool, it’s not without its drawbacks. The main issue is that web pages change frequently, and your parsing code may need to change with it. You can lessen the risk somewhat by focusing on the elements of the page least likely to change, such as ID or class variables, but you’re still at the mercy of whoever creates the page. If at all possible, it’s usually much better in the long term if you can rely on official channels, such as a published API for accessing data, rather than doing it all yourself. Later, we’ll look at strategies for dealing with failures in your script and how you can mitigate them.