Changes between Version 73 and Version 74 of DeveloperGuidelines/CodeConventions


Ignore:
Timestamp:
01/22/18 21:56:43 (4 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/CodeConventions

    v73 v74  
    7878}}}
    7979
     80 * Add comments so others can understand your code when they try to find bugs or improve/extend it
     81 * Comments in code should explain intent (or clarify techniques), not repeat the code (do not explain what is self-explaining)
     82
     83Poor:
     84{{{
     85# Set free to True
     86free = True
     87}}}
     88
     89Good:
     90{{{
     91# Indicate that the position is now free
     92free = True
     93}}}
     94
     95 * Commented code should have a comment explaining why it is commented
     96
     97Unclear:
     98{{{
     99#result = somefunction(somearg)
     100result = 0
     101}}}
     102
     103Better:
     104{{{
     105# Not working yet, @todo: fix somefunction
     106#result = somefunction(somearg)
     107result = 0
     108}}}
    80109=== Internationalisation ===
    81110