|
As a general rule the coding standard to follow is the coding style of the module owner. So no I will not list long rules to follow, the numerous source code should give you a pretty good idea of the coding standard in use :). Here some general convention: - use 4 SPACES, no TAB
- class/constructor always start with upper case ( HelloClass )
- method/property always start with lower case ( helloMethod )
- private always start with 1 underscore ( _ )
- internal always start with 2 underscores ( __ )
- protected are named as public (because we can reuse it in inheritance)
- public and protected are always documented with NaturalDocs style
- use Subversion, always log a message when you commit
- use unit tests consistently
- provide meaningfull names (Using Good Naming To Detect Bad Code)
- don't over comment the code, for more details use the wiki
- avoid the code smells
- no pre-processor
In brief, be code-centric, keep it simple and keep it readable :).
|