SQLServerCentral Article

Quintessential Or Elegant

,

We have a guest editorial today as Steve is traveling today.

Quintessential --  most typically representative of a quality,state, etc.;perfect -- Free Dictionary

As developers, both application and database, we frequently seek to write code that we like to think works perfectly every time. Or, in the parlance of an earlier life, does not rust bust or collect dust.  In other words we desire to create quintessential solutions.  I have begun to wonder if that is good enough.  Yes, the code works and passes Unit, QA and UA testing before it goes into production.  That being said, I have over the years looked back at code that I wrote in the past and wondered why I made the algorythmic choices I made.  In the quest to get things done quickly to solve a particular problem faced by users, I have often written expedient rather than elegant code.

Margaret Rouse once wrote in SearchSOA.techtarget.com that an elegant solution is one which the maximum desired effect is achieved with the smallest, or simplest effort.  How often have we chosen to write procedural database scripts rather than set-based scripts because it was faster for us to solve the problem immediately facing us rather than take the long view and write code that runs faster and more effectively. Or how often have we extracted a script from Management Studio rather than write SQL code that is database driven.

We have many choices in how we develop our solutions.  There are many competing issues and influences that developers encounter such as management priorities, time constraints and the like. In a world where we must balance the need for effectiveness with the cost of efficiency no one can legitimately second guess a particular decision.

On the other hand we can exercise self-discipline in our own work and consider the people following us.  I recall a project I was on almost ten years ago;  I was a contractor.  The architect on the project, also a contractor, decided that the controls on any web page in this web application would be dynamically added through the page load event.  He was interested in using the latest technology of the time.  Developers having to maintain the application found it almost impossible to troubleshoot issues because they could not keep track of the controls that would be on a page at any given time.

My challenge for this year is to invest more thought into the solutions I develop such that at the end of the year I can review the code I wrote in January and recognize the code is not only effective but efficient an elegant.  My hope is that other developers also see the need to create more efficient and elegant code and act on that need. 

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating