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

RE: [XP] Coding Standards

Expand Messages
  • Rob Park
    0-space indents on HTML does sound crazy. although worth a try. :-) Does anyone have any preferences/arguments/documentation/examples for spacing/formatting in
    Message 1 of 247 , Sep 2, 2007
      0-space indents on HTML does sound crazy. although worth a try. :-)



      Does anyone have any preferences/arguments/documentation/examples for
      spacing/formatting in complex TSQL queries/stored procedures?



      rob.



      From: extremeprogramming@yahoogroups.com
      [mailto:extremeprogramming@yahoogroups.com] On Behalf Of William Pietri
      Sent: Friday, August 31, 2007 6:16 PM
      To: extremeprogramming@yahoogroups.com
      Subject: Re: [XP] Coding Standards



      J. B. Rainsberger wrote:
      > Not for me. I tend to use 4-space indents for HTML.
      >

      I encourage folks to try zero-space indents for HTML. I used to indent
      my HTML because, well, that seemed like the thing to do. But then a
      friend, who is an ascended master as far as HTML goes, told me he didn't
      indent at all, and just uses some newline-based grouping.

      I thought he was crazy, but I gave it a try. Eventually I decided I
      liked that a lot, because

      a) it's not a programming language,
      b) my editor shows me tag balance better than indenting would, and
      c) when I'm dealing with templates, there's no worrying about indent
      collision

      As a bonus, it's faster to transmit, too.

      This approach is probably not for everybody, but I don't miss HTML
      indents at all.

      William

      --
      William Pietri - william@... <mailto:william%40scissor.com> -
      +1-415-643-1024
      Agile consulting, coaching, and development: http://www.scissor.com/
      Use your geek-fu to fight poverty: http://www.mifos.org/





      [Non-text portions of this message have been removed]
    • J. B. Rainsberger
      ... Got it. ... So this was just a simplest thing decision? OK. -- J. B. (Joe) Rainsberger :: http://www.jbrains.ca Your guide to software craftsmanship
      Message 247 of 247 , Sep 14, 2007
        Phlip wrote:

        > J. B. Rainsberger wrote:
        >
        > > Still, I'd like to know why you'd rather generate HTML in the controller
        > > rather than in the view.
        >
        > It was the Model!

        Got it.

        > Maybe it was because that's where the text input caret was when I
        > thought of
        > the HTML...

        So this was just a "simplest thing" decision? OK.
        --
        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.