---
title: "Meaning & Key Takeaway of: the road to programming hell is paved…"
description: "\"“the road to programming hell is paved with global variables,”\" — Steve McConnell"
image: "https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png"
---

#  the road to programming hell is paved with global variables,

![“the road to programming hell is paved with global variables,” quote by Steve McConnell](https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png)   [Download](https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png) [Open image](https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png)

> ““the road to programming hell is paved with global variables,””

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

## About This Quote

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

Relying heavily on global variables creates tangled, hard‑to‑maintain code, leading developers into a chaotic, error‑prone state.

**In simple terms:** Global variables breed programming chaos.

Key Takeaway

Avoid globals to keep code clean.

Themes

software engineering code quality maintainability programming practices

Mood

pragmatic cautionary

Type

technical advice programming aphorism

When to use this quote

- large legacy codebases
- team projects with shared state
- rapid prototyping without proper architecture

Key Concepts

modularity encapsulation

Practical Applications

- Refactor to use local scope and dependency injection.

Questions to Reflect On

- What trade‑offs exist when eliminating globals in performance‑critical code?
- How can teams enforce discipline around global state?

★ ★ ★ ★ ★   No ratings yet

[Programming](https://sms4smile.com/quotes/about/programming/) [Technology](https://sms4smile.com/quotes/about/technology/)

## Related quotes

> [“When you link to multiple JavaScript files from your page, all the global variables are defined in the same global space.”](https://sms4smile.com/quotes/eric-freeman/when-you-link-to-multiple-javascript-files-from-your-page-all-the/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“undefined and NaN are not constants. They are global variables, and you can change their values. That should not be possible, and yet it…](https://sms4smile.com/quotes/douglas-crockford/undefined-and-nan-are-not-constants-they-are-global-variables-and-you/)

[Douglas Crockford](https://sms4smile.com/quotes/author/douglas-crockford/)

> [There's a story about how the program is organized, there's a story about the context in which the program is expected to operate. And…](https://sms4smile.com/quotes/guy-steele/there-s-a-story-about-how-the-program-is-organized-there-s-a-story/)

[Guy Steele](https://sms4smile.com/quotes/author/guy-steele/)

> [... programming requires more concentration than other activities. It's the reason programmers get upset about 'quick interruptions' - such interruptions are tantamount to asking…](https://sms4smile.com/quotes/steve-mcconnell/programming-requires-more-concentration-than-other-activities-it-s/)

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

> [“You should imagine variables as tentacles, rather than boxes. They do not contain values; they grasp them—two variables can refer to the same value.”](https://sms4smile.com/quotes/marijn-haverbeke/you-should-imagine-variables-as-tentacles-rather-than-boxes-they-do/)

[Marijn Haverbeke](https://sms4smile.com/quotes/author/marijn-haverbeke/)

> [“usually more time is spent in making good-looking presentation slides than in improving the quality of the software.”](https://sms4smile.com/quotes/steve-mcconnell/usually-more-time-is-spent-in-making-good-looking-presentation-slides/)

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

> [The job of the average manager requires a shift in focus every few minutes. The job of the average software developer requires that the…](https://sms4smile.com/quotes/steve-mcconnell/the-job-of-the-average-manager-requires-a-shift-in-focus-every-few/)

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

> [“With great goals, comes the high costs; both fixed and variable. Time is the fixed cost; efforts, variable. Spend passionately.”](https://sms4smile.com/quotes/vikrmn-ca-vikram-verma/with-great-goals-comes-the-high-costs-both-fixed-and-variable-time-is/)

[Vikrmn: CA Vikram Verma](https://sms4smile.com/quotes/author/vikrmn-ca-vikram-verma/)

> [I believe that it may be normal, healthy, and even productive to experience mild to moderate depression from time to time as part of…](https://sms4smile.com/quotes/andrew-weil/i-believe-that-it-may-be-normal-healthy-and-even-productive-to/)

[Andrew Weil](https://sms4smile.com/quotes/author/andrew-weil/)

> [We’re never gonna understand women. They’re way too complex. You’ve got too many variables to consider. PMS, bad hair days, miscellaneous mood swings .…](https://sms4smile.com/quotes/susane-colasanti/we-re-never-gonna-understand-women-they-re-way-too-complex-you-ve-got/)

[Susane Colasanti](https://sms4smile.com/quotes/author/susane-colasanti/)

> [Because what happens is, as the economy suffers, tax revenues go down. But unlike businesses, where at least your variable costs go down, in…](https://sms4smile.com/quotes/meg-whitman/because-what-happens-is-as-the-economy-suffers-tax-revenues-go-down/)

[Meg Whitman](https://sms4smile.com/quotes/author/meg-whitman/)

> [The difference is that we have the hardest and most painful evidence that there was a Holocaust. But, for the global warming scenario that…](https://sms4smile.com/quotes/thomas-sowell/the-difference-is-that-we-have-the-hardest-and-most-painful-evidence/)

[Thomas Sowell](https://sms4smile.com/quotes/author/thomas-sowell/)

> [Science manipulates things and gives up living in them. It makes its own limited models of things; operating upon these indices or variables to…](https://sms4smile.com/quotes/maurice-merleau-ponty/science-manipulates-things-and-gives-up-living-in-them-it-makes-its/)

[Maurice Merleau-Ponty](https://sms4smile.com/quotes/author/maurice-merleau-ponty/)

> [As a social and as a personal force, religion has become a dependent variable. It does not originate; it reacts. It does not denounce;…](https://sms4smile.com/quotes/c-wright-mills/as-a-social-and-as-a-personal-force-religion-has-become-a-dependent/)

[C. Wright Mills](https://sms4smile.com/quotes/author/c-wright-mills/)

> [As the variable capital always stays in the hands of the capitalist in some form or other, it cannot be claimed in any way…](https://sms4smile.com/quotes/karl-marx/as-the-variable-capital-always-stays-in-the-hands-of-the-capitalist/)

[Karl Marx](https://sms4smile.com/quotes/author/karl-marx/)

## More by Steve McConnell

> [“it's done by creating 25 times as many dirty tests”](https://sms4smile.com/quotes/steve-mcconnell/it-s-done-by-creating-25-times-as-many-dirty-tests/)

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

> [... programming requires more concentration than other activities. It's the reason programmers get upset about 'quick interruptions' - such interruptions are tantamount to asking…](https://sms4smile.com/quotes/steve-mcconnell/programming-requires-more-concentration-than-other-activities-it-s/)

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

> [The job of the average manager requires a shift in focus every few minutes. The job of the average software developer requires that the…](https://sms4smile.com/quotes/steve-mcconnell/the-job-of-the-average-manager-requires-a-shift-in-focus-every-few/)

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

> [“usually more time is spent in making good-looking presentation slides than in improving the quality of the software.”](https://sms4smile.com/quotes/steve-mcconnell/usually-more-time-is-spent-in-making-good-looking-presentation-slides/)

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

> [It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is…](https://sms4smile.com/quotes/steve-mcconnell/it-s-hard-enough-to-find-an-error-in-your-code-when-you-re-looking/)

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

> [“the error rate in manual testing is comparable to the bug rate in the code being tested.”](https://sms4smile.com/quotes/steve-mcconnell/the-error-rate-in-manual-testing-is-comparable-to-the-bug-rate-in-the/)

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

> [“few people can understand more than three levels of nested ifs”](https://sms4smile.com/quotes/steve-mcconnell/few-people-can-understand-more-than-three-levels-of-nested-ifs/)

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

> [ “\[...\] you shouldn't be uneasy about any parts of the architecture. It shouldn't contain anything just to please the boss. It shouldn't contain anything… ](https://sms4smile.com/quotes/steve-mcconnell/you-shouldn-t-be-uneasy-about-any-parts-of-the-architecture-it/)

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

> [It's OK to figure out murder mysteries, but you shouldn't need to figure out code. You should be able to read it.](https://sms4smile.com/quotes/steve-mcconnell/it-s-ok-to-figure-out-murder-mysteries-but-you-shouldn-t-need-to/)

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

> [“Programmers working with high-level languages achieve better productivity and quality than those working with lower-level languages. Languages such as C++, Java, Smalltalk, and Visual…](https://sms4smile.com/quotes/steve-mcconnell/programmers-working-with-high-level-languages-achieve-better/)

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

> [The trouble with quick and dirty is that dirty remains long after quick has been forgotten.](https://sms4smile.com/quotes/steve-mcconnell/the-trouble-with-quick-and-dirty-is-that-dirty-remains-long-after/)

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

> [“Be sure that the names you choose favor read-time convenience over write-time convenience.”](https://sms4smile.com/quotes/steve-mcconnell/be-sure-that-the-names-you-choose-favor-read-time-convenience-over/)

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

> [Even when you have skilled, motivated, hard-working people, the wrong team structure can undercut their efforts instead of catapulting them to success. A poor…](https://sms4smile.com/quotes/steve-mcconnell/even-when-you-have-skilled-motivated-hard-working-people-the-wrong/)

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

> [A typical software project can present more opportunities to learn from mistakes than some people get in a lifetime.](https://sms4smile.com/quotes/steve-mcconnell/a-typical-software-project-can-present-more-opportunities-to-learn/)

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

> [The default movement on a software project should be in the direction of taking elements of the software away to make it simpler rather…](https://sms4smile.com/quotes/steve-mcconnell/the-default-movement-on-a-software-project-should-be-in-the-direction/)

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

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

## More Programming quotes

> [Of everything I have done, 'The Archers' always gets the most excitement; there's a sort of uncontrollable joy from fans of the program.](https://sms4smile.com/quotes/felicity-jones/of-everything-i-have-done-the-archers-always-gets-the-most-excitement/)

[Felicity Jones](https://sms4smile.com/quotes/author/felicity-jones/)

> [When we shipped 'Borderlands 2,' we didn't ship it with a plan of how the level cap was going to increase. We didn't have…](https://sms4smile.com/quotes/randy-pitchford/when-we-shipped-borderlands-2-we-didn-t-ship-it-with-a-plan-of-how/)

[Randy Pitchford](https://sms4smile.com/quotes/author/randy-pitchford/)

> [It is no secret that I have read 'The Da Vinci Code' several times. I genuinely believe that 'The Da Vinci Code' and 'Angels…](https://sms4smile.com/quotes/ashwin-sanghi/it-is-no-secret-that-i-have-read-the-da-vinci-code-several-times-i/)

[Ashwin Sanghi](https://sms4smile.com/quotes/author/ashwin-sanghi/)

> [“Check the program before you two start undressing and...well, doing whatever freaky shit you talked Harley into.” I”](https://sms4smile.com/quotes/james-cox/check-the-program-before-you-two-start-undressing-and-well-doing/)

[James Cox](https://sms4smile.com/quotes/author/james-cox/)

> [Programmers are always surrounded by complexity; we cannot avoid it… If our basic tool, the language in which we design and code our programs,…](https://sms4smile.com/quotes/tony-hoare/programmers-are-always-surrounded-by-complexity-we-cannot-avoid-it-if/)

[Tony Hoare](https://sms4smile.com/quotes/author/tony-hoare/)

> [One of my most productive days was throwing away 1,000 lines of code.](https://sms4smile.com/quotes/ken-thompson/one-of-my-most-productive-days-was-throwing-away-1-000-lines-of-code/)

[Ken Thompson](https://sms4smile.com/quotes/author/ken-thompson/)

> [Writing code means always having to say you're sorry.](https://sms4smile.com/quotes/paul-ford/writing-code-means-always-having-to-say-you-re-sorry/)

[Paul Ford](https://sms4smile.com/quotes/author/paul-ford/)

> [Limit use of shareware and public domain software to systems without fixed disks. If you do use them on fixed disks, allocate separate subdirectories...…](https://sms4smile.com/quotes/john-mcafee/limit-use-of-shareware-and-public-domain-software-to-systems-without/)

[John McAfee](https://sms4smile.com/quotes/author/john-mcafee/)

> [I'm publicist, patron of nine charities, creative director, food consultant, recipe developer - and mum.](https://sms4smile.com/quotes/jack-monroe/i-m-publicist-patron-of-nine-charities-creative-director-food/)

[Jack Monroe](https://sms4smile.com/quotes/author/jack-monroe/)

> [With VR, we have this same vision, which is create this ultimate platform for sharing your imagination. Our huge community of 300,000 developers creates…](https://sms4smile.com/quotes/david-baszucki/with-vr-we-have-this-same-vision-which-is-create-this-ultimate/)

[David Baszucki](https://sms4smile.com/quotes/author/david-baszucki/)

> [It would be a piece of ingenuousness to accuse the man of today of his lack of moral code. The accusation would leave him…](https://sms4smile.com/quotes/jose-ortega-y-gasset/it-would-be-a-piece-of-ingenuousness-to-accuse-the-man-of-today-of/)

[Jose Ortega y Gasset](https://sms4smile.com/quotes/author/jose-ortega-y-gasset/)

> [A lot of the kids gave a lot of positive feedback about if I ever became a coach, they would love to play in…](https://sms4smile.com/quotes/penny-hardaway/a-lot-of-the-kids-gave-a-lot-of-positive-feedback-about-if-i-ever/)

[Penny Hardaway](https://sms4smile.com/quotes/author/penny-hardaway/)

> [I loved 'Chicago Code;' I watched that a lot. It was great because it really captured the city - I'm from Chicago, too.](https://sms4smile.com/quotes/jessy-schram/i-loved-chicago-code-i-watched-that-a-lot-it-was-great-because-it/)

[Jessy Schram](https://sms4smile.com/quotes/author/jessy-schram/)

> [I kind of pride myself on coming onto things that are well-oiled machines and finding a way to bring what I bring and fit…](https://sms4smile.com/quotes/rob-lowe/i-kind-of-pride-myself-on-coming-onto-things-that-are-well-oiled/)

[Rob Lowe](https://sms4smile.com/quotes/author/rob-lowe/)

> [“By rendering the model in ASN.1, the NCBI created a system that combined objects (DNA sequences, protein sequences, references, sequence features) from a variety…](https://sms4smile.com/quotes/anonymous/by-rendering-the-model-in-asn-1-the-ncbi-created-a-system-that/)

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

[Browse all 6,477 Programming quotes ](https://sms4smile.com/quotes/about/programming/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“the road to programming hell is paved with global variables,”",
            "creator": {
                "@type": "Person",
                "name": "Steve McConnell"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/steve-mcconnell/the-road-to-programming-hell-is-paved-with-global-variables/",
            "about": {
                "@type": "Thing",
                "name": "Programming"
            },
            "@id": "https://sms4smile.com/quotes/steve-mcconnell/the-road-to-programming-hell-is-paved-with-global-variables/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png",
                "contentUrl": "https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png",
                "url": "https://sms4smile.com/quotes/i/31c/steve-mcconnell-11957_programming_the-road-to-programming-hell-is-paved-wi_104311.png",
                "width": 1080,
                "height": 1080,
                "caption": "“the road to programming hell is paved with global variables,” — Steve McConnell",
                "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": "Steve McConnell",
                    "item": "https://sms4smile.com/quotes/author/steve-mcconnell/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“the road to programming hell is...",
                    "item": "https://sms4smile.com/quotes/steve-mcconnell/the-road-to-programming-hell-is-paved-with-global-variables/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/steve-mcconnell/the-road-to-programming-hell-is-paved-with-global-variables/#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
            }
        }
    ]
}
```
