I was participating in a thread today on the ACFUG
email list and something occurred to me about many developer's mental quest to develop the "Perfect Application". The thread was about the use of "SELECT *" in SQL code and debated the real performance cost or gain from using or not using "SELECT *". Lots of people had opinions, and in the end a semi-consensus was reached that while it was important to consider the implications of using "SELECT *", there are plenty of scenarios where it doesn't really matter.
So many development questions are answered with "it depends". On the CFCDev
list, I see so much "it depends" that I can predict the contents of some replies before even opening them. If I only had a nickel...
But "it depends" isn't satisfying!
A frequent lifecycle of a CF developer begins with a budding newbie roaming email lists and websites seeking "rules of thumb" and dutifully collecting them, jotting them down and attempting to "follow all the rules". They may learn that "SELECT * is evil", that "stored procedures are better for performance", or that slightly different syntax in an if statement results in some virtually unperceivable performance gain.
As your bag of tricks grows, you mentally start to build the Perfect Application in your head. You think that if only you could implement all the things you've learned in one application it would be Perfect! It would be speedy and sexy and would finally prove you've arrived as a seasoned developer!
As you continue to grow as a CF developer you realize that this list is not, in fact, the guide to the Perfect Application. You learn that while using Stored Procedures can speed up code, it can also increase development time and make the code less portable. That your tweaked if() statements are confusing to other developers on your team and slow development down.
One by one each Rule of Thumb from your collection is slowly disassembled as you learn that there are very few actual Rules of Thumb. Perhaps along the way you discover Design Patterns and add them to your list, only to find out that they too have exceptions.
In the end you realize that there is no such thing as the Perfect Application. Every rule has it's exceptions, and everything has a time and place. The makings of a great developer include not only knowledge of the tricks from your former Rule of Thumb list, but when NOT to use them.