Temp Logs into Documentation

Here’s an idea I had while writing a server application I needed to test on a remote computer with limited debugging abilities…

I insert debug logs, temporary logs, before and/or after important sections of flow so I could see in the console what is going on and what is failing. But I wouldn’t want them there when the app rolls into production.

And then I thought, people hate writing in-line documentation but it’s quite important. And here I have all these debug logs explaining what is going on. So, instead of deleting them, comment them out. Then I have them for later, if I want, and they pretty much function like in-line documentation.

Win-Win!


Posted in IT, Life, Practice, Programming, Thinking Out Loud, Work by with no comments yet.