Tuesday, November 12, 2013

Patterns and Software Development

My father always said that it's always critically important to have the right tools for the job.  He's right, though that shouldn't be very surprising.  Applying that nugget of wisdom to software development has so many different meanings that it will make your head spin.

For example, there's your development environment: Visual Studio, Eclipse, Vim, Emacs, and Notepad (a few of only millions of development tools).  Many of these environments have plug-ins allowing you to build more tools for your tools.  I've even seen a video of someone that has bootstrapped a speech controlled development environment so that he can dictate his code.

Another example would be libraries you can use.  This is a collection of software ready to be used by your software.  Libraries can limit the amount of code required to complete your task.

Then there are patterns...  Patterns are code snippets that help you create strategies to effectively complete a task or solve a problem.  The more code you create, the more you will notice a class or even a function call that works well in several situations.  Not that it's used often, but when it is used, there's a feeling of relief that you're doing something that just feels right.  Get enough good patterns in your head, then you're really excited to create new code.  But why?
  1. Patterns are recognizable.  They are repeatable.... which lends to their recognizability.
  2. Similar patterns can be used to solve similar problems.
  3. Patterns help us learn from the sweat of our coding predecessors
  4. Good patterns are easy to maintain.
  5. Patterns allow us to think less about some of the details and more about the bigger task at hand.
  6. Patterns are often fast to implement requiring less refactoring.
There are too many patterns to name.  There are books about patterns.  Many patterns are organized into one of several groups.  Patterns are extensively studied because they can be extensively used with great success.  In some future updates, I will cover a few of the more basic, but interesting ones as well as discuss the different groups that most patterns fall into.

Please don't think that patterns solve all the world's problems.  They don't.  As with all things, KISS (Keep It Simple Stupid) is paramount.

No comments:

Post a Comment