---
title: "The code also assumes that it's difficult to misspell 'a' or 'b'. :-) — Larry Wall Quote #155 | QuotesBy.net"
description: "The code also assumes that it's difficult to misspell 'a' or 'b'. :-) — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # The code also assumes that it's difficult to misspell 'a' or 'b'. :-)

[Larry Wall](https://quotesby.net/Larry-Wall)\#155

[Programming](https://quotesby.net/Larry-Wall/programming/)[Software](https://quotesby.net/Larry-Wall/software/)[Code](https://quotesby.net/Larry-Wall/code/)[Error](https://quotesby.net/Larry-Wall/error/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9CThe%20code%20also%20assumes%20that%20it%27s%20difficult%20to%20misspell%20%27a%27%20or%20%27b%27.%20%3A-%29%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F155%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9CThe%20code%20also%20assumes%20that%20it%27s%20difficult%20to%20misspell%20%27a%27%20or%20%27b%27.%20%3A-%29%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F155%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F155%2F)

## About this quote

What does it mean?The code assumes that misspelling simple characters like 'a' or 'b' is unlikely.In plain termsCode 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](https://quotesby.net/Larry-Wall/154/ "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](https://quotesby.net/Larry-Wall/156/ "Permalink to quote 156")
3. > It's not really a rule--it's more like a trend.

[Permalink to quote \#153](https://quotesby.net/Larry-Wall/153/ "Permalink to quote 153")

## Related quotes

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

[Donald Knuth](https://quotesby.net/Donald-Knuth)[Donald Knuth quote \#1](https://quotesby.net/Donald-Knuth/1/ "Permalink to quote 1")
2. > Beware of bugs in the above code; I have only proved it correct, not tried it.

[Donald Knuth](https://quotesby.net/Donald-Knuth)[Donald Knuth quote \#2](https://quotesby.net/Donald-Knuth/2/ "Permalink to 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 Graham](https://quotesby.net/Paul-Graham)[Paul Graham quote \#5](https://quotesby.net/Paul-Graham/5/ "Permalink to quote 5")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "The code also assumes that it's difficult to misspell 'a' or 'b'. :-)",
    "url": "https://quotesby.net/Larry-Wall/155/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Larry Wall"
    }
}
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://quotesby.net/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Authors",
            "item": "https://quotesby.net/authors/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Larry Wall",
            "item": "https://quotesby.net/Larry-Wall"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #155",
            "item": "https://quotesby.net/Larry-Wall/155/"
        }
    ]
}
```
