| This is meant as a common base when developing applications in a distributed, cooperative manner. As with every Wiki page, this text can be edited by (almost) everyone. Be reasonable. NamingUse meaningful names for functions and variables.Use bumpyCase styled names. Example: $encodingClass = "none"; function increaseLength($from, $by) Where possible, try to group names by meaning/function, like: $classEncoder $classDecoder fileOpen($handle) fileClose($handle) FormattingDon't use tabs. Use two spaces to indent a level.Use K&R-style formatting. Example: for ($count=1; $count<=10; $count } CommentsThe best comment is the code itself.But still, you would be a big selfish dumbass ending the project as soon as you leave, when you don't COMMENT nicely! Nice said, eh? Abstraction LayersNever ever access a DB without a consistent abstraction layer handling at least error messages / problems for you.Use a template system for HTML output, where applicable. |