[stats-dev] Formatting

Jim C. Nasby decibel at distributed.net
Thu Sep 11 12:38:15 EDT 2003


Now that we have a shiny-new codebase, I'd like to standardize on some
formatting. I'm not suggesting a big clean-up of the formatting at this
point, but we should at least standardize going forward. Right now, the
PHP seems to be a mix of 2 space and 4 space indentation. I think the 2
space code might be a holdover from the old codebase, but I'm not sure.
Also, there are sections of code that aren't indented to a proper
boundary at all; these should be cleaned up relatively soon ihmo.

Generally, we don't seem to have a lot of indentation levels, so I'd
personally prefer 4 space.

For query strings, I generally do this:

SELECT blah blah
        blah
    FROM table
    WHERE
        AND

and not this:

SELECT blah blah
       blah
  FROM table
 WHERE blah
   AND blah

The second form might be slightly easier to read, but I don't think it's
worth the added hassle.
-- 
Jim C. Nasby, Database Consultant                  jim at nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


More information about the stats-dev mailing list