Nov. 27, 2014, 10:09 a.m.
IT | Rants

Accidental or Ignorance?

Modern IDEs help developers write code much quicker than ever before, autocompleting and auto-sensing a lot of what we want to do. Sometimes it generates code that needs to be changed due to the intent of the programmer that differs from the assumptions made by the IDE.

That said, when I see code like this I cannot help but ponder for a brief moment whether the developer just forgot to clean up the code generated by the IDE, or whether the developer intentionally placed the cookies on the table - ummm - I meant the break after the return:

switch (someType)
{
  case A:
  case B:
  case C:
  case D:
     return false;
     break; // <- WTF?
}