in reply to Danger, danger Will Robinson (documenting code)

This is one I came across recently:
Copying and pasting code snippets together with the comments (helpfull comments that is), then change the code but don't bother updating the comment..
Guaranteed confusion when updating a rather big sourcetree, after all, one checks the comments first to see if a section of code needs updating... *sigh*


Jorg

"Do or do not, there is no try" -- Yoda
  • Comment on Re: Danger, danger Will Robinson (documenting code)

Replies are listed 'Best First'.
Re: Re: Danger, danger Will Robinson (documenting code)
by dws (Chancellor) on Mar 30, 2001 at 11:42 UTC
    Adele Goldberg, one of the principals behind Smalltalk and later founder of ParcPlace Systems, coined a term that covers copying chunks of code but neglecting to fix comments. She calls it "Rape and Paste Programming".

    It's an expression that grabs your attention and forces you to stop and think.