The only thing scarier than the code I actually write is the code I thought of and decided not to write. Actually, that is not true. The code I write is always perfect. Until I decide to change it later and make it more perfect.
Today I was writing a small console app which I wanted to run indefinitely until the user decides they would like to close it. This posed quite a challenge. Should I stop every 1000 iterations and check if the user has indicated they would like to stop processing? Should this be a windows app so I can have a stop button?
No, I should just run indefinitely and if they user wants the program to terminate, they will close the console window. So simple. My mind really wanted to complicate this one.