4 ms·
> For example, an obsessive-compulsive cleaning ritual may overemphasize the order, direction, and number of wipes used to clean the surface. The goal becomes l
by alan-crowe 16y ago
> For example, an obsessive-compulsive cleaning ritual may overemphasize the order, direction, and number of wipes used to clean the surface. The goal becomes less important than the actions used to achieve the goal, with the implication that magic rituals can persist without efficacy because the intent is lost within the act.
This made me think about the way we teach beginning programmers to comment code. In commercial practice writing comments is an economic activity. One spends time and money now, hoping to benefit a year in the future when one needs to modify the original code. Optimal commenting requires knowing your cost of capital. If you are funding your start up on your credit card at 2% per month you should write fewer comments than if you are polishing corporate code funded by a bond paying 2% per year.
There is a good reason that we overlook cost of capital when we are writing comments. A bad comment costs 5 minutes when you write it, and costs 5 more minutes a year later when you read it and find that the information that you cannot get from the code isn't in the comment either. A good comment saves you two hours on reconstructing reasoning that you have forgotten, but only cost five minutes to write because the key point was fresh in your mind from composing the code. The difference in profit between a good comment and a bad comment are so large that they overwhelm any reasonable cost of capital.
I have never seen a tutorial on writing comments that even mentions the cost of capital. So it seems to be traditional that the intent (to make money) is lost within the act.