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

Re: An XP Experiment (long)

Expand Messages
  • Chris Booth
    ... set one ... hung on ... to do ... more, I m not ... want to do. ... I felt I just had to point out that just because something is EASY doesn t mean it is
    Message 1 of 29 , Dec 1, 2000
    • 0 Attachment
      --- In extremeprogramming@egroups.com, Paul Michali <pcm@c...> wrote:
      > I wrote:
      >
      > > > Hmm. Hadn't thought of using a local mail server. I've never
      set one
      > > > up, so I don't know how hard that is. This is one area that I'm
      hung on
      > > > (how to test e-mailing). Maybe I should do a spike to see how
      to do
      > > > this.
      >
      > Although a cool idea using a local server, as I think about this
      more, I'm not
      > totally convinced that I should go through the effort for what I
      want to do.
      > Is there a simpler way?

      I felt I just had to point out that just because something is EASY
      doesn't mean it is SIMPLE. "Easy" is a property of the process,
      but "simple" is a property of the product. XP wants a simple design
      so that your intention is communicated (amongst other things). You
      want an easy implementation to make the process fast. I think XP
      says that you should do the simple thing rather than the easy thing,
      because in the long term it will save the customer's money. Even if
      he is you, I believe :-)

      Regards,

      Chris.
    • Paul Michali
      ... I had used sockets by opening a socket to the corporate mail server, forming a mail message, and then sending it. It is about 50 lines of Java and is not
      Message 2 of 29 , Dec 1, 2000
      • 0 Attachment
        Kevin Smith wrote:

        > You have mentioned that you wrote this app once before. What
        > solution did you use to send mail then? In other words, is
        > there a workable solution that you already know how to use?
        > Once it's working, you could later switch to JavaMail if you
        > wanted to. Or was that app in a different language/platform?
        > I'm just looking for ways to deliver that business value as
        > quickly as possible.

        I had used sockets by opening a socket to the corporate
        mail server, forming a mail message, and then sending it. It is
        about 50 lines of Java and is not very robust (it doesn't check
        to see if the message was sent successfully).

        I have been toying with the idea that I could do it this way and
        then change it later. I've also been thinking about doing a spike
        solution with JavaMail to see how that works.

        I been pondering about whether I should do what is quickest for
        me versus what is "the simplest thing". I just read this e-mail, which
        is along the same thoughts...

        Chris Booth wrote:

        > I felt I just had to point out that just because something is EASY
        > doesn't mean it is SIMPLE. "Easy" is a property of the process,
        > but "simple" is a property of the product. XP wants a simple design
        > so that your intention is communicated (amongst other things). You
        > want an easy implementation to make the process fast. I think XP
        > says that you should do the simple thing rather than the easy thing,
        > because in the long term it will save the customer's money. Even if
        > he is you, I believe :-)

        Kevin Smith wrote:

        > If you are going to mock JavaMail, then I think you
        > described it pretty well. In a perfect world, JavaMail would
        > have a published interface. You could write a class that
        > implements that interface.
        >
        > If it instead publishes a class, then it's harder to mock. I
        > think you would create your own interface, with two
        > implementations. One would simply pass through to JavaMail.
        > Since it's trivial, you could get away with no UT's for it.
        > the other implementation would be your test stub.
        >
        > I'm not a Java guru, so grab a grain of salt.

        Yeah, me neither, and there's quite a bit to learn about all of
        the Java packages that are available. I've going to look at the
        stuff that Robert Crawford posted recently on this thread to
        learn more about JavaMail.


        PCM (Paul Michali)

        Carrier Voice Gateway Business Unit (CVGBU)
        Cisco Systems, Inc.
        250 Apollo Drive
        Chelmsford, MA 01824

        Phone : (800) 572-6771 x 45817 (978) 244-5817 [direct]
        Paging: (800) 365-4578 [voice] pcm@... [email page]
      • Joe Tatem
        This is just me, but I would start with the code you have. It may not be very good, but at least it does something. Then, you can write tests that break it,
        Message 3 of 29 , Dec 1, 2000
        • 0 Attachment
          This is just me, but I would start with the code you have. It may not be
          very good, but at least it does something. Then, you can write tests
          that break it, make the fixes and refactor mercilessly.

          You still have to have a test setup, tho. Maybe the poster who wrote the
          in-memory SMTP/POP3 server could share it?

          Joe

          Paul Michali wrote:
          >
          > Kevin Smith wrote:
          >
          > > You have mentioned that you wrote this app once before. What
          > > solution did you use to send mail then? In other words, is
          > > there a workable solution that you already know how to use?
          > > Once it's working, you could later switch to JavaMail if you
          > > wanted to. Or was that app in a different language/platform?
          > > I'm just looking for ways to deliver that business value as
          > > quickly as possible.
          >
          > I had used sockets by opening a socket to the corporate
          > mail server, forming a mail message, and then sending it. It is
          > about 50 lines of Java and is not very robust (it doesn't check
          > to see if the message was sent successfully).
          >
          > I have been toying with the idea that I could do it this way and
          > then change it later. I've also been thinking about doing a spike
          > solution with JavaMail to see how that works.
          >
          > I been pondering about whether I should do what is quickest for
          > me versus what is "the simplest thing". I just read this e-mail, which
          > is along the same thoughts...
          >
          > Chris Booth wrote:
          >
          > > I felt I just had to point out that just because something is EASY
          > > doesn't mean it is SIMPLE. "Easy" is a property of the process,
          > > but "simple" is a property of the product. XP wants a simple design
          > > so that your intention is communicated (amongst other things). You
          > > want an easy implementation to make the process fast. I think XP
          > > says that you should do the simple thing rather than the easy thing,
          > > because in the long term it will save the customer's money. Even if
          > > he is you, I believe :-)
          >
          > Kevin Smith wrote:
          >
          > > If you are going to mock JavaMail, then I think you
          > > described it pretty well. In a perfect world, JavaMail would
          > > have a published interface. You could write a class that
          > > implements that interface.
          > >
          > > If it instead publishes a class, then it's harder to mock. I
          > > think you would create your own interface, with two
          > > implementations. One would simply pass through to JavaMail.
          > > Since it's trivial, you could get away with no UT's for it.
          > > the other implementation would be your test stub.
          > >
          > > I'm not a Java guru, so grab a grain of salt.
          >
          > Yeah, me neither, and there's quite a bit to learn about all of
          > the Java packages that are available. I've going to look at the
          > stuff that Robert Crawford posted recently on this thread to
          > learn more about JavaMail.
          >
          > PCM (Paul Michali)
          >
          > Carrier Voice Gateway Business Unit (CVGBU)
          > Cisco Systems, Inc.
          > 250 Apollo Drive
          > Chelmsford, MA 01824
          >
          > Phone : (800) 572-6771 x 45817 (978) 244-5817 [direct]
          > Paging: (800) 365-4578 [voice] pcm@... [email page]
          >
          > To Post a message, send it to: extremeprogramming@...
          >
          > To Unsubscribe, send a blank message to: extremeprogramming-unsubscribe@...
          >
          > Ad-free courtesy of objectmentor.com
        • Dossy
          ... Never label leveraging past experience as cheating . That s a lot of what differentiates good programmers from really good programmers. Speaking of
          Message 4 of 29 , Dec 1, 2000
          • 0 Attachment
            On 2000.12.01, Paul Michali <pcm@...> wrote:
            > I just looked at each task and "guestimated" how long it would take me sitting
            > at my PC, punching out code (I think that's what I read I should do). Pure
            > programming, without any other distractions. I'm cheating a bit, as I have an
            > application that I made a while back, so I know most of the things I have to
            > do.

            Never label "leveraging past experience" as "cheating". That's a
            lot of what differentiates good programmers from really good
            programmers.

            Speaking of cheating, let me ask the XP folks a question:

            Say you recognize that a set of stories the customer asked for could
            be solved with a third-party product. Completing these stories would
            be by integrating this third-party product into the project you're
            delivering to your customer.

            o How does this affect your velocity? Should you even count these
            completed stories towards your velocity? Should the time it takes
            to integrate product XYZ count as the velocity?

            o Should the original stories be thrown out and a new story written
            along the lines of "integrate product XYZ into project"?
            Should the original stories be kept and the task and story
            completion be tracked as "completed by integrating product XYZ
            into product"?

            o How do you give an estimate for something like this? Pretend you
            have no experience with product XYZ at all, other than the fact that
            you know for certain that it will meet your customer's needs. Is it
            fair to give WAG's at that point, and perhaps adjust them as SOON
            as you know they're wrong and let the customer make decisions then?
            Do you just say "I really have no idea, and no way of making an
            educated guess" and go forward with NO estimates? (Scary thought.)

            (Pretend that no spike you could run would really give you a good
            idea of the difficulty with any real level of confidence. Pretend
            that the cost of product XYZ would be the same or less than what you
            would charge the customer to develop it yourself, and that time to
            integrate product XYZ would be the same or less than the time it
            takes to implement it yourself.)


            I'm sure there are other questions that should be asked, but these
            are the only ones I can think of off the top of my head.

            - Dossy

            --
            Dossy Shiobara mail: dossy@...
            Panoptic Computer Network web: http://www.panoptic.com/
          • John Brewer
            ... takes ... (See below) ... If the team already has an estimate for doing the story by hand. So now you re handing your customer an alternative story, buy
            Message 5 of 29 , Dec 1, 2000
            • 0 Attachment
              --- In extremeprogramming@egroups.com, Dossy <dossy@p...> wrote:
              > On 2000.12.01, Paul Michali <pcm@c...> wrote:
              > o How does this affect your velocity? Should you even count these
              > completed stories towards your velocity? Should the time it
              takes
              > to integrate product XYZ count as the velocity?

              (See below)

              > o Should the original stories be thrown out and a new story written
              > along the lines of "integrate product XYZ into project"?
              > Should the original stories be kept and the task and story
              > completion be tracked as "completed by integrating product XYZ
              > into product"?


              If the team already has an estimate for doing the story by hand. So
              now you're handing your customer an alternative story, "buy and
              integrate XYZ" instead of "write XYZ functionality in house." You
              estimate the new story, apprise your customer of the risks (per-seat
              licensing, and product immaturity, for example). Then he gets to
              decide.

              > o How do you give an estimate for something like this? Pretend you
              > have no experience with product XYZ at all, other than the fact
              that
              > you know for certain that it will meet your customer's needs.

              If I have no experience with it, how can I be certain it'll meet my
              customer's needs?

              > Do you just say "I really have no idea, and no way of making an
              > educated guess" and go forward with NO estimates? (Scary
              thought.)

              You spike. If the spike is going to take a large chunk of time, you
              get the customer to schedule it.

              > (Pretend that no spike you could run would really give you a good
              > idea of the difficulty with any real level of confidence.

              If no spike could give me an estimate, then I'd consider it too risky
              to try.

              > Pretend
              > that the cost of product XYZ would be the same or less than what
              you
              > would charge the customer to develop it yourself, and that time
              to
              > integrate product XYZ would be the same or less than the time it
              > takes to implement it yourself.)

              Which one? If integration can cost as much as doing it ourselves,
              then any cost of product XYZ represents an additional cost to the
              customer.

              John Brewer
              Jera Design
            • Dossy
              ... Pretend you received advice from an expert whose knowledge you respect that the product will meet your customer s needs. Pretend that the expert has
              Message 6 of 29 , Dec 1, 2000
              • 0 Attachment
                On 2000.12.02, John Brewer <jbrewer@...> wrote:
                > > o How do you give an estimate for something like this? Pretend you
                > > have no experience with product XYZ at all, other than the fact
                > that
                > > you know for certain that it will meet your customer's needs.
                >
                > If I have no experience with it, how can I be certain it'll meet my
                > customer's needs?


                Pretend you received advice from an expert whose knowledge you
                respect that the product will meet your customer's needs. Pretend
                that the expert has first-hand experience with the product, and
                you have shown him your story cards---you have just paired on story
                estimation---and he made this recommendation to use product XYZ.

                The gut reaction is "why can't this expert make the estimate?" and
                the quick answer is "perhaps the expert can do it in X days, but
                your team probably won't be able to." No, the expert cannot take
                part in any of the integration, not even to answer questions. (Say,
                the expert is a friend only doing you a favor.)

                Do you ignore what the expert has to say and implement in-house since
                you lack any experience, or... what?


                > > Do you just say "I really have no idea, and no way of making an
                > > educated guess" and go forward with NO estimates? (Scary
                > thought.)
                >
                > You spike. If the spike is going to take a large chunk of time, you
                > get the customer to schedule it.


                What if you can't spike because you can't get an evaluation copy of
                the product to spike with, and you can't convince the customer to
                purchase the product just to run a spike?

                (Most companies will give eval. copies, but this is just a hypothetical.)


                > > (Pretend that no spike you could run would really give you a good
                > > idea of the difficulty with any real level of confidence.
                >
                > If no spike could give me an estimate, then I'd consider it too risky
                > to try.


                That's what I was thinking.


                > > Pretend
                > > that the cost of product XYZ would be the same or less than what
                > you
                > > would charge the customer to develop it yourself, and that time
                > to
                > > integrate product XYZ would be the same or less than the time it
                > > takes to implement it yourself.)
                >
                > Which one? If integration can cost as much as doing it ourselves,
                > then any cost of product XYZ represents an additional cost to the
                > customer.


                The win is speed or cost. Let me expand what I said into what I
                was really trying to express (un-refactoring, whatever we used to
                call this back in Algebra class... multiplying out?):

                If it would cost the same, it would take less time to buy the
                product.

                If it would take the same amount of time, it would cost less to
                buy the product.


                - Dossy

                --
                Dossy Shiobara mail: dossy@...
                Panoptic Computer Network web: http://www.panoptic.com/
              • Tim Mackinnon
                Guys - be careful with this approach. I would reccomend viewing connecting to something real (even if its fake) as a kind of System test which is allowed to
                Message 7 of 29 , Dec 3, 2000
                • 0 Attachment
                  Guys - be careful with this approach. I would reccomend viewing
                  connecting to something real (even if its fake) as a kind of System
                  test which is allowed to fail.

                  I say this because by virtue of the protocols involved you often get
                  one-off failures when you run your unit tests (its hard to guarantee
                  that you started your server in time to run tests against it,
                  similarly shutting it down can be tricky as well).

                  We have stuff like this, and we are slowly getting rid of it and
                  replacing it with objects we can mock up - e.g. Url is final in Java
                  but we have wrapped it and we use something we call a WebConnection.
                  We pass this object around and for our tests we pass in a fake
                  version that does no url connections at all. This is great for
                  repeatable unit testing.

                  We then have some separate "system tests" (I say system because they
                  aren't really acceptance/functional becuase the user didn't really
                  write them) that connect to live things and prove some of the lower
                  level connectivity. These tests will sometimes fail, but that is
                  acceptable within reason (e.g. 1 time in 10 or something like that).

                  Tim

                  --- In extremeprogramming@egroups.com, ejfried@c... wrote:
                  > I think Paul Michali wrote:
                  > > Laurent Bossavit wrote:
                  > >
                  > > > If it's not automated, it's not a test. Install a local mail
                  server
                  > > > (I recommend the shareware ArgoSoft it you're using Win32). Do
                  the
                  > > > Simplest Thing and rely on J2EE's JavaMail API to send mail as
                  well
                  > > > as read it (or, if the JavaMail API isn't congenial with you,
                  have a
                  > > > look at OROInc's NetComponents). In your test, send mail to
                  > > > "localhost" (SMTP), then retrieve mail from "localhost" (POP3);
                  check
                  > > > that it is the same mail.
                  > >
                  > > Hmm. Hadn't thought of using a local mail server. I've never set
                  one
                  > > up, so I don't know how hard that is. This is one area that I'm
                  hung on
                  > > (how to test e-mailing). Maybe I should do a spike to see how to
                  do
                  > > this.
                  > >
                  > > I'll need to look into the JavaMail API too, as I forgot that
                  this is
                  > > something I can use. My old app opened a socket to our mail
                  server to
                  > > send e-mail. I was thinking of using a socket and have a thread
                  that
                  > > listens on the socket for the message and then send my "mail" to
                  that
                  > > socket instead.
                  > >
                  >
                  >
                  > I did precisely this on a recent project: wrote a tiny SMTP + POP3
                  > mail server for testing purposes only. I put them both in the same
                  > server, so there was no persistent message store; the SMTP server
                  > received messages and put them into a HashMap of ArrayLists by
                  > username, and the POP3 server pulled the messages out of the HashMap
                  > and returned them. It was actually pretty easy -- you only need to
                  > implement a few commands. You're not testing SMTP or POP3 protocol
                  > compliance, so you can be pretty lax about what you accept. Use
                  > JavaMail for the client side -- it's pretty painless.
                  >
                  >
                  >
                  > ---------------------------------------------------------
                  > Ernest Friedman-Hill
                  > Distributed Systems Research Phone: (925) 294-2154
                  > Sandia National Labs FAX: (925) 294-2234
                  > Org. 8920, MS 9012 ejfried@c...
                  > PO Box 969 http://herzberg.ca.sandia.gov
                  > Livermore, CA 94550
                • Laurent Bossavit
                  ... Given the above assumptions, isn t there an extra risk involved when choosing the integration strategy over the development strategy ? The above
                  Message 8 of 29 , Dec 4, 2000
                  • 0 Attachment
                    > Pretend that no spike you could run would really give you a good
                    > idea of the difficulty with any real level of confidence. Pretend
                    > that the cost of product XYZ would be the same or less than what
                    > you would charge the customer to develop it yourself, and that time
                    > to integrate product XYZ would be the same or less than the time it
                    > takes to implement it yourself.

                    Given the above assumptions, isn't there an extra risk involved
                    when choosing the "integration" strategy over the "development"
                    strategy ? The above implies that the "time", "scope", and "cost"
                    variables are controlled, leaving what variable unconstrained ?..


                    ========================================
                    Bless n'a pas de modele : son ambition
                    est d'en devenir un.
                    ========================================
                    Laurent Bossavit - Software Architect
                    >>> laurent.bossavit@... <<<
                    >>> 06 68 15 11 44 <<<
                    >> ICQ#39281367 <<
                    Agence Bless http://www.agencebless.com/
                    ========================================
                  • Dossy
                    ... The idea was that quality, scope and cost would be fixed by choosing the third-party component. Quality, time and cost could be fixed by implementing
                    Message 9 of 29 , Dec 4, 2000
                    • 0 Attachment
                      On 2000.12.04, Laurent Bossavit <laurent.bossavit@...> wrote:
                      > > Pretend that no spike you could run would really give you a good
                      > > idea of the difficulty with any real level of confidence. Pretend
                      > > that the cost of product XYZ would be the same or less than what
                      > > you would charge the customer to develop it yourself, and that time
                      > > to integrate product XYZ would be the same or less than the time it
                      > > takes to implement it yourself.
                      >
                      > Given the above assumptions, isn't there an extra risk involved
                      > when choosing the "integration" strategy over the "development"
                      > strategy ? The above implies that the "time", "scope", and "cost"
                      > variables are controlled, leaving what variable unconstrained ?..

                      The idea was that quality, scope and cost would be fixed by choosing
                      the third-party component. Quality, time and cost could be fixed
                      by implementing in-house.

                      Still, my question really was: how do you give estimates for something
                      you've never done before, and either there IS no spike that would give
                      you an estimate you have confidence in, or you can't think of a spike,
                      or the spike itself would be too time consuming/costly.

                      It seems the common theme amongst the XP'ers is: "Too risky, don't
                      do it."


                      - Dossy

                      --
                      Dossy Shiobara mail: dossy@...
                      Panoptic Computer Network web: http://www.panoptic.com/
                    • Russell Giebelhaus
                      I am currently reading Martin Fowler s book Refactoring: Improving the Design of Existing Code. I was intrigued to read about the Smalltalk Profiler for
                      Message 10 of 29 , Dec 8, 2000
                      • 0 Attachment
                        I am currently reading Martin Fowler's book Refactoring: Improving the
                        Design of Existing Code.
                        I was intrigued to read about the Smalltalk Profiler for discovering and
                        pinpointing performance concerns in the code.

                        Are there similar profilers available for Java code?
                        We are currently writing a transparent persistence layer (utilizing XP) and
                        will soon be at the stage of needing to pinpoint performance issues.

                        Thank you for your help,
                        Russell Giebelhaus

                        Developer, Web Solutions, net-linx Americas Inc.
                        200, 12420 - 104 Avenue, Edmonton, Alberta, Canada T5N 3Z9
                        russell.giebelhaus@...
                      • Jason Yip
                        ... wrote: ... It s like these things come in groups... PerfAnal,
                        Message 11 of 29 , Dec 8, 2000
                        • 0 Attachment
                          --- In extremeprogramming@egroups.com, "Russell Giebelhaus"
                          <russell.giebelhaus@n...> wrote:
                          <snip>
                          > Are there similar profilers available for Java code?
                          > We are currently writing a transparent persistence layer (utilizing
                          > XP) and will soon be at the stage of needing to pinpoint
                          > performance issues.

                          It's like these things come in groups...

                          PerfAnal,
                          http://developer.java.sun.com/developer/technicalArticles/Programming/
                          perfanal/

                          or jProf, http://www.inttek.com/~jlnance/mozilla/jprof/
                        • Chad Fowler
                          ... For a cheap solution, try java -prof . It s not beautiful to read, but it can be helpful.
                          Message 12 of 29 , Dec 9, 2000
                          • 0 Attachment
                            >
                            > Are there similar profilers available for Java code?

                            For a cheap solution, try "java -prof <your class>". It's not
                            beautiful to read, but it can be helpful.
                          • Kevin Lewis
                            The commercial players I know about: http://www.optimizeit.com/ http://www.jprobe.com/software/jprobe/ I do think that the profiling support in the JDK is
                            Message 13 of 29 , Dec 16, 2000
                            • 0 Attachment
                              The commercial players I know about:
                              http://www.optimizeit.com/
                              http://www.jprobe.com/software/jprobe/

                              I do think that the profiling support in the JDK is pretty good.

                              --
                              Kevin Lewis
                              Axys Solutions
                              http://www.AxysSolutions.com/
                            Your message has been successfully submitted and would be delivered to recipients shortly.