Instrumentation
Have you ever found yourself in a situation where a user contacts you and reports a problem, which you can't reproduce on your own environment? What would really be helpful is knowing how your code was being used, with which values your stored procedures were called, and which code path the user took to get to the situation they found themselves in before they contacted you.
There is a way to know all this information, and the way to get it is by properly instrumenting your code. Instrumenting your developed code means putting in debug statements throughout. In these debug statements, there should be the information you need to track the execution of the developed code. Also, it should be complete with timestamps and other meaningful information.
Tyler Muth has written an excellent utility to help you with instrumenting your code. This package is called Logger and can be used to instrument your code—not only your APEX code, but also your database stored procedures. One of...