A while ago I used to work with one legacy platform. It started its existence more than 10 year ago, most probably as a customer specific solution which turned into platform. It’s still quite popular and I guess it covers major user requirements. But as it happens with systems which doesn’t evolve good enough or evolve the wrong way, it ends up as small hell even for vendors’ developers. I was third party developer, but for my job I had access to most of the production source and since stumbling upon funny and frustrating comments I decided to create a collection. Here’s part 1 of it.
Some things are edited (marked out by {… …} ) to make them shorter or to not disclose the system name.
So let’s start from a few of my favorite ones:
// Origin selection and date (this is horrible, horrible, horrible... // there should be ONE field for origin and origin date. // A big THANK YOU _NOT_ SO VERY MUCH to the unnamed customer who strictly demanded // this crap and then never needed it anyway...
// TODO: All the following code is so silly it brings tears to to the eye of // any man or woman... What needs to be done is to set up a generic refresh // framework to avoid this clumsy stupidity...
And sometimes it tries to threaten you:
-- This parameter is CRITICAL for journalization, so you BETTER know what you're -- doing if you're specifying this!
// USE WITH CAUTION! If the incorrect context menu is specified, problems WILL // surely arise.
// enableViewState = true; <-- This is not working =(
// Don't call SetData(""); since there's no point in setting non-existant data, // plus some controls might fuck up severely if it was done.
Sometimes it gets offensive:
// Output the search result html as an Excel sheet (ugly as yo mama, but works)
if (newParent == ID) { //alert("You must be stupid !"); }
And here are some comments regarding the implementation:
// Known issue: // // If the textbox is read-only, TextBoxKeyDownEventHandler will disregard any keys // pressed, but the other events will cause change. No biggie though - who ever // drags text to an empty textbox, and will Earth explode if that happens? No.
// Recursively disables controls starting from the given control, following // a shitload of rules.
// No message here? Really? I think "The connected foundation does no longer seem // to exist in the database." would be proper. Plus a check if the given ID (data) // is null or empty, before even trying?
// Save the foundation connection to the database right away (out of paranoia of // the user forgetting to save the case, or what?).
// TODO: This is such a suck, looping through all columns every stinking time // to locate the one to place the text on... Do it in a completely different way or at least cache the columns // or something...
// Skip the following (the day the value of a button is saved to the database // for a valid reason, I'll change my name to Mr. Cowdung)
// This "helper frame" was used to generate the favourite menu displayed in // TopMenu.aspx. Not anymore. Is there something else using it?
// This is a hack to // {… 4 lines of explanation …} // All of the code should be rewritten, it's so full of bullshit it makes me puke.
// Rip the from and to date fields from the date control (ugly as // troll-butt, but the only way for now)
// A lot of crap needed for {… …} in searchframe {… 10 lines of code …} // End crap !
// This is a bit of a WTF, but it is a (little) bit better to use a named variable // instead of "top" to access variables and functions
To be continued…
Update 2014-01-28: part 2
Webmaster do you want unlimited content for your wp blog?
Type in google:
Anightund’s rewriter