I worked in a group of C programmers in the 80's, all working on a Unix single application, but different parts of code.
We had strict rules for "writing" our code:
- Each procedure starts with a "PDL" (programming development language), or "what the function receives/use as parameters, what does it do, what it returns.
- Each function had a self explanatory "name", respecting a pre-defined standard: function f31() has no meaning as is forbidden!
function add_shadow_to_image() HAS.
- ALL PDLs were gathered in a DB, with their function's names: anyone can consult them, and no-one re-invents the wheel!
- Text disposition: Correct indenting always exiged, no wrap-up lines etc: a function must be clear to read as a plain text. We had strict rules on formatting!
- Every complex function/line of code MUST be commented (how, why).
We could pick up someone else's code, and would not be able to say "He wrote this!": They were all the same.