4 ms·
> “will I understand this code later?” My driving principle in the same vein is "where do I have to look when/if this doesn't behave as expected?" - if the ans
by albrewer 2y ago
> “will I understand this code later?”
My driving principle in the same vein is "where do I have to look when/if this doesn't behave as expected?" - if the answer is not in the docs (wiki -> package/module -> file -> class -> function / method) or is otherwise > 10 lines away, it gets an inline comment (or the docs are updated). Usually this happens when chopping up strings or during intermediate navigation steps over an odd data structure.