If computers and phones and other electronics are programmed to follow codes and don’t have a conscious to think freely. How do they end up crashing and what causes them to do a task they’ve done hundreds of times before, wrong?

270 views

If computers and phones and other electronics are programmed to follow codes and don’t have a conscious to think freely. How do they end up crashing and what causes them to do a task they’ve done hundreds of times before, wrong?

In: 0

7 Answers

Anonymous 0 Comments

> what causes them to do a task they’ve done hundreds of times before, wrong

In most cases, they are not doing the exact same thing every time. Instead, they perform the same operation on different data, under different conditions. For example, suppose you have a program that goes through a file that contains a set of data on each line and calculates the average. e.g. if a line contains “1.0, 2.0” the program outputs “1.5”. But what if you accidentally feed in a file that contains an empty line, or a line that reads “one two banana”? Unless the program has been told to do something different in these cases, it will likely crash or produce nonsense. For another example, suppose a program keeps adding information to a database. But what happens when the hard disk eventually fills up? Again, unless it has been told what to do in this case, it will typically crash.

Hardware faults, buggy software updates, and hacking are also possible reasons why a program might suddenly stop working.

You are viewing 1 out of 7 answers, click here to view all answers.