patterns: debug

Unwrapping a tangled thread.

Picture the stack pointer. It traces a path in space, as it descends into loops, back out of them, and jumps around the place.

Theory tells us that cputation in reversible, except in the case where information is destroyed. The various ways a program can fail correspond to ways of losing data. If memory is incorrectly shared, an old bit gets improperly overwritten. This could lead to merely wrong results-- benign-- or it could participate in an inadvertant jump, causing a tight loop or dead end.

To debug is to unravel the tangle in the thread. This is why it's so critical to avoid-- it's easier to keep thread untangled then fix it later. 2017 [171108]