On 6/11/2012 11:49 PM, Robert Dodier wrote:
> On 2012-06-02, Raymond Toy<toy.raymond at gmail.com> wrote:
>
>> Richard makes a really good point that if something that
>> hasn't changed in decades is now changed, it would be really nice to
>> have a comment in the code about why and not in some checkin message
>> that often times is wholly inadequate to explain why.
> I just can't get on this bandwagon. There is nothing special about
> decades-old code. It's just old, not necessarily better or deserving
> special consideration somehow.
As Freud may have said, "Sometimes a cigar is just a cigar".
> There is code which hasn't changed
> in decades, not because the Programmers of Old were specially
> enlightened beings, but because nobody can figure out how the code
> works.
On the other hand, some of the code is there because it was carefully
constructed, after
weeks of study, experimentation, testing, and comparison with
alternatives that might at
first glance seem better. It might even be the topic of journal papers,
PhD dissertations, etc.
I find it annoying to see some doofus casually discard working refined
code and replace it with
some crudely written alternative which has the sole advantage that the
doofus understands
his own new code.
It is generally not possible for the doofus to distinguish code that is
"merely old and possibly
in need of revision" from code that is clever beyond his understanding.
Leaving tracks in the
code (in addition to CVS etc) still seems to me a good idea.
I prefer if the source code itself shows the signs of revision by, for
example
#+ignore ;; H.J. Doofus didn't understand this / or thinks this is a bug
(old code)
;; H.J. Doofus replacement. [Date]. It seems to work fine. I added
documentation, too. HJD/...
(new code)
Of course it is possible that the original code was defective. There
were doofusses 45 years ago too.
RJF