Coding Starndard for Team Project

Coding Standards

Don’t dare to be different.  Conformity makes it easier for others to figure out your code.


Java style Camel Code Naming is preferred: Multiword names are concatenated with no space or “_” but each new word is capitalized.  For classes first letter is capitalized,   For methods and variables first letter is lower case.  Use names that are clear and identify what the class, function or variable is used for.  Examples “AClassName,” “aMethodName,” “aMemberVariable.”


Use Java Doc Style Comments and Headers.  This includes a comment block above each class or method with a clear description of what it is for and key attributes listed with standard naming such as “@author.”  This allows automatic generation of reference documents from the comments in the code.  Additional standards cover member variables etc.  See and links below for more.


Use short functions and methods grouped in small files as much as possible.  Use packages and a hierarchical directory structure for more complex projects.  This kind of organization should naturally follow from an object oriented design where different logical components are encapsulated in their own classes and files.  Java has many good examples.

Code Reuse:

Use common class libraries where ever possible.  A good example is the Java or C++ collections classes that come standard with the languages.  Java has a huge set of standard libraries.  Third party libraries can also be used for Java and other languages.


Use popular or common design architectures such as Model View Controller or its common variants.  This insures that the over all structure of your code is familiar to other programmers and can more easily integrate with the work of others.


Use other existing projects as examples and models.  Try to follow standards or default standards established by dominant products.  Make your UI instantly familiar and easy to use.



Please paste the following lines at the top of your source code file


Copyright © 2012 The Regents of the University of CaliforniaAll Rights ReservedInformation Retrieval and Knowledge Management LabUniversity of California Santa Cruz
Created by *** (your name)

Last modified by ***  (name & time)

Last approved by *** (name & time)



Rather than rewrite the book on coding standards here are some links to useful documents: