During his interview, Michael was asked what his coding pet peeves were. Things that, as a developer, really got under his skin.

Michael replied with the best answer he could think of. "I hate working inside of sloppy code. I think that it's best to spend time coding up front to save yourself from headaches down the road."

The hiring manager cocked an eyebrow and replied, "What about a scenario where it's 2 in the morning and you have to apply an emergency bug fix ASAP. Sometimes, to get things moving, maybe you have to cut an occasional corner?"

Michael saw where the interviewer was leading him and conceded, "Of course, the effort up front prevents the 2am emergency, but yes, sometimes you have a gun to your head and need to apply a 'dirty' patch, but go back and put things right as soon as possible."

Seemingly satisfied with his answer, the hiring manager nodded in apparent satisfaction as he jotted a quick note on his clipboard. Michael wasn't sure what he had said that impressed the hiring manager so much, but he had an offer before leaving the interview.

Skip ahead to Michael's third week at his new job. While knee deep in the source of the application he'd inherited, he found the following:

while (rsSource.next()) {
	// This section should be enhanced at some point
	// using a ResultSetMetadata object, iterating
	// through the column types -aj
	stmtInsertToTarget.setInt(1, rsSource.getInt(1));
	//stmtInsertToTarget.setInt(1, 9999);// for testing purposes
	stmtInsertToTarget.setInt(2, rsSource.getInt(2));
	stmtInsertToTarget.setString(3, rsSource.getString(3));
	stmtInsertToTarget.setString(4, rsSource.getString(4));
	stmtInsertToTarget.setInt(5, rsSource.getInt(5));
	stmtInsertToTarget.setInt(6, rsSource.getInt(6));
	stmtInsertToTarget.setString(7, rsSource.getString(7));
	stmtInsertToTarget.setString(8, rsSource.getString(8));
	stmtInsertToTarget.setString(9, rsSource.getString(9));
	stmtInsertToTarget.setString(10, rsSource.getString(10));
	stmtInsertToTarget.setString(11, rsSource.getString(11));
	stmtInsertToTarget.setString(12, rsSource.getString(12));
	stmtInsertToTarget.setString(13, rsSource.getString(13));
	stmtInsertToTarget.setString(14, rsSource.getString(14));
	stmtInsertToTarget.setString(15, rsSource.getString(15));
	stmtInsertToTarget.setString(16, rsSource.getString(16));
	stmtInsertToTarget.setString(17, rsSource.getString(17));
	stmtInsertToTarget.setString(18, rsSource.getString(18));
	stmtInsertToTarget.setString(19, rsSource.getString(19));
	stmtInsertToTarget.setString(20, rsSource.getString(20));
	stmtInsertToTarget.setString(21, rsSource.getString(21));
	stmtInsertToTarget.setString(22, rsSource.getString(22));
	stmtInsertToTarget.setInt(23, rsSource.getInt(23));
	stmtInsertToTarget.setString(24, rsSource.getString(24));
	stmtInsertToTarget.setString(25, rsSource.getString(25));
	stmtInsertToTarget.setString(26, rsSource.getString(26));
	stmtInsertToTarget.setFloat(27, rsSource.getFloat(27));
	stmtInsertToTarget.setFloat(28, rsSource.getFloat(28));
	stmtInsertToTarget.setFloat(29, rsSource.getFloat(29));
	stmtInsertToTarget.setFloat(30, rsSource.getFloat(30));
	stmtInsertToTarget.setFloat(31, rsSource.getFloat(31));
	stmtInsertToTarget.setFloat(32, rsSource.getFloat(32));
	stmtInsertToTarget.setFloat(33, rsSource.getFloat(33));
	stmtInsertToTarget.setFloat(34, rsSource.getFloat(34));
	stmtInsertToTarget.setDate(35, rsSource.getDate(35));
	stmtInsertToTarget.setString(36, rsSource.getString(36));
	stmtInsertToTarget.setInt(37, rsSource.getInt(37));
	stmtInsertToTarget.setDate(38, rsSource.getDate(38));
	stmtInsertToTarget.setInt(39, rsSource.getInt(39));
	stmtInsertToTarget.setDate(40, rsSource.getDate(40));
	stmtInsertToTarget.addBatch();
}

...and the further he dug, the more he uncovered, all variations upon the same theme. True, it wasn't the worst corporate code out there, but it certainly wasn't winning any awards either.

Hoping to score some "newbie" points, Michael brought it up in a developer status meeting as a refactoring opportunity. However, instead of the 'attaboys' he was expecting, some of his fellow coworkers chided him.

"Listen, the app works, OK?" started one of the high ranking senior devs, "I know you may be tempted to jump in and change the universe, but we have SLAs to maintain and any code change adds risk."

"Yeah, relax your high standards, man," another graybeard developer advised.

It wasn't much long after that Michael decided to seek other employment. In the end, Michael agreed with the developers - he and his "high standards" would never fit in.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!