08 Nov Debugging
I was making ginger tea last night because it was really cold in Tallinn. For those who don't know what ginger tea is, it's just ginger, brown sugar, and water. To make ginger tea, there is one important step: the ginger must be soaked in cold water for a long period of time. The cold water lets more of the ginger "spice" into the water, which creates the "warming" effect when drinking ginger tea. **Making ginger tea:** 1. Cut ginger into slices 2. Fill a pot with cold water soak the ginger for an hour or two 3. Slowly let the water boil 4. After the water is boiling, taste the tea to see if it's spicy enough 5. If it's enough, scoop all the ginger out 6. Add brown sugar and stir It's easy enough! When I was making the tea last night, I suddenly thought that scooping the ginger out was like debugging a program. When you scoop the ginger slices out, it's easy in the beginning because there's so much. But as you scoop more and more out, it becomes harder to find those lone slices floating in the water. Sometimes you see one float by, but as you reach towards it with your spoon, it just floats away. When you debug a program, it's very easy to fix the many bugs in the beginning. But as your program matures and is closer to being finished, you find that there are _still_ bugs in the program, just like those lone ginger slices floating in the water. And just like the ginger, these bugs are very hard to find and hard to catch. As you reach towards them, you just may find them floating away again.