Computers do exactly what you tell them

By their nature, computers follow given instructions exactly. While this is incredibly useful, this also means they will execute harmful or broken instructions with no hesitation. In certain circumstances, this can cost a lot, both in terms of finances, and human lives. It’s important to catch these issues before it’s too late.

Through the duration of this class, I have realized that being able to account for and mitigate mistakes is far more useful and practical than trying for perfection.

 

“The extensive reviews and tests carried out during the Ariane 5 development program did not include adequate analysis and testing of the inertial reference system or of the complete flight control system, which could have detected the potential failure,″
-Quote from The ESA commission report about The Ariane 5 explosion.

 

Ariane 5

sariane 5

Ariane 5 Exploded shortly after launch due to an unhandled exception. An improperly formatted integer was input into a function which could not handle it, causing loss of stability control. Nothing was done when the exception was thrown, eventually costing the ESA millions of dollars.

divide by zero error

In the above image, a divide by zero error is handled in a Lisp program by displaying an error message and replacing the divisor with ‘2’ to prevent the program from crashing or stopping.

 

error message

  • Error messages are visible evidence of proper exception handling.
  • Error messages often appear after a program has already mitigated the issue or stopped itself to prevent damage
  • Properly coded Error messages can be used to convey a problem without compromising security.

 

Accounting for human error

Humans aren’t perfect, and it’s unfair to expect it from them or the things they create. Instead focus should be placed on being able to catch these mistakes before they become too big of a problem. Exception handling is a means of providing a safety net to catch issues before they can cause serious damage. A slightly annoying error message is always preferable to a project going up in flames.

rocket down

Conclusion

  • It is important to be aware of what can cause an exception in order to better handle the issue or eliminate it entirely.
  • Exception handling should not compromise security
  • Exceptions should always be handled to prevent exploits.
  • Errors are often annoying but incredibly useful tools
References
https://www.esa.int/ESA_Multimedia/Images/2009/09/Explosion_of_first_Ariane_5_flight_June_4_1996
https://www.howtogeek.com/thumbcache/2/200/15dfa7058be4f8e50d3e138143ae7e8c/wp-content/uploads/2007/08/image155.png
https://apnews.com/article/1d85f290e31cad8532636fcb576f4788