Tuesday, March 9, 2010

Code Comment WTF? Part 209

Found this in a snippet today:
-- ********************************
-- End of Package Body

END package_pkg ;
/
Seriously? Was that necessary? Could I possibly be under the illusion that it is not the end of the package?

Stop it.

Now.

6 comments:

  1. Without the comment, one might have thought that was the end of the package spec - the comment saves all the work of scrolling up to see what one is looking at :)

    ReplyDelete
  2. Here's one I saw not that long ago.

    --get wonum, changedate, description --from workorder
    cursor getWorkorder is
    select wonum, changedate, description from workorder

    ReplyDelete
  3. -- BEGIN comment

    /* I think you are missing the point
    * because you think that anything
    * less than commenting everything
    * that could be commented upon is
    * simply not going to cut on my
    * development team.
    */

    -- END comment

    ReplyDelete
  4. Could be worse...
    you could have comments like

    /*do some stuff*/

    ReplyDelete
  5. Comment WTFs are fun. I used to leave comments like this in my own code:

    # Someone is going to hate me for this later.
    # That someone is likely to be me.

    ReplyDelete
  6. I think TOAD or something generates those stupid little comments...

    ReplyDelete