Clean Code

Clean Code

Today and Always

No one dreads writing clean code more than a beginner. This was my case some years back, I was barely understanding the basic syntax of Dart when I began to hear about another yet difficult coding pattern called "Clean Code". I began to feel too dumb to learn to code. Like, I enjoyed the liberty of writing the few things I knew wherever I found convenient without caring much about the maintainability of the code base. Fast forward to some months later, I began to realize how much technical debts I had incurred. Nothing I wrote made sense to me, and to make this worst, I was on a deadline to add features to a program that has its feet rooted in all kinds of bad practices. That day I learned my lesson the hard way and the key points from my experience that day:

  1. You know only a fraction until you know design patterns that guarantee maintainability for your use case.
  2. Clean code takes time to write but its worth it in the long run.
  3. Too much freedom is a bad practice on its own. A third party should only be able to interact with your software in the way and only the way you want them to.