---
title: "Meaning & Key Takeaway of: Always think about how a piece of code…"
description: "\"Always think about how a piece of code should be used: good interfaces are the essence of good code. You can hide all kinds of clever and dirty code be..."
image: "https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg"
---

#  Always think about how a piece of code should be used…

![“Always think about how a piece of code should be used: good interfaces are the essence of good code. You can hide all kinds of clever and dirty code behind a good interface if you really need such code.” quote by Bjarne Stroustrup](https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg)   [Download](https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg) [Open image](https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg)

> “Always think about how a piece of code should be used: good interfaces are the essence of good code. You can hide all kinds of clever and dirty code behind a good interface if you really need such code.”

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

## About This Quote

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

Good interfaces encapsulate complexity, allowing users to benefit from functionality without exposing underlying intricacies or technical debt.

**In simple terms:** Interfaces hide implementation details.

Key Takeaway

Design interfaces first.

Themes

software design abstraction maintainability encapsulation usability

Mood

pragmatic analytical

Type

advice principle

When to use this quote

- API development
- library creation
- framework design
- team code reviews

Key Concepts

interface design code hygiene modularity

Practical Applications

- API documentation
- component reuse

Questions to Reflect On

- How does a well‑designed interface affect future changes?
- What trade‑offs exist between hiding complexity and providing flexibility?

★ ★ ★ ★ ★   No ratings yet

