Found this little gem among the 500 stand alone functions in a unit called AMSMasterDataUnit.pas:

Found this little gem among the 500 stand alone functions in a unit called AMSMasterDataUnit.pas:

function FindDatabaseAbuser: TStringList;

How cool is that?

Comments

  1. And oh, it has the following line of code in it:

    Sleep(10000);

    Lovely.

    ReplyDelete
  2. What? No Application.ProcessMessages? Novice!! :-D

    ReplyDelete
  3. Man, you're getting fussy! :) Must be getting old....

    ReplyDelete
  4. What, no FreeAndNil(something)??? :-)

    ReplyDelete
  5. While I've never done anything quite like that, I have made disruptive code changes simply to see who would complain so I could... instruct them. With a clue by four.

    ReplyDelete
  6. for O in FindDatabaseAbusers.Objects do FreeAndNil(O)

    ReplyDelete
  7. Hehe. I'm reminded of a user validation library I wrote for our web cowboy. After it was all tested and working he decided he needed a way to bypass it... so I gave him "ExecuteThisCommandAsAdminRegardlessOfWhatPermissionsTheUserActuallyHasAndIgnoreTheImplicationsOfLettingRandomUsersBypassSecurity()" (or something similar). My boss listened to his complaint, looked at the code, and said "that name is good".

    ReplyDelete
  8. Nick Hodges Where do you keep finding this stuff xD

    ReplyDelete
  9. Any sufficiently large and mature codebase will be full of WTFs implemented by inexperienced or poor coders.

    ReplyDelete
  10. Anthony Frazier Any sufficiently old codebase will contain such WTFs written by yourself.

    ReplyDelete
  11. Uwe Raabe that were probably written as bandaids over additional WTFs.

    ReplyDelete
  12. Uwe Raabe Indeed, a lot of my old cold sends shivers down my spine

    ReplyDelete
  13. I keep cursing my younger-by-six-months self. He was stupid and inexperienced. Been doing that for twenty years.

    ReplyDelete

Post a Comment