Azterizm
Back to Blog

The Truth about Writing "Good" Code

Wrote function with all the explicit types. Refactored long functions. The codebase is clean. Followed principles. Life is good.

Now time to introduce an update or bug fix that would change those functions. Because you are following CLEAN pattern and highly refactored codebase, things are in multiple places. Doing this from time to time, you realise all your hard written code is now vanished and we are now left with again not so good code. Should you do same process again or not? Well let's see about that.

The Uncomfortable Reality

In the silence of my workspace, with nothing but the amber glow of candlelight dancing across my notebook, I've come to understand something that the industry refuses to acknowledge. All code you write is technical debt. It will rot soon or will be replaced. Things are moving fast and skills are being developed. Good code today becomes bad code tomorrow.

This realisation hit me during one of those long nights when I was refactoring what I thought was beautiful architecture. The screens illuminated my face as I stared at functions that once felt like poetry, now seeming like ancient artefacts from a forgotten era.

The Path of Least Resistance

Write with the most comfortable and enjoyable technologies. It doesn't need to fit the case perfectly. The industry preaches about choosing the right tool for the job, but they fail to mention that the "right" tool changes every six months. The technology that makes you feel alive, that sparks something within you - that's what matters.

I've learned not to stay on one technology for too long. Learn new things and adopt them. This keeps you going and makes life worth living. In my travels through different frameworks and languages, each transition felt like opening a new door in a vast mansion of possibilities.

Source Code Has No Value

Bismillah - In the name of Allah, the Most Gracious, the Most Merciful. This truth might sting, but it needs to be said: your source code has no inherent value.

Requirements change over time, requiring code to change with them. It's harder to read existing code than to write it from scratch. So much code is already available that it's not worth being afraid that people will make services from your code.

Your code is written to match specifics to your requirements and the people around you. The same code cannot be applied for someone else's context. SaaS can be built with open source code where people will pay merely for hosting costs and convenience.

Code keeps getting old as technologies evolve. Those who wanted to profit from your code will eventually need to modernize it, and with the requirement of understanding the codebase fully, they would've been better off writing the code from scratch themselves.

The Harsh Truth About Recognition

No one cares about the technologies you use or how elegant your code appears. The nights spent crafting perfect abstractions, the careful consideration of every design pattern - it all dissolves when the next urgent requirement arrives at your desk.

If that hardly-earned feature you built after countless nights breaks immediately after deployment, the world will label you a worthless programmer. This is the reality we navigate, not the fairy tale of appreciation for craftsmanship.

What Remains

In my automation projects, I've witnessed how quickly entire systems become obsolete. The tech that once seemed revolutionary now gathers digital dust. Yet this impermanence isn't something to mourn - it's the natural order.

The landscape shifts beneath our feet constantly. Those who resist change get buried under the debris of outdated methodologies. Those who embrace this reality, who dance with the chaos rather than fight it, they find a different kind of peace.

The greenery outside my window changes with seasons. Code changes with market demands. Both follow laws beyond our control.

Moving Forward

Should you repeat the same process of perfectionism? Should you chase the illusion of "clean code" again? The answer lies not in the code itself, but in understanding its true nature - temporary, functional, replaceable.

Write code that works. Learn constantly. Accept impermanence. Find joy in the process rather than attachment to the output.

Alhamdulillah - All praise is due to Allah. In this acceptance, there's freedom.

More Articles You Might Like

Subscribe for new articles.

talk