Download Web Fonts

Rigorous Thinking

by in Development

I'm not very stylish. I've been known to walk around in sandals and socks, jeans that had some sort of glitter applied that I couldn't see in the store where I bought them, a bathrobe for trips to get groceries, t-shirts with holes around the neck, t-shirts too small for me, and "Grandpa" jeans. Most of the nice clothes I wear are Christmas and birthday gifts from my mother (Thanks Mum!).  In summary: I'm no sharp dressed man.

However, when it comes to programming, style is critical to me. I believe that there is a right way to structure code, and that way is clean. Clean implies organization, clarity, and leanness. There are a variety of simple rules I follow to achieve this: classes and methods with single responsibility, accurate naming, no comments, and a strong love of brevity only bowing to the critically important readability of the code.

The opposite to clean code is hacking, where you just piece together code and if it doesn't break, it's declared good. 

The drawbacks to hacked together code (often called "spaghetti code") are:

  • It's buggy and hard to find the bugs
  • It slows development exponentially as the code base grows
  • It's difficult to maintain, and cost intensive to extend in the future.

Conversly, clean code requires a lot of thought, forcing the author to think carefully and analyze what their expressing.  This is why clean code is so important and makes it easy to spot bugs, sustains a predictable development pace, is easy to maintain, and lowers the total cost of ownership.

Clean coding is a form of rigorous thinking. By being diligent in our thinking, we save energy and effort. I think this principle can be applied to a lot of things and in the next post we'll look at how this relates to the topic of business.

Last modified on
Tagged in: clean lean style
John is the owner and lead developer of Blue Bridge.  He's contributed to the Joomla project as a JCM author, JUG team leader, and a bug squasher.  In his spare time, he loves to write and read, advance his development and business knowledge, play video games, boulder, and spend time with his girlfriend and their dog Sunny.
blog comments powered by Disqus