Some time ago this comic strip was published
It actually took me some time to figure it out.
The robots are programmed in the programming language C, and the robots went berserk because the engineers simply missed an equal sign in a conditional statement, turning it into an assignment instead of a comparison.
This kind of an error is called a software bug.
Software bugs are very real, and can have have dire consequences, here’s a list of some of the most significant ones. The list includes rocket, airplane and helicopter crashes, patients dying from radiation overdoses and payments ending up in the wrong accounts, so why not crazy murdering robots?
Somewhat alarming, it is possible to make the same mistake in the more modern programming languages, C#, Java and JavaScript that are derived from C, and it makes me wonder why these languages even permit this, and old languages like BASIC and ALGOL never did?
My guess is that it is mostly to maintain compatibility with it’s predecessor C, and that it can be useful in some cases, but I consider it strange and potentially dangerous, and it makes me wonder if current mainstream programming languages, especially those derived directly from C, should be our choice for programming anything.
Exterminators
A redeeming factor, is that for instance the C# development tools warns us about the error, and that the compiler even suggests the correct solution, but it’s still possible to run the program, and make the robot a crazy murdering one.
External links and references
- C (programming language). Retrieved on 1 October 2017 – via Wikipedia.
- Conditional (computer programming). Retrieved on 1 October 2017 – via Wikipedia.
- List of software bugs. Retrieved on 1 October 2017 – via Wikipedia.
- BASIC. Retrieved on 1 October 2017 – via Wikipedia.
- ALGOL. Retrieved on 1 October 2017 – via Wikipedia.
- C#. Retrieved on 1 October 2017 – via Wikipedia.
- Java. Retrieved on 1 October 2017 – via Wikipedia.
- JavaScript. Retrieved on 1 October 2017 – via Wikipedia.
- Compiler. Retrieved on 2 October 2017 – via Wikipedia.