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

Re: [XP] how much to unit test function that calls well-tested functions?

Expand Messages
  • John A. De Goes
    ... Admittedly, a poor turn of phrase, but no offense was meant by it. My point is that you can justify a lot of ugly practices with the maxim, If there are
    Message 1 of 60 , Aug 31, 2008
    • 0 Attachment
      On Aug 31, 2008, at 5:24 PM, Ron Jeffries wrote:
      > Hello, John. On Sunday, August 31, 2008, at 6:41:52 PM, you wrote:
      >
      > > By that illogic, you shouldn't write any automated tests. When you
      > > have "problems" in the future, you can solve them -- by debugging!
      >
      > Yellow card.
      >

      Admittedly, a poor turn of phrase, but no offense was meant by it. My
      point is that you can justify a lot of ugly practices with the maxim,
      "If there are problems in the future, solve them in the future."

      > I'm not sure we do have to write it. Sometimes we choose to, and it
      > may be a mistake every time.
      >

      Say you're finishing up a contract job, and know that you won't be
      responsible for maintaining the software in the future. Do you come
      out ahead or behind by incurring technical debt?

      Or suppose you're part of a start-up, and the VC firm is demanding a
      feature-complete release in six weeks, or will cut off funding. Is it
      OK to borrow from the future a little to keep your job?

      I think in some cases, you come out ahead by incurring technical debt,
      just like in real-life you sometimes come out ahead by borrowing. It's
      a gamble, of course, but sometimes the risk-takers actually do beat
      the risk-minimizers.

      Regards,

      John A. De Goes
      N-BRAIN, Inc.
      http://www.n-brain.net
      [n minds are better than n-1]
    • John A. De Goes
      Yes, but in the case of a competition, there is no change. It s truly a write-once, throwaway scenario, for which there is no investment to protect. Regards,
      Message 60 of 60 , Sep 13, 2008
      • 0 Attachment
        Yes, but in the case of a competition, there is no change. It's truly
        a write-once, throwaway scenario, for which there is no investment to
        protect.

        Regards,

        John A. De Goes
        N-BRAIN, Inc.
        http://www.n-brain.net
        [n minds are better than n-1]

        On Sep 13, 2008, at 9:59 AM, Marty Nelson wrote:

        > > > Let's hold a contest, where the winner is the first one to
        > complete
        > > > the assignment. The assignment is to write a program that prints
        > > > "Hello World". You code a solution with TDD, and I'll code the
        > > > solution with "print "Hello World";"
        > >
        > > > Which one of us will win the competition?
        >
        > To show how horrible wrong even a hello world app can go(and assume
        > this is .NET, not sure how other languages handle this), imagine that
        > for v2 of the app, our customers are raving for it to
        > say "Hello\Goodbye World".
        >
        > So TDD is not just about the solution, but protecting that investment
        > against change...
        >
        >
        >



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