Friday, August 30, 2013

Writing Clean Code

Currently doing some work at a client site and had to stop to admire my code, here are some things that struck me about it:
  • Well structured and organized
  • Meaningful variable names
  • The code is like reading a story book - seriously
  • Utilization of DRY principles
One thing about clean code is being able to look at the code, even if you have zero context into the language spec, and being able to understand everything that's going on. 

I would always get a request from developers I manage to work on "more complex code" and every time I painstakingly had to explain that 'complex' code is truly just a composition of smaller components, where things get 'complex' as they like to allude to is when components aren't truly designed (and implemented) correctly. 

Here's a book I recommend if you want to know how to write Clean Code. Learning every pattern in the world is good but having clean well structured code is better. This book is a must have on every developer desk. Check out my blog post about Investing in Yourself (IIY)

1 comment:

Deveroux Martin said...

Do you think I would look at your code in admiration too? :)