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

Self-consistent Source (was Re: "A Skeptical Examination of Some Agile Rhetoric" at Hacknot)

Expand Messages
  • William E Caputo
    ... Why is this ideal? (Serious Question) I have been very curious about this lately, in fact I blogged the topic twice in the past few weeks:
    Message 1 of 12 , Oct 27, 2003
    • 0 Attachment
      Joseph Beckenbach:
      >Perhaps "Self-consistent Source" -- ideally the software and any
      >other definition/implementation/documentation of the system should
      >look like it was written by one mind

      Why is this ideal? (Serious Question)

      I have been very curious about this lately, in fact I blogged the topic
      twice in the past few weeks:
      http://www.twelve71.com/caputo/archive/000248.html
      http://www.twelve71.com/caputo/archive/000192.html

      And I think -- for me at least -- that Consistency is its own reward,
      and I am rationalizing its benefits. And since unexamined assumptions
      often get us in trouble, and because debates on this kind of stuff can bog
      a team down for days (and longer), I think it worth asking:

      Why do we consider consistency a good thing in itself? Why instead of
      talking about legibility, we always seem to switch to consistency?

      Best,
      Bill

      William E. Caputo
      ThoughtWorks, Inc.
      http://www.twelve71.com/caputo/
      --------
      Continuous Integration: Watchin' the hella tech ta' boost da' shiggety
      shiggety shwa.
    • Michael Feathers
      WEC And I think -- for me at least -- that Consistency is its own reward, WEC and I am rationalizing its benefits. And since unexamined assumptions WEC
      Message 2 of 12 , Oct 27, 2003
      • 0 Attachment
        WEC> And I think -- for me at least -- that Consistency is its own reward,
        WEC> and I am rationalizing its benefits. And since unexamined assumptions
        WEC> often get us in trouble, and because debates on this kind of stuff can bog
        WEC> a team down for days (and longer), I think it worth asking:

        WEC> Why do we consider consistency a good thing in itself? Why instead of
        WEC> talking about legibility, we always seem to switch to consistency?

        I think it is because we take the goodness of legibility for granted.
        When I work in consistently illegible code, I yearn for inconsistency.
        :-)


        Michael Feathers
        www.objectmentor.com

        NP: Gigantic Land-Crabs In Earth Takeover Bid - Hatfield and the North
      • Ken Boucher
        ... You got me. Often when I have seen software written by one mind through use of coding standards, it s been my thought that the mind was in serious need
        Message 3 of 12 , Oct 27, 2003
        • 0 Attachment
          >> Perhaps "Self-consistent Source" -- ideally the software and any
          >> other definition/implementation/documentation of the system should
          >> look like it was written by one mind
          >
          > Why is this ideal? (Serious Question)
          >
          > Why do we consider consistency a good thing in itself? Why instead
          > of talking about legibility, we always seem to switch to
          > consistency?

          You got me. Often when I have seen software written by "one mind"
          through use of coding standards, it's been my thought that the mind
          was in serious need of therapy. It's like asking all the programmers
          to stop being the people we hired them to be and instead pretend to
          be someone else.

          I would rather prefer understandable inconsistancy. And part of that
          is for a very unusual reason. If I can read something written in
          the "true voice" of the author, I have a much better chance of
          understanding what the author's frame of mind was and what they were
          thinking.

          For example, if braces are all over the place, that tells me
          something very important about the conditions under which the method
          was written, which in turn tells me something very important about
          the method. Dollars to donuts, this is a method lacking in testing
          because the author(s) were rushed/tired/distracted at the time they
          wrote it. Having the compiler reformatting the text for me does me no
          favors because it hides information.

          Code written in the "true voice" of the writer tells me who wrote it
          without needing to know names or looking in the version control. The
          style is a "smell" of it's own. I know code with a particular style
          tends to have certain strengths and weaknesses, and that's a useful
          thing to know.
        • Steve Bate
          ... I don t consider consistency a good thing in itself. For me, code that is formatted consistenty is easier to read & com- pre-
          Message 4 of 12 , Oct 27, 2003
          • 0 Attachment
            > Why do we consider consistency a good thing in itself? Why instead of
            > talking about legibility, we always seem to switch to consistency?

            I don't consider consistency
            a good thing in itself. For me, code
            that is
            formatted consistenty is easier to read & com-
            pre-
            hend than code that is
            not.
            It
            is
            not an
            either/or issue of legibility or illegibility . I can read code
            that is inconsistently or/
            and poorly formatted
            but it requires more
            time and effort for me to do so.

            If you want a better understanding of how consistency may
            benefit program reading comprehension, you might want to
            review some of the related software psychology research.

            Research in that field has developed several cognitive models
            for program comprehension. The bottom up model combines small
            chunks of program information into increasingly more
            abstract units. Based on my personal experience, I suspect the
            the benefit I get from consistent code formatting is due to
            increased chunking, especially while doing quick visual scans
            of code.
          • Steve Howell
            ... I am working in a coffeehouse these days, and the number one byproduct of consistency is agility. The lettuce is always the same place in the sandwich
            Message 5 of 12 , Oct 27, 2003
            • 0 Attachment
              On Mon, 2003-10-27 at 16:03, William E Caputo wrote:
              > Why do we consider consistency a good thing in itself? Why instead of
              > talking about legibility, we always seem to switch to consistency?
              >

              I am working in a coffeehouse these days, and the number one byproduct
              of consistency is agility. The lettuce is always the same place in the
              sandwich bar; the darjeeling tea is always at the same place on the
              register screen; the 20 oz cups are always on the same shelf in the
              storage room. The tiny microoptimizations that consistency provides can
              make a huge difference when customers are waiting.

              But software is different.

              When I was last doing software fulltime, consistency seemed like a much
              less pressing issue. I remember the big issues being elimination of
              redundancy and meta things like whether to BDUF, etc. (It was not an XP
              shop.)

              (Sorry to change subject line once again. I went for accuracy over
              consistency.)
            • Ron Jeffries
              ... Chunking is, in fact, the main reason why I like { brackets like this; ) Ron Jeffries www.XProgramming.com Maybe it is like green shoes. Interesting, but
              Message 6 of 12 , Oct 27, 2003
              • 0 Attachment
                On Monday, October 27, 2003, at 7:14:58 PM, Steve Bate wrote:

                > Based on my personal experience, I suspect the
                > the benefit I get from consistent code formatting is due to
                > increased chunking, especially while doing quick visual scans
                > of code.

                Chunking is, in fact, the main reason why I like {
                brackets like this;
                )

                Ron Jeffries
                www.XProgramming.com
                Maybe it is like green shoes. Interesting, but not sought after. -- Dick Jeffries
              • Steve Howell
                ... I agree. A little soul in the code s a good thing.
                Message 7 of 12 , Oct 27, 2003
                • 0 Attachment
                  On Mon, 2003-10-27 at 18:44, Ken Boucher wrote:
                  > >> Perhaps "Self-consistent Source" -- ideally the software and any
                  > >> other definition/implementation/documentation of the system should
                  > >> look like it was written by one mind
                  > >
                  > > Why is this ideal? (Serious Question)
                  > >
                  > > Why do we consider consistency a good thing in itself? Why instead
                  > > of talking about legibility, we always seem to switch to
                  > > consistency?
                  >
                  > You got me. Often when I have seen software written by "one mind"
                  > through use of coding standards, it's been my thought that the mind
                  > was in serious need of therapy. It's like asking all the programmers
                  > to stop being the people we hired them to be and instead pretend to
                  > be someone else.
                  >
                  > I would rather prefer understandable inconsistancy. And part of that
                  > is for a very unusual reason. If I can read something written in
                  > the "true voice" of the author, I have a much better chance of
                  > understanding what the author's frame of mind was and what they were
                  > thinking.
                  >
                  > For example, if braces are all over the place, that tells me
                  > something very important about the conditions under which the method
                  > was written, which in turn tells me something very important about
                  > the method. Dollars to donuts, this is a method lacking in testing
                  > because the author(s) were rushed/tired/distracted at the time they
                  > wrote it. Having the compiler reformatting the text for me does me no
                  > favors because it hides information.
                  >
                  > Code written in the "true voice" of the writer tells me who wrote it
                  > without needing to know names or looking in the version control. The
                  > style is a "smell" of it's own. I know code with a particular style
                  > tends to have certain strengths and weaknesses, and that's a useful
                  > thing to know.
                  >

                  I agree. A little soul in the code's a good thing.
                • Edmund Schweppe
                  ... Mismatched? :-) Or is this some weird language with parentheses overloaded as brackets? -- Edmund Schweppe -- schweppe@ieee.org --
                  Message 8 of 12 , Oct 28, 2003
                  • 0 Attachment
                    Ron Jeffries wrote:
                    > Chunking is, in fact, the main reason why I like {
                    > brackets like this;
                    > )

                    Mismatched? :-)

                    Or is this some weird language with parentheses overloaded as brackets?

                    --
                    Edmund Schweppe -- schweppe@... -- http://schweppe.home.tiac.net
                    The opinions expressed herein are at best coincidentally related to
                    those of any past, present or future employer.
                  • Ron Jeffries
                    ... The latter. Why [in the world) don t you know that? {No offense intended, of course.] Ron Jeffries www.XProgramming.com The greatest mistake we make is
                    Message 9 of 12 , Oct 28, 2003
                    • 0 Attachment
                      On Tuesday, October 28, 2003, at 5:41:02 AM, Edmund Schweppe wrote:

                      > Ron Jeffries wrote:
                      >> Chunking is, in fact, the main reason why I like {
                      >> brackets like this;
                      >> )

                      > Mismatched? :-)

                      > Or is this some weird language with parentheses overloaded as brackets?

                      The latter. Why [in the world) don't you know that? {No offense intended,
                      of course.]

                      Ron Jeffries
                      www.XProgramming.com
                      The greatest mistake we make is living in constant fear that we will make one.
                      -- John Maxwell
                    • jrb32002
                      ... So we can *reliably* deliver our software. Right now, one of my teams cannot deliver current completed functionality: the software is deadlocking in unit
                      Message 10 of 12 , Oct 28, 2003
                      • 0 Attachment
                        --- In extremeprogramming@yahoogroups.com, William E Caputo
                        <wecaputo@t...> wrote:
                        > Joseph Beckenbach:
                        > >Perhaps "Self-consistent Source" -- ideally the software and any
                        > >other definition/implementation/documentation of the system should
                        > >look like it was written by one mind
                        >
                        > Why is this ideal? (Serious Question)

                        So we can *reliably* deliver our software. Right now, one of my
                        teams cannot deliver current completed functionality: the software is
                        deadlocking in unit test on the automated build machine, because we do
                        not follow a Swing threading rule consistently. Until that is
                        corrected, we cannot deliver.

                        Another possible phrasing might be "Self-coherent Source".

                        Joseph Beckenbach
                        lead XP tester
                      • Ron Jeffries
                        ... Is it your view that if their code adhered to a consistent coding standard it would now be working? Ron Jeffries www.XProgramming.com Learn the principle,
                        Message 11 of 12 , Oct 28, 2003
                        • 0 Attachment
                          On Tuesday, October 28, 2003, at 11:07:30 AM, jrb32002 wrote:

                          > --- In extremeprogramming@yahoogroups.com, William E Caputo
                          > <wecaputo@t...> wrote:
                          >> Joseph Beckenbach:
                          >> >Perhaps "Self-consistent Source" -- ideally the software and any
                          >> >other definition/implementation/documentation of the system should
                          >> >look like it was written by one mind
                          >>
                          >> Why is this ideal? (Serious Question)

                          > So we can *reliably* deliver our software. Right now, one of my
                          > teams cannot deliver current completed functionality: the software is
                          > deadlocking in unit test on the automated build machine, because we do
                          > not follow a Swing threading rule consistently. Until that is
                          > corrected, we cannot deliver.

                          Is it your view that if their code adhered to a consistent coding standard
                          it would now be working?

                          Ron Jeffries
                          www.XProgramming.com
                          Learn the principle, abide by the principle, and dissolve the principle.
                          -- Bruce Lee
                        • jrb32002
                          ... standard ... Yes. The line-item being abused is When a library sets restrictions on threading, follow those restrictions . Again, as others have pointed
                          Message 12 of 12 , Oct 29, 2003
                          • 0 Attachment
                            --- In extremeprogramming@yahoogroups.com, Ron Jeffries
                            <ronjeffries@X...> wrote:
                            > On Tuesday, October 28, 2003, at 11:07:30 AM, jrb32002 wrote:
                            >
                            > > So we can *reliably* deliver our software. Right now, one of my
                            > > teams cannot deliver current completed functionality: the software is
                            > > deadlocking in unit test on the automated build machine, because we do
                            > > not follow a Swing threading rule consistently. Until that is
                            > > corrected, we cannot deliver.

                            > Is it your view that if their code adhered to a consistent coding
                            standard
                            > it would now be working?

                            Yes. The line-item being abused is "When a library sets
                            restrictions on threading, follow those restrictions". Again, as
                            others have pointed out, it's not a coding standard as much as it is
                            visible agreement on how to write (including design) the code.

                            Joseph Beckenbach
                            leading XP tester
                          Your message has been successfully submitted and would be delivered to recipients shortly.