SourceForge.net Logo Support This Project

jMemorize

Code Conventions

Jump to: navigation, search

Please try to use these code conventions when submitting patches for jMemorize. This will help in keeping the code consistent and easier to understand.

  • Indentation: 4 spaces (no tabs!)
  • Use American English (not British English)
  • Use the word "Observer" instead of "Listener"
  • Put curly braces on new lines
 if (true)
 {
     foo1();
     foo2();
 }
instead of
 if (true) {
     foo1();
     foo2();
 }
  • Use "m_" as prefix for instance variables
 class Foo
 {
   private int m_variable;
   private int m_anotherVariable;
 }
  • Document classes at least at class level and its most important methods
  • Ideally also provide unit tests

Eclipse

If you're using Eclipse, you can also import this code style file.

Personal tools