DEV Community

Rickard Engberg
Rickard Engberg

Posted on

2

How far should you take clean coding?

I've been thinking about something for quite some time. I'm a strong advocate for clean coding, and that a professional programmer should be allowed time for doing their job right. With that, I mean fixes and features should be done cleanly, and, if needed, legacy code adjacent to what the programmer is working on should be refactored (within reasonable limits). Indeed, certain levels of refactorings and renovation of legacy code should be included in the estimate for the story.
However, now and again, reality happens. Perhaps a bug was found, and it needs to be corrected, tested and distributed asap. There might not be enough time to do the refactoring that part of the code you're in so desperately needs. Alternatively, given the limited time frame, you may not want the risk a possibly complex refactoring adds. Should a professional programmer still enforce clean coding principles? At what cost should these principles be enforced?
There is always the option to make a quick fix, test it and ship it, but also write a story for the backlog on the need for renovation. Of course, we all know how hard it can be to get that story prioritised and scheduled for action.
I want your views on this, so please join the discussion.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay