General Tips
 | The clauses of a predicate should normally occupy less than 20 lines. Otherwise one
should consider introducing auxiliary predicates to handle sub-tasks. Situations where a
predicate can occupy more than 20 lines are cases where e.g. 50 properties have to be set
for some object each setting requiring a call. |
 | Do not inherit from a class in order to extend your name space
with the static predicates from another class, instead use "open" or fully
qualified names. |
 | Use fully qualified names (e.g. cSomeClass::method), whenever that makes
the program more clear. |
 | Class methods should have meaningful names, when read together with the class name.
Avoid repeating the class name in the method name, i.e. the name should be: |
cSomeClass::method
rather than
cSomeClass::someClass_method
 | A predicate should only do one thing. So, if you have a predicate that
does something with every element in a list, consider splitting it into two
predicates: one that goes through the list and one that does something with
the element. The advantage of doing this is that the predicates becomes
simpler (and thus easier to get correct and easier to understand). |
|