Clean Code

Posted by on Jan 23, 2012 in Blog | 0 comments

My wife and I have very different methods of keeping the house clean.  She will walk into a room, and within a few seconds, it will look like the aftermath of a hurricane.  Clothes strewn all over the room, makeup powder lining the counter, discarded shoes that didn’t meet muster for the “outfit of the day”.  It’s like watching the Tasmanian Devil move through an area leaving a path of destruction behind.  When it comes time to clean up, my wife does the whole process with just as much fervor but in reverse.  She becomes this tornado of cleanliness that sucks in all the surrounding mess and deposits it in its right and proper place.  I am quite different.  I try my darnedest to keep things clean as I go.  If I drop my clothes on the floor while changing, I immediately pick them up and throw them in the hamper.  I do this not because I am such a tidy person, but because I know if I don’t, it may be until the next lunar eclipse before I actually clean up the mess I made.

 
These two approaches to keeping things clean and tidy are very similar to what programmers face when writing code.  There’s nothing inherently wrong with either approach when it comes to cleaning a house, but when cleaning code, some complications start to arise.  You see, when you write code, a lot of what you write builds upon other things that have already been written.  If you change something in one part of the code, it could have serious ramifications in other parts.  What makes it easier to identify any possible ramifications is related to the cleanliness of the code.  Since even the act of cleaning up code is a change, it’s much easier to clean up code that is just a little dirty rather than a huge mess.  Every code base gets dirty over time without a conscious effort to keep it clean, just like a house.  Here at SOAPware, we’ve started to increase our efforts to keep our code clean as we develop.  This will help us release better quality software and respond quicker to the always changing demands of the medical industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>