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

RE: [XP] Re: Collective Code Ownership

Expand Messages
  • Rob Park
    ... JB wrote: Interesting. Does your language make it costly to extract logical breaks into separate methods? ... No, it s not costly and I could see that
    Message 1 of 60 , Sep 2, 2007
    • 0 Attachment
      Rob Park wrote:

      > Whitespace is actually 1 of our formatting issues. As much as I
      > prefer very little whitespace and making whitespace communicate
      > something (i.e. logic breaks), I would happily inject lots of
      > whitespace if that were the team's preference.



      JB wrote:
      Interesting. Does your language make it costly to extract logical breaks
      into separate methods?



      ----------------

      No, it's not costly and I could see that taken to the limit, no method
      should have /any/ whitespace in between lines.

      The cost of that would be my sanity. ;-)

      rob.





      [Non-text portions of this message have been removed]
    • J. B. Rainsberger
      ... I typically put blank lines between the arrange, act and assert parts of my tests, assuming that the whole test is more than a one-liner, but that s the
      Message 60 of 60 , Sep 10, 2007
      • 0 Attachment
        Ron Jeffries wrote:

        > Hello, Chris. On Monday, September 10, 2007, at 3:52:48 AM, you
        > wrote:
        >
        > > I'm with you, Joe: my rule of thumb is that a method that has blank
        > > lines in it either shouldn't have them or is too long.
        >
        > Yes. If there are blank lines in a method that aren't just a
        > mistake, then they are setting off one bit of code from another.
        > Those bits are being set off because they each do something that is
        > a sort of unified step toward some final result. They each embody an
        > "idea".
        >
        > So I'd figure out what that idea is ... and extract a method with
        > that name.

        I typically put blank lines between the arrange, act and assert parts of
        my tests, assuming that the whole test is more than a one-liner, but
        that's the only common exception I can think of.
        --
        J. B. (Joe) Rainsberger :: http://www.jbrains.ca
        Your guide to software craftsmanship
        JUnit Recipes: Practical Methods for Programmer Testing
        2005 Gordon Pask Award for contribution Agile Software Practice
      Your message has been successfully submitted and would be delivered to recipients shortly.