Exforsys

Free Training

Re: Advantages

This is a discussion on Re: Advantages within the Software Patterns forums, part of the Testing category; Andre wrote: > ... what advantages there are in using design patterns... do they > make code more complex? If ...

Go Back   Exforsys > Testing > Software Patterns

Exforsys.com

  #1 (permalink)  
Old 07-04-2003, 12:05 PM
panu
Guest
 
Posts: n/a
Re: Advantages

Andre wrote:

> ... what advantages there are in using design patterns... do they
> make code more complex?



If you know your patterns - and can identify them from your code -
they actually make it less complex. Why? Because you can apply a
pattern in several places, but you can *reuse your understanding* about
it everywhere.

Consider a carpet with a few repeating 'patterns' woven' into it. It is
relatively easy to understand and describe such a carpet, as opposed to
one where every thread is random.

Consider a detective trying to solve a set of crimes. If there is a
common 'pattern' in all of them, the case becomes considerably less
complex, and easier to solve.

Design Patterns is about reuse of well proven organizations/solutions
within your code. Every time you reuse something, the total complexity
decreases.

-Panu Viljamaa

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-18-2003, 03:47 PM
Bill Burris
Guest
 
Posts: n/a
Re: Advantages


"panu" <panu@fcc.net_zerospam> wrote in message
news:0SOdnbzIPbHnPpiiXTWJiQ@fcc.net...
> Andre wrote:
>
> > ... what advantages there are in using design patterns... do they
> > make code more complex?

>
> Design Patterns is about reuse of well proven organizations/solutions
> within your code. Every time you reuse something, the total complexity
> decreases.
>


With Design Patterns you are also reusing the expertise of many other
developers who have spent a lot of time thinking about these patterns.

When a engineer sets out to build a bridge he doesn't sit under an apple
tree waiting for an apple to fall on his head, so he can rediscover the laws
of physics and engineering principles. Instead he learns the patterns
discovered by physicist and other engineers.

Your time is better spent learning patterns identified by others, then to
re-discover those same patterns on your own. This way you are more likely
to end up building skyscrapers instead of houses.

Some people seem to think that using patterns turns your job into kids play,
plugging together Lego blocks. This is far from the truth. What it does is
bumps your productivity up so that you can move onto more interesting
things, instead of spending your time debugging similar code over and over.

You also want to learn unit testing and refactoring, so you can take any
piece of crappy code written by someone else or yourself and clean it up.

Bill


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.