Changes between Version 16 and Version 17 of DevNotes/DevGuide/CodingRules


Ignore:
Timestamp:
May 30, 2016 6:52:31 AM (8 years ago)
Author:
wojciech
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DevNotes/DevGuide/CodingRules

    v16 v17  
    6060    * Use _box_car with a leading underscore for non-public methods and _CamelCase with a leading underscore for non-public classes. 
    6161    * Never use __box_car__ with leading and trailing double underscores 
    62     * Avoid one-letter variable names. 
    63  
     62    * Avoid one-letter variable names (unless is acceptable one letter variable name or it is justified by the math in the paper) 
     63    * Don't make long variable names just to keep lint happy: 
     64      {{{ 
     65      #!div style="font-size: 80%" 
     66      {{{#!python   
     67      [(value, key) for key, value in translation_dictionary.items()] 
     68      }}} 
     69      }}} 
     70      is no better than: 
     71      {{{ 
     72      #!div style="font-size: 80%" 
     73      {{{#!python   
     74      [(v, k) for k, v in translation_dictionary.items()] 
     75      }}} 
     76      }}} 
     77      but the following is: 
     78      {{{ 
     79      #!div style="font-size: 80%" 
     80      {{{#!python   
     81      [(latin, english) for english, latin in translation_dictionary.keys()] 
     82      }}} 
     83      }}} 
    6484    * Models: for adding a new model no capitalization and thus no CamelCase in model names. If necessary use underscore to separate (i.e. barbell not BarBell or broad_peak not BroadPeak) 
    6585    * Models: Don't add/Remove “model” in/from the name (i.e. barbell not BarBellModel)