Patterns & Principles Help Me Sleep!

I don’t talk about design patterns & principles in my blog as much as before because they have become second nature to me, kinda like breathing.


Understanding the value of design patterns and object-oriented principles was a huge transformation in my career. Note the word understanding. This is not the same as memorizing them from a book to be buzzword compliant and pass interviews. Certainly being exposed to them is important and the first step, but you really don’t understand their value until you have had to maintain and enhance production code in a significant way. I am not talking about tossing a new textbox on a form, but enhancements that typically come from iterative development on an application of significant complexity as it evolves over a period of time. Some developers never get exposed to this and perhaps never fully appreciate design patterns & principles, while others are constantly bombarded with these challenges and use patterns & principles daily as tools of the trade.


Personally, until I truly learned these concepts I really never had any way to gauge the quality of my solutions, typically in terms of maintainability. Sure the end result met the needs of the customer, but was it a good solution that can easily be maintained, adapted, and understood? This is a fair question and the uncertainty had me feeling uneasy. It wasn’t until I truly learned the SOLID Principles from Agile Software Development, GRASP Patterns from Applying UML and Design Patterns, and picked up at least one design pattern book with samples, did I truly sleep at night! The use of design patterns & principles gave me this measure of quality I needed for more restful nights. Rather than just solving problems in my own way and worrying about the overall quality, I can apply solutions to problems in well-known ways from respected experts who have dealt with these problems for years.


Truth be told, we could talk about the plethora of benefits of using these basic patterns & principles, but no amount of preaching and examples will make you see it. You have to discover it on your own, at your own pace, and in a manner that you can relate to. I know this first hand as it usually takes me awhile to understand the value of things and usually after I crash and burn a few times. As they say, you truly learn best from your mistakes.


If nothing else, hopefully some of the recent discussions on the values of design patterns & principles will pique your interest. The beauty about them is that they are not complicated and often can be summed up in a few sentences. However, truly understanding and experiencing their value will usually take a bit more time. You better start right away ;)


 


David Hayden



 

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

7 Responses to Patterns & Principles Help Me Sleep!

  1. David Hayden says:

    Jim,

    Thanks for the spelling tip. I made the change.

  2. Jim Cooper says:

    That should be “pique your interest”

  3. David Hayden says:

    Daniel,

    Yep. If you are building disposable applications ( prototypes, pilots, etc. ) then certainly having higher quality, maintainable code won’t be as big of a deal as you don’t have to worry about maintaining and evolving it.

    Of course, how many times does a pilot or prototype become an application that needs to be maintained and evolved over a longer term than expected and then you have to deal with less quality code? And then the total cost of ownership of the application becomes much more than what would have been the price of an application with far better code quality? Happens all the time ;)

    Your point is well-taken, however. There is a market for disposable applications, but the client should be made aware of the fact that they are getting a disposable application.

    As you say, there is also more to developing and maintaining production systems than just having high code quality. Of course, if your code is hard to maintain, those systems won’t necessarily be as effective as they could be in the long run.

  4. David Hayden says:

    Hey Craig,

    Thanks for your comment! Your experience sounds similar to mine many years back and I think a lot of developers have experienced this situation. Sounds like you are on the right path so keep up the great work!

  5. Well said David. This looks like it was written in response to a certain podcast over the last month. Thanks for making a solid case for understanding principles and patterns and clarifying that real world experience with them is when they come alive.

    And I too sleep much better now.

  6. Daniel says:

    Design patterns and principles are only the tip of the iceberg. Software architecture and processes in general can produce even more suitable and better fitting the problem. There are some cases where maintainability isnt the most important requirement or is a requirement at all ( for a pilot?).

  7. Craig says:

    Many thanks for this posting as I myself am having trouble sleeping at night (well sort of!) due to the same issues you have spoken about.

    I have been developing web based applications since 2000 first using classic asp, then moving up to .net with vb.net then C# around 4 years ago. I have only ever worked for small software companies that have been more interested in shipping systems out of the door rather than shipping good maintainable software. I have just started my quest in trying to gain the skills that will make me become a more productive developer that is capable of producing high quality maintainable code. I have read a few books such as The Pragmatic Programmer, a new book by Neil Ford titled the Productive Programmer, C# Design patterns and downloaded the GoF patterns . I am now also looking at Bob Martins blogs articles regarding SOLID principles.

    I am not saying that I am a poor developer by any means, as all my clients have been very happy with the solutions I have provided, and the code is a great deal better than a lot of the code out there. It’s just that niggling feeling that it could be so much better by applying some of the principles mentioned above. It’s not that I am looking for some kind of developer utopia , but just a better knowledge and understanding of what it takes to write good, clean maintainable code.

    Unfortunately a lot of this was to taught at Uni back in 1997 and I seem to have had the misfortune to work at companies who’s developers did not care much for the afore mentioned. So its up to myself to get out there and learn those skills by reading blogs like yours and other likeminded professionals. Any maybe some time in the not too distant future I too, will be able to sleep as sound as you.

    Keep up the good work.

    Craig

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>