Writing Clean Code

Lately, I see a lot of articles about clean code. And that’s good! Back when I was a teacher people asked me what my vision of clean code is. I never understood why people asked about ‘my vision’. I just read about Robert C. Martin, a.k.a. Uncle Bob, and stuck to what I have done and learned.

But some people read a book and follow it as the bible of clean code. I believe there is more to it than just someone telling his best idea of clean code.

My vision of clean code is based on experience and learning from others. I have a few ground ‘rules’ I stick to and try to teach that to others who are interested. These are not the only way to go and you may not agree with some, but I have been using the following tips for many years.

This article is based on C#, but it could also be applicable for Java, PHP, and other OOP languages.

Team Players

Clean code is not some given book, like the 10 commandments. You will discover and develop it when you work your way up to being a good developer. Yes, there are good developers with terrible code who usually don’t work in a team. Because as a team you set certain ground rules on how team members should be making code. The idea of this is simple: Everyone in the team develops code in the same way, so everyone can read it, change it, and continue on it.

Visit Now

Tags: Clean Code