Got my new November Dr. Dobbs issue today. The back column “Swaine’s Flames” has reminded me of some programming “laws” that I have seen before. I have added my own corollaries for each:
Kernighan’s Law: “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
My corollary: “The developer who’s code that you inherit believed they were twice as smart as they really are.”
Eagleson’s Law: “Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
My corollary: “You can recognize that you have written code to solve a particular problem but will be unable to locate the specific instance you recall.”