DEV Community

Cover image for A better architecture
Alish Giri
Alish Giri

Posted on

A better architecture

If you have not understood by now then let me remind you the time you or your team went down through all those codes you wrote few months or years ago and now you have to do that all over again.

This is a very common pattern with established systems. Improvement work is either done or skipped due to higher risk rate. And only selected portion of the work is pushed forward.

This is a where most systems go down the rabbit hole!

Every client I have worked with in the past wants to get things done fast. And until it's too late they will keep pushing. Technology changes fast so keeping up with it is the only way to progress otherwise we already know how fast things deprecate. And messy code cannot be upgraded without adding more messy code 🤮. This is what happened to a client of mine from Norway.

The only solution to this I have come up with is "A better architecture". If the foundation is strong then only few changes are required to make the upgrade. I do this in practice all the time and have been successful at doing this because of my constant need for improvement.

In two of my past projects I rewrote the entire code because I found something better 😅. Most will call me stupid and they will not be wrong. But the backbone on which I do these changes is rigorous integration testing. I write tests and this becomes my single source of truth for the quality I expect from my code. But now that I have all these experiences, even the major upgrade requires minor tweaks surprisingly due to better architectural understanding.

However, the most important factor we want from the code is higher flexibility. Because things will change. And we want to keep all of our hair intact.

Top comments (0)