If I were to win, I'd only need one ticket.  I'm not sure if this
counts (it might be more appropriate for the Daily WTF), but I once
saw Java code that looked like the following (I don't remember what
was inside the if blocks):

for (int i = 0; i < 4; i++) {
  if (i == 0) {
    //some code to handle case 0
  } else if (i == 1) {
    //some code to handle case 1
  } else if (i == 2) {
    //some code to handle case 2
  } else if (i == 3) {
    //some code to handle case 3
  } else if (i == 4) {
    //some code to handle case 4
  }
}

I was going to make fun of whoever had written it and ask why on earth
it had been structured as a loop, but I lost my nerve when the version
control system revealed that it had been written by the head of the
engineering team for the small startup I was at.  I think I'd be more
courageous about calling him on it at this point. :)

--Matt

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to