Skip to content
quotesby

About this quote

What does it mean?
The code assumes that misspelling simple characters like 'a' or 'b' is unlikely.
In plain terms
Code expects 'a' and 'b' not to be misspelled.
What can you take from it?
Design code with realistic error expectations.

Where it applies

  • programming
  • software testing

Putting it to work

  • validate inputs
  • document assumptions

Questions to consider

  • When should you validate simple inputs?
  • How to handle rare misspellings?

Another view

Assumptions may break with unexpected user input.

More from Larry Wall

  1. Double *sigh*. _04 is going onto thousands of CDs even as we speak, so to speak.

    Permalink to quote #154
  2. Well, hey, let's just make everything into a closure, and then we'll have our general garbage collector, installed by 'use less memory'.

    Permalink to quote #156
  3. It's not really a rule--it's more like a trend.

    Permalink to quote #153

Related quotes

  1. Premature optimization is the root of all evil (or at least most of it) in programming.

    Donald KnuthDonald Knuth quote #1
  2. Beware of bugs in the above code; I have only proved it correct, not tried it.

    Donald KnuthDonald Knuth quote #2
  3. If you try to solve a hard problem, the question is not whether you will use a powerful enough language, but whether you will (a) use a powerful language, (b) …

    Paul GrahamPaul Graham quote #5