This is a small follow up to my blogs about anti-patterns. When trying to debug a complex logic or performance problem one of the most important things one can do is take notes. I had a conversation with someone the other day where the person said, "I'm in a rush, I don't have time to take notes about my runs." To this I replied, you don't have time not too.
So often we are in such a rush to solve a problem that we cut the wrong corners. When performance tuning, and/or tracking something down that requires multiple runs or configurations of your software always always always take notes on each run. They don't have to be super formal but you should write down all the details you can think of. Some examples include, what were my settings, what did the cpu usage/machine stats look like. What problems did I run into. Always keep a date/time stamp on the tests. This will prevent the inevitable rerunning of tests because you forgot the results, or mixing up what you have tried and not tried. It only takes one mistake to use up more time than tons of note taking would require.
This is simple but great advice that matches my experience. I have actually gone so far as to write a script that wrapped each test run to automatically record date, time, copy key config files, tuning parameters, etc and stuff them in a directory somewhere. That has saved me more than once. It doesn't take very many tests before it's easy to get confused.
ReplyDeleteOr better yet, log all the important data to look at later :)
ReplyDeleteOr better yet, log all the important data to analyze later. Do it in a format that easy to import in spreadsheet and charting tools (csv,tab delimited etc.). Nmon does a very good job of giving very useful and rich set of data (cpu, network, disk .. you name it).
ReplyDeleteCheers.