This article originally appeared on earthli News and has been cross-posted here.
ELI5 is the "Explain LIke I'm Five" forum at Reddit. I recently answered the question "How and why do computer programs crash?" and thought the answer might be worth cross-posting (even though the post itself never gained any traction).
Programs comprise a limited set of instructions that tell them what they should do when they encounter certain inputs under certain conditions.
People write computer programs. Therefore, programs only do what those people can anticipate. Unanticipated situations result in crashes.
A "crash" is when a program is no longer able to process further input.
Here's roughly how it works:
This can happen either:
This does not mean that the program behaves unpredictably. The crash is perfectly predictable.
Crashes can be avoided with one or more of the following:
Hope that helps.
Sign up for our Newsletter