Re:Keeping track of technical debt in source code
by throwaway2048 on Friday April 14, 2017 @09:16AM
(#14114256)
I like the XXX idiom
//XXX this is bad
//XXXX this is more bad
//XXXXX this is EXTREMELY bad
Allows for easy grepability and a rough, at a glance evaluation of the seriousness of the hack/debt
> Using a physical notebook distances the workload from the code and hides the fact something is incomplete from others.
Exactly. In fact, I use both (except the notebook is an org-mode file, not a dead-tree book). TODOs / FIXMEs in code are for things very context-dependent and connected to code, for which it's important to see them in surrounding context. In more abstract cases, I just log a task in my notebook, to be done later.
Examples of both - code:
(i.e. move to external string resources database later)vs. notebook:
--Also, often TODO / FIXME comments serve for me as anchors in some larger refactoring processes. I tend to label them specifically for easy grepping (e.g. with unique Unicode chars like ). The point is, refactoring process may take few days, during which I also may need to do some other tasks, so whenever there's a piece of code that needs to be redone but not right now, I tag it for later; I can then use grep/IDE search to check if I didn't miss anything.