What Interest Me This Week

Writing simple code

Watching Dan North some time back gave me the courage to challenge the notion of SOLID framework.

My biggest beef with SOLID is that more so than the Ten Commandments, it's hardly actionable.

As a competition to that, the thesis is simple code itself will keep a code base highly maintainable.

Which leads to the problem of trying to define simplicity. I first tried doing that by formulating simplicity as the lack of complexity. But that led nowhere. Even if it's true it's hardly usable.

After some more thinking I arrived a definition I'm fairly satisfied with:

Simple code is a block of code that is self-explanatory within one view.

If you try to code in such a way that achieve this quality, I submit that most of SOLID is made obsolete.

It's a not a fully-formed idea yet; the attack surface to that statement is wide and vast. It is asking for long think-piece to examine to implications that follow.