---
title: "Meaning & Key Takeaway of: When you write a program, think of it…"
description: "\"When you write a program, think of it primarily as a work of literature. You're trying to write something that human beings are going to read. Don't th..."
image: "https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg"
---

#  When you write a program, think of it primarily as a work…

![“When you write a program, think of it primarily as a work of literature. You're trying to write something that human beings are going to read. Don't think of it primarily as something a computer is going to follow. The more effective you are at making your program readable, the more effective it's…” quote by Donald Knuth](https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg)   [Download](https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg) [Open image](https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg)

> “When you write a program, think of it primarily as a work of literature. You're trying to write something that human beings are going to read. Don't think of it primarily as something a computer is going to follow. The more effective you are at making your program readable, the more effective it's going to be: You'll understand it today, you'll understand it next week, and your successors who are going to maintain and modify it will understand it.”

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Programming should be written like literature, prioritizing readability for humans over machine instructions.

**In simple terms:** Write code as readable literature.

Key Takeaway

Write clear, maintainable code.

Themes

programming readability literature maintenance

Mood

educational inspirational

Type

technical philosophical

When to use this quote

- code reviews
- team onboarding
- long term projects

Key Concepts

software design human factors documentation

Questions to Reflect On

- How can you balance elegance with performance?
- What practices improve code readability?

A Different Perspective

May be less efficient for low‑level optimization.

★ ★ ★ ★ ★   No ratings yet

[Books](https://sms4smile.com/quotes/about/books/) [Computer](https://sms4smile.com/quotes/about/computer/) [Human beings](https://sms4smile.com/quotes/about/human-beings/) [Humans](https://sms4smile.com/quotes/about/humans/) [Literature](https://sms4smile.com/quotes/about/literature/) [Programming](https://sms4smile.com/quotes/about/programming/) [Technology](https://sms4smile.com/quotes/about/technology/) [Thinking](https://sms4smile.com/quotes/about/thinking/) [Today](https://sms4smile.com/quotes/about/today/) [Week](https://sms4smile.com/quotes/about/week/) [Writing](https://sms4smile.com/quotes/about/writing/)

## Related quotes

> [If you want your program to be readable, consider supplying the argument.](https://sms4smile.com/quotes/larry-wall/if-you-want-your-program-to-be-readable-consider-supplying-the/)

[Larry Wall](https://sms4smile.com/quotes/author/larry-wall/)

> [Once you understand how to write a program get someone else to write it.](https://sms4smile.com/quotes/alan-perlis/once-you-understand-how-to-write-a-program-get-someone-else-to-write/)

[Alan Perlis](https://sms4smile.com/quotes/author/alan-perlis/)

> [Most talk about 'super-geniuses' is nonsense. I have found that when 'stars' drop out, successors are usually at hand to fill their places, and…](https://sms4smile.com/quotes/charles-m-schwab/most-talk-about-super-geniuses-is-nonsense-i-have-found-that-when/)

[Charles M. Schwab](https://sms4smile.com/quotes/author/charles-m-schwab/)

> [Our Faith will never be true unless it is united to that of St. Peter and the Pontiff, his successors.](https://sms4smile.com/quotes/alphonsus-liguori/our-faith-will-never-be-true-unless-it-is-united-to-that-of-st-peter/)

[Alphonsus Liguori](https://sms4smile.com/quotes/author/alphonsus-liguori/)

> [President Obama, don't you think you should follow in the footsteps of your predecessor? Remember, President George W. Bush? He stayed out of the…](https://sms4smile.com/quotes/sean-hannity/president-obama-don-t-you-think-you-should-follow-in-the-footsteps-of/)

[Sean Hannity](https://sms4smile.com/quotes/author/sean-hannity/)

> [Important artists are innovators whose work changes the practices of their successors.](https://sms4smile.com/quotes/david-galenson/important-artists-are-innovators-whose-work-changes-the-practices-of/)

[David Galenson](https://sms4smile.com/quotes/author/david-galenson/)

> [Leadership success is measured by the success of your successor.](https://sms4smile.com/quotes/myles-munroe/leadership-success-is-measured-by-the-success-of-your-successor/)

[Myles Munroe](https://sms4smile.com/quotes/author/myles-munroe/)

> [The latest political rumor, North Korea ruler Kim Jong Il is close to naming his successor. Yeah, he said the only person with glasses…](https://sms4smile.com/quotes/conan-o-brien/the-latest-political-rumor-north-korea-ruler-kim-jong-il-is-close-to/)

[Conan O'Brien](https://sms4smile.com/quotes/author/conan-o-brien/)

> [The Talmud derives its authority from the position held by the ancient (Pharisee) academies. The teachers of those academies, both of Babylonia and of…](https://sms4smile.com/quotes/louis-finkelstein/the-talmud-derives-its-authority-from-the-position-held-by-the/)

[Louis Finkelstein](https://sms4smile.com/quotes/author/louis-finkelstein/)

> [The name of a successor is like the tolling of my own death-bell!](https://sms4smile.com/quotes/elizabeth-i/the-name-of-a-successor-is-like-the-tolling-of-my-own-death-bell/)

[Elizabeth I](https://sms4smile.com/quotes/author/elizabeth-i/)

> [One of the gratifying things, I think, about the end of my presidency even though admittedly my successor ran against a lot of what…](https://sms4smile.com/quotes/barack-obama/one-of-the-gratifying-things-i-think-about-the-end-of-my-presidency/)

[Barack Obama](https://sms4smile.com/quotes/author/barack-obama/)

> [A man of variable mind is not one man, but several men in one; he multiplies himself as often as he changes his taste…](https://sms4smile.com/quotes/jean-de-la-bruyere/a-man-of-variable-mind-is-not-one-man-but-several-men-in-one-he/)

[Jean de la Bruyere](https://sms4smile.com/quotes/author/jean-de-la-bruyere/)

> [In science the successors stand upon the shoulders of their predecessors; where one man of supreme genius has invented a method, a thousand lesser…](https://sms4smile.com/quotes/bertrand-russell/in-science-the-successors-stand-upon-the-shoulders-of-their/)

[Bertrand Russell](https://sms4smile.com/quotes/author/bertrand-russell/)

> [Three hundred men, all of whom know one another, direct the economic destiny of Europe and choose their successors from among themselves.](https://sms4smile.com/quotes/walther-rathenau/three-hundred-men-all-of-whom-know-one-another-direct-the-economic/)

[Walther Rathenau](https://sms4smile.com/quotes/author/walther-rathenau/)

> [I am now old enough to make common cause with my predecessors against my successors.](https://sms4smile.com/quotes/mason-cooley/i-am-now-old-enough-to-make-common-cause-with-my-predecessors-against/)

[Mason Cooley](https://sms4smile.com/quotes/author/mason-cooley/)

## More by Donald Knuth

> [I'll never know everything. My life would be a lot worse if there was nothing I knew the answers about - and if there…](https://sms4smile.com/quotes/donald-knuth/i-ll-never-know-everything-my-life-would-be-a-lot-worse-if-there-was/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [“Nearly every example of faulty reasoning that has been published is accompanied by the phrase "of course" or its equivalent.”](https://sms4smile.com/quotes/donald-knuth/nearly-every-example-of-faulty-reasoning-that-has-been-published-is/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [ \[The Euclidean algorithm is\] the granddaddy of all algorithms, because it is the oldest nontrivial algorithm that has survived to the present day. ](https://sms4smile.com/quotes/donald-knuth/the-euclidean-algorithm-is-the-granddaddy-of-all-algorithms-because/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [The process of preparing programs for a digital computer is especially attractive, not only because it can economically and scientifically rewarding, but also because…](https://sms4smile.com/quotes/donald-knuth/the-process-of-preparing-programs-for-a-digital-computer-is/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [When certain concepts of TeX are introduced informally, general rules will be stated; afterwards you will find that the rules aren't strictly true. In…](https://sms4smile.com/quotes/donald-knuth/when-certain-concepts-of-tex-are-introduced-informally-general-rules/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [In fact, my main conclusion after spending ten years of my life working on the TEX project is that software is hard. It's harder…](https://sms4smile.com/quotes/donald-knuth/in-fact-my-main-conclusion-after-spending-ten-years-of-my-life/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [Any inaccuracies in this index may be explained by the fact that it has been prepared with the help of a computer.](https://sms4smile.com/quotes/donald-knuth/any-inaccuracies-in-this-index-may-be-explained-by-the-fact-that-it/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [My first program taught me a lot about the errors that I was going to be making in the future, and also about how…](https://sms4smile.com/quotes/donald-knuth/my-first-program-taught-me-a-lot-about-the-errors-that-i-was-going-to/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [It would be nice if we could design a virtual reality in Hyperbolic Space, and meet each other there.](https://sms4smile.com/quotes/donald-knuth/it-would-be-nice-if-we-could-design-a-virtual-reality-in-hyperbolic/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [I have a hunch that the unknown sequences of DNA will decode into copyright notices and patent protections.](https://sms4smile.com/quotes/donald-knuth/i-have-a-hunch-that-the-unknown-sequences-of-dna-will-decode-into/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [If you optimize everything, you will always be unhappy.](https://sms4smile.com/quotes/donald-knuth/if-you-optimize-everything-you-will-always-be-unhappy/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [Computers are good at following instructions, but not at reading your mind.](https://sms4smile.com/quotes/donald-knuth/computers-are-good-at-following-instructions-but-not-at-reading-your/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not…](https://sms4smile.com/quotes/donald-knuth/we-should-forget-about-small-efficiencies-say-about-97-of-the-time/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [...One of the most important lessons, perhaps, is the fact that SOFTWARE IS HARD. From now on I shall have significantly greater respect for…](https://sms4smile.com/quotes/donald-knuth/one-of-the-most-important-lessons-perhaps-is-the-fact-that-software/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

> [Always remember, however, that there’s usually a simpler and better way to do something than the first way that pops into your head.](https://sms4smile.com/quotes/donald-knuth/always-remember-however-that-there-s-usually-a-simpler-and-better-way/)

[Donald Knuth](https://sms4smile.com/quotes/author/donald-knuth/)

[Explore all 78 Donald Knuth quotes ](https://sms4smile.com/quotes/author/donald-knuth/)

## More Be you quotes

> [I just think music is one of those frontiers where people really want the "I" to be you.](https://sms4smile.com/quotes/regina-spektor/i-just-think-music-is-one-of-those-frontiers-where-people-really-want/)

[Regina Spektor](https://sms4smile.com/quotes/author/regina-spektor/)

> [“You go into extinction by being obsessed about becoming something else and then travelling in the wrong car while your real self keeps waiting…](https://sms4smile.com/quotes/israelmore-ayivor/you-go-into-extinction-by-being-obsessed-about-becoming-something/)

[Israelmore Ayivor](https://sms4smile.com/quotes/author/israelmore-ayivor/)

> [If you can't love yourself, how in the hell you gonna love somebody else?](https://sms4smile.com/quotes/rupaul/if-you-can-t-love-yourself-how-in-the-hell-you-gonna-love-somebody/)

[RuPaul](https://sms4smile.com/quotes/author/rupaul/)

> [When you are not honoring the present moment by allowing it to be, you are creating drama.](https://sms4smile.com/quotes/eckhart-tolle/when-you-are-not-honoring-the-present-moment-by-allowing-it-to-be-you/)

[Eckhart Tolle](https://sms4smile.com/quotes/author/eckhart-tolle/)

> [No matter how beautiful a woman might be, you're always threatened by certain... You're always threatened by](https://sms4smile.com/quotes/dolly-parton/no-matter-how-beautiful-a-woman-might-be-you-re-always-threatened-by/)

[Dolly Parton](https://sms4smile.com/quotes/author/dolly-parton/)

> [Be comfortable; be you. Whats most important is to understand what suits your body type and personality. Stick to that, and you cant go…](https://sms4smile.com/quotes/sonakshi-sinha/be-comfortable-be-you-whats-most-important-is-to-understand-what/)

[Sonakshi Sinha](https://sms4smile.com/quotes/author/sonakshi-sinha/)

> [Strong families use the word "we" a lot, but "I" is never forgotten. Family members know they have the freedom to go off on…](https://sms4smile.com/quotes/joyce-brothers/strong-families-use-the-word-we-a-lot-but-i-is-never-forgotten-family/)

[Joyce Brothers](https://sms4smile.com/quotes/author/joyce-brothers/)

> [There is no future and there is no past, there never has been, there never will be. You just think there is. It's not…](https://sms4smile.com/quotes/frederick-lenz/there-is-no-future-and-there-is-no-past-there-never-has-been-there/)

[Frederick Lenz](https://sms4smile.com/quotes/author/frederick-lenz/)

> [Acting is not a state of being ... but a state of appearing to be. You can't be eight times a week without going…](https://sms4smile.com/quotes/noel-coward/acting-is-not-a-state-of-being-but-a-state-of-appearing-to-be-you-can/)

[Noel Coward](https://sms4smile.com/quotes/author/noel-coward/)

> [It doesn't have the ability to think rationally this economic model. It thinks like a drug addict: 'Where can I get my next fix?'…](https://sms4smile.com/quotes/naomi-klein/it-doesn-t-have-the-ability-to-think-rationally-this-economic-model/)

[Naomi Klein](https://sms4smile.com/quotes/author/naomi-klein/)

> [the myth of childhood happiness flourishes so wildly not because it satisfies the needs of children but because it satisfies the needs of adults.…](https://sms4smile.com/quotes/shulamith-firestone/the-myth-of-childhood-happiness-flourishes-so-wildly-not-because-it/)

[Shulamith Firestone](https://sms4smile.com/quotes/author/shulamith-firestone/)

> [Go forth in peace, for you have followed the good road. Go forth without fear, for he who created you has made you holy,…](https://sms4smile.com/quotes/clare-of-assisi/go-forth-in-peace-for-you-have-followed-the-good-road-go-forth/)

[Clare of Assisi](https://sms4smile.com/quotes/author/clare-of-assisi/)

> [I've never forgotten a word of advice my father gave to me. 'Never lose sight of your dream,' he said 'Of that person you…](https://sms4smile.com/quotes/helen-lowrie-marshall/i-ve-never-forgotten-a-word-of-advice-my-father-gave-to-me-never-lose/)

Helen Lowrie Marshall

> [Always be a first-rate version of yourself.](https://sms4smile.com/quotes/audrey-hepburn/always-be-a-first-rate-version-of-yourself/)

[Audrey Hepburn](https://sms4smile.com/quotes/author/audrey-hepburn/)

> [You can be anything you want to be. You can be a street sweeper, if you want. Just be the best blasted street sweeper…](https://sms4smile.com/quotes/david-dinkins/you-can-be-anything-you-want-to-be-you-can-be-a-street-sweeper-if-you/)

[David Dinkins](https://sms4smile.com/quotes/author/david-dinkins/)

Browse all 477 Be you quotes

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "When you write a program, think of it primarily as a work of literature. You're trying to write something that human beings are going to read. Don't think of it primarily as something a computer is going to follow. The more effective you are at making your program readable, the more effective it's going to be: You'll understand it today, you'll understand it next week, and your successors who are going to maintain and modify it will understand it.",
            "creator": {
                "@type": "Person",
                "name": "Donald Knuth"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/donald-knuth/when-you-write-a-program-think-of-it-primarily-as-a-work-of/",
            "about": {
                "@type": "Thing",
                "name": "Be you"
            },
            "@id": "https://sms4smile.com/quotes/donald-knuth/when-you-write-a-program-think-of-it-primarily-as-a-work-of/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg",
                "url": "https://sms4smile.com/quotes/i/077/donald-knuth-8762_be-you_when-you-write-a-program-think-of-it-pri_1550531.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“When you write a program, think of it primarily as a work of literature. You're trying to write something…” — Donald Knuth",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "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": "Donald Knuth",
                    "item": "https://sms4smile.com/quotes/author/donald-knuth/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "When you write a program, think...",
                    "item": "https://sms4smile.com/quotes/donald-knuth/when-you-write-a-program-think-of-it-primarily-as-a-work-of/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/donald-knuth/when-you-write-a-program-think-of-it-primarily-as-a-work-of/#breadcrumb"
        },
        {
            "@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
            }
        }
    ]
}
```
