DEFECT CONTAINMENT

Bugs

Faults

Failures

Devs

            Defect Prevention
        
            Defect Removal
        

REMEMBER OUR TARGET AS SOFTWARE ENGINEERS: REDUCE AND MINIMIZE IMPACT OF DEFECTS

TODAY WE ARE GOING TO TALK ABOUT MINIMIZING ITS IMPACT

TEACHING NOTES

Available at:

 

http://dcoloma.github.io/software-quality/all.html#assertion-driven-development-design-by-contract

 

 

ASSERTION DRIVEN DEVELOPMENT AND DESIGN BY CONTRACT

Deffensive Programming

Including in the Software as many check as possible...

 

What if... just in case... for the sake of being on the safe side...

Design By Contract

Real World Contract

when a contract is exhaustive, there is a guarantee that all the obligations are related to the benefits

Software Contract

If all the subtasks are completed correctly, the task will be also finished successfully. If there is a contract between the task and the subtasks, the task will have some guarantees about the completion. Subtasks in software developmentare typically functions, object methods...

Please also think about the Spotify way of working in which they created an architecture that manage every team to deliver different parts of Spotify client independently. It is quite similar, they have divided the main task (the Spotify client) in multiple subtasks (the components of the architecture). If all the components behave properly, the final task will be working properly too.

Design By Contract

  • Preconditions: A certain conditions to be guaranteed on entry by any client module that calls it. It is an obligation for the client module and a benefit for the supplier (no need to handle cases outside of the precondition)
  • Postconditions: Gurantee a certain property on exit. This is an obligation for the supplier and a benefit for the client.
  • Class-invariant: Guarantee that certain properties are not going to be changed on exit.

"What happens if one of these conditions fails during execution?"

Up to the developers

FAULT TOLERANCE & FAILURE CONTAINMENT

TARGET: INCREASE THE RELIABILITY

BREAK THE BUG/FAILURE CAUSE/EFFECT RELATIONSHIP

FAULT TOLERANCE

TARGET: INCREASE SAFETY

MINIMIZE CONSEQUENCES OF FAILURES

FAILURE CONTAINMENT

for instance a medical system could not be 100% reliable but it should be 100% safe

REDUNDANCY IS KEY!

FAULT TOLERANCE

RECOVERY BLOCKS

N-VERSION PROGRAMMING

Failure Containment

https://www.youtube.com/watch?v=yx_XoqXNtRM

https://www.youtube.com/watch?v=0vZwaMg60FM

https://www.youtube.com/watch?v=aayvBkTGZH0

Unidad 5 - parte 2

By Daniel Coloma

Unidad 5 - parte 2

  • 558