I'd have to say out of all of these months of posting to this blog, the most memorable post came from Nikolay Simeonov who not only survived, but single-handedly maintained the Hotel Reservation System From Hell (part 2). I've heard reports of developers changing professions after just seeing that post. And I'm pretty sure that most among us would be so awestruck with working on that system that we'd fear even thinking about looking at another computer again.

But not Nikolay; he's a programmer's programmer. No, he's a programmer's programmer's programmer. Not only did he go to Hell and back, but he returned to do a little bit of consulting ...

I was contacted from a guy from a meteorological station because their programmer had just up and disappeared. Their system had gone from bad to completely useless and the station manager had a meeting with the mayor coming up and needed to show exactly what they had been up to with their budget. It should have been an easy fix: the recording hardware worked, the calculation system (from the scientests) worked, the data import module (from the programmer) didn't. So, I agreed to help them out a bit.

When I got there, they explained that the data import program simply exported .txt/.csv files from the hardware and then imported them in MS SQL server for the calculation program to use. Seemed simple enough to fix. Then I opened up the Delphi data module ...

Fair enough, the programmer just must not have used the GUI portion of the data import. Then I started to dig through the queries ...

SELECT dbo.[m22].*
FROM dbo.[m22]
WHERE ([dt] >= :sDate) AND ([dt] <= :eDate)

SELECT dbo.[m23].*
FROM dbo.[m23]
WHERE ([dt] >= :sDate) AND ([dt] <= :eDate)

(dt, id, val, status, a1, a2)
VALUES (:dt, :id, :val, :status, :a1, :a2)

And then there were views on top of the views ...

SELECT dbo.m15.dt, dbo.m15.val AS Tem, dbo.m16.val AS WS, 
dbo.m17.val AS WP, dbo.m18.val AS WL,
dbo.m19.val AS WA, dbo.m20.val AS WI, dbo.m21.val AS SIGMA, dbo.m22.val AS UST FROM dbo.m15 INNER JOIN dbo.m16 ON dbo.m15.dt = dbo.m16.dt INNER JOIN dbo.m17 ON dbo.m16.dt = dbo.m17.dt INNER JOIN dbo.m18 ON dbo.m17.dt = dbo.m18.dt INNER JOIN dbo.m19 ON dbo.m18.dt = dbo.m19.dt INNER JOIN dbo.m20 ON dbo.m19.dt = dbo.m20.dt INNER JOIN dbo.m21 ON dbo.m20.dt = dbo.m21.dt INNER JOIN dbo.m22 ON dbo.m21.dt = dbo.m22.dt

Well, at least the code was consistent ...

Surprisingly, after a few hours, I was able to get it to compile. Unfortunately, I didn't save the 200+ compiler warnings (and this is Pascal where it takes a lot to generate a warning, unlike C++). But once it was all over, they had a working data import module. And an impressed mayor.

And to this day, Nikolay remains a programmer.

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