Ram.Franco LogoRam.Franco
The Cult of Clean Code Has Gone Too Far
Code Quality

The Cult of Clean Code Has Gone Too Far

6 min read

Let me tell you about the cleanest codebase I ever saw.

Perfect abstraction. Every function under 10 lines. SOLID principles everywhere. 100% test coverage.

It took 6 months to build a login page.

The project was cancelled. 🪦

📿 The Church of Clean Code

Somewhere along the way, "writing good code" became "following rules religiously."

The commandments:

  • Thou shalt not repeat thyself (DRY)
  • Thou shalt have one responsibility per function (SRP)
  • Thou shalt abstract early and often
  • Thou shalt achieve 100% test coverage
  • Thou shalt never use any in TypeScript

And look, these are good guidelines. I apply them.

But when they become religion, we get absurdity.

Did you know? The original "Clean Code" book by Uncle Bob is great. But some developers treat it like a sacred text where every word is law. Uncle Bob himself has said people take it too far.

🎪 The Absurdity Examples

Example 1: DRY to Death

The code:

// Used in 2 places
const formatDate = (date) => date.toLocaleDateString();

The "clean" refactor:

// date-utils.ts
export const createDateFormatter =
  (options = {}) =>
  (date) =>
    date.toLocaleDateString(options.locale, options);

// date-formatter-factory.ts
export const getDefaultDateFormatter = () => createDateFormatter({});

// constants/date.ts
export const DATE_FORMAT_OPTIONS = { locale: 'en-US' };

We went from 1 line to 3 files because "what if we need flexibility later?"

We won't. We didn't. The feature got deprecated.

Example 2: Abstraction Astronautics

What we needed: Fetch user data.

What we built:

  • UserRepositoryInterface
  • UserRepositoryImpl
  • UserService
  • UserServiceImpl
  • UserFacade
  • UserController
  • UserDTO
  • UserMapper
  • UserFactory

For a call that hits one endpoint and returns JSON.

Did you know? This pattern is called "Astronaut Architecture"—built for flexibility that will never be used, at massive complexity cost.

Example 3: The Test Coverage Trap

"We need 100% test coverage!"

So we write tests like:

test('returns true when condition is true', () => {
  expect(isTrue(true)).toBe(true);
});

Congratulations. You've tested that JavaScript works.

Meanwhile, the actual business logic has bugs because we spent all our time writing meaningless tests.

🔥 The Controversial Takes

Take 1: Some Repetition is Fine

Copy-pasting code 2-3 times isn't a crime. If the uses diverge later, you didn't over-abstract.

Take 2: Premature Abstraction is Worse Than Duplication

You know what's harder than duplicated code? Wrong abstraction that everything depends on.

Take 3: "Clean" is Subjective

What's "clean" to you is "over-engineered" to someone else. Stop pretending there's one truth.

Take 4: Shipping > Purity

A messy feature that helps users is better than perfect code that never ships.

Take 5: Test Coverage Numbers Are Vanity Metrics

80% of the bugs come from untested edge cases in the 20% of code that's hard to test. 100% coverage is a feel-good number.

📊 The Actual Balance

ExtremeProblemBetter Approach
No standardsChaos, bugs, unmaintainableHave guidelines
Religious adherenceSlow, over-engineeredGuidelines, not laws
Zero testsRegressions, fearTest critical paths
100% coverageWasted time, false confidenceTest what matters

🧘 My Approach Now

  1. Make it work — Ship something
  2. Make it right — Refactor when patterns emerge
  3. Make it fast — Optimize when needed

Notice "clean" isn't a step. It's a byproduct of iteration, not a goal in itself.

🎯 The Bottom Line

Clean code principles are TOOLS. Not commandments.

Tools serve the work. When the religion serves itself, we've lost the plot.

The goal is: Ship valuable software that works.

Not: Satisfy abstract principles while users wait forever.

When code review becomes theology debates instead of "does this solve the problem?"—you've joined a cult.

I'm not saying be sloppy. I'm saying be pragmatic.

Now if you'll excuse me, I have a feature to ship. Even if it's not perfectly SOLID. 🚀

Code Quality
Controversial
Opinion
Development

More from the Blog

Limited Availability

Ready to Build Something Extraordinary?

Whether you have a fully-defined project scope or just a high-level vision, let's discuss how we can bring it to life with production-grade engineering.

Available for new projects