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

Re: Is it OK to add code to a class *only* to improve its testabilit

Expand Messages
  • Robert Martin
    One reasonable definition of good design is testability. It is hard to imagine a software system that is both testable and poorly designed. It is also hard
    Message 1 of 28 , Feb 10, 2010
      One reasonable definition of good design is testability. It is hard to imagine a software system that is both testable and poorly designed. It is also hard to imagine a software system that is well designed but also untestable.


      ----
      Robert C. Martin (Uncle Bob) | email: unclebob@...
      Object Mentor Inc. | blog: blog.objectmentor.com
      The Agile Transition Experts | web: www.objectmentor.com
      800-338-6716 | twitter: unclebobmartin







      [Non-text portions of this message have been removed]
    • Sebastian
      You are right. And by the way: what are the craftsmen doing? Are you planning to continue the article series? Regards, Sebastian Kübeck
      Message 2 of 28 , Feb 10, 2010
        You are right.
        And by the way: what are the craftsmen doing?
        Are you planning to continue the article series?

        Regards,
        Sebastian Kübeck

        --- In testdrivendevelopment@yahoogroups.com, Robert Martin <UncleBob@...> wrote:
        >
        > One reasonable definition of good design is testability. It is hard to imagine a software system that is both testable and poorly designed. It is also hard to imagine a software system that is well designed but also untestable.
        >
        >
        > ----
        > Robert C. Martin (Uncle Bob) | email: unclebob@...
        > Object Mentor Inc. | blog: blog.objectmentor.com
        > The Agile Transition Experts | web: www.objectmentor.com
        > 800-338-6716 | twitter: unclebobmartin
        >
        >
        >
        >
        >
        >
        >
        > [Non-text portions of this message have been removed]
        >
      • Roy Osherove
        Does that mean that all ruby programs ate well designed? On Wednesday, February 10, 2010, Robert Martin ... -- Thanks, Roy Osherove www.TypeMock.com - Unit
        Message 3 of 28 , Feb 10, 2010
          Does that mean that all ruby programs ate well designed?

          On Wednesday, February 10, 2010, Robert Martin
          <UncleBob@...> wrote:
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > One reasonable definition of good design is testability. It is hard to imagine a software system that is both testable and poorly designed. It is also hard to imagine a software system that is well designed but also untestable.
          >
          > ----
          > Robert C. Martin (Uncle Bob) | email: unclebob@... <unclebob%40objectmentor.com>
          > Object Mentor Inc. | blog: blog.objectmentor.com
          > The Agile Transition Experts | web: www.objectmentor.com
          > 800-338-6716 | twitter: unclebobmartin
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >

          --
          Thanks,

          Roy Osherove
          www.TypeMock.com - Unit Testing, Plain Smart

          Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
          A blog for team leaders: http://5Whys.com
          my .NET blog: http://www.ISerializable.com
          Twitter: http://twitter.com/RoyOsherove
          +972-524-655388 (GMT+2)
        • George Dinwiddie
          Hi, Uncle Bob, ... Yes. ... I don t think this is so hard, at all. For a trivial counter-case, there could be rampant duplication of testable code. I would
          Message 4 of 28 , Feb 10, 2010
            Hi, Uncle Bob,

            Robert Martin wrote:
            > One reasonable definition of good design is testability.

            Yes.

            > It is hard to imagine a software system that is both testable and
            > poorly designed.

            I don't think this is so hard, at all. For a trivial counter-case,
            there could be rampant duplication of testable code. I would call that
            poorly designed.

            > It is also hard to imagine a software system that is well
            > designed but also untestable.

            This, I believe.

            Perhaps I would say "One reasonable component of the definition of good
            design is testability."

            - George

            --
            ----------------------------------------------------------------------
            * George Dinwiddie * http://blog.gdinwiddie.com
            Software Development http://www.idiacomputing.com
            Consultant and Coach http://www.agilemaryland.org
            ----------------------------------------------------------------------
          • Olof Bjarnason
            2010/2/10 George Dinwiddie ... +1. That is: view testability as a quality of the code just as time-complexity, readability, DRYness,
            Message 5 of 28 , Feb 10, 2010
              2010/2/10 George Dinwiddie <lists@...>

              >
              >
              > Hi, Uncle Bob,
              >
              >
              > Robert Martin wrote:
              > > One reasonable definition of good design is testability.
              >
              > Yes.
              >
              >
              > > It is hard to imagine a software system that is both testable and
              > > poorly designed.
              >
              > I don't think this is so hard, at all. For a trivial counter-case,
              > there could be rampant duplication of testable code. I would call that
              > poorly designed.
              >
              > > It is also hard to imagine a software system that is well
              > > designed but also untestable.
              >

              > This, I believe.
              >
              > Perhaps I would say "One reasonable component of the definition of good
              > design is testability."
              >

              +1.

              That is: view testability as a quality of the code just as time-complexity,
              readability, DRYness, ..

              What mix of those qualities to choose? Depends. Striking the right balance
              for a particular situation is an act of craft. Things like experience &
              taste overweighs mechanical approaches. Maybe that is why I like the
              craftsman view of software development more than the engineering view; there
              is no algorithm when it comes to software development.



              >
              > - George
              >
              > --
              > ----------------------------------------------------------
              > * George Dinwiddie * http://blog.gdinwiddie.com
              > Software Development http://www.idiacomputing.com
              > Consultant and Coach http://www.agilemaryland.org
              > ----------------------------------------------------------
              >
              >
              >



              --
              http://olofb.wordpress.com


              [Non-text portions of this message have been removed]
            • Steven Gordon
              On Wed, Feb 10, 2010 at 8:14 AM, Olof Bjarnason ... When I taught, I would tell my students that they should be thankful that there is no algorithm for
              Message 6 of 28 , Feb 10, 2010
                On Wed, Feb 10, 2010 at 8:14 AM, Olof Bjarnason
                <olof.bjarnason@...> wrote:

                > there is no algorithm when it comes to software development.
                >

                When I taught, I would tell my students that they should be thankful
                that there is no algorithm for developing software. If there were,
                somebody would program that algorithm and nobody would ever need to
                hire any developers after that.
              • Josue Barbosa dos Santos
                ... In this blog post - Why I love everything you hate about Java(1) - the authors explain why even in Ruby concepts more used in a Java (2) world such as
                Message 7 of 28 , Feb 10, 2010
                  >>Does that mean that all ruby programs ate well designed?

                  In this blog post - Why I love everything you hate about Java(1) - the
                  authors explain why even in Ruby concepts more used in a Java (2) world
                  such as Factories, AbstractFactories, DependencyInjection, Decorators etc.
                  leads to a code more configurable and modular.

                  The main point of the post is not about testability but in some place he
                  says:

                  "One of the principal advantages of (or stated another way, one of the
                  principal motivations for) writing Decorator-oriented code is how easy it is
                  to write isolated unit tests of that code." And from the reading I think he
                  thinks the same to the others patterns.

                  So, from the post, the same kind of code that leads to a more well designed
                  code also leads to a more testable code. Thus, even in Ruby (where it seems
                  not to be possible to create untestable) more testable code is code with
                  better design.

                  If the idea was not clear it is because my English. :)

                  Blog post:
                  http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/


                  --
                  Abraços,
                  Josué
                  http://twitter.com/josuesantos


                  (1) I think a best post title would be - Why i love a well designed code -
                  or - Why I love factories, decorators, DI etc.

                  (2) I am not a Ruby boy, I am telling what the authors says.


                  On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...> wrote:

                  > Does that mean that all ruby programs ate well designed?
                  >
                  > On Wednesday, February 10, 2010, Robert Martin
                  > <UncleBob@...> wrote:
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > > One reasonable definition of good design is testability. It is
                  > hard to imagine a software system that is both testable and poorly designed.
                  > It is also hard to imagine a software system that is well designed but also
                  > untestable.
                  > >
                  > > ----
                  > > Robert C. Martin (Uncle Bob) | email: unclebob@...
                  > <unclebob%40objectmentor.com>
                  > > Object Mentor Inc. | blog: blog.objectmentor.com
                  > > The Agile Transition Experts | web: www.objectmentor.com
                  > > 800-338-6716 | twitter: unclebobmartin
                  > >
                  > > [Non-text portions of this message have been removed]
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  > >
                  >
                  > --
                  > Thanks,
                  >
                  > Roy Osherove
                  > www.TypeMock.com - Unit Testing, Plain Smart
                  >
                  > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                  > A blog for team leaders: http://5Whys.com
                  > my .NET blog: http://www.ISerializable.com
                  > Twitter: http://twitter.com/RoyOsherove
                  > +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388> (GMT+2)
                  >
                  >
                  > ------------------------------------
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >


                  [Non-text portions of this message have been removed]
                • Roy Osherove
                  my point was that in ruby, where testability is no a concern, design can still be an issue. they are not always welded together. everything in ruby is
                  Message 8 of 28 , Feb 10, 2010
                    my point was that in ruby, where testability is no a concern, design can
                    still be an issue.
                    they are not always welded together.
                    everything in ruby is replaceable, and thus testable.
                    but that doesn't mean you don't need to design in Ruby.

                    we are connecting testability to design just because it seems to fit the
                    current needs of the industry, but your hanging on to branches in a tree
                    that only grows specific kinds of fruit. "testability for good design" is a
                    band aid (and only applies in static typed langs) because there seems to be
                    nothing better that tells us our design is up to par with some kind of
                    requirement. but once you realize it only applies in specific languages you
                    see that testability for design is not a universal concept - it is tacked
                    on because it is easy to grasp and talk about - and abandoning all forms of
                    design that does not adhere to that specific idea of testability.

                    2010/2/10 Josue Barbosa dos Santos <josuesantos@...>

                    >
                    >
                    > >>Does that mean that all ruby programs ate well designed?
                    >
                    > In this blog post - Why I love everything you hate about Java(1) - the
                    > authors explain why even in Ruby concepts more used in a Java (2) world
                    > such as Factories, AbstractFactories, DependencyInjection, Decorators etc.
                    > leads to a code more configurable and modular.
                    >
                    > The main point of the post is not about testability but in some place he
                    > says:
                    >
                    > "One of the principal advantages of (or stated another way, one of the
                    > principal motivations for) writing Decorator-oriented code is how easy it
                    > is
                    > to write isolated unit tests of that code." And from the reading I think he
                    > thinks the same to the others patterns.
                    >
                    > So, from the post, the same kind of code that leads to a more well designed
                    > code also leads to a more testable code. Thus, even in Ruby (where it seems
                    > not to be possible to create untestable) more testable code is code with
                    > better design.
                    >
                    > If the idea was not clear it is because my English. :)
                    >
                    > Blog post:
                    >
                    > http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                    >
                    > --
                    > Abra�os,
                    > Josu�
                    > http://twitter.com/josuesantos
                    >
                    > (1) I think a best post title would be - Why i love a well designed code -
                    > or - Why I love factories, decorators, DI etc.
                    >
                    > (2) I am not a Ruby boy, I am telling what the authors says.
                    >
                    >
                    > On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>>
                    > wrote:
                    >
                    > > Does that mean that all ruby programs ate well designed?
                    > >
                    > > On Wednesday, February 10, 2010, Robert Martin
                    > > <UncleBob@... <UncleBob%40objectmentor.com>> wrote:
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > > One reasonable definition of good design is testability. It is
                    > > hard to imagine a software system that is both testable and poorly
                    > designed.
                    > > It is also hard to imagine a software system that is well designed but
                    > also
                    > > untestable.
                    > > >
                    > > > ----
                    > > > Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                    > > <unclebob%40objectmentor.com>
                    > > > Object Mentor Inc. | blog: blog.objectmentor.com
                    > > > The Agile Transition Experts | web: www.objectmentor.com
                    > > > 800-338-6716 | twitter: unclebobmartin
                    > > >
                    > > > [Non-text portions of this message have been removed]
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > > >
                    > >
                    > > --
                    >
                    > > Thanks,
                    > >
                    > > Roy Osherove
                    > > www.TypeMock.com - Unit Testing, Plain Smart
                    > >
                    > > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                    > > A blog for team leaders: http://5Whys.com
                    > > my .NET blog: http://www.ISerializable.com
                    > > Twitter: http://twitter.com/RoyOsherove
                    > > +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                    > (GMT+2)
                    > >
                    > >
                    > > ------------------------------------
                    > >
                    > > Yahoo! Groups Links
                    >
                    > >
                    > >
                    > >
                    > >
                    >
                    > [Non-text portions of this message have been removed]
                    >
                    >
                    >



                    --
                    Thanks,

                    Roy Osherove
                    www.TypeMock.com - Unit Testing, Plain Smart

                    Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                    A blog for team leaders: http://5Whys.com
                    my .NET blog: http://www.ISerializable.com
                    Twitter: http://twitter.com/RoyOsherove
                    +972-524-655388 (GMT+2)


                    [Non-text portions of this message have been removed]
                  • Luiz Esmiralha
                    ... In this case, wouldn t it be that the tests are poorly designed, instead of the system under test? Best regards, Luiz
                    Message 9 of 28 , Feb 10, 2010
                      2010/2/10 George Dinwiddie <lists@...> wrote:
                      >
                      >
                      >
                      > Hi, Uncle Bob,
                      >
                      > Robert Martin wrote:
                      > > One reasonable definition of good design is testability.
                      >
                      > Yes.
                      >
                      > > It is hard to imagine a software system that is both testable and
                      > > poorly designed.
                      >
                      > I don't think this is so hard, at all. For a trivial counter-case,
                      > there could be rampant duplication of testable code. I would call that
                      > poorly designed.
                      >

                      In this case, wouldn't it be that the tests are poorly designed,
                      instead of the system under test?

                      Best regards,
                      Luiz
                    • Adam Sroka
                      ... No. Not all Ruby programs are testable either. A Ruby program which is tested but not well designed is almost certainly missing some tests.
                      Message 10 of 28 , Feb 10, 2010
                        On Wed, Feb 10, 2010 at 6:14 AM, Roy Osherove <roy@...> wrote:
                        > Does that mean that all ruby programs ate well designed?
                        >

                        No. Not all Ruby programs are testable either. A Ruby program which is
                        tested but not well designed is almost certainly missing some tests.
                      • Adam Sroka
                        On Wed, Feb 10, 2010 at 5:59 AM, Robert Martin ... I would say that a system which is well tested is also well designed. It follows that if anything I wanted
                        Message 11 of 28 , Feb 10, 2010
                          On Wed, Feb 10, 2010 at 5:59 AM, Robert Martin
                          <UncleBob@...> wrote:
                          >
                          >
                          >
                          > One reasonable definition of good design is testability. It is hard to imagine a software system that is both testable and poorly designed. It is also hard to imagine a software system that is well designed but also untestable.
                          >

                          I would say that a system which is well tested is also well designed.
                          It follows that if anything I wanted to test about a system I could
                          easily test then the system is well designed. However, I don't believe
                          that that is knowable without actually doing it.

                          That leads me back to my earlier point: designing and testing are the
                          same thing. They both boil down to knowing how it works.
                        • Steven Gordon
                          ... This logic supports the statement that any system that can be tested easily is well designed. Just because a system could be tested easily does not
                          Message 12 of 28 , Feb 10, 2010
                            On Wed, Feb 10, 2010 at 1:26 PM, Adam Sroka <adam.sroka@...> wrote:

                            >
                            >
                            > On Wed, Feb 10, 2010 at 5:59 AM, Robert Martin
                            > <UncleBob@... <UncleBob%40objectmentor.com>> wrote:
                            > >
                            > >
                            > >
                            > > One reasonable definition of good design is testability. It is hard to
                            > imagine a software system that is both testable and poorly designed. It is
                            > also hard to imagine a software system that is well designed but also
                            > untestable.
                            > >
                            >
                            > I would say that a system which is well tested is also well designed.
                            > It follows that if anything I wanted to test about a system I could
                            > easily test then the system is well designed. However, I don't believe
                            > that that is knowable without actually doing it.
                            >

                            This logic supports the statement that any system that can be tested easily
                            is well designed.

                            Just because a system could be tested easily does not necessarily mean it
                            has been tested at all, let alone well tested.


                            > That leads me back to my earlier point: designing and testing are the
                            > same thing. They both boil down to knowing how it works.
                            >
                            >

                            Testing may be the best vehicle we know of for designing, but it is not the
                            only way. To say they are the same is the kind of hyperbole that reduces
                            credibility.

                            SteveG


                            [Non-text portions of this message have been removed]
                          • Adam Sroka
                            ... Yes. It must be (at least theoretically) possible to have a system that is well designed without knowing it. However, I can t see how that is a useful
                            Message 13 of 28 , Feb 10, 2010
                              On Wed, Feb 10, 2010 at 1:31 PM, Steven Gordon <sgordonphd@...> wrote:
                              >
                              >
                              >
                              > On Wed, Feb 10, 2010 at 1:26 PM, Adam Sroka <adam.sroka@...> wrote:
                              >
                              > >
                              > >
                              > > On Wed, Feb 10, 2010 at 5:59 AM, Robert Martin
                              > > <UncleBob@... <UncleBob%40objectmentor.com>> wrote:
                              > > >
                              > > >
                              > > >
                              > > > One reasonable definition of good design is testability. It is hard to
                              > > imagine a software system that is both testable and poorly designed. It is
                              > > also hard to imagine a software system that is well designed but also
                              > > untestable.
                              > > >
                              > >
                              > > I would say that a system which is well tested is also well designed.
                              > > It follows that if anything I wanted to test about a system I could
                              > > easily test then the system is well designed. However, I don't believe
                              > > that that is knowable without actually doing it.
                              > >
                              >
                              > This logic supports the statement that any system that can be tested easily
                              > is well designed.
                              >
                              > Just because a system could be tested easily does not necessarily mean it
                              > has been tested at all, let alone well tested.
                              >

                              Yes. It must be (at least theoretically) possible to have a system
                              that is well designed without knowing it. However, I can't see how
                              that is a useful position to be in.

                              That is the quandary of the "I don't have to test it because I know I
                              am right" crowd. I assert that that which is unknown is unknowable
                              without investigation, and that testing == investigation.

                              > > That leads me back to my earlier point: designing and testing are the
                              > > same thing. They both boil down to knowing how it works.
                              > >
                              > >
                              >
                              > Testing may be the best vehicle we know of for designing, but it is not the
                              > only way. To say they are the same is the kind of hyperbole that reduces
                              > credibility.
                              >

                              It is not hyperbole. It is an unqualified observation based on my own practice.

                              I am very open to finding a better/faster way to know if I have
                              created a well designed system. If you can explain how I can do that
                              without testing then I will admit that there is an alternative. Then
                              we can go about discovering which is better/faster in a given set of
                              circumstances.
                            • Josue Barbosa dos Santos
                              ... So I think I am not clear in my point. I do not agree that in ruby testability is not a concern. The blog post that I cited just showed one example where
                              Message 14 of 28 , Feb 10, 2010
                                >>my point was that in ruby, where testability is no a concern, design can
                                >>still be an issue.

                                So I think I am not clear in my point. I do not agree that in ruby
                                testability is not a concern. The blog post that I cited just showed one
                                example where it is and why. In one form the design was better to test than
                                in the another. And coincidently or not the design with best testability is
                                the one considered better.

                                On Wed, Feb 10, 2010 at 3:37 PM, Roy Osherove <roy@...> wrote:

                                > my point was that in ruby, where testability is no a concern, design can
                                > still be an issue.
                                > they are not always welded together.
                                > everything in ruby is replaceable, and thus testable.
                                > but that doesn't mean you don't need to design in Ruby.
                                >
                                > we are connecting testability to design just because it seems to fit the
                                > current needs of the industry, but your hanging on to branches in a tree
                                > that only grows specific kinds of fruit. "testability for good design" is a
                                > band aid (and only applies in static typed langs) because there seems to be
                                > nothing better that tells us our design is up to par with some kind of
                                > requirement. but once you realize it only applies in specific languages you
                                > see that testability for design is not a universal concept - it is tacked
                                > on because it is easy to grasp and talk about - and abandoning all forms of
                                > design that does not adhere to that specific idea of testability.
                                >
                                > 2010/2/10 Josue Barbosa dos Santos <josuesantos@...>
                                >
                                > >
                                > >
                                > > >>Does that mean that all ruby programs ate well designed?
                                > >
                                > > In this blog post - Why I love everything you hate about Java(1) - the
                                > > authors explain why even in Ruby concepts more used in a Java (2) world
                                > > such as Factories, AbstractFactories, DependencyInjection, Decorators
                                > etc.
                                > > leads to a code more configurable and modular.
                                > >
                                > > The main point of the post is not about testability but in some place he
                                > > says:
                                > >
                                > > "One of the principal advantages of (or stated another way, one of the
                                > > principal motivations for) writing Decorator-oriented code is how easy it
                                > > is
                                > > to write isolated unit tests of that code." And from the reading I think
                                > he
                                > > thinks the same to the others patterns.
                                > >
                                > > So, from the post, the same kind of code that leads to a more well
                                > designed
                                > > code also leads to a more testable code. Thus, even in Ruby (where it
                                > seems
                                > > not to be possible to create untestable) more testable code is code with
                                > > better design.
                                > >
                                > > If the idea was not clear it is because my English. :)
                                > >
                                > > Blog post:
                                > >
                                > >
                                > http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                > >
                                > > --
                                > > Abraços,
                                > > Josué
                                > > http://twitter.com/josuesantos
                                > >
                                > > (1) I think a best post title would be - Why i love a well designed code
                                > -
                                > > or - Why I love factories, decorators, DI etc.
                                > >
                                > > (2) I am not a Ruby boy, I am telling what the authors says.
                                > >
                                > >
                                > > On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%
                                > 40osherove.com>>
                                > > wrote:
                                > >
                                > > > Does that mean that all ruby programs ate well designed?
                                > > >
                                > > > On Wednesday, February 10, 2010, Robert Martin
                                > > > <UncleBob@... <UncleBob%40objectmentor.com>> wrote:
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > > One reasonable definition of good design is testability. It is
                                > > > hard to imagine a software system that is both testable and poorly
                                > > designed.
                                > > > It is also hard to imagine a software system that is well designed but
                                > > also
                                > > > untestable.
                                > > > >
                                > > > > ----
                                > > > > Robert C. Martin (Uncle Bob) | email: unclebob@...
                                > <unclebob%40objectmentor.com>
                                > > > <unclebob%40objectmentor.com>
                                > > > > Object Mentor Inc. | blog: blog.objectmentor.com
                                > > > > The Agile Transition Experts | web: www.objectmentor.com
                                > > > > 800-338-6716 | twitter: unclebobmartin
                                > > > >
                                > > > > [Non-text portions of this message have been removed]
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > > >
                                > > >
                                > > > --
                                > >
                                > > > Thanks,
                                > > >
                                > > > Roy Osherove
                                > > > www.TypeMock.com - Unit Testing, Plain Smart
                                > > >
                                > > > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                > > > A blog for team leaders: http://5Whys.com
                                > > > my .NET blog: http://www.ISerializable.com
                                > > > Twitter: http://twitter.com/RoyOsherove
                                > > > +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                > > (GMT+2)
                                > > >
                                > > >
                                > > > ------------------------------------
                                > > >
                                > > > Yahoo! Groups Links
                                > >
                                > > >
                                > > >
                                > > >
                                > > >
                                > >
                                > > [Non-text portions of this message have been removed]
                                > >
                                > >
                                > >
                                >
                                >
                                >
                                > --
                                > Thanks,
                                >
                                > Roy Osherove
                                > www.TypeMock.com - Unit Testing, Plain Smart
                                >
                                > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                > A blog for team leaders: http://5Whys.com
                                > my .NET blog: http://www.ISerializable.com
                                > Twitter: http://twitter.com/RoyOsherove
                                > +972-524-655388 (GMT+2)
                                >
                                >
                                > [Non-text portions of this message have been removed]
                                >
                                >
                                >
                                > ------------------------------------
                                >
                                > Yahoo! Groups Links
                                >
                                >
                                >
                                >


                                --
                                Abraços,
                                Josué
                                http://twitter.com/josuesantos


                                [Non-text portions of this message have been removed]
                              • Keith Ray
                                The phrase Good Design generally means something like works well for its intended purpose(s) . Agree? If testability is one of those intended purposes, then
                                Message 15 of 28 , Feb 10, 2010
                                  The phrase "Good Design" generally means something like "works well
                                  for its intended purpose(s)". Agree?

                                  If testability is one of those intended purposes, then a design that
                                  isn't testable is not __ by the definition just mentioned above __ a
                                  good design.

                                  If readable is one of those intended purposes, then a design that
                                  isn't readable is not __ by the definition just mentioned above __ a
                                  good design.

                                  (Repeat above for "maintainable", "reliable", etc...)

                                  Let's find something more interesting to talk about, OK?

                                  C. Keith Ray
                                • George Dinwiddie
                                  Hi, Luiz, ... In that the tests don t detect duplication in the code? I hadn t thought of that. I don t think I ve ever written tests that check something
                                  Message 16 of 28 , Feb 10, 2010
                                    Hi, Luiz,

                                    Luiz Esmiralha wrote:
                                    > 2010/2/10 George Dinwiddie <lists@...> wrote:
                                    >>> It is hard to imagine a software system that is both testable and
                                    >>> poorly designed.
                                    >> I don't think this is so hard, at all. For a trivial counter-case,
                                    >> there could be rampant duplication of testable code. I would call that
                                    >> poorly designed.
                                    >>
                                    >
                                    > In this case, wouldn't it be that the tests are poorly designed,
                                    > instead of the system under test?

                                    In that the tests don't detect duplication in the code? I hadn't
                                    thought of that. I don't think I've ever written tests that check
                                    something like that. There are, of course, code metric tools to check
                                    such things, but when I've seen them used, one of two things happen:
                                    1. People argue about their interpretation, or
                                    2. Nobody reads the output and they're ignored.

                                    In any event, I would still say that the system under test was both
                                    testable and poorly designed.

                                    - George

                                    --
                                    ----------------------------------------------------------------------
                                    * George Dinwiddie * http://blog.gdinwiddie.com
                                    Software Development http://www.idiacomputing.com
                                    Consultant and Coach http://www.agilemaryland.org
                                    ----------------------------------------------------------------------
                                  • Luiz Esmiralha
                                    Hi George, I misread your post... Instead of testable code I read test code as in having duplication in the tests. I m sorry for that. Anyway, I feel that
                                    Message 17 of 28 , Feb 11, 2010
                                      Hi George, I misread your post... Instead of "testable code" I read
                                      "test code" as in having duplication in the tests. I'm sorry for that.

                                      Anyway, I feel that a bad design will impair testability somehow. For
                                      example, duplicated code could probably lead to lots of duplication in
                                      the tests, making tests more complex than they should be?

                                      Best regards,
                                      Luiz


                                      2010/2/10 George Dinwiddie <lists@...>
                                      >
                                      >
                                      >
                                      > Hi, Luiz,
                                      >
                                      > Luiz Esmiralha wrote:
                                      > > 2010/2/10 George Dinwiddie <lists@...> wrote:
                                      > >>> It is hard to imagine a software system that is both testable and
                                      > >>> poorly designed.
                                      > >> I don't think this is so hard, at all. For a trivial counter-case,
                                      > >> there could be rampant duplication of testable code. I would call that
                                      > >> poorly designed.
                                      > >>
                                      > >
                                      > > In this case, wouldn't it be that the tests are poorly designed,
                                      > > instead of the system under test?
                                      >
                                      > In that the tests don't detect duplication in the code? I hadn't
                                      > thought of that. I don't think I've ever written tests that check
                                      > something like that. There are, of course, code metric tools to check
                                      > such things, but when I've seen them used, one of two things happen:
                                      > 1. People argue about their interpretation, or
                                      > 2. Nobody reads the output and they're ignored.
                                      >
                                      > In any event, I would still say that the system under test was both
                                      > testable and poorly designed.
                                      >
                                      > - George
                                      >
                                      > --
                                      > ----------------------------------------------------------
                                      > * George Dinwiddie * http://blog.gdinwiddie.com
                                      > Software Development http://www.idiacomputing.com
                                      > Consultant and Coach http://www.agilemaryland.org
                                      > ----------------------------------------------------------
                                      >
                                      >
                                    • George Dinwiddie
                                      ... Ah, yes, but someone who doesn t notice the duplication in the code under test will also not notice it in the test code. They ll probably just look at
                                      Message 18 of 28 , Feb 11, 2010
                                        Luiz Esmiralha wrote:
                                        > Anyway, I feel that a bad design will impair testability somehow. For
                                        > example, duplicated code could probably lead to lots of duplication in
                                        > the tests, making tests more complex than they should be?

                                        Ah, yes, but someone who doesn't notice the duplication in the code
                                        under test will also not notice it in the test code. They'll probably
                                        just look at their code coverage metric and feel happy with themselves.
                                        <sigh/>

                                        - George

                                        --
                                        ----------------------------------------------------------------------
                                        * George Dinwiddie * http://blog.gdinwiddie.com
                                        Software Development http://www.idiacomputing.com
                                        Consultant and Coach http://www.agilemaryland.org
                                        ----------------------------------------------------------------------
                                      • Pat Maddox
                                        I think you might be setting the bar very low for what testable means. If you re just talking about the possibility for a programmer to write a test, then
                                        Message 19 of 28 , Feb 13, 2010
                                          I think you might be setting the bar very low for what "testable" means. If you're just talking about the possibility for a programmer to write a test, then yes, a Ruby program is more "testable" than a Java program. Across all categories. That is simply a property of the language and the runtime.

                                          Whether the programmer is able to write good tests for that platform is a different question altogether. That's where having a testable design comes into the picture. Too often I'm finding in the Ruby community we've got people who have learned how to test, and even take advantage of Ruby's flexibility when writing tests, but have never learned how to design. They end up doing crazy shit because (a) they don't know any better and (b) they can.

                                          Pat



                                          On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:

                                          > my point was that in ruby, where testability is no a concern, design can
                                          > still be an issue.
                                          > they are not always welded together.
                                          > everything in ruby is replaceable, and thus testable.
                                          > but that doesn't mean you don't need to design in Ruby.
                                          >
                                          > we are connecting testability to design just because it seems to fit the
                                          > current needs of the industry, but your hanging on to branches in a tree
                                          > that only grows specific kinds of fruit. "testability for good design" is a
                                          > band aid (and only applies in static typed langs) because there seems to be
                                          > nothing better that tells us our design is up to par with some kind of
                                          > requirement. but once you realize it only applies in specific languages you
                                          > see that testability for design is not a universal concept - it is tacked
                                          > on because it is easy to grasp and talk about - and abandoning all forms of
                                          > design that does not adhere to that specific idea of testability.
                                          >
                                          > 2010/2/10 Josue Barbosa dos Santos <josuesantos@...>
                                          >
                                          >>
                                          >>
                                          >>>> Does that mean that all ruby programs ate well designed?
                                          >>
                                          >> In this blog post - Why I love everything you hate about Java(1) - the
                                          >> authors explain why even in Ruby concepts more used in a Java (2) world
                                          >> such as Factories, AbstractFactories, DependencyInjection, Decorators etc.
                                          >> leads to a code more configurable and modular.
                                          >>
                                          >> The main point of the post is not about testability but in some place he
                                          >> says:
                                          >>
                                          >> "One of the principal advantages of (or stated another way, one of the
                                          >> principal motivations for) writing Decorator-oriented code is how easy it
                                          >> is
                                          >> to write isolated unit tests of that code." And from the reading I think he
                                          >> thinks the same to the others patterns.
                                          >>
                                          >> So, from the post, the same kind of code that leads to a more well designed
                                          >> code also leads to a more testable code. Thus, even in Ruby (where it seems
                                          >> not to be possible to create untestable) more testable code is code with
                                          >> better design.
                                          >>
                                          >> If the idea was not clear it is because my English. :)
                                          >>
                                          >> Blog post:
                                          >>
                                          >> http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                          >>
                                          >> --
                                          >> Abraços,
                                          >> Josué
                                          >> http://twitter.com/josuesantos
                                          >>
                                          >> (1) I think a best post title would be - Why i love a well designed code -
                                          >> or - Why I love factories, decorators, DI etc.
                                          >>
                                          >> (2) I am not a Ruby boy, I am telling what the authors says.
                                          >>
                                          >>
                                          >> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>>
                                          >> wrote:
                                          >>
                                          >>> Does that mean that all ruby programs ate well designed?
                                          >>>
                                          >>> On Wednesday, February 10, 2010, Robert Martin
                                          >>> <UncleBob@... <UncleBob%40objectmentor.com>> wrote:
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>> One reasonable definition of good design is testability. It is
                                          >>> hard to imagine a software system that is both testable and poorly
                                          >> designed.
                                          >>> It is also hard to imagine a software system that is well designed but
                                          >> also
                                          >>> untestable.
                                          >>>>
                                          >>>> ----
                                          >>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                          >>> <unclebob%40objectmentor.com>
                                          >>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                          >>>> The Agile Transition Experts | web: www.objectmentor.com
                                          >>>> 800-338-6716 | twitter: unclebobmartin
                                          >>>>
                                          >>>> [Non-text portions of this message have been removed]
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>>
                                          >>>
                                          >>> --
                                          >>
                                          >>> Thanks,
                                          >>>
                                          >>> Roy Osherove
                                          >>> www.TypeMock.com - Unit Testing, Plain Smart
                                          >>>
                                          >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                          >>> A blog for team leaders: http://5Whys.com
                                          >>> my .NET blog: http://www.ISerializable.com
                                          >>> Twitter: http://twitter.com/RoyOsherove
                                          >>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                          >> (GMT+2)
                                          >>>
                                          >>>
                                          >>> ------------------------------------
                                          >>>
                                          >>> Yahoo! Groups Links
                                          >>
                                          >>>
                                          >>>
                                          >>>
                                          >>>
                                          >>
                                          >> [Non-text portions of this message have been removed]
                                          >>
                                          >>
                                          >>
                                          >
                                          >
                                          >
                                          > --
                                          > Thanks,
                                          >
                                          > Roy Osherove
                                          > www.TypeMock.com - Unit Testing, Plain Smart
                                          >
                                          > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                          > A blog for team leaders: http://5Whys.com
                                          > my .NET blog: http://www.ISerializable.com
                                          > Twitter: http://twitter.com/RoyOsherove
                                          > +972-524-655388 (GMT+2)
                                          >
                                          >
                                          > [Non-text portions of this message have been removed]
                                          >
                                          >
                                          >
                                          > ------------------------------------
                                          >
                                          > Yahoo! Groups Links
                                          >
                                          >
                                          >
                                        • Roy Osherove
                                          so Pat and all, is it better to take care of a or b? because they can or because they don t know how to design My claim is that fixing the first one is
                                          Message 20 of 28 , Feb 13, 2010
                                            so Pat and all,
                                            is it better to take care of a or b?
                                            "because they can" or "because they don't know how to design"

                                            My claim is that fixing the first one is meaningless and leads to a false
                                            sense of helping, instead of teaching.
                                            and of course that all means that design and testability are two different
                                            beasts.

                                            On Sat, Feb 13, 2010 at 10:12 PM, Pat Maddox <mailinglists@...>wrote:

                                            >
                                            >
                                            > I think you might be setting the bar very low for what "testable" means. If
                                            > you're just talking about the possibility for a programmer to write a test,
                                            > then yes, a Ruby program is more "testable" than a Java program. Across all
                                            > categories. That is simply a property of the language and the runtime.
                                            >
                                            > Whether the programmer is able to write good tests for that platform is a
                                            > different question altogether. That's where having a testable design comes
                                            > into the picture. Too often I'm finding in the Ruby community we've got
                                            > people who have learned how to test, and even take advantage of Ruby's
                                            > flexibility when writing tests, but have never learned how to design. They
                                            > end up doing crazy shit because (a) they don't know any better and (b) they
                                            > can.
                                            >
                                            > Pat
                                            >
                                            >
                                            > On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:
                                            >
                                            > > my point was that in ruby, where testability is no a concern, design can
                                            > > still be an issue.
                                            > > they are not always welded together.
                                            > > everything in ruby is replaceable, and thus testable.
                                            > > but that doesn't mean you don't need to design in Ruby.
                                            > >
                                            > > we are connecting testability to design just because it seems to fit the
                                            > > current needs of the industry, but your hanging on to branches in a tree
                                            > > that only grows specific kinds of fruit. "testability for good design" is
                                            > a
                                            > > band aid (and only applies in static typed langs) because there seems to
                                            > be
                                            > > nothing better that tells us our design is up to par with some kind of
                                            > > requirement. but once you realize it only applies in specific languages
                                            > you
                                            > > see that testability for design is not a universal concept - it is tacked
                                            > > on because it is easy to grasp and talk about - and abandoning all forms
                                            > of
                                            > > design that does not adhere to that specific idea of testability.
                                            > >
                                            > > 2010/2/10 Josue Barbosa dos Santos <josuesantos@...<josuesantos%40gmail.com>
                                            > >
                                            > >
                                            > >>
                                            > >>
                                            > >>>> Does that mean that all ruby programs ate well designed?
                                            > >>
                                            > >> In this blog post - Why I love everything you hate about Java(1) - the
                                            > >> authors explain why even in Ruby concepts more used in a Java (2) world
                                            > >> such as Factories, AbstractFactories, DependencyInjection, Decorators
                                            > etc.
                                            > >> leads to a code more configurable and modular.
                                            > >>
                                            > >> The main point of the post is not about testability but in some place he
                                            > >> says:
                                            > >>
                                            > >> "One of the principal advantages of (or stated another way, one of the
                                            > >> principal motivations for) writing Decorator-oriented code is how easy
                                            > it
                                            > >> is
                                            > >> to write isolated unit tests of that code." And from the reading I think
                                            > he
                                            > >> thinks the same to the others patterns.
                                            > >>
                                            > >> So, from the post, the same kind of code that leads to a more well
                                            > designed
                                            > >> code also leads to a more testable code. Thus, even in Ruby (where it
                                            > seems
                                            > >> not to be possible to create untestable) more testable code is code with
                                            > >> better design.
                                            > >>
                                            > >> If the idea was not clear it is because my English. :)
                                            > >>
                                            > >> Blog post:
                                            > >>
                                            > >>
                                            > http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                            > >>
                                            > >> --
                                            > >> Abra�os,
                                            > >> Josu�
                                            > >> http://twitter.com/josuesantos
                                            > >>
                                            > >> (1) I think a best post title would be - Why i love a well designed code
                                            > -
                                            > >> or - Why I love factories, decorators, DI etc.
                                            > >>
                                            > >> (2) I am not a Ruby boy, I am telling what the authors says.
                                            > >>
                                            > >>
                                            > >> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>
                                            > <roy%40osherove.com>>
                                            >
                                            > >> wrote:
                                            > >>
                                            > >>> Does that mean that all ruby programs ate well designed?
                                            > >>>
                                            > >>> On Wednesday, February 10, 2010, Robert Martin
                                            > >>> <UncleBob@... <UncleBob%40objectmentor.com> <UncleBob%
                                            > 40objectmentor.com>> wrote:
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>> One reasonable definition of good design is testability. It is
                                            > >>> hard to imagine a software system that is both testable and poorly
                                            > >> designed.
                                            > >>> It is also hard to imagine a software system that is well designed but
                                            > >> also
                                            > >>> untestable.
                                            > >>>>
                                            > >>>> ----
                                            > >>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                            > <unclebob%40objectmentor.com>
                                            > >>> <unclebob%40objectmentor.com>
                                            > >>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                            > >>>> The Agile Transition Experts | web: www.objectmentor.com
                                            > >>>> 800-338-6716 | twitter: unclebobmartin
                                            > >>>>
                                            > >>>> [Non-text portions of this message have been removed]
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>>
                                            > >>>
                                            > >>> --
                                            > >>
                                            > >>> Thanks,
                                            > >>>
                                            > >>> Roy Osherove
                                            > >>> www.TypeMock.com - Unit Testing, Plain Smart
                                            > >>>
                                            > >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                            > >>> A blog for team leaders: http://5Whys.com
                                            > >>> my .NET blog: http://www.ISerializable.com
                                            > >>> Twitter: http://twitter.com/RoyOsherove
                                            > >>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                            > >> (GMT+2)
                                            > >>>
                                            > >>>
                                            > >>> ------------------------------------
                                            > >>>
                                            > >>> Yahoo! Groups Links
                                            > >>
                                            > >>>
                                            > >>>
                                            > >>>
                                            > >>>
                                            > >>
                                            > >> [Non-text portions of this message have been removed]
                                            > >>
                                            > >>
                                            > >>
                                            > >
                                            > >
                                            > >
                                            > > --
                                            > > Thanks,
                                            > >
                                            > > Roy Osherove
                                            > > www.TypeMock.com - Unit Testing, Plain Smart
                                            > >
                                            > > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                            > > A blog for team leaders: http://5Whys.com
                                            > > my .NET blog: http://www.ISerializable.com
                                            > > Twitter: http://twitter.com/RoyOsherove
                                            > > +972-524-655388 (GMT+2)
                                            > >
                                            > >
                                            > > [Non-text portions of this message have been removed]
                                            > >
                                            > >
                                            > >
                                            > > ------------------------------------
                                            > >
                                            > > Yahoo! Groups Links
                                            > >
                                            > >
                                            > >
                                            >
                                            >
                                            >



                                            --
                                            Thanks,

                                            Roy Osherove
                                            www.TypeMock.com - Unit Testing, Plain Smart

                                            Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                            A blog for team leaders: http://5Whys.com
                                            my .NET blog: http://www.ISerializable.com
                                            Twitter: http://twitter.com/RoyOsherove
                                            +972-524-655388 (GMT+2)


                                            [Non-text portions of this message have been removed]
                                          • Pat Maddox
                                            I don t even know what it would mean to fix the first one. Use a language that doesn t let them, or institute some kind of policy that prohibits it? Neither
                                            Message 21 of 28 , Feb 13, 2010
                                              I don't even know what it would mean to fix the first one. Use a language that doesn't let them, or institute some kind of policy that prohibits it? Neither makes much sense in my view.

                                              Educate developers on good design. Make them aware of the tradeoffs involved when using certain techniques. Give them the tools to perform the tasks they need to, to the best of their abilities. Above all, allow them to make mistakes and learn from them.

                                              When I'm pairing in "teaching" mode, I like to let my partner go down a path that doesn't sit well with me. I am fine with giving him enough rope to hang himself, as long as he's capable of analyzing and learning from the result (which may be prompted by me saying, "did you notice that you hung yourself?")

                                              Pat


                                              On Feb 13, 2010, at 12:24 PM, Roy Osherove wrote:

                                              > so Pat and all,
                                              > is it better to take care of a or b?
                                              > "because they can" or "because they don't know how to design"
                                              >
                                              > My claim is that fixing the first one is meaningless and leads to a false
                                              > sense of helping, instead of teaching.
                                              > and of course that all means that design and testability are two different
                                              > beasts.
                                              >
                                              > On Sat, Feb 13, 2010 at 10:12 PM, Pat Maddox <mailinglists@...>wrote:
                                              >
                                              >>
                                              >>
                                              >> I think you might be setting the bar very low for what "testable" means. If
                                              >> you're just talking about the possibility for a programmer to write a test,
                                              >> then yes, a Ruby program is more "testable" than a Java program. Across all
                                              >> categories. That is simply a property of the language and the runtime.
                                              >>
                                              >> Whether the programmer is able to write good tests for that platform is a
                                              >> different question altogether. That's where having a testable design comes
                                              >> into the picture. Too often I'm finding in the Ruby community we've got
                                              >> people who have learned how to test, and even take advantage of Ruby's
                                              >> flexibility when writing tests, but have never learned how to design. They
                                              >> end up doing crazy shit because (a) they don't know any better and (b) they
                                              >> can.
                                              >>
                                              >> Pat
                                              >>
                                              >>
                                              >> On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:
                                              >>
                                              >>> my point was that in ruby, where testability is no a concern, design can
                                              >>> still be an issue.
                                              >>> they are not always welded together.
                                              >>> everything in ruby is replaceable, and thus testable.
                                              >>> but that doesn't mean you don't need to design in Ruby.
                                              >>>
                                              >>> we are connecting testability to design just because it seems to fit the
                                              >>> current needs of the industry, but your hanging on to branches in a tree
                                              >>> that only grows specific kinds of fruit. "testability for good design" is
                                              >> a
                                              >>> band aid (and only applies in static typed langs) because there seems to
                                              >> be
                                              >>> nothing better that tells us our design is up to par with some kind of
                                              >>> requirement. but once you realize it only applies in specific languages
                                              >> you
                                              >>> see that testability for design is not a universal concept - it is tacked
                                              >>> on because it is easy to grasp and talk about - and abandoning all forms
                                              >> of
                                              >>> design that does not adhere to that specific idea of testability.
                                              >>>
                                              >>> 2010/2/10 Josue Barbosa dos Santos <josuesantos@...<josuesantos%40gmail.com>
                                              >>>
                                              >>>
                                              >>>>
                                              >>>>
                                              >>>>>> Does that mean that all ruby programs ate well designed?
                                              >>>>
                                              >>>> In this blog post - Why I love everything you hate about Java(1) - the
                                              >>>> authors explain why even in Ruby concepts more used in a Java (2) world
                                              >>>> such as Factories, AbstractFactories, DependencyInjection, Decorators
                                              >> etc.
                                              >>>> leads to a code more configurable and modular.
                                              >>>>
                                              >>>> The main point of the post is not about testability but in some place he
                                              >>>> says:
                                              >>>>
                                              >>>> "One of the principal advantages of (or stated another way, one of the
                                              >>>> principal motivations for) writing Decorator-oriented code is how easy
                                              >> it
                                              >>>> is
                                              >>>> to write isolated unit tests of that code." And from the reading I think
                                              >> he
                                              >>>> thinks the same to the others patterns.
                                              >>>>
                                              >>>> So, from the post, the same kind of code that leads to a more well
                                              >> designed
                                              >>>> code also leads to a more testable code. Thus, even in Ruby (where it
                                              >> seems
                                              >>>> not to be possible to create untestable) more testable code is code with
                                              >>>> better design.
                                              >>>>
                                              >>>> If the idea was not clear it is because my English. :)
                                              >>>>
                                              >>>> Blog post:
                                              >>>>
                                              >>>>
                                              >> http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                              >>>>
                                              >>>> --
                                              >>>> Abraços,
                                              >>>> Josué
                                              >>>> http://twitter.com/josuesantos
                                              >>>>
                                              >>>> (1) I think a best post title would be - Why i love a well designed code
                                              >> -
                                              >>>> or - Why I love factories, decorators, DI etc.
                                              >>>>
                                              >>>> (2) I am not a Ruby boy, I am telling what the authors says.
                                              >>>>
                                              >>>>
                                              >>>> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>
                                              >> <roy%40osherove.com>>
                                              >>
                                              >>>> wrote:
                                              >>>>
                                              >>>>> Does that mean that all ruby programs ate well designed?
                                              >>>>>
                                              >>>>> On Wednesday, February 10, 2010, Robert Martin
                                              >>>>> <UncleBob@... <UncleBob%40objectmentor.com> <UncleBob%
                                              >> 40objectmentor.com>> wrote:
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>> One reasonable definition of good design is testability. It is
                                              >>>>> hard to imagine a software system that is both testable and poorly
                                              >>>> designed.
                                              >>>>> It is also hard to imagine a software system that is well designed but
                                              >>>> also
                                              >>>>> untestable.
                                              >>>>>>
                                              >>>>>> ----
                                              >>>>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                              >> <unclebob%40objectmentor.com>
                                              >>>>> <unclebob%40objectmentor.com>
                                              >>>>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                              >>>>>> The Agile Transition Experts | web: www.objectmentor.com
                                              >>>>>> 800-338-6716 | twitter: unclebobmartin
                                              >>>>>>
                                              >>>>>> [Non-text portions of this message have been removed]
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>>
                                              >>>>>
                                              >>>>> --
                                              >>>>
                                              >>>>> Thanks,
                                              >>>>>
                                              >>>>> Roy Osherove
                                              >>>>> www.TypeMock.com - Unit Testing, Plain Smart
                                              >>>>>
                                              >>>>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                              >>>>> A blog for team leaders: http://5Whys.com
                                              >>>>> my .NET blog: http://www.ISerializable.com
                                              >>>>> Twitter: http://twitter.com/RoyOsherove
                                              >>>>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                              >>>> (GMT+2)
                                              >>>>>
                                              >>>>>
                                              >>>>> ------------------------------------
                                              >>>>>
                                              >>>>> Yahoo! Groups Links
                                              >>>>
                                              >>>>>
                                              >>>>>
                                              >>>>>
                                              >>>>>
                                              >>>>
                                              >>>> [Non-text portions of this message have been removed]
                                              >>>>
                                              >>>>
                                              >>>>
                                              >>>
                                              >>>
                                              >>>
                                              >>> --
                                              >>> Thanks,
                                              >>>
                                              >>> Roy Osherove
                                              >>> www.TypeMock.com - Unit Testing, Plain Smart
                                              >>>
                                              >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                              >>> A blog for team leaders: http://5Whys.com
                                              >>> my .NET blog: http://www.ISerializable.com
                                              >>> Twitter: http://twitter.com/RoyOsherove
                                              >>> +972-524-655388 (GMT+2)
                                              >>>
                                              >>>
                                              >>> [Non-text portions of this message have been removed]
                                              >>>
                                              >>>
                                              >>>
                                              >>> ------------------------------------
                                              >>>
                                              >>> Yahoo! Groups Links
                                              >>>
                                              >>>
                                              >>>
                                              >>
                                              >>
                                              >>
                                              >
                                              >
                                              >
                                              > --
                                              > Thanks,
                                              >
                                              > Roy Osherove
                                              > www.TypeMock.com - Unit Testing, Plain Smart
                                              >
                                              > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                              > A blog for team leaders: http://5Whys.com
                                              > my .NET blog: http://www.ISerializable.com
                                              > Twitter: http://twitter.com/RoyOsherove
                                              > +972-524-655388 (GMT+2)
                                              >
                                              >
                                              > [Non-text portions of this message have been removed]
                                              >
                                              >
                                              >
                                              > ------------------------------------
                                              >
                                              > Yahoo! Groups Links
                                              >
                                              >
                                              >
                                            • Roy Osherove
                                              my reference was for tools like isolation frameworks that only fake some of the things out there, on purpose. (jmock vs. powermock moq vs. typemock). and the
                                              Message 22 of 28 , Feb 13, 2010
                                                my reference was for tools like isolation frameworks that only fake some of
                                                the things out there, on purpose. (jmock vs. powermock\moq vs. typemock).
                                                and the claims from people that by using the more limiting frameworks you
                                                are forcing people into the path of better design.

                                                On Sat, Feb 13, 2010 at 11:59 PM, Pat Maddox <mailinglists@...>wrote:

                                                >
                                                >
                                                > I don't even know what it would mean to fix the first one. Use a language
                                                > that doesn't let them, or institute some kind of policy that prohibits it?
                                                > Neither makes much sense in my view.
                                                >
                                                > Educate developers on good design. Make them aware of the tradeoffs
                                                > involved when using certain techniques. Give them the tools to perform the
                                                > tasks they need to, to the best of their abilities. Above all, allow them to
                                                > make mistakes and learn from them.
                                                >
                                                > When I'm pairing in "teaching" mode, I like to let my partner go down a
                                                > path that doesn't sit well with me. I am fine with giving him enough rope to
                                                > hang himself, as long as he's capable of analyzing and learning from the
                                                > result (which may be prompted by me saying, "did you notice that you hung
                                                > yourself?")
                                                >
                                                > Pat
                                                >
                                                >
                                                > On Feb 13, 2010, at 12:24 PM, Roy Osherove wrote:
                                                >
                                                > > so Pat and all,
                                                > > is it better to take care of a or b?
                                                > > "because they can" or "because they don't know how to design"
                                                > >
                                                > > My claim is that fixing the first one is meaningless and leads to a false
                                                > > sense of helping, instead of teaching.
                                                > > and of course that all means that design and testability are two
                                                > different
                                                > > beasts.
                                                > >
                                                > > On Sat, Feb 13, 2010 at 10:12 PM, Pat Maddox <mailinglists@...<mailinglists%40patmaddox.com>
                                                > >wrote:
                                                > >
                                                > >>
                                                > >>
                                                > >> I think you might be setting the bar very low for what "testable" means.
                                                > If
                                                > >> you're just talking about the possibility for a programmer to write a
                                                > test,
                                                > >> then yes, a Ruby program is more "testable" than a Java program. Across
                                                > all
                                                > >> categories. That is simply a property of the language and the runtime.
                                                > >>
                                                > >> Whether the programmer is able to write good tests for that platform is
                                                > a
                                                > >> different question altogether. That's where having a testable design
                                                > comes
                                                > >> into the picture. Too often I'm finding in the Ruby community we've got
                                                > >> people who have learned how to test, and even take advantage of Ruby's
                                                > >> flexibility when writing tests, but have never learned how to design.
                                                > They
                                                > >> end up doing crazy shit because (a) they don't know any better and (b)
                                                > they
                                                > >> can.
                                                > >>
                                                > >> Pat
                                                > >>
                                                > >>
                                                > >> On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:
                                                > >>
                                                > >>> my point was that in ruby, where testability is no a concern, design
                                                > can
                                                > >>> still be an issue.
                                                > >>> they are not always welded together.
                                                > >>> everything in ruby is replaceable, and thus testable.
                                                > >>> but that doesn't mean you don't need to design in Ruby.
                                                > >>>
                                                > >>> we are connecting testability to design just because it seems to fit
                                                > the
                                                > >>> current needs of the industry, but your hanging on to branches in a
                                                > tree
                                                > >>> that only grows specific kinds of fruit. "testability for good design"
                                                > is
                                                > >> a
                                                > >>> band aid (and only applies in static typed langs) because there seems
                                                > to
                                                > >> be
                                                > >>> nothing better that tells us our design is up to par with some kind of
                                                > >>> requirement. but once you realize it only applies in specific languages
                                                > >> you
                                                > >>> see that testability for design is not a universal concept - it is
                                                > tacked
                                                > >>> on because it is easy to grasp and talk about - and abandoning all
                                                > forms
                                                > >> of
                                                > >>> design that does not adhere to that specific idea of testability.
                                                > >>>
                                                > >>> 2010/2/10 Josue Barbosa dos Santos <josuesantos@...<josuesantos%40gmail.com>
                                                > <josuesantos%40gmail.com>
                                                >
                                                > >>>
                                                > >>>
                                                > >>>>
                                                > >>>>
                                                > >>>>>> Does that mean that all ruby programs ate well designed?
                                                > >>>>
                                                > >>>> In this blog post - Why I love everything you hate about Java(1) - the
                                                > >>>> authors explain why even in Ruby concepts more used in a Java (2)
                                                > world
                                                > >>>> such as Factories, AbstractFactories, DependencyInjection, Decorators
                                                > >> etc.
                                                > >>>> leads to a code more configurable and modular.
                                                > >>>>
                                                > >>>> The main point of the post is not about testability but in some place
                                                > he
                                                > >>>> says:
                                                > >>>>
                                                > >>>> "One of the principal advantages of (or stated another way, one of the
                                                > >>>> principal motivations for) writing Decorator-oriented code is how easy
                                                > >> it
                                                > >>>> is
                                                > >>>> to write isolated unit tests of that code." And from the reading I
                                                > think
                                                > >> he
                                                > >>>> thinks the same to the others patterns.
                                                > >>>>
                                                > >>>> So, from the post, the same kind of code that leads to a more well
                                                > >> designed
                                                > >>>> code also leads to a more testable code. Thus, even in Ruby (where it
                                                > >> seems
                                                > >>>> not to be possible to create untestable) more testable code is code
                                                > with
                                                > >>>> better design.
                                                > >>>>
                                                > >>>> If the idea was not clear it is because my English. :)
                                                > >>>>
                                                > >>>> Blog post:
                                                > >>>>
                                                > >>>>
                                                > >>
                                                > http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                                > >>>>
                                                > >>>> --
                                                > >>>> Abra�os,
                                                > >>>> Josu�
                                                > >>>> http://twitter.com/josuesantos
                                                > >>>>
                                                > >>>> (1) I think a best post title would be - Why i love a well designed
                                                > code
                                                > >> -
                                                > >>>> or - Why I love factories, decorators, DI etc.
                                                > >>>>
                                                > >>>> (2) I am not a Ruby boy, I am telling what the authors says.
                                                > >>>>
                                                > >>>>
                                                > >>>> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>
                                                > <roy%40osherove.com>
                                                > >> <roy%40osherove.com>>
                                                > >>
                                                > >>>> wrote:
                                                > >>>>
                                                > >>>>> Does that mean that all ruby programs ate well designed?
                                                > >>>>>
                                                > >>>>> On Wednesday, February 10, 2010, Robert Martin
                                                > >>>>> <UncleBob@... <UncleBob%40objectmentor.com> <UncleBob%
                                                > 40objectmentor.com> <UncleBob%
                                                >
                                                > >> 40objectmentor.com>> wrote:
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>> One reasonable definition of good design is testability. It is
                                                > >>>>> hard to imagine a software system that is both testable and poorly
                                                > >>>> designed.
                                                > >>>>> It is also hard to imagine a software system that is well designed
                                                > but
                                                > >>>> also
                                                > >>>>> untestable.
                                                > >>>>>>
                                                > >>>>>> ----
                                                > >>>>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                                > <unclebob%40objectmentor.com>
                                                > >> <unclebob%40objectmentor.com>
                                                > >>>>> <unclebob%40objectmentor.com>
                                                > >>>>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                                > >>>>>> The Agile Transition Experts | web: www.objectmentor.com
                                                > >>>>>> 800-338-6716 | twitter: unclebobmartin
                                                > >>>>>>
                                                > >>>>>> [Non-text portions of this message have been removed]
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>>
                                                > >>>>>
                                                > >>>>> --
                                                > >>>>
                                                > >>>>> Thanks,
                                                > >>>>>
                                                > >>>>> Roy Osherove
                                                > >>>>> www.TypeMock.com - Unit Testing, Plain Smart
                                                > >>>>>
                                                > >>>>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                > >>>>> A blog for team leaders: http://5Whys.com
                                                > >>>>> my .NET blog: http://www.ISerializable.com
                                                > >>>>> Twitter: http://twitter.com/RoyOsherove
                                                > >>>>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                                > >>>> (GMT+2)
                                                > >>>>>
                                                > >>>>>
                                                > >>>>> ------------------------------------
                                                > >>>>>
                                                > >>>>> Yahoo! Groups Links
                                                > >>>>
                                                > >>>>>
                                                > >>>>>
                                                > >>>>>
                                                > >>>>>
                                                > >>>>
                                                > >>>> [Non-text portions of this message have been removed]
                                                > >>>>
                                                > >>>>
                                                > >>>>
                                                > >>>
                                                > >>>
                                                > >>>
                                                > >>> --
                                                > >>> Thanks,
                                                > >>>
                                                > >>> Roy Osherove
                                                > >>> www.TypeMock.com - Unit Testing, Plain Smart
                                                > >>>
                                                > >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                > >>> A blog for team leaders: http://5Whys.com
                                                > >>> my .NET blog: http://www.ISerializable.com
                                                > >>> Twitter: http://twitter.com/RoyOsherove
                                                > >>> +972-524-655388 (GMT+2)
                                                > >>>
                                                > >>>
                                                > >>> [Non-text portions of this message have been removed]
                                                > >>>
                                                > >>>
                                                > >>>
                                                > >>> ------------------------------------
                                                > >>>
                                                > >>> Yahoo! Groups Links
                                                > >>>
                                                > >>>
                                                > >>>
                                                > >>
                                                > >>
                                                > >>
                                                > >
                                                > >
                                                > >
                                                > > --
                                                > > Thanks,
                                                > >
                                                > > Roy Osherove
                                                > > www.TypeMock.com - Unit Testing, Plain Smart
                                                > >
                                                > > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                > > A blog for team leaders: http://5Whys.com
                                                > > my .NET blog: http://www.ISerializable.com
                                                > > Twitter: http://twitter.com/RoyOsherove
                                                > > +972-524-655388 (GMT+2)
                                                > >
                                                > >
                                                > > [Non-text portions of this message have been removed]
                                                > >
                                                > >
                                                > >
                                                > > ------------------------------------
                                                > >
                                                > > Yahoo! Groups Links
                                                > >
                                                > >
                                                > >
                                                >
                                                >
                                                >



                                                --
                                                Thanks,

                                                Roy Osherove
                                                www.TypeMock.com - Unit Testing, Plain Smart

                                                Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                A blog for team leaders: http://5Whys.com
                                                my .NET blog: http://www.ISerializable.com
                                                Twitter: http://twitter.com/RoyOsherove
                                                +972-524-655388 (GMT+2)


                                                [Non-text portions of this message have been removed]
                                              • twitter.com/nfma
                                                I ve done that kind of pairing but found out that most people don t like to hang themselves... they specifically asked me to guide them instead... I think it s
                                                Message 23 of 28 , Feb 13, 2010
                                                  I've done that kind of pairing but found out that most people don't like to
                                                  hang themselves... they specifically asked me to guide them instead... I
                                                  think it's a missing opportunity to learn... isn't it?

                                                  On 13 February 2010 22:59, Pat Maddox <mailinglists@...> wrote:

                                                  >
                                                  >
                                                  > I don't even know what it would mean to fix the first one. Use a language
                                                  > that doesn't let them, or institute some kind of policy that prohibits it?
                                                  > Neither makes much sense in my view.
                                                  >
                                                  > Educate developers on good design. Make them aware of the tradeoffs
                                                  > involved when using certain techniques. Give them the tools to perform the
                                                  > tasks they need to, to the best of their abilities. Above all, allow them to
                                                  > make mistakes and learn from them.
                                                  >
                                                  > When I'm pairing in "teaching" mode, I like to let my partner go down a
                                                  > path that doesn't sit well with me. I am fine with giving him enough rope to
                                                  > hang himself, as long as he's capable of analyzing and learning from the
                                                  > result (which may be prompted by me saying, "did you notice that you hung
                                                  > yourself?")
                                                  >
                                                  > Pat
                                                  >
                                                  >
                                                  > On Feb 13, 2010, at 12:24 PM, Roy Osherove wrote:
                                                  >
                                                  > > so Pat and all,
                                                  > > is it better to take care of a or b?
                                                  > > "because they can" or "because they don't know how to design"
                                                  > >
                                                  > > My claim is that fixing the first one is meaningless and leads to a false
                                                  > > sense of helping, instead of teaching.
                                                  > > and of course that all means that design and testability are two
                                                  > different
                                                  > > beasts.
                                                  > >
                                                  > > On Sat, Feb 13, 2010 at 10:12 PM, Pat Maddox <mailinglists@...<mailinglists%40patmaddox.com>
                                                  > >wrote:
                                                  > >
                                                  > >>
                                                  > >>
                                                  > >> I think you might be setting the bar very low for what "testable" means.
                                                  > If
                                                  > >> you're just talking about the possibility for a programmer to write a
                                                  > test,
                                                  > >> then yes, a Ruby program is more "testable" than a Java program. Across
                                                  > all
                                                  > >> categories. That is simply a property of the language and the runtime.
                                                  > >>
                                                  > >> Whether the programmer is able to write good tests for that platform is
                                                  > a
                                                  > >> different question altogether. That's where having a testable design
                                                  > comes
                                                  > >> into the picture. Too often I'm finding in the Ruby community we've got
                                                  > >> people who have learned how to test, and even take advantage of Ruby's
                                                  > >> flexibility when writing tests, but have never learned how to design.
                                                  > They
                                                  > >> end up doing crazy shit because (a) they don't know any better and (b)
                                                  > they
                                                  > >> can.
                                                  > >>
                                                  > >> Pat
                                                  > >>
                                                  > >>
                                                  > >> On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:
                                                  > >>
                                                  > >>> my point was that in ruby, where testability is no a concern, design
                                                  > can
                                                  > >>> still be an issue.
                                                  > >>> they are not always welded together.
                                                  > >>> everything in ruby is replaceable, and thus testable.
                                                  > >>> but that doesn't mean you don't need to design in Ruby.
                                                  > >>>
                                                  > >>> we are connecting testability to design just because it seems to fit
                                                  > the
                                                  > >>> current needs of the industry, but your hanging on to branches in a
                                                  > tree
                                                  > >>> that only grows specific kinds of fruit. "testability for good design"
                                                  > is
                                                  > >> a
                                                  > >>> band aid (and only applies in static typed langs) because there seems
                                                  > to
                                                  > >> be
                                                  > >>> nothing better that tells us our design is up to par with some kind of
                                                  > >>> requirement. but once you realize it only applies in specific languages
                                                  > >> you
                                                  > >>> see that testability for design is not a universal concept - it is
                                                  > tacked
                                                  > >>> on because it is easy to grasp and talk about - and abandoning all
                                                  > forms
                                                  > >> of
                                                  > >>> design that does not adhere to that specific idea of testability.
                                                  > >>>
                                                  > >>> 2010/2/10 Josue Barbosa dos Santos <josuesantos@...<josuesantos%40gmail.com>
                                                  > <josuesantos%40gmail.com>
                                                  > >>>
                                                  > >>>
                                                  > >>>>
                                                  > >>>>
                                                  > >>>>>> Does that mean that all ruby programs ate well designed?
                                                  > >>>>
                                                  > >>>> In this blog post - Why I love everything you hate about Java(1) - the
                                                  > >>>> authors explain why even in Ruby concepts more used in a Java (2)
                                                  > world
                                                  > >>>> such as Factories, AbstractFactories, DependencyInjection, Decorators
                                                  > >> etc.
                                                  > >>>> leads to a code more configurable and modular.
                                                  > >>>>
                                                  > >>>> The main point of the post is not about testability but in some place
                                                  > he
                                                  > >>>> says:
                                                  > >>>>
                                                  > >>>> "One of the principal advantages of (or stated another way, one of the
                                                  > >>>> principal motivations for) writing Decorator-oriented code is how easy
                                                  > >> it
                                                  > >>>> is
                                                  > >>>> to write isolated unit tests of that code." And from the reading I
                                                  > think
                                                  > >> he
                                                  > >>>> thinks the same to the others patterns.
                                                  > >>>>
                                                  > >>>> So, from the post, the same kind of code that leads to a more well
                                                  > >> designed
                                                  > >>>> code also leads to a more testable code. Thus, even in Ruby (where it
                                                  > >> seems
                                                  > >>>> not to be possible to create untestable) more testable code is code
                                                  > with
                                                  > >>>> better design.
                                                  > >>>>
                                                  > >>>> If the idea was not clear it is because my English. :)
                                                  > >>>>
                                                  > >>>> Blog post:
                                                  > >>>>
                                                  > >>>>
                                                  > >>
                                                  > http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                                  > >>>>
                                                  > >>>> --
                                                  > >>>> Abraços,
                                                  > >>>> Josué
                                                  > >>>> http://twitter.com/josuesantos
                                                  > >>>>
                                                  > >>>> (1) I think a best post title would be - Why i love a well designed
                                                  > code
                                                  > >> -
                                                  > >>>> or - Why I love factories, decorators, DI etc.
                                                  > >>>>
                                                  > >>>> (2) I am not a Ruby boy, I am telling what the authors says.
                                                  > >>>>
                                                  > >>>>
                                                  > >>>> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>
                                                  > <roy%40osherove.com>
                                                  > >> <roy%40osherove.com>>
                                                  > >>
                                                  > >>>> wrote:
                                                  > >>>>
                                                  > >>>>> Does that mean that all ruby programs ate well designed?
                                                  > >>>>>
                                                  > >>>>> On Wednesday, February 10, 2010, Robert Martin
                                                  > >>>>> <UncleBob@... <UncleBob%40objectmentor.com> <UncleBob%
                                                  > 40objectmentor.com> <UncleBob%
                                                  > >> 40objectmentor.com>> wrote:
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>> One reasonable definition of good design is testability. It is
                                                  > >>>>> hard to imagine a software system that is both testable and poorly
                                                  > >>>> designed.
                                                  > >>>>> It is also hard to imagine a software system that is well designed
                                                  > but
                                                  > >>>> also
                                                  > >>>>> untestable.
                                                  > >>>>>>
                                                  > >>>>>> ----
                                                  > >>>>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                                  > <unclebob%40objectmentor.com>
                                                  > >> <unclebob%40objectmentor.com>
                                                  > >>>>> <unclebob%40objectmentor.com>
                                                  > >>>>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                                  > >>>>>> The Agile Transition Experts | web: www.objectmentor.com
                                                  > >>>>>> 800-338-6716 | twitter: unclebobmartin
                                                  > >>>>>>
                                                  > >>>>>> [Non-text portions of this message have been removed]
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>>
                                                  > >>>>>
                                                  > >>>>> --
                                                  > >>>>
                                                  > >>>>> Thanks,
                                                  > >>>>>
                                                  > >>>>> Roy Osherove
                                                  > >>>>> www.TypeMock.com - Unit Testing, Plain Smart
                                                  > >>>>>
                                                  > >>>>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                  > >>>>> A blog for team leaders: http://5Whys.com
                                                  > >>>>> my .NET blog: http://www.ISerializable.com
                                                  > >>>>> Twitter: http://twitter.com/RoyOsherove
                                                  > >>>>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                                  > >>>> (GMT+2)
                                                  > >>>>>
                                                  > >>>>>
                                                  > >>>>> ------------------------------------
                                                  > >>>>>
                                                  > >>>>> Yahoo! Groups Links
                                                  > >>>>
                                                  > >>>>>
                                                  > >>>>>
                                                  > >>>>>
                                                  > >>>>>
                                                  > >>>>
                                                  > >>>> [Non-text portions of this message have been removed]
                                                  > >>>>
                                                  > >>>>
                                                  > >>>>
                                                  > >>>
                                                  > >>>
                                                  > >>>
                                                  > >>> --
                                                  > >>> Thanks,
                                                  > >>>
                                                  > >>> Roy Osherove
                                                  > >>> www.TypeMock.com - Unit Testing, Plain Smart
                                                  > >>>
                                                  > >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                  > >>> A blog for team leaders: http://5Whys.com
                                                  > >>> my .NET blog: http://www.ISerializable.com
                                                  > >>> Twitter: http://twitter.com/RoyOsherove
                                                  > >>> +972-524-655388 (GMT+2)
                                                  > >>>
                                                  > >>>
                                                  > >>> [Non-text portions of this message have been removed]
                                                  > >>>
                                                  > >>>
                                                  > >>>
                                                  > >>> ------------------------------------
                                                  > >>>
                                                  > >>> Yahoo! Groups Links
                                                  > >>>
                                                  > >>>
                                                  > >>>
                                                  > >>
                                                  > >>
                                                  > >>
                                                  > >
                                                  > >
                                                  > >
                                                  > > --
                                                  > > Thanks,
                                                  > >
                                                  > > Roy Osherove
                                                  > > www.TypeMock.com - Unit Testing, Plain Smart
                                                  > >
                                                  > > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                  > > A blog for team leaders: http://5Whys.com
                                                  > > my .NET blog: http://www.ISerializable.com
                                                  > > Twitter: http://twitter.com/RoyOsherove
                                                  > > +972-524-655388 (GMT+2)
                                                  > >
                                                  > >
                                                  > > [Non-text portions of this message have been removed]
                                                  > >
                                                  > >
                                                  > >
                                                  > > ------------------------------------
                                                  > >
                                                  > > Yahoo! Groups Links
                                                  > >
                                                  > >
                                                  > >
                                                  >
                                                  >
                                                  >


                                                  [Non-text portions of this message have been removed]
                                                • Pat Maddox
                                                  Gotcha. I think that s silly. Restricting the toolset doesn t automatically make you a better designer any more than TDD automatically makes you a better
                                                  Message 24 of 28 , Feb 13, 2010
                                                    Gotcha. I think that's silly. Restricting the toolset doesn't automatically make you a better designer any more than TDD automatically makes you a better designer. The decision to use typemock etc should be made as a team (or by the team lead, for the team if that's your organization). It's important to consider the team composition when making that decision. I would rarely decide that a team will never use typemock, but I might say they won't use it on *this* project until I'm confident that everybody's got the hang of the basics first.

                                                    Pat



                                                    On Feb 13, 2010, at 2:03 PM, Roy Osherove wrote:

                                                    > my reference was for tools like isolation frameworks that only fake some of
                                                    > the things out there, on purpose. (jmock vs. powermock\moq vs. typemock).
                                                    > and the claims from people that by using the more limiting frameworks you
                                                    > are forcing people into the path of better design.
                                                    >
                                                    > On Sat, Feb 13, 2010 at 11:59 PM, Pat Maddox <mailinglists@...>wrote:
                                                    >
                                                    >>
                                                    >>
                                                    >> I don't even know what it would mean to fix the first one. Use a language
                                                    >> that doesn't let them, or institute some kind of policy that prohibits it?
                                                    >> Neither makes much sense in my view.
                                                    >>
                                                    >> Educate developers on good design. Make them aware of the tradeoffs
                                                    >> involved when using certain techniques. Give them the tools to perform the
                                                    >> tasks they need to, to the best of their abilities. Above all, allow them to
                                                    >> make mistakes and learn from them.
                                                    >>
                                                    >> When I'm pairing in "teaching" mode, I like to let my partner go down a
                                                    >> path that doesn't sit well with me. I am fine with giving him enough rope to
                                                    >> hang himself, as long as he's capable of analyzing and learning from the
                                                    >> result (which may be prompted by me saying, "did you notice that you hung
                                                    >> yourself?")
                                                    >>
                                                    >> Pat
                                                    >>
                                                    >>
                                                    >> On Feb 13, 2010, at 12:24 PM, Roy Osherove wrote:
                                                    >>
                                                    >>> so Pat and all,
                                                    >>> is it better to take care of a or b?
                                                    >>> "because they can" or "because they don't know how to design"
                                                    >>>
                                                    >>> My claim is that fixing the first one is meaningless and leads to a false
                                                    >>> sense of helping, instead of teaching.
                                                    >>> and of course that all means that design and testability are two
                                                    >> different
                                                    >>> beasts.
                                                    >>>
                                                    >>> On Sat, Feb 13, 2010 at 10:12 PM, Pat Maddox <mailinglists@...<mailinglists%40patmaddox.com>
                                                    >>> wrote:
                                                    >>>
                                                    >>>>
                                                    >>>>
                                                    >>>> I think you might be setting the bar very low for what "testable" means.
                                                    >> If
                                                    >>>> you're just talking about the possibility for a programmer to write a
                                                    >> test,
                                                    >>>> then yes, a Ruby program is more "testable" than a Java program. Across
                                                    >> all
                                                    >>>> categories. That is simply a property of the language and the runtime.
                                                    >>>>
                                                    >>>> Whether the programmer is able to write good tests for that platform is
                                                    >> a
                                                    >>>> different question altogether. That's where having a testable design
                                                    >> comes
                                                    >>>> into the picture. Too often I'm finding in the Ruby community we've got
                                                    >>>> people who have learned how to test, and even take advantage of Ruby's
                                                    >>>> flexibility when writing tests, but have never learned how to design.
                                                    >> They
                                                    >>>> end up doing crazy shit because (a) they don't know any better and (b)
                                                    >> they
                                                    >>>> can.
                                                    >>>>
                                                    >>>> Pat
                                                    >>>>
                                                    >>>>
                                                    >>>> On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:
                                                    >>>>
                                                    >>>>> my point was that in ruby, where testability is no a concern, design
                                                    >> can
                                                    >>>>> still be an issue.
                                                    >>>>> they are not always welded together.
                                                    >>>>> everything in ruby is replaceable, and thus testable.
                                                    >>>>> but that doesn't mean you don't need to design in Ruby.
                                                    >>>>>
                                                    >>>>> we are connecting testability to design just because it seems to fit
                                                    >> the
                                                    >>>>> current needs of the industry, but your hanging on to branches in a
                                                    >> tree
                                                    >>>>> that only grows specific kinds of fruit. "testability for good design"
                                                    >> is
                                                    >>>> a
                                                    >>>>> band aid (and only applies in static typed langs) because there seems
                                                    >> to
                                                    >>>> be
                                                    >>>>> nothing better that tells us our design is up to par with some kind of
                                                    >>>>> requirement. but once you realize it only applies in specific languages
                                                    >>>> you
                                                    >>>>> see that testability for design is not a universal concept - it is
                                                    >> tacked
                                                    >>>>> on because it is easy to grasp and talk about - and abandoning all
                                                    >> forms
                                                    >>>> of
                                                    >>>>> design that does not adhere to that specific idea of testability.
                                                    >>>>>
                                                    >>>>> 2010/2/10 Josue Barbosa dos Santos <josuesantos@...<josuesantos%40gmail.com>
                                                    >> <josuesantos%40gmail.com>
                                                    >>
                                                    >>>>>
                                                    >>>>>
                                                    >>>>>>
                                                    >>>>>>
                                                    >>>>>>>> Does that mean that all ruby programs ate well designed?
                                                    >>>>>>
                                                    >>>>>> In this blog post - Why I love everything you hate about Java(1) - the
                                                    >>>>>> authors explain why even in Ruby concepts more used in a Java (2)
                                                    >> world
                                                    >>>>>> such as Factories, AbstractFactories, DependencyInjection, Decorators
                                                    >>>> etc.
                                                    >>>>>> leads to a code more configurable and modular.
                                                    >>>>>>
                                                    >>>>>> The main point of the post is not about testability but in some place
                                                    >> he
                                                    >>>>>> says:
                                                    >>>>>>
                                                    >>>>>> "One of the principal advantages of (or stated another way, one of the
                                                    >>>>>> principal motivations for) writing Decorator-oriented code is how easy
                                                    >>>> it
                                                    >>>>>> is
                                                    >>>>>> to write isolated unit tests of that code." And from the reading I
                                                    >> think
                                                    >>>> he
                                                    >>>>>> thinks the same to the others patterns.
                                                    >>>>>>
                                                    >>>>>> So, from the post, the same kind of code that leads to a more well
                                                    >>>> designed
                                                    >>>>>> code also leads to a more testable code. Thus, even in Ruby (where it
                                                    >>>> seems
                                                    >>>>>> not to be possible to create untestable) more testable code is code
                                                    >> with
                                                    >>>>>> better design.
                                                    >>>>>>
                                                    >>>>>> If the idea was not clear it is because my English. :)
                                                    >>>>>>
                                                    >>>>>> Blog post:
                                                    >>>>>>
                                                    >>>>>>
                                                    >>>>
                                                    >> http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                                    >>>>>>
                                                    >>>>>> --
                                                    >>>>>> Abraços,
                                                    >>>>>> Josué
                                                    >>>>>> http://twitter.com/josuesantos
                                                    >>>>>>
                                                    >>>>>> (1) I think a best post title would be - Why i love a well designed
                                                    >> code
                                                    >>>> -
                                                    >>>>>> or - Why I love factories, decorators, DI etc.
                                                    >>>>>>
                                                    >>>>>> (2) I am not a Ruby boy, I am telling what the authors says.
                                                    >>>>>>
                                                    >>>>>>
                                                    >>>>>> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>
                                                    >> <roy%40osherove.com>
                                                    >>>> <roy%40osherove.com>>
                                                    >>>>
                                                    >>>>>> wrote:
                                                    >>>>>>
                                                    >>>>>>> Does that mean that all ruby programs ate well designed?
                                                    >>>>>>>
                                                    >>>>>>> On Wednesday, February 10, 2010, Robert Martin
                                                    >>>>>>> <UncleBob@... <UncleBob%40objectmentor.com> <UncleBob%
                                                    >> 40objectmentor.com> <UncleBob%
                                                    >>
                                                    >>>> 40objectmentor.com>> wrote:
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>> One reasonable definition of good design is testability. It is
                                                    >>>>>>> hard to imagine a software system that is both testable and poorly
                                                    >>>>>> designed.
                                                    >>>>>>> It is also hard to imagine a software system that is well designed
                                                    >> but
                                                    >>>>>> also
                                                    >>>>>>> untestable.
                                                    >>>>>>>>
                                                    >>>>>>>> ----
                                                    >>>>>>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                                    >> <unclebob%40objectmentor.com>
                                                    >>>> <unclebob%40objectmentor.com>
                                                    >>>>>>> <unclebob%40objectmentor.com>
                                                    >>>>>>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                                    >>>>>>>> The Agile Transition Experts | web: www.objectmentor.com
                                                    >>>>>>>> 800-338-6716 | twitter: unclebobmartin
                                                    >>>>>>>>
                                                    >>>>>>>> [Non-text portions of this message have been removed]
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>>
                                                    >>>>>>>
                                                    >>>>>>> --
                                                    >>>>>>
                                                    >>>>>>> Thanks,
                                                    >>>>>>>
                                                    >>>>>>> Roy Osherove
                                                    >>>>>>> www.TypeMock.com - Unit Testing, Plain Smart
                                                    >>>>>>>
                                                    >>>>>>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                    >>>>>>> A blog for team leaders: http://5Whys.com
                                                    >>>>>>> my .NET blog: http://www.ISerializable.com
                                                    >>>>>>> Twitter: http://twitter.com/RoyOsherove
                                                    >>>>>>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                                    >>>>>> (GMT+2)
                                                    >>>>>>>
                                                    >>>>>>>
                                                    >>>>>>> ------------------------------------
                                                    >>>>>>>
                                                    >>>>>>> Yahoo! Groups Links
                                                    >>>>>>
                                                    >>>>>>>
                                                    >>>>>>>
                                                    >>>>>>>
                                                    >>>>>>>
                                                    >>>>>>
                                                    >>>>>> [Non-text portions of this message have been removed]
                                                    >>>>>>
                                                    >>>>>>
                                                    >>>>>>
                                                    >>>>>
                                                    >>>>>
                                                    >>>>>
                                                    >>>>> --
                                                    >>>>> Thanks,
                                                    >>>>>
                                                    >>>>> Roy Osherove
                                                    >>>>> www.TypeMock.com - Unit Testing, Plain Smart
                                                    >>>>>
                                                    >>>>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                    >>>>> A blog for team leaders: http://5Whys.com
                                                    >>>>> my .NET blog: http://www.ISerializable.com
                                                    >>>>> Twitter: http://twitter.com/RoyOsherove
                                                    >>>>> +972-524-655388 (GMT+2)
                                                    >>>>>
                                                    >>>>>
                                                    >>>>> [Non-text portions of this message have been removed]
                                                    >>>>>
                                                    >>>>>
                                                    >>>>>
                                                    >>>>> ------------------------------------
                                                    >>>>>
                                                    >>>>> Yahoo! Groups Links
                                                    >>>>>
                                                    >>>>>
                                                    >>>>>
                                                    >>>>
                                                    >>>>
                                                    >>>>
                                                    >>>
                                                    >>>
                                                    >>>
                                                    >>> --
                                                    >>> Thanks,
                                                    >>>
                                                    >>> Roy Osherove
                                                    >>> www.TypeMock.com - Unit Testing, Plain Smart
                                                    >>>
                                                    >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                    >>> A blog for team leaders: http://5Whys.com
                                                    >>> my .NET blog: http://www.ISerializable.com
                                                    >>> Twitter: http://twitter.com/RoyOsherove
                                                    >>> +972-524-655388 (GMT+2)
                                                    >>>
                                                    >>>
                                                    >>> [Non-text portions of this message have been removed]
                                                    >>>
                                                    >>>
                                                    >>>
                                                    >>> ------------------------------------
                                                    >>>
                                                    >>> Yahoo! Groups Links
                                                    >>>
                                                    >>>
                                                    >>>
                                                    >>
                                                    >>
                                                    >>
                                                    >
                                                    >
                                                    >
                                                    > --
                                                    > Thanks,
                                                    >
                                                    > Roy Osherove
                                                    > www.TypeMock.com - Unit Testing, Plain Smart
                                                    >
                                                    > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                    > A blog for team leaders: http://5Whys.com
                                                    > my .NET blog: http://www.ISerializable.com
                                                    > Twitter: http://twitter.com/RoyOsherove
                                                    > +972-524-655388 (GMT+2)
                                                    >
                                                    >
                                                    > [Non-text portions of this message have been removed]
                                                    >
                                                    >
                                                    >
                                                    > ------------------------------------
                                                    >
                                                    > Yahoo! Groups Links
                                                    >
                                                    >
                                                    >
                                                  • Pat Maddox
                                                    It s not something I would do all the time. It s a teaching technique and has its place. When to apply it is based on many factors, including the person,
                                                    Message 25 of 28 , Feb 13, 2010
                                                      It's not something I would do all the time. It's a teaching technique and has its place. When to apply it is based on many factors, including the person, nature of the problem, schedule, etc. Often times a programmer won't recognize he's made a mistake until he has to live with it. Ideally that lifespan will be short, a few minutes to a few days, rather than long-term. If I'm working with an experienced programmer and I recognize something bad, I can bring it up right then, we have a little talk, go on our way. With someone less experienced, the lesson may not come until two days later when we're trying add functionality and finding it tough to do so, because of decisions made earlier. So it's a matter of balancing the cost of teaching a deeper lesson & the impact of that lesson.

                                                      Pat



                                                      On Feb 13, 2010, at 2:03 PM, twitter.com/nfma wrote:

                                                      > I've done that kind of pairing but found out that most people don't like to
                                                      > hang themselves... they specifically asked me to guide them instead... I
                                                      > think it's a missing opportunity to learn... isn't it?
                                                      >
                                                      > On 13 February 2010 22:59, Pat Maddox <mailinglists@...> wrote:
                                                      >
                                                      > >
                                                      > >
                                                      > > I don't even know what it would mean to fix the first one. Use a language
                                                      > > that doesn't let them, or institute some kind of policy that prohibits it?
                                                      > > Neither makes much sense in my view.
                                                      > >
                                                      > > Educate developers on good design. Make them aware of the tradeoffs
                                                      > > involved when using certain techniques. Give them the tools to perform the
                                                      > > tasks they need to, to the best of their abilities. Above all, allow them to
                                                      > > make mistakes and learn from them.
                                                      > >
                                                      > > When I'm pairing in "teaching" mode, I like to let my partner go down a
                                                      > > path that doesn't sit well with me. I am fine with giving him enough rope to
                                                      > > hang himself, as long as he's capable of analyzing and learning from the
                                                      > > result (which may be prompted by me saying, "did you notice that you hung
                                                      > > yourself?")
                                                      > >
                                                      > > Pat
                                                      > >
                                                      > >
                                                      > > On Feb 13, 2010, at 12:24 PM, Roy Osherove wrote:
                                                      > >
                                                      > > > so Pat and all,
                                                      > > > is it better to take care of a or b?
                                                      > > > "because they can" or "because they don't know how to design"
                                                      > > >
                                                      > > > My claim is that fixing the first one is meaningless and leads to a false
                                                      > > > sense of helping, instead of teaching.
                                                      > > > and of course that all means that design and testability are two
                                                      > > different
                                                      > > > beasts.
                                                      > > >
                                                      > > > On Sat, Feb 13, 2010 at 10:12 PM, Pat Maddox <mailinglists@...<mailinglists%40patmaddox.com>
                                                      > > >wrote:
                                                      > > >
                                                      > > >>
                                                      > > >>
                                                      > > >> I think you might be setting the bar very low for what "testable" means.
                                                      > > If
                                                      > > >> you're just talking about the possibility for a programmer to write a
                                                      > > test,
                                                      > > >> then yes, a Ruby program is more "testable" than a Java program. Across
                                                      > > all
                                                      > > >> categories. That is simply a property of the language and the runtime.
                                                      > > >>
                                                      > > >> Whether the programmer is able to write good tests for that platform is
                                                      > > a
                                                      > > >> different question altogether. That's where having a testable design
                                                      > > comes
                                                      > > >> into the picture. Too often I'm finding in the Ruby community we've got
                                                      > > >> people who have learned how to test, and even take advantage of Ruby's
                                                      > > >> flexibility when writing tests, but have never learned how to design.
                                                      > > They
                                                      > > >> end up doing crazy shit because (a) they don't know any better and (b)
                                                      > > they
                                                      > > >> can.
                                                      > > >>
                                                      > > >> Pat
                                                      > > >>
                                                      > > >>
                                                      > > >> On Feb 10, 2010, at 10:37 AM, Roy Osherove wrote:
                                                      > > >>
                                                      > > >>> my point was that in ruby, where testability is no a concern, design
                                                      > > can
                                                      > > >>> still be an issue.
                                                      > > >>> they are not always welded together.
                                                      > > >>> everything in ruby is replaceable, and thus testable.
                                                      > > >>> but that doesn't mean you don't need to design in Ruby.
                                                      > > >>>
                                                      > > >>> we are connecting testability to design just because it seems to fit
                                                      > > the
                                                      > > >>> current needs of the industry, but your hanging on to branches in a
                                                      > > tree
                                                      > > >>> that only grows specific kinds of fruit. "testability for good design"
                                                      > > is
                                                      > > >> a
                                                      > > >>> band aid (and only applies in static typed langs) because there seems
                                                      > > to
                                                      > > >> be
                                                      > > >>> nothing better that tells us our design is up to par with some kind of
                                                      > > >>> requirement. but once you realize it only applies in specific languages
                                                      > > >> you
                                                      > > >>> see that testability for design is not a universal concept - it is
                                                      > > tacked
                                                      > > >>> on because it is easy to grasp and talk about - and abandoning all
                                                      > > forms
                                                      > > >> of
                                                      > > >>> design that does not adhere to that specific idea of testability.
                                                      > > >>>
                                                      > > >>> 2010/2/10 Josue Barbosa dos Santos <josuesantos@...<josuesantos%40gmail.com>
                                                      > > <josuesantos%40gmail.com>
                                                      > > >>>
                                                      > > >>>
                                                      > > >>>>
                                                      > > >>>>
                                                      > > >>>>>> Does that mean that all ruby programs ate well designed?
                                                      > > >>>>
                                                      > > >>>> In this blog post - Why I love everything you hate about Java(1) - the
                                                      > > >>>> authors explain why even in Ruby concepts more used in a Java (2)
                                                      > > world
                                                      > > >>>> such as Factories, AbstractFactories, DependencyInjection, Decorators
                                                      > > >> etc.
                                                      > > >>>> leads to a code more configurable and modular.
                                                      > > >>>>
                                                      > > >>>> The main point of the post is not about testability but in some place
                                                      > > he
                                                      > > >>>> says:
                                                      > > >>>>
                                                      > > >>>> "One of the principal advantages of (or stated another way, one of the
                                                      > > >>>> principal motivations for) writing Decorator-oriented code is how easy
                                                      > > >> it
                                                      > > >>>> is
                                                      > > >>>> to write isolated unit tests of that code." And from the reading I
                                                      > > think
                                                      > > >> he
                                                      > > >>>> thinks the same to the others patterns.
                                                      > > >>>>
                                                      > > >>>> So, from the post, the same kind of code that leads to a more well
                                                      > > >> designed
                                                      > > >>>> code also leads to a more testable code. Thus, even in Ruby (where it
                                                      > > >> seems
                                                      > > >>>> not to be possible to create untestable) more testable code is code
                                                      > > with
                                                      > > >>>> better design.
                                                      > > >>>>
                                                      > > >>>> If the idea was not clear it is because my English. :)
                                                      > > >>>>
                                                      > > >>>> Blog post:
                                                      > > >>>>
                                                      > > >>>>
                                                      > > >>
                                                      > > http://magicscalingsprinkles.wordpress.com/2010/02/08/why-i-love-everything-you-hate-about-java/
                                                      > > >>>>
                                                      > > >>>> --
                                                      > > >>>> Abra�os,
                                                      > > >>>> Josu�
                                                      > > >>>> http://twitter.com/josuesantos
                                                      > > >>>>
                                                      > > >>>> (1) I think a best post title would be - Why i love a well designed
                                                      > > code
                                                      > > >> -
                                                      > > >>>> or - Why I love factories, decorators, DI etc.
                                                      > > >>>>
                                                      > > >>>> (2) I am not a Ruby boy, I am telling what the authors says.
                                                      > > >>>>
                                                      > > >>>>
                                                      > > >>>> On Wed, Feb 10, 2010 at 11:14 AM, Roy Osherove <roy@...<roy%40osherove.com>
                                                      > > <roy%40osherove.com>
                                                      > > >> <roy%40osherove.com>>
                                                      > > >>
                                                      > > >>>> wrote:
                                                      > > >>>>
                                                      > > >>>>> Does that mean that all ruby programs ate well designed?
                                                      > > >>>>>
                                                      > > >>>>> On Wednesday, February 10, 2010, Robert Martin
                                                      > > >>>>> <UncleBob@... <UncleBob%40objectmentor.com> <UncleBob%
                                                      > > 40objectmentor.com> <UncleBob%
                                                      > > >> 40objectmentor.com>> wrote:
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>> One reasonable definition of good design is testability. It is
                                                      > > >>>>> hard to imagine a software system that is both testable and poorly
                                                      > > >>>> designed.
                                                      > > >>>>> It is also hard to imagine a software system that is well designed
                                                      > > but
                                                      > > >>>> also
                                                      > > >>>>> untestable.
                                                      > > >>>>>>
                                                      > > >>>>>> ----
                                                      > > >>>>>> Robert C. Martin (Uncle Bob) | email: unclebob@...<unclebob%40objectmentor.com>
                                                      > > <unclebob%40objectmentor.com>
                                                      > > >> <unclebob%40objectmentor.com>
                                                      > > >>>>> <unclebob%40objectmentor.com>
                                                      > > >>>>>> Object Mentor Inc. | blog: blog.objectmentor.com
                                                      > > >>>>>> The Agile Transition Experts | web: www.objectmentor.com
                                                      > > >>>>>> 800-338-6716 | twitter: unclebobmartin
                                                      > > >>>>>>
                                                      > > >>>>>> [Non-text portions of this message have been removed]
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>>
                                                      > > >>>>>
                                                      > > >>>>> --
                                                      > > >>>>
                                                      > > >>>>> Thanks,
                                                      > > >>>>>
                                                      > > >>>>> Roy Osherove
                                                      > > >>>>> www.TypeMock.com - Unit Testing, Plain Smart
                                                      > > >>>>>
                                                      > > >>>>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                      > > >>>>> A blog for team leaders: http://5Whys.com
                                                      > > >>>>> my .NET blog: http://www.ISerializable.com
                                                      > > >>>>> Twitter: http://twitter.com/RoyOsherove
                                                      > > >>>>> +972-524-655388 <http://twitter.com/RoyOsherove%0A+972-524-655388>
                                                      > > >>>> (GMT+2)
                                                      > > >>>>>
                                                      > > >>>>>
                                                      > > >>>>> ------------------------------------
                                                      > > >>>>>
                                                      > > >>>>> Yahoo! Groups Links
                                                      > > >>>>
                                                      > > >>>>>
                                                      > > >>>>>
                                                      > > >>>>>
                                                      > > >>>>>
                                                      > > >>>>
                                                      > > >>>> [Non-text portions of this message have been removed]
                                                      > > >>>>
                                                      > > >>>>
                                                      > > >>>>
                                                      > > >>>
                                                      > > >>>
                                                      > > >>>
                                                      > > >>> --
                                                      > > >>> Thanks,
                                                      > > >>>
                                                      > > >>> Roy Osherove
                                                      > > >>> www.TypeMock.com - Unit Testing, Plain Smart
                                                      > > >>>
                                                      > > >>> Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                      > > >>> A blog for team leaders: http://5Whys.com
                                                      > > >>> my .NET blog: http://www.ISerializable.com
                                                      > > >>> Twitter: http://twitter.com/RoyOsherove
                                                      > > >>> +972-524-655388 (GMT+2)
                                                      > > >>>
                                                      > > >>>
                                                      > > >>> [Non-text portions of this message have been removed]
                                                      > > >>>
                                                      > > >>>
                                                      > > >>>
                                                      > > >>> ------------------------------------
                                                      > > >>>
                                                      > > >>> Yahoo! Groups Links
                                                      > > >>>
                                                      > > >>>
                                                      > > >>>
                                                      > > >>
                                                      > > >>
                                                      > > >>
                                                      > > >
                                                      > > >
                                                      > > >
                                                      > > > --
                                                      > > > Thanks,
                                                      > > >
                                                      > > > Roy Osherove
                                                      > > > www.TypeMock.com - Unit Testing, Plain Smart
                                                      > > >
                                                      > > > Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                      > > > A blog for team leaders: http://5Whys.com
                                                      > > > my .NET blog: http://www.ISerializable.com
                                                      > > > Twitter: http://twitter.com/RoyOsherove
                                                      > > > +972-524-655388 (GMT+2)
                                                      > > >
                                                      > > >
                                                      > > > [Non-text portions of this message have been removed]
                                                      > > >
                                                      > > >
                                                      > > >
                                                      > > > ------------------------------------
                                                      > > >
                                                      > > > Yahoo! Groups Links
                                                      > > >
                                                      > > >
                                                      > > >
                                                      > >
                                                      > >
                                                      > >
                                                      >
                                                      > [Non-text portions of this message have been removed]
                                                      >
                                                      >



                                                      [Non-text portions of this message have been removed]
                                                    • Michael Feathers
                                                      I think there are deep reasons why this is true. Going to be doing a talk about it in Norway next week. Michael On Wed, Feb 10, 2010 at 8:59 AM, Robert Martin
                                                      Message 26 of 28 , Feb 13, 2010
                                                        I think there are deep reasons why this is true.

                                                        Going to be doing a talk about it in Norway next week.

                                                        Michael

                                                        On Wed, Feb 10, 2010 at 8:59 AM, Robert Martin
                                                        <UncleBob@...> wrote:
                                                        > One reasonable definition of good design is testability.  It is hard to imagine a software system that is both testable and poorly designed.  It is also hard to imagine a software system that is well designed but also untestable.
                                                        >
                                                        >
                                                        > ----
                                                        > Robert C. Martin (Uncle Bob)  | email: unclebob@...
                                                        > Object Mentor Inc.            | blog:  blog.objectmentor.com
                                                        > The Agile Transition Experts  | web:   www.objectmentor.com
                                                        > 800-338-6716                  | twitter: unclebobmartin
                                                        >
                                                        >
                                                        >
                                                        >
                                                        >
                                                        >
                                                        >
                                                        > [Non-text portions of this message have been removed]
                                                        >
                                                        >
                                                        >
                                                        > ------------------------------------
                                                        >
                                                        > Yahoo! Groups Links
                                                        >
                                                        >
                                                        >
                                                        >
                                                      • Adam Sroka
                                                        I don t even think you have to go very deep to understand why it is true. In some ways I am surprised that it has lead to so much debate on this list. TDD is
                                                        Message 27 of 28 , Feb 13, 2010
                                                          I don't even think you have to go very deep to understand why it is
                                                          true. In some ways I am surprised that it has lead to so much debate
                                                          on this list. TDD is simultaneously about testing and design. The idea
                                                          that the two are interdependent ought not be that controversial here.

                                                          On Sat, Feb 13, 2010 at 3:02 PM, Michael Feathers
                                                          <mfeathers@...> wrote:
                                                          >
                                                          >
                                                          >
                                                          > I think there are deep reasons why this is true.
                                                          >
                                                          > Going to be doing a talk about it in Norway next week.
                                                          >
                                                          > Michael
                                                          >
                                                          > On Wed, Feb 10, 2010 at 8:59 AM, Robert Martin
                                                          > <UncleBob@...> wrote:
                                                          > > One reasonable definition of good design is testability.  It is hard to imagine a software system that is both testable and poorly designed.  It is also hard to imagine a software system that is well designed but also untestable.
                                                          > >
                                                          > >
                                                          > > ----
                                                          > > Robert C. Martin (Uncle Bob)  | email: unclebob@...
                                                          > > Object Mentor Inc.            | blog:  blog.objectmentor.com
                                                          > > The Agile Transition Experts  | web:   www.objectmentor.com
                                                          > > 800-338-6716                  | twitter: unclebobmartin
                                                          > >
                                                          > >
                                                          > >
                                                          > >
                                                          > >
                                                          > >
                                                          > >
                                                          > > [Non-text portions of this message have been removed]
                                                          > >
                                                          > >
                                                          > >
                                                          > > ------------------------------------
                                                          > >
                                                          > > Yahoo! Groups Links
                                                          > >
                                                          > >
                                                          > >
                                                          > >
                                                          >
                                                        • Roy Osherove
                                                          my argument isn t about the connection between tests and design, as it is about the tooling one uses as if it helps in the design process during tests. I fully
                                                          Message 28 of 28 , Feb 14, 2010
                                                            my argument isn't about the connection between tests and design, as it is
                                                            about the tooling one uses as if it helps in the design process during
                                                            tests.
                                                            I fully agree that tests help your design be more usable. and I also think
                                                            that tooling that inhibits design during tests just makes you feel better
                                                            instead of design better.

                                                            On Sun, Feb 14, 2010 at 1:31 AM, Adam Sroka <adam.sroka@...> wrote:

                                                            > I don't even think you have to go very deep to understand why it is
                                                            > true. In some ways I am surprised that it has lead to so much debate
                                                            > on this list. TDD is simultaneously about testing and design. The idea
                                                            > that the two are interdependent ought not be that controversial here.
                                                            >
                                                            > On Sat, Feb 13, 2010 at 3:02 PM, Michael Feathers
                                                            > <mfeathers@...> wrote:
                                                            > >
                                                            > >
                                                            > >
                                                            > > I think there are deep reasons why this is true.
                                                            > >
                                                            > > Going to be doing a talk about it in Norway next week.
                                                            > >
                                                            > > Michael
                                                            > >
                                                            > > On Wed, Feb 10, 2010 at 8:59 AM, Robert Martin
                                                            > > <UncleBob@...> wrote:
                                                            > > > One reasonable definition of good design is testability. It is hard to
                                                            > imagine a software system that is both testable and poorly designed. It is
                                                            > also hard to imagine a software system that is well designed but also
                                                            > untestable.
                                                            > > >
                                                            > > >
                                                            > > > ----
                                                            > > > Robert C. Martin (Uncle Bob) | email: unclebob@...
                                                            > > > Object Mentor Inc. | blog: blog.objectmentor.com
                                                            > > > The Agile Transition Experts | web: www.objectmentor.com
                                                            > > > 800-338-6716 | twitter: unclebobmartin
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > > [Non-text portions of this message have been removed]
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > > ------------------------------------
                                                            > > >
                                                            > > > Yahoo! Groups Links
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > > >
                                                            > >
                                                            >
                                                            >
                                                            > ------------------------------------
                                                            >
                                                            > Yahoo! Groups Links
                                                            >
                                                            >
                                                            >
                                                            >


                                                            --
                                                            Thanks,

                                                            Roy Osherove
                                                            www.TypeMock.com - Unit Testing, Plain Smart

                                                            Author of "The Art Of Unit Testing" (http://ArtOfUnitTesting.com )
                                                            A blog for team leaders: http://5Whys.com
                                                            my .NET blog: http://www.ISerializable.com
                                                            Twitter: http://twitter.com/RoyOsherove
                                                            +972-524-655388 (GMT+2)


                                                            [Non-text portions of this message have been removed]
                                                          Your message has been successfully submitted and would be delivered to recipients shortly.