Years ago I attended my very first technical conference, SqlPass.  I was only a DBA for a few months at the time and it was a very last minute adventure.  I would spend the next 3 days at this conference becoming inundated with all things SQL Server surrounded by peers who had been doing this for much longer (I had only been a DBA for 3 months).

The only session I remember from that event was this guy (sorry don’t remember the name) who got up on stage and talked about this big project he did for this restaurant review site and how he had to process millions and millions of records in an OLTP (Online Transaction Processing – think Shopping Carts) fashion and make them available to the website in a very quick and efficient way without dropping performance.

He had to denormalize the tables and he did it.

I remember the scoffs from the crowd, “how could normalization be broken”, “how could you go against everything we hold dear”… I, as the newbie on the scene, watched the arguments go back and forth but this speaker’s answer to it all was perfect – “It just didn’t work”.

Boom.

Years of experience, years of patterns and practices and “it just didn’t work” silenced everyone.  He walked through why he had to make the changes and where the benefits came from.  He didn’t advocate that this was how to solve everyone’s problems, but he did advocate that this how to solve his problem.

I think of this often when I hear people scoffing at someone’s design because it doesn’t follow the design pattern du jour.  Sure design patterns are great, they give you a path, they give you an idea, they give you a starting point but at the end of the day ask yourself what you would rather have – “A system built on a design pattern that is constantly requiring maintenance and changes to keep running” or “A system built without a pattern or practice, maybe the code looks a little dirty, but it runs like a machine, never stopping, never needing to catch it’s breath or have a bug logged against it, it just works”.  That’s how you should code – to make it work.

Want more? Check out my book Code Your Way Up – available as an eBook or Paperback on Amazon (CAN and US).  I’m also the co-host of the Remotely Prepared podcast.

Author

Write A Comment