[Clever](https://sms4smile.com/quotes/about/clever/) [Code](https://sms4smile.com/quotes/about/code/) [Essence](https://sms4smile.com/quotes/about/essence/) [Interfaces](https://sms4smile.com/quotes/about/interfaces/) [Programming](https://sms4smile.com/quotes/about/programming/) [Technology](https://sms4smile.com/quotes/about/technology/) [Thinking](https://sms4smile.com/quotes/about/thinking/)

## Related quotes

> [I have discovered that there are two types of command interfaces in the world of computing: good interfaces and user interfaces.](https://sms4smile.com/quotes/daniel-j-bernstein/i-have-discovered-that-there-are-two-types-of-command-interfaces-in/)

[Daniel J. Bernstein](https://sms4smile.com/quotes/author/daniel-j-bernstein/)

> [More good code has been written in languages denounced as "bad'' than in languages proclaimed "wonderful'' - much more.](https://sms4smile.com/quotes/bjarne-stroustrup/more-good-code-has-been-written-in-languages-denounced-as-bad-than-in/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [Little else matters than to write good code.](https://sms4smile.com/quotes/karl-lehenbauer/little-else-matters-than-to-write-good-code/)

[Karl Lehenbauer](https://sms4smile.com/quotes/author/karl-lehenbauer/)

> [Good code is its own best documentation. As you're about to add a comment, ask yourself, "How can I improve the code so that…](https://sms4smile.com/quotes/steve-mcconnell/good-code-is-its-own-best-documentation-as-you-re-about-to-add-a/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [Good code is its own best documentation.](https://sms4smile.com/quotes/steve-mcconnell/good-code-is-its-own-best-documentation/)

[Steve McConnell](https://sms4smile.com/quotes/author/steve-mcconnell/)

> [In the face of entropy and nothingness, you kind of have to pretend it's not there if you want to keep writing good code.](https://sms4smile.com/quotes/karl-lehenbauer/in-the-face-of-entropy-and-nothingness-you-kind-of-have-to-pretend-it/)

[Karl Lehenbauer](https://sms4smile.com/quotes/author/karl-lehenbauer/)

> [“A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has…](https://sms4smile.com/quotes/kevlin-henney/a-non-programmer-friend-once-remarked-that-code-looks-like-poetry-i/)

Kevlin Henney

> [I used to be a computer engineer, and I can make really good code, and we can make systems that work really well, and…](https://sms4smile.com/quotes/travis-kalanick/i-used-to-be-a-computer-engineer-and-i-can-make-really-good-code-and/)

[Travis Kalanick](https://sms4smile.com/quotes/author/travis-kalanick/)

> [“Python is good enough for code that only has to respond to a single user at human speed, but not usually for code that…](https://sms4smile.com/quotes/anonymous/python-is-good-enough-for-code-that-only-has-to-respond-to-a-single/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

> [First, I'd like to see the basic tools such as compilers, debuggers, profilers, database interfaces, GUI builders, CAD tools, and so forth fully support…](https://sms4smile.com/quotes/bjarne-stroustrup/first-i-d-like-to-see-the-basic-tools-such-as-compilers-debuggers/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [The combination of threads, remote-procedure-call interfaces, and heavyweight object-oriented design is especially dangerous... if you are ever invited onto a project that is supposed…](https://sms4smile.com/quotes/eric-s-raymond/the-combination-of-threads-remote-procedure-call-interfaces-and/)

[Eric S. Raymond](https://sms4smile.com/quotes/author/eric-s-raymond/)

> [It was one of those sort of apocalyptic moments. I remember within ten minutes of seeing the graphical user interface stuff, just knowing that…](https://sms4smile.com/quotes/steve-jobs/it-was-one-of-those-sort-of-apocalyptic-moments-i-remember-within-ten/)

[Steve Jobs](https://sms4smile.com/quotes/author/steve-jobs/)

> [One of the things I've been working on for the past few months is a radical simplification of the interface.](https://sms4smile.com/quotes/matt-mullenweg/one-of-the-things-i-ve-been-working-on-for-the-past-few-months-is-a/)

[Matt Mullenweg](https://sms4smile.com/quotes/author/matt-mullenweg/)

> [I understood more what Nancy Reagan and Ronald Reagan, what they were coming from. Kind of the horrors of their childhoods that they were…](https://sms4smile.com/quotes/cynthia-nixon/i-understood-more-what-nancy-reagan-and-ronald-reagan-what-they-were/)

[Cynthia Nixon](https://sms4smile.com/quotes/author/cynthia-nixon/)

> [Even the best designers produce successful products only if their designs solve the right problems. A wonderful interface to the wrong features will fail.](https://sms4smile.com/quotes/jakob-nielsen/even-the-best-designers-produce-successful-products-only-if-their/)

[Jakob Nielsen](https://sms4smile.com/quotes/author/jakob-nielsen/)

## More by Bjarne Stroustrup

> [Any verbose and tedious solution is error-prone because programmers get bored.](https://sms4smile.com/quotes/bjarne-stroustrup/any-verbose-and-tedious-solution-is-error-prone-because-programmers/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”](https://sms4smile.com/quotes/bjarne-stroustrup/there-are-only-two-kinds-of-languages-the-ones-people-complain-about/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [Nobody should call themselves a professional if they only knew one language.](https://sms4smile.com/quotes/bjarne-stroustrup/nobody-should-call-themselves-a-professional-if-they-only-knew-one/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [It's easy to win forgiveness for being wrong; being right is what gets you into real trouble.](https://sms4smile.com/quotes/bjarne-stroustrup/it-s-easy-to-win-forgiveness-for-being-wrong-being-right-is-what-gets/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [Some software is actually pretty good, by any standard. Think of the Mars Rovers, Google, and the Human Genome Project. Now, that's quality software!](https://sms4smile.com/quotes/bjarne-stroustrup/some-software-is-actually-pretty-good-by-any-standard-think-of-the/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.](https://sms4smile.com/quotes/bjarne-stroustrup/c-makes-it-easy-to-shoot-yourself-in-the-foot-c-makes-it-harder-but/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [I assume that a sufficiently skilled will be able to do anything not explicitly forbidden by the hardware.](https://sms4smile.com/quotes/bjarne-stroustrup/i-assume-that-a-sufficiently-skilled-will-be-able-to-do-anything-not/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [I like doing research that has an impact. If I went to a company to make what they call 'real money,' I'd be just…](https://sms4smile.com/quotes/bjarne-stroustrup/i-like-doing-research-that-has-an-impact-if-i-went-to-a-company-to/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [I would encourage nonproprietary standards for tools and libraries](https://sms4smile.com/quotes/bjarne-stroustrup/i-would-encourage-nonproprietary-standards-for-tools-and-libraries/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [This evolution may compromise Java's claim of being simpler than C++, but my guess is that the effort will make Java a better language…](https://sms4smile.com/quotes/bjarne-stroustrup/this-evolution-may-compromise-java-s-claim-of-being-simpler-than-c/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [Clearly, I reject the view that there is one way that is right for everyone and for every problem](https://sms4smile.com/quotes/bjarne-stroustrup/clearly-i-reject-the-view-that-there-is-one-way-that-is-right-for/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [There is no one "root of all evil" in software development. Design is hard in many ways. People tend to underestimate the intellectual and…](https://sms4smile.com/quotes/bjarne-stroustrup/there-is-no-one-root-of-all-evil-in-software-development-design-is/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [However, when Java is promoted as the sole programming language, its flaws and limitations become serious.](https://sms4smile.com/quotes/bjarne-stroustrup/however-when-java-is-promoted-as-the-sole-programming-language-its/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> [C++ is designed to allow you to express ideas, but if you don't have ideas or don't have any clue about how to express…](https://sms4smile.com/quotes/bjarne-stroustrup/c-is-designed-to-allow-you-to-express-ideas-but-if-you-don-t-have/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

> ["Legacy code" often differs from its suggested alternative by actually working and scaling.](https://sms4smile.com/quotes/bjarne-stroustrup/legacy-code-often-differs-from-its-suggested-alternative-by-actually/)

[Bjarne Stroustrup](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

[Explore all 58 Bjarne Stroustrup quotes ](https://sms4smile.com/quotes/author/bjarne-stroustrup/)

## More All kinds quotes

> [I was interested in all kinds of things, whether it be Avatar, Mad Men, Troy, 300, Battlestar Gallactica, or the poems of Horace and…](https://sms4smile.com/quotes/daniel-mendelsohn/i-was-interested-in-all-kinds-of-things-whether-it-be-avatar-mad-men/)

[Daniel Mendelsohn](https://sms4smile.com/quotes/author/daniel-mendelsohn/)

> [While husbands and lovers in the stories are of all kinds, ranging from sympathetic to disgusting, women are invariably deceivers: inconstant, unscrupulous, quarrelsome, querulous,…](https://sms4smile.com/quotes/barbara-tuchman/while-husbands-and-lovers-in-the-stories-are-of-all-kinds-ranging/)

[Barbara Tuchman](https://sms4smile.com/quotes/author/barbara-tuchman/)

> [I'm not technically proficient enough to attempt all kinds of music.](https://sms4smile.com/quotes/noel-gallagher/i-m-not-technically-proficient-enough-to-attempt-all-kinds-of-music/)

[Noel Gallagher](https://sms4smile.com/quotes/author/noel-gallagher/)

> [My office in New York is overflowing with all kinds of cookbooks, and in New Orleans we have a huge culinary library. So yeah,…](https://sms4smile.com/quotes/emeril-lagasse/my-office-in-new-york-is-overflowing-with-all-kinds-of-cookbooks-and/)

[Emeril Lagasse](https://sms4smile.com/quotes/author/emeril-lagasse/)

> [Sydney is full of the craziest and most talented artists of all kinds.](https://sms4smile.com/quotes/keiynan-lonsdale/sydney-is-full-of-the-craziest-and-most-talented-artists-of-all-kinds/)

[Keiynan Lonsdale](https://sms4smile.com/quotes/author/keiynan-lonsdale/)

> [Baseball needs to put the steroids era behind it by having and enforcing tough rules against all kinds of artificial advantages, so that spring…](https://sms4smile.com/quotes/marvin-olasky/baseball-needs-to-put-the-steroids-era-behind-it-by-having-and/)

[Marvin Olasky](https://sms4smile.com/quotes/author/marvin-olasky/)

> [You know, the world’s not running out of oil. There’s all kinds of oil left in all kinds of places. …We’re never going to…](https://sms4smile.com/quotes/jeff-rubin/you-know-the-world-s-not-running-out-of-oil-there-s-all-kinds-of-oil/)

[Jeff Rubin](https://sms4smile.com/quotes/author/jeff-rubin/)

> [I grew up with all kinds of people.](https://sms4smile.com/quotes/vin-diesel/i-grew-up-with-all-kinds-of-people/)

[Vin Diesel](https://sms4smile.com/quotes/author/vin-diesel/)

> [Because there were all kinds of hell - some were black and dirty, and some were silvery and high.](https://sms4smile.com/quotes/mark-helprin/because-there-were-all-kinds-of-hell-some-were-black-and-dirty-and/)

[Mark Helprin](https://sms4smile.com/quotes/author/mark-helprin/)

> [The architecture of the song, if it's built properly, can withstand all kinds of things.](https://sms4smile.com/quotes/emily-haines/the-architecture-of-the-song-if-it-s-built-properly-can-withstand-all/)

[Emily Haines](https://sms4smile.com/quotes/author/emily-haines/)

> [There are all kinds of writers. The best writers write children's books.](https://sms4smile.com/quotes/richard-scarry/there-are-all-kinds-of-writers-the-best-writers-write-children-s-books/)

[Richard Scarry](https://sms4smile.com/quotes/author/richard-scarry/)

> [We also need to make sure women can be in charge of their reproductive health. We can't defund places like Planned Parenthood, where women…](https://sms4smile.com/quotes/chrissy-teigen/we-also-need-to-make-sure-women-can-be-in-charge-of-their/)

[Chrissy Teigen](https://sms4smile.com/quotes/author/chrissy-teigen/)

> [The single greatest pleasure that I have in doing ('Bizarre Foods') is when I meet families with 6, 7, 8-year-olds, or teenagers, who say,…](https://sms4smile.com/quotes/andrew-zimmern/the-single-greatest-pleasure-that-i-have-in-doing-bizarre-foods-is/)

[Andrew Zimmern](https://sms4smile.com/quotes/author/andrew-zimmern/)

> [I can see that I imagine all kinds of rejection that never happens. I can see that I beg and plead for love that…](https://sms4smile.com/quotes/elizabeth-wurtzel/i-can-see-that-i-imagine-all-kinds-of-rejection-that-never-happens-i/)

[Elizabeth Wurtzel](https://sms4smile.com/quotes/author/elizabeth-wurtzel/)

> [Do you know people who insist they like 'all kinds of music'? That actually means they like no kinds of music.](https://sms4smile.com/quotes/chuck-klosterman/do-you-know-people-who-insist-they-like-all-kinds-of-music-that/)

[Chuck Klosterman](https://sms4smile.com/quotes/author/chuck-klosterman/)

Browse all 1,489 All kinds quotes

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "Always think about how a piece of code should be used: good interfaces are the essence of good code. You can hide all kinds of clever and dirty code behind a good interface if you really need such code.",
            "creator": {
                "@type": "Person",
                "name": "Bjarne Stroustrup"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/bjarne-stroustrup/always-think-about-how-a-piece-of-code-should-be-used-good-interfaces/",
            "about": {
                "@type": "Thing",
                "name": "All kinds"
            },
            "@id": "https://sms4smile.com/quotes/bjarne-stroustrup/always-think-about-how-a-piece-of-code-should-be-used-good-interfaces/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg",
                "url": "https://sms4smile.com/quotes/i/761/bjarne-stroustrup-11774_all-kinds_always-think-about-how-a-piece-of-code-s_41665.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“Always think about how a piece of code should be used: good interfaces are the essence of good code. You can…” — Bjarne Stroustrup",
                "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": "Bjarne Stroustrup",
                    "item": "https://sms4smile.com/quotes/author/bjarne-stroustrup/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "Always think about how a piece...",
                    "item": "https://sms4smile.com/quotes/bjarne-stroustrup/always-think-about-how-a-piece-of-code-should-be-used-good-interfaces/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/bjarne-stroustrup/always-think-about-how-a-piece-of-code-should-be-used-good-interfaces/#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
            }
        }
    ]
}
```
