Loading ...
Sorry, an error occurred while loading the content.

How can one learn to internalize and apply these specific good design practices?

Expand Messages
  • petewil0
    A few years back now (2003?), I took the Net Objectives introductory and advanced design patterns courses. There were slides for qualities that made for
    Message 1 of 4 , Feb 10, 2009
    View Source
    • 0 Attachment
      A few years back now (2003?), I took the Net Objectives introductory
      and advanced design patterns courses. There were slides for
      qualities that made for goodness in design, things like prefer
      containment to inheritance, use the open/closed principle, high
      cohesion and low coupling, focus, etc.

      Years later, I'm realizing that I still don't know how to apply most
      of these in practice. I don't know how to design something that is
      cohesive, I don't know how to design something that is open to
      extension but closed to change, I don't know how to design for
      focus. I re-read the class notes, but they don't seem to give a lot
      of practical guidance.

      I can finally recognize coupling, and it is fairly easy to apply
      preferring containment to inheritance.

      So, my question is, how do I learn to design things that are
      cohesive, and open/closed? How can I measure if one design is more
      cohesive than another? Is there some reference, or some good way to
      learn this?

      One potential solution is to apply patterns, and refactor ruthlessly
      so that everything is only done in one place. However, at the end of
      his book (yes, I actually read it) Alexander suggests that once we
      understand the forces, we don't actually need the patterns anymore.
      I'm trying to understand the forces better so I can design my own
      patterns where the GoF doesn't have a pattern for something that I
      need to do.

      Thanks for reading!
    • Scott L. Bain
      There are a lot of answers to this, so I suspect others will chime in with their thoughts, but one answer is: This is what patterns are. They are examples of
      Message 2 of 4 , Feb 11, 2009
      View Source
      • 0 Attachment

        There are a lot of answers to this, so I suspect others will chime in with their thoughts, but one answer is:

         

        This is what patterns are.  They are examples of “getting it right” in various ways, when you are confronted with various problems.  As your questions seems to center on “how do I know what to do?” I interpret this as similar to “how do  I know which pattern to use?”

         

        In the course you took we focus on “pattern motivation”, but that’s really only *one* way of deciding which pattern to use.  There are many.

         

        If you visit our pattern repository, and for each pattern examine the “contextual forces”, you will see many ways of “seeing the pattern in the problem”.

         

        Hope this gets you started in a good direction.

         

        http://www.netobjectives.com/PatternRepository/index.php?title=Main_Page

         

        -S-

         

        From: leanprogramming@yahoogroups.com [mailto:leanprogramming@yahoogroups.com] On Behalf Of petewil0
        Sent: Tuesday, February 10, 2009 6:02 PM
        To: leanprogramming@yahoogroups.com
        Subject: [leanprogramming] How can one learn to internalize and apply these specific good design practices?

         


        A few years back now (2003?), I took the Net Objectives introductory
        and advanced design patterns courses. There were slides for
        qualities that made for goodness in design, things like prefer
        containment to inheritance, use the open/closed principle, high
        cohesion and low coupling, focus, etc.

        Years later, I'm realizing that I still don't know how to apply most
        of these in practice. I don't know how to design something that is
        cohesive, I don't know how to design something that is open to
        extension but closed to change, I don't know how to design for
        focus. I re-read the class notes, but they don't seem to give a lot
        of practical guidance.

        I can finally recognize coupling, and it is fairly easy to apply
        preferring containment to inheritance.

        So, my question is, how do I learn to design things that are
        cohesive, and open/closed? How can I measure if one design is more
        cohesive than another? Is there some reference, or some good way to
        learn this?

        One potential solution is to apply patterns, and refactor ruthlessly
        so that everything is only done in one place. However, at the end of
        his book (yes, I actually read it) Alexander suggests that once we
        understand the forces, we don't actually need the patterns anymore.
        I'm trying to understand the forces better so I can design my own
        patterns where the GoF doesn't have a pattern for something that I
        need to do.

        Thanks for reading!


        ______________________________________________________________________
        This email has been scanned by the MessageLabs Email Security System.
        For more information please visit http://www.messagelabs.com/email
        ______________________________________________________________________

      • Christopher Sage
        That s pretty much how I do it; I will see the pattern in the problem . Though, don t force patterns into your code for the sake of having a pattern. Use
        Message 3 of 4 , Feb 11, 2009
        View Source
        • 0 Attachment
          That's pretty much how I do it; I will 'see the pattern in the problem'.

          Though, don't force patterns into your code for the sake of having a pattern.  Use sparingly and when needed. :)

          -Chris

          On Wed, Feb 11, 2009 at 11:28 AM, Scott L. Bain <slbain@...> wrote:

          There are a lot of answers to this, so I suspect others will chime in with their thoughts, but one answer is:

           

          This is what patterns are.  They are examples of "getting it right" in various ways, when you are confronted with various problems.  As your questions seems to center on "how do I know what to do?" I interpret this as similar to "how do  I know which pattern to use?"

           

          In the course you took we focus on "pattern motivation", but that's really only *one* way of deciding which pattern to use.  There are many.

           

          If you visit our pattern repository, and for each pattern examine the "contextual forces", you will see many ways of "seeing the pattern in the problem".

           

          Hope this gets you started in a good direction.

           

          http://www.netobjectives.com/PatternRepository/index.php?title=Main_Page

           

          -S-

           

          From: leanprogramming@yahoogroups.com [mailto:leanprogramming@yahoogroups.com] On Behalf Of petewil0
          Sent: Tuesday, February 10, 2009 6:02 PM
          To: leanprogramming@yahoogroups.com
          Subject: [leanprogramming] How can one learn to internalize and apply these specific good design practices?

           


          A few years back now (2003?), I took the Net Objectives introductory
          and advanced design patterns courses. There were slides for
          qualities that made for goodness in design, things like prefer
          containment to inheritance, use the open/closed principle, high
          cohesion and low coupling, focus, etc.

          Years later, I'm realizing that I still don't know how to apply most
          of these in practice. I don't know how to design something that is
          cohesive, I don't know how to design something that is open to
          extension but closed to change, I don't know how to design for
          focus. I re-read the class notes, but they don't seem to give a lot
          of practical guidance.

          I can finally recognize coupling, and it is fairly easy to apply
          preferring containment to inheritance.

          So, my question is, how do I learn to design things that are
          cohesive, and open/closed? How can I measure if one design is more
          cohesive than another? Is there some reference, or some good way to
          learn this?

          One potential solution is to apply patterns, and refactor ruthlessly
          so that everything is only done in one place. However, at the end of
          his book (yes, I actually read it) Alexander suggests that once we
          understand the forces, we don't actually need the patterns anymore.
          I'm trying to understand the forces better so I can design my own
          patterns where the GoF doesn't have a pattern for something that I
          need to do.

          Thanks for reading!


          ______________________________________________________________________
          This email has been scanned by the MessageLabs Email Security System.
          For more information please visit http://www.messagelabs.com/email
          ______________________________________________________________________


        • Max Guernsey, III
          Doing: accept no substitute. That s my contribution to this thread and I know it s not particularly helpful except in that it reiterates the value of patience
          Message 4 of 4 , Feb 12, 2009
          View Source
          • 0 Attachment

            Doing: accept no substitute.  That’s my contribution to this thread and I know it’s not particularly helpful except in that it reiterates the value of patience in this scenario.  The number one rule is “keep practicing and don’t be afraid of mistakes.”  Personally, I wouldn’t be too worried about “wedging” patterns in where they don’t fit: if you constantly seek to improve your skills and remove impediments than the value of the lessons learned in such “overdesign” will far outweigh the costs.

             

            I don’t think that the patterns can be abandoned once the forces are understood, though – they help us communicate with other experienced developers and help us educate the next generation.

             

            Max Guernsey, III

            Managing Member, Hexagon Software

            http://www.hexsw.com

            http://www.dataconstructor.com

             

            From: leanprogramming@yahoogroups.com [mailto:leanprogramming@yahoogroups.com] On Behalf Of Christopher Sage
            Sent: Wednesday, February 11, 2009 12:12 PM
            To: leanprogramming@yahoogroups.com
            Subject: Re: [leanprogramming] How can one learn to internalize and apply these specific good design practices?

             

            That's pretty much how I do it; I will 'see the pattern in the problem'.

            Though, don't force patterns into your code for the sake of having a pattern.  Use sparingly and when needed. :)

            -Chris

            On Wed, Feb 11, 2009 at 11:28 AM, Scott L. Bain <slbain@...> wrote:

            There are a lot of answers to this, so I suspect others will chime in with their thoughts, but one answer is:

             

            This is what patterns are.  They are examples of "getting it right" in various ways, when you are confronted with various problems.  As your questions seems to center on "how do I know what to do?" I interpret this as similar to "how do  I know which pattern to use?"

             

            In the course you took we focus on "pattern motivation", but that's really only *one* way of deciding which pattern to use.  There are many.

             

            If you visit our pattern repository, and for each pattern examine the "contextual forces", you will see many ways of "seeing the pattern in the problem".

             

            Hope this gets you started in a good direction.

             

            http://www.netobjectives.com/PatternRepository/index.php?title=Main_Page

             

            -S-

             

            From: leanprogramming@yahoogroups.com [mailto:leanprogramming@yahoogroups.com] On Behalf Of petewil0
            Sent: Tuesday, February 10, 2009 6:02 PM
            To: leanprogramming@yahoogroups.com
            Subject: [leanprogramming] How can one learn to internalize and apply these specific good design practices?

             


            A few years back now (2003?), I took the Net Objectives introductory
            and advanced design patterns courses. There were slides for
            qualities that made for goodness in design, things like prefer
            containment to inheritance, use the open/closed principle, high
            cohesion and low coupling, focus, etc.

            Years later, I'm realizing that I still don't know how to apply most
            of these in practice. I don't know how to design something that is
            cohesive, I don't know how to design something that is open to
            extension but closed to change, I don't know how to design for
            focus. I re-read the class notes, but they don't seem to give a lot
            of practical guidance.

            I can finally recognize coupling, and it is fairly easy to apply
            preferring containment to inheritance.

            So, my question is, how do I learn to design things that are
            cohesive, and open/closed? How can I measure if one design is more
            cohesive than another? Is there some reference, or some good way to
            learn this?

            One potential solution is to apply patterns, and refactor ruthlessly
            so that everything is only done in one place. However, at the end of
            his book (yes, I actually read it) Alexander suggests that once we
            understand the forces, we don't actually need the patterns anymore.
            I'm trying to understand the forces better so I can design my own
            patterns where the GoF doesn't have a pattern for something that I
            need to do.

            Thanks for reading!


            ______________________________________________________________________
            This email has been scanned by the MessageLabs Email Security System.
            For more information please visit http://www.messagelabs.com/email
            ______________________________________________________________________

             

          Your message has been successfully submitted and would be delivered to recipients shortly.