Best 17 quotes of Brian Kernighan on MyQuotes

Brian Kernighan

  • By Anonym
    Brian Kernighan

    An effective way to test code is to exercise it at its natural boundaries

  • By Anonym
    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 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.

  • By Anonym
    Brian Kernighan

    Believe the terrain, not the map

  • By Anonym
    Brian Kernighan

    C is a razor-sharp tool, with which one can create an elegant and efficient program or a bloody mess.

  • By Anonym
    Brian Kernighan

    Controlling complexity is the essence of computer programming.

  • By Anonym
    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 are, by definition, not smart enough to debug it.

  • By Anonym
    Brian Kernighan

    Don't document bad code - rewrite it.

  • By Anonym
    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.

  • By Anonym
    Brian Kernighan

    Each new user of a new system uncovers a new class of bugs.

  • By Anonym
    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 easier to work with

  • By Anonym
    Brian Kernighan

    If you had done something twice, you are likely to do it again.

  • By Anonym
    Brian Kernighan

    If you're as clever as you can be when you write it, how will you ever debug it?

  • By Anonym
    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 you don't, you are not testing; you are experimenting.

  • By Anonym
    Brian Kernighan

    Mechanical rules are never a substitute for clarity of thought.

  • By Anonym
    Brian Kernighan

    The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.

  • By Anonym
    Brian Kernighan

    Trivia rarely affect efficiency. Are all the machinations worth it, when their primary effect is to make the code less readable?

  • By Anonym
    Brian Kernighan

    Trying to outsmart a compiler defeats much of the purpose of using one.