---
title: "6 Programmers Quotes By Brian Kernighan"
description: "6 Programmers quotes by Brian Kernighan. Plus more from Brian Kernighan and more Programmers sayings from other authors."
image: "https://sms4smile.com/quotes/i/0bb/brian-kernighan-27197_computer-programmers_trying-to-outsmart-a-compiler-defeats-mu_152420.png"
---

> [Trying to outsmart a compiler defeats much of the purpose of using one.](https://sms4smile.com/quotes/brian-kernighan/trying-to-outsmart-a-compiler-defeats-much-of-the-purpose-of-using-one/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

[Image](https://sms4smile.com/quotes/i/0bb/brian-kernighan-27197_computer-programmers_trying-to-outsmart-a-compiler-defeats-mu_152420.png)

> [Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as…](https://sms4smile.com/quotes/brian-kernighan/debugging-is-twice-as-hard-as-writing-the-code-in-the-first-place/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

[Image](https://sms4smile.com/quotes/i/0ad/brian-kernighan-27197_code_debugging-is-twice-as-hard-as-writing-th_1499521.jpg)

> [ Another effective \[debugging\] technique is to explain your code to someone else. This will often cause you to explain the bug to… ](https://sms4smile.com/quotes/brian-kernighan/another-effective-debugging-technique-is-to-explain-your-code-to/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

[Image](https://sms4smile.com/quotes/i/fb9/brian-kernighan-27197_bears_another-effective-debugging-technique-is_1618728.jpg)

> [Controlling complexity is the essence of computer programming.](https://sms4smile.com/quotes/brian-kernighan/controlling-complexity-is-the-essence-of-computer-programming/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

[Image](https://sms4smile.com/quotes/i/50c/brian-kernighan-27197_complexity_controlling-complexity-is-the-essence-of_2026164.png)

> [The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.](https://sms4smile.com/quotes/brian-kernighan/the-most-effective-debugging-tool-is-still-careful-thought-coupled/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

[Image](https://sms4smile.com/quotes/i/2c3/brian-kernighan-27197_careful_the-most-effective-debugging-tool-is-sti_2804082.png)

> [Some compilers allow a check during execution that subscripts do not exceed array dimensions. This is a help, but not sufficient. First,…](https://sms4smile.com/quotes/brian-kernighan/some-compilers-allow-a-check-during-execution-that-subscripts-do-not/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

[Image](https://sms4smile.com/quotes/i/d53/brian-kernighan-27197_answers_some-compilers-allow-a-check-during-exec_2909735.jpg)

## Other authors on Programmers

- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b008/author-edsger-dijkstra-31653.jpg) Edsger Dijkstra 13 quotes ](https://sms4smile.com/quotes/about/programmers/edsger-dijkstra/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b003/author-allen-tucker-11774.jpg) Bjarne Stroustrup 11 quotes ](https://sms4smile.com/quotes/about/programmers/bjarne-stroustrup/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b016/author-linus-torvalds-60596.jpg) Linus Torvalds 9 quotes ](https://sms4smile.com/quotes/about/programmers/linus-torvalds/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b015/author-larry-wall-58700.jpg) Larry Wall 8 quotes ](https://sms4smile.com/quotes/about/programmers/larry-wall/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b010/author-fred-brooks-36015.jpg) Fred Brooks 7 quotes ](https://sms4smile.com/quotes/about/programmers/fred-brooks/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b009/author-eric-s-raymond-33568.jpg) Eric S. Raymond 7 quotes ](https://sms4smile.com/quotes/about/programmers/eric-s-raymond/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b009/author-ellen-ullman-32754.jpg) Ellen Ullman 7 quotes ](https://sms4smile.com/quotes/about/programmers/ellen-ullman/)
- [Erik Naggum 6 quotes](https://sms4smile.com/quotes/about/programmers/erik-naggum/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b022/author-steve-mcconnell-87333.jpg) Steve McConnell 5 quotes ](https://sms4smile.com/quotes/about/programmers/steve-mcconnell/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b013/author-joel-spolsky-50663.jpg) Joel Spolsky 5 quotes ](https://sms4smile.com/quotes/about/programmers/joel-spolsky/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b005/author-bill-gates-17911.jpg) Bill Gates 5 quotes ](https://sms4smile.com/quotes/about/programmers/bill-gates/)

## More by Brian Kernighan

> [Get the weirdnesses into the data where you can manipulate them easily, and the regularity into the code because regular code is a lot…](https://sms4smile.com/quotes/brian-kernighan/get-the-weirdnesses-into-the-data-where-you-can-manipulate-them/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Trying to outsmart a compiler defeats much of the purpose of using one.](https://sms4smile.com/quotes/brian-kernighan/trying-to-outsmart-a-compiler-defeats-much-of-the-purpose-of-using-one/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [An effective way to test code is to exercise it at its natural boundaries](https://sms4smile.com/quotes/brian-kernighan/an-effective-way-to-test-code-is-to-exercise-it-at-its-natural/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [As we said in the preface to the first edition, C "wears well as one's experience with it grows." With a decade more experience,…](https://sms4smile.com/quotes/brian-kernighan/as-we-said-in-the-preface-to-the-first-edition-c-wears-well-as-one-s/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Trivia rarely affect efficiency. Are all the machinations worth it, when their primary effect is to make the code less readable?](https://sms4smile.com/quotes/brian-kernighan/trivia-rarely-affect-efficiency-are-all-the-machinations-worth-it/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [If you had done something twice, you are likely to do it again.](https://sms4smile.com/quotes/brian-kernighan/if-you-had-done-something-twice-you-are-likely-to-do-it-again/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [C is a razor-sharp tool, with which one can create an elegant and efficient program or a bloody mess.](https://sms4smile.com/quotes/brian-kernighan/c-is-a-razor-sharp-tool-with-which-one-can-create-an-elegant-and/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Believe the terrain, not the map](https://sms4smile.com/quotes/brian-kernighan/believe-the-terrain-not-the-map/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Mechanical rules are never a substitute for clarity of thought.](https://sms4smile.com/quotes/brian-kernighan/mechanical-rules-are-never-a-substitute-for-clarity-of-thought/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Don't document bad code - rewrite it.](https://sms4smile.com/quotes/brian-kernighan/don-t-document-bad-code-rewrite-it/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you…](https://sms4smile.com/quotes/brian-kernighan/debugging-is-twice-as-hard-as-writing-the-code-in-the-first-place/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can…](https://sms4smile.com/quotes/brian-kernighan/everyone-knows-that-debugging-is-twice-as-hard-as-writing-a-program/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [ Another effective \[debugging\] technique is to explain your code to someone else. This will often cause you to explain the bug to yourself. Sometimes… ](https://sms4smile.com/quotes/brian-kernighan/another-effective-debugging-technique-is-to-explain-your-code-to/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [... it is a fundamental principle of testing that you must know in advance the answer each test case is supposed to produce. If…](https://sms4smile.com/quotes/brian-kernighan/it-is-a-fundamental-principle-of-testing-that-you-must-know-in/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

> [Do what you think is interesting, do something that you think is fun and worthwhile, because otherwise you won't do it well anyway.](https://sms4smile.com/quotes/brian-kernighan/do-what-you-think-is-interesting-do-something-that-you-think-is-fun/)

[Brian Kernighan](https://sms4smile.com/quotes/author/brian-kernighan/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "ItemList",
            "@id": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/#itemlist",
            "name": "6 Programmers Quotes By Brian Kernighan",
            "numberOfItems": 6,
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "item": {
                        "@type": "Quotation",
                        "text": "Trying to outsmart a compiler defeats much of the purpose of using one.",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/trying-to-outsmart-a-compiler-defeats-much-of-the-purpose-of-using-one/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/0bb/brian-kernighan-27197_computer-programmers_trying-to-outsmart-a-compiler-defeats-mu_152420.png",
                            "contentUrl": "https://sms4smile.com/quotes/i/0bb/brian-kernighan-27197_computer-programmers_trying-to-outsmart-a-compiler-defeats-mu_152420.png",
                            "url": "https://sms4smile.com/quotes/i/0bb/brian-kernighan-27197_computer-programmers_trying-to-outsmart-a-compiler-defeats-mu_152420.png",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“Trying to outsmart a compiler defeats much of the purpose of using one.” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "item": {
                        "@type": "Quotation",
                        "text": "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/debugging-is-twice-as-hard-as-writing-the-code-in-the-first-place/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/0ad/brian-kernighan-27197_code_debugging-is-twice-as-hard-as-writing-th_1499521.jpg",
                            "contentUrl": "https://sms4smile.com/quotes/i/0ad/brian-kernighan-27197_code_debugging-is-twice-as-hard-as-writing-th_1499521.jpg",
                            "url": "https://sms4smile.com/quotes/i/0ad/brian-kernighan-27197_code_debugging-is-twice-as-hard-as-writing-th_1499521.jpg",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as…” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "item": {
                        "@type": "Quotation",
                        "text": "Another effective [debugging] technique is to explain your code to someone else. This will often cause you to explain the bug to yourself. Sometimes it takes no more than a few sentences, followed by an embarrassed \"Never mind, I see what's wrong. Sorry to bother you.\" This works remarkably well; you can even use non-programmers as listeners. One university computer center kept a teddy bear near the help desk. Students with mysterious bugs were required to explain them to the bear before they could speak to a human counselor.",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/another-effective-debugging-technique-is-to-explain-your-code-to/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/fb9/brian-kernighan-27197_bears_another-effective-debugging-technique-is_1618728.jpg",
                            "contentUrl": "https://sms4smile.com/quotes/i/fb9/brian-kernighan-27197_bears_another-effective-debugging-technique-is_1618728.jpg",
                            "url": "https://sms4smile.com/quotes/i/fb9/brian-kernighan-27197_bears_another-effective-debugging-technique-is_1618728.jpg",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“Another effective [debugging] technique is to explain your code to someone else. This will often cause you…” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "item": {
                        "@type": "Quotation",
                        "text": "Controlling complexity is the essence of computer programming.",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/controlling-complexity-is-the-essence-of-computer-programming/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/50c/brian-kernighan-27197_complexity_controlling-complexity-is-the-essence-of_2026164.png",
                            "contentUrl": "https://sms4smile.com/quotes/i/50c/brian-kernighan-27197_complexity_controlling-complexity-is-the-essence-of_2026164.png",
                            "url": "https://sms4smile.com/quotes/i/50c/brian-kernighan-27197_complexity_controlling-complexity-is-the-essence-of_2026164.png",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“Controlling complexity is the essence of computer programming.” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                },
                {
                    "@type": "ListItem",
                    "position": 5,
                    "item": {
                        "@type": "Quotation",
                        "text": "The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/the-most-effective-debugging-tool-is-still-careful-thought-coupled/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/2c3/brian-kernighan-27197_careful_the-most-effective-debugging-tool-is-sti_2804082.png",
                            "contentUrl": "https://sms4smile.com/quotes/i/2c3/brian-kernighan-27197_careful_the-most-effective-debugging-tool-is-sti_2804082.png",
                            "url": "https://sms4smile.com/quotes/i/2c3/brian-kernighan-27197_careful_the-most-effective-debugging-tool-is-sti_2804082.png",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                },
                {
                    "@type": "ListItem",
                    "position": 6,
                    "item": {
                        "@type": "Quotation",
                        "text": "Some compilers allow a check during execution that subscripts do not exceed array dimensions. This is a help, but not sufficient. First, many programmers do not use such compilers because They're not efficient. (Presumably, this means that it is vital to get the wrong answers quickly.)",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/some-compilers-allow-a-check-during-execution-that-subscripts-do-not/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/d53/brian-kernighan-27197_answers_some-compilers-allow-a-check-during-exec_2909735.jpg",
                            "contentUrl": "https://sms4smile.com/quotes/i/d53/brian-kernighan-27197_answers_some-compilers-allow-a-check-during-exec_2909735.jpg",
                            "url": "https://sms4smile.com/quotes/i/d53/brian-kernighan-27197_answers_some-compilers-allow-a-check-during-exec_2909735.jpg",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“Some compilers allow a check during execution that subscripts do not exceed array dimensions. This is a…” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                }
            ]
        },
        {
            "@type": "CollectionPage",
            "@id": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/#webpage",
            "url": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/",
            "name": "Programmers Quotes by Brian Kernighan",
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "mainEntity": {
                "@id": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/#itemlist"
            },
            "primaryImageOfPage": {
                "@id": "https://sms4smile.com/quotes/i/0bb/brian-kernighan-27197_computer-programmers_trying-to-outsmart-a-compiler-defeats-mu_152420.png"
            },
            "description": "6 Programmers quotes by Brian Kernighan. Plus more from Brian Kernighan and more Programmers sayings from other authors.",
            "breadcrumb": {
                "@id": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/#breadcrumb"
            }
        },
        {
            "@type": "BreadcrumbList",
            "@id": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/#breadcrumb",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Topics",
                    "item": "https://sms4smile.com/quotes/categories/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "Programmers",
                    "item": "https://sms4smile.com/quotes/about/programmers/"
                },
                {
                    "@type": "ListItem",
                    "position": 5,
                    "name": "Brian Kernighan",
                    "item": "https://sms4smile.com/quotes/about/programmers/brian-kernighan/"
                }
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
