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

Written December 2007 while Steve was on an HR-only "vacation" — time off spent entirely on bringing his game Wyvern back online. The honest reason underneath all the mundane ones, he admits, is that the code base had become too big for one person to manage. The thesis is a self-described minority opinion: the worst thing that can happen to a code base is size. Bloat wrecks projects, companies, and eventually forces rewrites. Steve grounds it in personal accountability — his game grew to 500,000 lines of Java, lovely on the outside and "quite horrific internally," and doing the right thing with unit tests would have doubled it. He goes after the industry's blind spots: programmers treat code like dirt to be shovelled with ever-bigger tools; Refactoring and Design Patterns only ever make a code base larger (only Interpreter, the one GoF pattern that compresses, is universally ignored); IDEs can't save you — Steve never once got Eclipse to even index his own half-million-line game. This is ultimately a Java problem: the language has no compression facilities — no macros, lambdas, templates — so bloat is structural, and if you must shrink your code, you cannot keep using it. He addresses the rant to a hypothetical young student, because aiming it at "experienced" programmers would raise his blood pressure too much to finish.

"Code base size is the enemy" became one of Steve's most-cited theses and a fixed reference point in the conciseness debates of the late 2000s — a self-described minority view at the time, amplified by Jeff Atwood ("Size Is The Enemy") and rebutted just as quickly. The Wyvern confession gave it unusual credibility: he indicted his own mess, not someone else's. Two decades on, the verdict splits cleanly. The size half won — "less code is better; code is a liability, not an asset" is now conventional wisdom, and the 2024–2026 AI-coding era re-litigated it in his favor as large-scale studies of machine-generated code measured exactly the runaway duplication and collapsed refactoring the rant warned about. The dynamic-languages half — abandon Java and static typing for languages that compress better — lost to the TypeScript / Rust / Go resurgence, though Steve had hedged even that, calling gradual typing "close to ideal" as early as 2005. The Rhino / EcmaScript-4 bet at the close dated fast; the core claim did not.

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