User:Xvedejas/Style

Braces and Indentation
All indentation should be four-spaces (soft tabs). It's basically a variation of the "Horstmann style" according to wikipedia. Braces should be lined up either on rows or columns for functions and control statements.

Omitting braces is okay, but only if there is exactly one line within.

Parens do not need to be lined up. The first paren of a function should always be directly after the function name.

There should be a space between a keyword and paren.

The "while" in do/while or "else" in if/elseif/else should be directly after the close brace.

More complex switch/case statements should use extra braces for scoping. "break"s should come after the closing brace. Always include a "break" after the default statement (save issues when refactoring)

Definitions
Don't define (but you can declare) variables all on one line.