Skip to content
← Bookmarks
Added 4 Aug 2026joelonsoftware.comfiled under Plugin Modernization

Why the ugly code you want to delete is ugly on purpose

A note on Things You Should Never Do, Part I by Joel Spolsky, published on joelonsoftware.com.

This is the piece to hand to anyone who opens a planning meeting by proposing a rewrite. It is from 2000 and it has not aged, which is itself evidence about how little the underlying dynamic has changed.

The core claim is uncomfortable and correct: legacy code looks worse than it is. Every awkward branch and unexplained condition is usually there because something broke once, in production, for a real customer, and somebody fixed it under pressure. Delete the file and you delete that record. The new version will be cleaner and it will rediscover the same bugs one at a time, in front of users.

For commercial plugin and SaaS work this is not an abstract argument. An install base you do not control cannot be migrated on your schedule, and a rewrite means running two systems until the last user moves, which is usually longer than anyone plans for.

Worth pairing with the strangler fig entry in this log: Spolsky tells you why not to rewrite, Fowler tells you what to do instead. Read in that order they are one argument rather than two.

This is the thinking behind why you do not rewrite a plugin with a big install base.

Read the original ↗ legacy-code · rewrites · plugins
also read
let's talk

Building something where this kind of work matters?

I'm in GMT+6 and work async-first, so your timezone is never a reason not to reach out.

Get in touch
Copyright © Hasan Misbah. All rights reserved.Privacy
Hasan Misbah