Code's Worst Enemy — cover art: a small panda standing at the foot of a colossal, teetering, wildly over-built castle of its own making, dwarfed and looking up as a few stones come loose.

2007 · Stevey's Blog Rants · Rant

“Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly.”
— From Code's Worst Enemy, December 2007
Read the essay

© 2007 Steve Yegge. Originally published at Stevey's Blog Rants.

Author’s note

Rereading this makes me feel soooo much better about some of the other garbage I've written. I just wish I always wrote like this.

The core thesis about code size really was a small minority opinion back then, and didn't start to become mainstream until ten or fifteen years later.

AI Notes

A Christmas-week dispatch from a "vacation" that was vacation only in the HR sense: Steve had taken time off work to haul his game back online — partly, he admits, so the players would stop stalking him — and this rant is what escaped while he sat contemplating the wreckage. He addresses it to an imaginary high-school student, because talking to experienced programmers about code size would, by his own account, raise his blood pressure past the point of finishing. The device sets the temperature: patient with the kid, merciless with everyone else, and built on homely metaphors — the closet you're cleaning without being allowed to throw anything away, the construction crew that sees code as dirt to be moved with ever-bigger machines. He even pauses to speculate about why Martin Fowler left Java for Ruby, then puts the question to him directly: "Martin, am I wrong?"

Steve concedes up front that he will fail to define bloat, and he keeps his word — "size" stays a placeholder he talks around, the exact gap rebuttals like Frans Bouma's drove a truck through. And the closing section, a JVM-language beauty contest conducted with maximum prejudice (proposing Lisp at work gets you bespittled "up to thirty feet, like zoo camels"; Groovy is ruled out permanently and with feeling; Jython gets a line about its coma), reads two decades later as the essay's hostage to fortune: the successor language he finally names, and the two-year window he gives himself to rewrite the game in it at a third of the size, are best enjoyed with the hindsight the reader already owns. The anger aged better than the answer.

Related listings

  • 2008

    Portrait of a N00b

    The two halves of one idea. Code's Worst Enemy says bloat is the enemy of a code base; Portrait of a N00b, two months later, names the personal habit — verbosity, an intolerance of compression — that grows the bloat one programmer at a time.

  • 2006

    Execution in the Kingdom of Nouns

    Code's Worst Enemy ends by concluding you cannot keep using Java if you want to shrink your code; Kingdom of Nouns is Steve's funniest, most complete account of what, exactly, is wrong with the language he is walking away from.

  • 2008

    Dynamic Languages Strike Back

    Code's Worst Enemy diagnoses the disease — Java has no compression facilities, so it bloats. Dynamic Languages Strike Back is the broader case for the language families that do, and for the runtimes that make them fast enough to choose.

Press & impact

Few twenty-year-old engineering rants get to watch their central claim go from heresy to house style. This one did. In December 2007 Steve framed "the worst thing that can happen to a code base is size" as a hard-won minority opinion — the kind of thing, he wrote, that gets you treated as a "borderline lunatic." The reception bore him out: a few loud endorsements, an equal number of flat rebuttals, and a lot of shrugging.

The argument kept compounding. "Code is a liability, not an asset" drifted quietly into mainstream engineering wisdom over the following fifteen years; then the AI-coding era handed it a second, louder vindication, as large-scale studies of machine-generated code began measuring exactly the runaway duplication and collapsed refactoring the rant had warned about. The trail below is the reception — then, and now.

The 2007 argument

Published two days before Christmas, the rant ran hot through the programming blogs over the holiday — endorsed, condensed, and contradicted, often within the same week.

2007-12-23 Size Is The Enemy Coding Horror · Jeff Atwood

The strongest immediate endorsement — condensed the rant to a single rule: "write less code, by any means necessary."

2007-12-24 Codebase size isn't the enemy weblogs.asp.net · Frans Bouma

The representative rebuttal: size is a consequence of scope, not the enemy — duplication and unclear intent are; and the dynamic-language remedy doesn't follow.

2007-12 Code size and dynamic languages Ola Bini

A response engaging the compression-via-dynamic-languages half of the argument.

2007-12 Does Lines of Code Kill? InfoQ

News write-up of the debate, calling Steve "more radical than most developers."

2007-12 Java Community News — Steve Yegge on Code's Worst Enemy Artima

Twenty years later: the AI-era reckoning

When LLMs began generating code by the thousand-line, the size-is-the-enemy framing returned — this time with data behind it.

2025-02 How AI-generated code accelerates technical debt LeadDev

Reports GitClear's 211-million-line study: an ~8× jump in duplicated code blocks during 2024, with copy/pasted code overtaking refactored ("moved") code for the first time — under the heading "More code lines ≠ success."

2025 How AI-generated code accelerates technical debt Thoughtworks

Frames raw AI output volume as a long-term maintenance liability — the rant's thesis in modern dress.

2025 AI-Generated Code Poses Security, Bloat Challenges Dark Reading

Bloat as a security surface, not just a maintenance one.

Where it was argued