[stats-dev] Formatting

Benjamin Gavin virtual_olympus at yahoo.com
Thu Sep 11 11:54:57 EDT 2003


Well a large bit of the 2-space indentation comes from me :)  I could care
less what format we use, but it needs to be easy to do in vi. ;)

As far as SQL formatting goes, I fail to see how either of the two
examples you gave are any harder than the other...  Personally I would
vote for the version that's easier to read (and because that's the
standard I tend to use), but again, I could really care less since they
are both equally difficult (or easy) to code.

Ben (TheJet)

--- "Jim C. Nasby" <decibel at distributed.net> wrote:
> 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?"
> _______________________________________________
> stats-dev mailing list
> stats-dev at lists.distributed.net
> http://lists.distributed.net/mailman/listinfo/stats-dev


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the stats-dev mailing list