I know I discussed this in an early post, but it seems to have reared its ugly head again. This time during the discussion of Barry Young's first article in his series on removing cursors from your code.
It seems interesting that there are individuals and companies out there the subscribe to the theory of developing to the lowest common denominator on their team. If this results in the writing of code that is inefficient, not scalable, but works in the test and development environment and meets the customers requirements, that's good enough. The excuse being that they have deadlines to meet, and customers to satisfy; they don't have time to train their developers in better, more efficient development techniques in a database environment like MS SQL Server. So, if you know and understand cursors, go ahead and use them even though they are not the best tool in the toolbox.
What is scary about this, is I could be in that category. When I first started working with SQL Server 6.5 back in 1997, I didn't have the benefit of working with anyone who had experience with SQL Server. Everything I learned, I learned from reading books or just experimenting. There was no SQLServerCentral.com at the time, in fact not much on the Internet at all back then really. I'm sure code I had written back then, except maybe the trivial code, is something now I would never write with the knowledge and experience I have now. Even some of the things I learned from books back then I will try to avoid today, like triangular joins for one.
I have learned new ways to look at things in SQL, and I am now willing to challenge the code I currently develop. Yes, it may work and provide me the answers I require, but is it really the best code I can develop? Is there something I am missing that could improve the performance or scalability of the code? I have even started search sites like SSC for similar problems to see if I could find a better solution that I could use.
I have also found myself sharing techniques I have learned from others on SSC with my coworkers, wether it has been simple things like determining the first and last days of the month, calculating work days, or parsing strings using a Tally table. These techniques have allowed us to implement new processes in our environment that might otherwise not have been considered viable projects.
As professionals, we must take personal responsibility learning the tools we are working with and how best to use them for the benefit of both ourselves, our employers, and our customers. If the company we work for is willing to pay for that training, great, make the best of those training dollars. If, however, they can't, or won't, then we have to step up to the plate and do what is necessary to help ourselves and our employer. The better we are able to use the tools we have, the more valuable we are to the people we work for, and in today's economy, that is very important.
But beyond that, we also need to be willing to share our knowledge with others we work with as well. Some may say that in today's economy that may not be the best thing to do. I have to disagree with that as well. Your willingness to share knowledge shows that you are a team player, working for the best interest of not only yourself, but the company as well. This is, in fact, an area I need to improve myself. As a lead for our database team, I should be doing more to improve the knowledge of all my team members. Perhaps by developing some simple brown-bag lunch seminars or half day classes.
So, I guess the best way to end this, is with a question. What are your thoughts regarding this subject? You can leave your comments here, or drop a short comment and link back to your own blog and post an answer there, You can be sure that I'll come and read it.