As a growing company, we recently hired a new Junior developer. The guy didn't have any work experience, but he did have a fresh university degree in CS, and he did well in the interview. In order to help him get his feet wet, we gave him some simple one-off projects to work on. We didn't have time to review his code, but the projects were so simple that they a university grad should have had no problem with them.
It turns out that this was a terrible mistake. He left the company after about two months of development. Then, the trouble started. As we began using the projects he had worked on, nearly every single one had some critical bug or flaw that prevented it from being used. This forced us to scramble to start fixing his work.
I have never in my life seen code this poor. There are too many WTFs for me to include them all here, so instead I'll just provide the most recent one that I had to fix:
private boolean isYearLink(String name) {
boolean isYear = false;
switch(name) {
case "2005":
isYear = true;
break;
case "2006":
isYear = true;
break;
case "2007":
isYear = true;
break;
case "2008":
isYear = true;
break;
case "2009":
isYear = true;
break;
case "2010":
isYear = true;
break;
case "2011":
isYear = true;
break;
case "2012":
isYear = true;
break;
case "2013":
isYear = true;
break;
}
return isYear;
}
Rather unsurprisingly, this choked on a year of 2014. To date, this developer has actually cost us more time than he saved us, and we are still running into time bombs left in his code. I've taken to just completely rewriting his code any time there is a problem with it.