What's the worst coding practices you have seen(or done!)?

View original thread
Emil Moe's photo

My teacher! Not only was it in Danish, it was also ridiculous. Here is the (english) translated version:

 * Determine kids gender.
public isBoy() {
  if (this.isBoy) {
    return true;
  else {
    return false;

I also had another teacher who started out, when he for the first time showed us his code, by saying "this is a little messed and now how you should do it" โ€“ he had put all 5-10 classes of the application in the same single file.