Pointless Code In Your Source

Posted by Ali on Programmers See other posts from Programmers or by Ali
Published on 2011-08-20T23:51:33Z Indexed on 2012/12/18 23:13 UTC
Read the original article Hit count: 381

Filed under:
|

I've heard stories of this from senior coders and I've seen some of it myself. It seems that there are more than a few instances of programmers writing pointless code. I will see things like:

  • Method or function calls that do nothing of value.
  • Redundant checks done in a separate class file, object or method.
  • if statements that always evaluate to true.
  • Threads that spin off and do nothing of note.

Just to name a few. I've been told that this is because programmers want to intentionally make the code confusing to raise their own worth to the organization or make sure of repeat business in the case of contractual or outsourced work.

My question is. Has anyone else seen code like this? What was your conclusion was to why that code was there?

If anyone has written code like this, can you share why?

© Programmers or respective owner

Related posts about bad-code

Related posts about bad-habits