---
title: "There are two ways to write error-free programs; only the third one w… — Alan Perlis Quote #25 | QuotesBy.net"
description: "There are two ways to write error-free programs; only the third one works. — a quote by Alan Perlis."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # There are two ways to write error-free programs; only the third one works.

[Alan Perlis](https://quotesby.net/Alan-Perlis)\#25

[Quality](https://quotesby.net/Alan-Perlis/quality/)[Reality](https://quotesby.net/topics/reality/)[Testing](https://quotesby.net/topics/testing/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9CThere%20are%20two%20ways%20to%20write%20error-free%20programs%3B%20only%20the%20third%20one%20works.%E2%80%9D%20%E2%80%94%20Alan%20Perlis%20https%3A%2F%2Fquotesby.net%2FAlan-Perlis%2F25%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9CThere%20are%20two%20ways%20to%20write%20error-free%20programs%3B%20only%20the%20third%20one%20works.%E2%80%9D%20%E2%80%94%20Alan%20Perlis&url=https%3A%2F%2Fquotesby.net%2FAlan-Perlis%2F25%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FAlan-Perlis%2F25%2F)

## About this quote

What does it mean?Theoretical ways to write error-free code often fail in practice.In plain termsOnly one real method works for writing bug-free programs.What can you take from it?Rely on practical testing rather than theoretical perfection.

### Where it applies

- development process
- quality assurance
- debugging

### Putting it to work

- test thoroughly
- accept imperfection
- focus on fixes

### Questions to consider

- How do you ensure your code is reliable?
- What prevents you from writing perfect code?

### Another view

Some theoretical approaches like formal verification do work in niche cases.

## More from Alan Perlis

1. > The computing field is always in need of new cliches.

[Permalink to quote \#24](https://quotesby.net/Alan-Perlis/24/ "Permalink to quote 24")
2. > You can measure a programmer's perspective by noting his attitude on the continuing vitality of FORTRAN.

[Permalink to quote \#26](https://quotesby.net/Alan-Perlis/26/ "Permalink to quote 26")
3. > The best book on programming for the layman is 'Alice in Wonderland'; but that's because it's the best book on anything for the layman.

[Permalink to quote \#23](https://quotesby.net/Alan-Perlis/23/ "Permalink to quote 23")

## Related quotes

1. > Best by test.

[Bobby Fischer](https://quotesby.net/Bobby-Fischer)[Bobby Fischer quote \#2](https://quotesby.net/Bobby-Fischer/2/ "Permalink to quote 2")
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. > Sun Microsystems had the right people to make Java into a first-class language, and I believe it was the Sun marketing people who rushed the thing out before i…

[Alan Kay](https://quotesby.net/Alan-Kay)[Alan Kay quote \#11](https://quotesby.net/Alan-Kay/11/ "Permalink to quote 11")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "There are two ways to write error-free programs; only the third one works.",
    "url": "https://quotesby.net/Alan-Perlis/25/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Alan Perlis"
    }
}
{
    "@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": "Alan Perlis",
            "item": "https://quotesby.net/Alan-Perlis"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #25",
            "item": "https://quotesby.net/Alan-Perlis/25/"
        }
    ]
}
```
