views:

76

answers:

0

There are many stories about intentionally bad code, not only on TDWTF but also on SO. Typical cases include:

  • Having a useless time-wasting construct (e.g. an empty loop counting to some huge value) so programmers can easily "speed up" the application by removing it when they are tasked to.
  • Providing intentionally misleading, wrong or no documentation to generate expensive support requests.
  • Readily generating errors, or worse, generating even though everything worked fine, locking up the application so an expensive support call is required to unlock.

These points display a more or less malicious attitude (even though sometimes by accident), especially the first point occurs rather often.

How should one deal with such constructs? Ignore the issue, or just remove the offending code? Notify their manager, or speak to the person who introduced the "feature"?

EDIT: Closed. Reposted on Programmers.SE.