Exit Conditions
A strange thing occurred this morning: I normally use a battery-powered ultrasonic toothbrush that does a pulsing buzz after 2min to signal that my brushing is over. Because the battery had died I used a regular toothbrush for the first time in months.
4 mins into brushing, I started asking myself why the the brush hadn't done it's pulse/buzz thing. I continued to brush a while longer when I realize the problem isn't the toothbrush.My exit condition was broken. I had become an infinite loop.