November 1, 2025
When whitespace starts a holy war
The hardest program I've ever written (2015)
A year on a code beautifier ignites ethics drama, PDF flashbacks, and a legendary one-word reply
TLDR: A Dart engineer spent a year perfecting a code formatter that automatically tidies code and runs blazing fast. Commenters split between praising the truce it brings to code reviews and blasting it as soulless uniformity, with battle-scarred PDF vets nodding and one mic-drop reply: “No.”
A year for 3,835 lines that just tweak spaces? That’s the twisty tale behind Dart’s code “beautifier,” which trims and breaks lines so teams stop arguing about style. The author says it blasts through two million lines in 45 seconds, after deleting 20,704 lines to get there. Cue the comments.
Old-school vets nodded grimly. One linked to Donald Knuth’s legendary TeX bug log, calling formatting “the kind of tarpit one can get trapped in” and sparking war stories about PDF output trauma. Pragmatists cheered the peace treaty angle: automatic formatting ends endless review fights. But the artsy camp pushed back: “Uniformity for the sake of uniformity. It is not a very humanistic,” sighed one critic, arguing code should keep some personality.
Meanwhile, builders flexed. One dev boasted they shipped a simpler formatter and actually had fun. Another declared, “Text formatting is a never ending list of problems,” which the thread turned into a meme. The article’s skull footnotes became a running joke for fallen lines of code, while a minimalist chimed in with a single word: “No.” Verdict? This “small” tool ignited big feelings—part therapy session, part philosophy class, part stand-up show. And someone made the “Skynet for spaces” joke.
Key Points
- •The author built an automated code formatter for Dart (“dartfmt”) consisting of 3,835 lines after extensive iteration.
- •Development involved deleting 20,704 lines over nearly a year to refine the final implementation.
- •The formatter emphasizes consistent, idiomatic output and was influenced by Go’s gofmt approach.
- •Performance is strong: over two million lines processed in ~45 seconds on a single-core laptop.
- •Handling line-length limits requires complex split decisions, with exponentially large search spaces (e.g., 13 split points = 8,192 combinations).