The hidden cognitive biases that make software fail
In short: Most modern programming languages are designed to fail safely, automatically throwing errors when a system call fails. However, older languages require developers to manually check every operation. This creates a psychological trap where even experts can fall victim to optimism bias, skipping vital checks and leading to erratic system behavior.
Programming languages are governed by syntax and semantics, much like natural languages, but their primary purpose is controlling machine behavior. While thousands of languages exist, only a few achieve widespread adoption. Interestingly, many of the most common languages—including Perl and Standard ML—lack formal international standardization, despite their ubiquity in professional environments.
A critical distinction exists in how languages handle input/output (I/O) failures. Modern languages like Python, Rust, and Java often feature 'failsafe I/O,' where the system automatically throws an exception or prints an error if a call fails. In contrast, older languages such as C, COBOL, and Perl require programmers to explicitly check for these errors. If a developer neglects these checks, the program may continue to execute in an erroneous state.
The risk of human error in these manual systems is compounded by cognitive biases. Research suggests that optimism bias can affect both novices and experts alike, leading them to assume a system call will succeed. This highlights a fundamental shift in software engineering: moving from manual error handling to language-enforced safety. While benchmarks exist to compare language performance, experts warn that these are often micro-benchmarks that can be easily misinterpreted without context.
The evolution of these comparisons is well-documented, with notable comparative analyses dating back to the 1970s. From the 1974 notes on Algol 68 and PL/I to the 1993 retrospective on the growth of languages like C and Pascal, the field has moved toward balancing expressive power with robust, automated safety mechanisms.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: Comparison of programming languages
To cite this card, link to https://intellectplus.co.uk/app/science-comparison-of-programming-languages.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Physics · More in Science · Latest · A–Z · All topics