http://www.perlmonks.org?node_id=970688


in reply to Re: "The Work of a Stranger ..."
in thread "The Work of a Stranger ..."

I can’t magine why you’d feel the need to don that flame-retardant bunny suit for making a pragmatic comment like that.   I rely much more on comments than on code for understanding even what I myself have done.   That is nothing more or less than a pragmatic survival skill.

I also categorically reject the viewpoint of people who say, perhaps in the name of “don’t repeat yourself,” that you have to write code as succinctly as possible.   For example, I recently got lambasted by someone who didn’t like me writing this:

if (something_1_fails()) { ... do something ... } if (something_2_fails()) { ... do the same thing ... }

This person’s murderously-held opinion being that the only proper way to write it was:

if (something_1_fails() || something_2_fails()) { ... do something ... }

such that it was absolutely “my way or the highway.”   My contrasting point-of-view simply being that:

Your thoughts always become the thoughts of a stranger, and you always re-discover those thoughts every time you go back to any piece of code .. in any language.   How well you documented those thoughts, and how cleanly you made those thoughts, truly makes all the difference in the world over the sometimes decades-long life span of a commercial application.