Why do we strive to write the most elegant and compact code?  I was working on a piece of code recently that the most straight forward way to write it would be dozens of if statements with redundant lines of code.  This bugged me so much that I actually spent an hour looking for a framework method to simplify the code.  Of course this search blinded me from the quick solution of writing a simple helper function.

So why does this bug most of us?  I believe that it is the mark of good developers, analysts and architects to strive to find the best solutions.  This is art.  You can’t just settle for painting a picture.  The end product needs to make a statement.

My experience also emphasizes a balance that you need to keep in mind.  That is the balance between doing things “right” and getting things done.  Some times you have to work on getting things done and then come back and clean it up.  To my view this is a good argument for refactoring.

Don’t give up on creating elegant code and be sure to pass on what you learn to the next generation developers.