Today we'll get a second look at the H3000, the application from yesterday's post that actually made Jesus weep. The fiercely brave Nikolay Simeonov provides us with even more insight into this abomination.

You've seen what the forms look like, so here are the demonic instructions powering “z bel 64001.”

While certainly not as bad as some of the other code we've seen, just imagine trying to fix a minor problem: thousands of lines of this code, spread across seemingly randomly named forms. Naturally, removing On Error Resume Next will completely break the system. I can hardly think of a crime heinous enough to maintain that.

But our tour doesn't stop with the forms, not at all. After all, what system would be complete without invoices and reports?

It may not seem so bad at first either, but we know what they say lie within the details. And the details of this report contain yet more reports ...

And in the details of that report ...

Whew! No more nested report details. But the sadistic may wonder, what kind of queries could possibly be powering these of reports? Here is, for example, the query titled “f z tgab 0101“.

SELECT DISTINCTROW [f z tgab 0101 1 1].Zahlungsart, Format(Format([BR],"Standard"),"@@@@@@@@@@@@@") AS BE
FROM [f z tgab 0101 1 1];

Tormenting us even further, the query refers to “f z tgab 0101 1 1“ which is, of course, another another query ...

SELECT DISTINCTROW [f z tgab 0101 2 1 4 1].MAINKAT, IIf([Dauer]=5,"-------------------------",IIf([Dauer]=6,"Summe Kat. " & [MAINKAT],IIf([Dauer]=7,"=========================",""))) AS KAT, IIf([Dauer]=5,"-------------",IIf([Dauer]=6,Format([f z tgab 0101 2 1 4 1].[BR],"Standard"),IIf([Dauer]=7,"=============",""))) AS BR, 4 AS SORT, [Z Tage].Dauer AS SORT2, Recipient
FROM [Z Tage], [f z tgab 0101 2 1 4 1] WHERE ((([Z Tage].Dauer)=5 Or ([Z Tage].Dauer)=6 Or ([Z Tage].Dauer)=7 Or ([Z Tage].Dauer)=8));

I'll spare you the further exploration of the “f z tgab 0101 2 1 4 1“ query. I think we have all seen enough. Nikolay, I salute you; this is, by far, the scarriest system I have ever seen.

I know when I go and watch {insert scarry slasher movie title here} this Halloween, I'll think of the victims, at least they aren't maintaining this.

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