---
title: "4 Computer programming Quotes By Brian Kernighan"
description: "4 Computer programming quotes by Brian Kernighan. Plus more from Brian Kernighan and more Computer programming 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)

> [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)

> [If you're as clever as you can be when you write it, how will you ever debug it?](https://sms4smile.com/quotes/brian-kernighan/if-you-re-as-clever-as-you-can-be-when-you-write-it-how-will-you-ever/)

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

[Image](https://sms4smile.com/quotes/i/767/brian-kernighan-27197_clever_if-you-re-as-clever-as-you-can-be-when-y_2043521.jpg)

## Other authors on Computer programming

- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b020/author-richard-e-pattis-78538.jpg) Richard E. Pattis 10 quotes ](https://sms4smile.com/quotes/about/computer-programming/richard-e-pattis/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b023/author-tony-hoare-91823.jpg) Tony Hoare 6 quotes ](https://sms4smile.com/quotes/about/computer-programming/tony-hoare/)
- [ ![](https://sms4smile.com/quotes/wp-content/uploads/sms4s/authors/processed/b008/author-edsger-dijkstra-31653.jpg) Edsger Dijkstra 6 quotes ](https://sms4smile.com/quotes/about/computer-programming/edsger-dijkstra/)

## 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/computer-programming/brian-kernighan/#itemlist",
            "name": "4 Computer programming Quotes By Brian Kernighan",
            "numberOfItems": 4,
            "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": "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": 4,
                    "item": {
                        "@type": "Quotation",
                        "text": "If you're as clever as you can be when you write it, how will you ever debug it?",
                        "creator": {
                            "@type": "Person",
                            "name": "Brian Kernighan"
                        },
                        "url": "https://sms4smile.com/quotes/brian-kernighan/if-you-re-as-clever-as-you-can-be-when-you-write-it-how-will-you-ever/",
                        "image": {
                            "@type": "ImageObject",
                            "@id": "https://sms4smile.com/quotes/i/767/brian-kernighan-27197_clever_if-you-re-as-clever-as-you-can-be-when-y_2043521.jpg",
                            "contentUrl": "https://sms4smile.com/quotes/i/767/brian-kernighan-27197_clever_if-you-re-as-clever-as-you-can-be-when-y_2043521.jpg",
                            "url": "https://sms4smile.com/quotes/i/767/brian-kernighan-27197_clever_if-you-re-as-clever-as-you-can-be-when-y_2043521.jpg",
                            "width": 1080,
                            "height": 1080,
                            "caption": "“If you're as clever as you can be when you write it, how will you ever debug it?” — Brian Kernighan",
                            "creditText": "SMS4Smile Quotes",
                            "creator": {
                                "@id": "https://sms4smile.com/quotes/#organization"
                            }
                        }
                    }
                }
            ]
        },
        {
            "@type": "CollectionPage",
            "@id": "https://sms4smile.com/quotes/about/computer-programming/brian-kernighan/#webpage",
            "url": "https://sms4smile.com/quotes/about/computer-programming/brian-kernighan/",
            "name": "Computer programming Quotes by Brian Kernighan",
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "mainEntity": {
                "@id": "https://sms4smile.com/quotes/about/computer-programming/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": "4 Computer programming quotes by Brian Kernighan. Plus more from Brian Kernighan and more Computer programming sayings from other authors.",
            "breadcrumb": {
                "@id": "https://sms4smile.com/quotes/about/computer-programming/brian-kernighan/#breadcrumb"
            }
        },
        {
            "@type": "BreadcrumbList",
            "@id": "https://sms4smile.com/quotes/about/computer-programming/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": "Computer Programming",
                    "item": "https://sms4smile.com/quotes/about/computer-programming/"
                },
                {
                    "@type": "ListItem",
                    "position": 5,
                    "name": "Brian Kernighan",
                    "item": "https://sms4smile.com/quotes/about/computer-programming/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
            }
        }
    ]
}
```
