Last week I was working on a piece of code and ended up creating a convoluted, hard-to-debug infinite loop. I managed to fix…