Think of all those old applications you’ve had to maintain. You know the type: the ones written by long-forgotten developers in long-lost languages. The ones that, after spending days searching for that one line of code that needs to be changed, you frustratingly decree “this f%*#@ thing needs to be rewritten.” And, naturally, the ones that never are, nor never will be rewritten.
Call it luck or persistence, but after dozens and dozens of maintenance requests over the years, Israel Brewster finally was given the opportunity to rewrite an application. From scratch. And the right way, this time. No shoddy VB6 front-end; no horribly-designed SQL Server 2000 (only) database; and certainly no Microsoft Access-based administration tool.
Though, after his third straight week of digging through form validation logic requirements – many of which were quadruplicated (or more), inconsistent, and often incorrect –he’s started to question if a rewrite is even possible. Consider, for example, Command 696: a method named that simply because Command1 through Command695 were already taken.
Private Sub Command696_Click() On Error GoTo Err_Command696_Click Dim stDocName As String Dim Response As Integer If Frame500 = 1 And pax > 37 Then MsgBox "CHECK PAX DASH 8 LIMIT 37 SEATS", vbOKOnly Else End If If Frame500 = 2 And pax > 29 Then MsgBox "CHECK PAX DASH 8 LIMIT 29 SEATS", vbOKOnly Else End If If totalload1 > 2000 Then MsgBox "OVERWEIGHT Fwd Shelf ", vbOKOnly Else End If If ttshelf > 1000 Then MsgBox "OVERWEIGHT Aft Shelf ", vbOKOnly Else End If If totalload1 + ttshelf > 2000 Then MsgBox "OVERWEIGHT Aft Compartment max 2000 lbs ", vbOKOnly Else End If If Frame500 = 1 And totalloadsecd > 0 Then MsgBox "DASH 8 WITHOUT SECTION D ", vbOKOnly Else End If If Frame500 = 2 And totalloadsecd > 2150 Then MsgBox "OVERWEIGHT SECTION D ", vbOKOnly Else End If If Remaining < 0 Then MsgBox "DASH 8 OVERWEIGHT REDUCE LOAD !!!!", vbOKOnly Else End If If ttload <= 0 Then Response = MsgBox("ARE YOU SURE AFT CARGO COMPARTMENT IS EMPTY!!!!", vbYesNo) Else Response = 6 End If If Frame500 = 1 And pax <= 37 And totalload1 <= 2000 And _ ttshelf <= 1000 And totalloadsecd = 0 And _ Remaining >= 0 And totalload1 + ttshelf <= 2000 And Response = 6 Then stDocName = "csaprintinfo37seats" DoCmd.OpenReport stDocName, acPreview Else End If If Frame500 = 2 And pax <= 29 And totalload1 <= 2000 And _ ttshelf <= 1000 And totalloadsecd <= 2150 And _ Remaining >= 0 And totalload1 + ttshelf <= 2000 And Response = 6 Then stDocName = "csaprintinfo29seats" DoCmd.OpenReport stDocName, acPreview Else End If