One of Adam Lane's many fun adventures as a consultant was to help out a company that had a large, broken, in-house reporting system. The company's lead programmer had just up and left, leaving a mess of a project that "Visual Basic was having a few problems compiling" and that Adam would have to "clean it up and make it work." A dirty job, but that's why they paid Adam Adam's employer the big bucks.

The reporting system had a total of 192 forms, 87 modules, and 21 class modules. And hundreds of compiler errors. I believe the appropriate adjective here is "Hindenburgesque." Before Adam even looked at the code, the client wanted a ballpark guess of how long it would take to get their system back and compiling. Adam guessed "a week or two at best." After looking the code, he revised estimate: "it's gonna be a while."

 

qPrint.Document.CreateColumns 24, "tbItem", True, "Arial", 
	8, eLeft, 0, 0, ccrMiddleRow, 0
' to-do: apologize in avdanced to next coder
' very sorry lol
qPrint.Document.InsertRow "tbItem", "", False, Sp(0), Sp(1), Sp(2), 
  Sp(3), (val(Sp(1)) + val(Sp(2)) + val(Sp(3))), Sp(5) & Sp(4), 
	Sp(7) & Sp(6), Sp(9) & Sp(8), Sp(11) & Sp(10), Sp(13) & Sp(12), 
	(val(Sp(5)) + val(Sp(7)) + val(Sp(9)) + val(Sp(11)) + val(Sp(13))) & 
	(val(Sp(4)) + val(Sp(6)) + val(Sp(8)) + val(Sp(10)) + val(Sp(12))), 
	(val(Sp(1)) + val(Sp(2)) + val(Sp(3))) + (val(Sp(4)) + val(Sp(6)) 
	+ val(Sp(8)) + val(Sp(10)) + val(Sp(12))), Sp(0), Sp(1), Sp(2), 
	Sp(3), (val(Sp(1)) + val(Sp(2)) + val(Sp(3))), Sp(5) & Sp(4), 
	Sp(7) & Sp(6), Sp(9) & Sp(8), Sp(11) & Sp(10), Sp(13) & Sp(12), 
	(val(Sp(5)) + val(Sp(7)) + val(Sp(9)) + val(Sp(11)) + val(Sp(13))) 
	& (val(Sp(4)) + val(Sp(6)) + val(Sp(8)) + val(Sp(10)) + val(Sp(12))), 
	(val(Sp(1)) + val(Sp(2)) + val(Sp(3))) + (val(Sp(4)) + val(Sp(6)) + 
	val(Sp(8)) + val(Sp(10)) + val(Sp(12)))

I should add that, the apology in "avdance" was not for the horribly complicated line that followed. It was for the horribly complicated completely useless line of code that Adam spent nearly a day trying to understand. Yes, lol.

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