“Best” method names ever…

We had a thread recently about the oddly named SafeHandle.DangerousGetHandle()…   

Which raised a few other oddly named methods from platforms past:


FDangerouslyCommitToDiskCacheButNotActuallyToDisk (or some approximation, from OLE)

SetMetafileBitsBetter (from win3.1)

PrestoChangoSelector (from some earlier windows version)


Got any of your own? 

Comments (46)

  1. I quite like RemotingService.Connect because the one this it doesn’t do it connect to the remote object

  2. Thinking about it I also like the incredibly descriptive


    I was hopiing to also find a




    But alas I was out of luck

  3. I can’t think of any from WinAPI or anything like that, but I have written the following webservice functions:



    I haven’t written better functions since. I think I hit my peak with those ones.

  4. Wesner Moise says:

    There was a goto label called ICantBelieveIUsedGoto in the thousands of lines of code contained in DefWndProc (released to public).

  5. Matt says:

    One of the guys here wrote a test called "TestBashThatBadBoy()". It was funny seeing that pop up on the list of failing tests the first time… 😛

  6. Kevin Dente says:

    For sheer length, I always liked:

    CoMarshalInterThreadInterfaceInStream (from COM)

  7. Deleep George says:

    I Agree Kevin !

    CoMarshalInterThreadInterfaceInStream is the best method name..

  8. AccessCheckByTypeResultListAndAuditAlarmByHandle tramples CoMarshalInterThreadInterfaceInStream.

  9. Rick Schaut says:

    Ed Fries wrote some code around a data structure representing a "Piece o’ Text" (i.e. a POT). This lead to function names like "FreePot" and "CleanPots".

  10. Stu Smith says:

    System._AppDomain ?

    A spanner in the works of IntelliSense.

    (And yes I know this isn’t what you’re looking for but it’s been bugging me in vs2005).

  11. Dmitry Shaporenkov says:

    How about renaming DangerousGetHandle to UnsafeGetHandle (or GetHandleUnsafe)? SafeHandle.UnsafeGetHandle looks even more funny 🙂

  12. We have a function called "f" that takes "this" as a parameter on my current project.

  13. Scott Allen says:

    Free BSD has (or had) a function named die_you_gravy_sucking_pigdog() in shutdown.c

  14. PatternGuru says:

    Do variable names count as well…?

    Like naming memory block reference "willy" just so you can laugh your head off (the first couple of times) when it comes time to free that sucker?

    That kind of thing…?

  15. orangy says:

    int IDontKnowWhatThisCodeDoesButItIsUsedTwentyTimesInThisClass(int i) { /* calculates some strange value, 20 lines of code, uses all five private fields */ }

    In legacy code.

  16. Brian Lloyd says:

    From Zope, there’s the infamous _setBasesHoldOnToYourButts() in ZClass.py.

    An immortal Jim Fulton-ism 😉

  17. Jason Bock says:

    Assembly has a _DontTouchThis field. True, it’s not a method name, but I stumbled across it one day and I was SOOO tempted to write Reflection code just to change it because it told me not to :).

  18. Jeffrey van Gogh says:

    in the FxCop unittests for the AvoidCallingProblematicMethods rule, there is a test that calls all the problematic methods this rule tests for:


  19. Mike Dunn says:

    I’ve always liked "MakeSureDirectoryPathExists".

    There’s an API called "PathMakeUniqueName" which begat "PathYetAnotherMakeUniqueName"

  20. Justin says:


  21. Sean Chase says:


  22. I once used a "G" prefix on a string abstraction, GString, used to encapsulate a private member.

  23. C#deSamurai says:

    I once came across CFURLCreateStringByReplacingPercentEscapesUsingEncoding and CFURLCreateFromFileSystemRepresentationRelativeToBase available in the Mac Core Foundations framework 🙂


  24. Jesse says:

    My favorite is part of kernel32.dll in XP and above:


    I would have loved to be at the API review for that one.

  25. A while ago, in my C++ days, I was digging through a header file and saw a DEFINE named BEEFCACE with the comment, "Too bad hex does’t have a K". I was laughing to tears!

  26. smidgeonsoft says:

    In the same vein as Richard Blewett’s "FormsAuthentication.HashPasswordForStoringInConfigFile" item in MSGINA.DLL there is a routine named, HashPassword, which contains a data string: "Long string used by msgina inside of winlogon to hash out the password" that is used as a parameter for a call to MD5Update — hmmm. And this routine does get called as part of the authentication process.

  27. smidgeonsoft says:

    And, of course, AccessCheckByTypeResultListAndAuditAlarmByHandle (from Pavel Lebedinsky) calls NtAccessCheckByTypeResultListAndAuditAlarmByHandle in NTDLL.

  28. JFo says:

    I rather like ISupportErrorInfo, for it’s moral statement about the matter.

  29. Mike Dunn says:

    This isn’t a method name, but back in Win 95 betas there was a secret system.ini switch called FLUFFYBUNNY32. Setting it to 1 turned on (I think) full-window dragging.

  30. mschaef says:

    The undocumented Windows API TabTheTextOutForWimps isn’t bad.

    I’ve also seen functions with names like maybe_open_window, etc. Real confidence insipiring name, no? 🙂

  31. Mark Mullin says:

    Somewhat in the same thread, I once worked with a guy writing very low level disk drivers, before the advent of the WD controller chips – you had to be prepared for horrible driver malfunctions like repeated slamming the arm into the end stops

    His technique was to make all drivers recognize the command FOAD, which meant to kill yourself immediately with extreme prejudice. When I innocently asked how I was to remember that

    "Because you want the driver to <bleep> off and die"

  32. Daniel Moth says:

    A few from Whidbey:

    private void System.IO.Ports.SerialPort.MaybeResizeBuffer(int)

    protected vistual void System.Web.Configuration.BrowserCapabilitiesFactory.PanasonicexchangesupporteddeviceProcessGateways(System.Collections.Specialized.NameValueCollection, System.Web.HttpBrowserCapabilities)

    public const long* System.DirectoryServices.Protocols.LocatorFlags.GoodTimeServerPreferred

    public const int* System.Management.ManagementStatus.ClientTooSlow

    public const int* System.Windows.Forms.AutoSizeMode.GrowAndShrink

  33. Keith Hill says:

    >> private void System.IO.Ports.SerialPort.MaybeResizeBuffer(int)

    Ugh! I could see something like SerialPort.AttemptBufferResize(int).

  34. System.Runtime.CompilerServices.AssemblyAttributesGoHereSM

  35. SuperJason says:

    I have some exceptions called "sex" because they are serilization exceptions.

    We also use "ass" as a shortcut for "Assembly".

  36. SuperJason says:

    One more, a guy here wrote a function called "ShowMoreLabelMore". Another wrote one called "HideMostOfMenu".

  37. Jeremy says:

    SuperJason: Would that mean you could have an assembly loading function called AssLoad()?

  38. Duncan says:

    There is a tale ofg a variable called "Live_RSA_Usages" which mutated over time to "Liversausages"..yeuch.

  39. Matt says:

    NdisDestroyLookaheadBufferFromSharedMemory always struck me as a bit lengthy, but Pavel’s has it beat by 6.

  40. Stephen says:

    I know this isn’t a method, however, It’s always puzuled me as to why this registry key exists:

    HKEY_CURRENT_USERWindows 3.1 Migration Status

    I’m sure you can’t upgrade 3.1 to xp?

  41. Howard Hoy says:

    Sure Enough. I found a Windows 3.1 Migration in my Registry. I posted a picture of it here. Check out the string value I found.


  42. These aren’t really method names, but nice constant values I’ve seen (or used) during the years. Hexadecimal fun in the style of "BEEFCACE".

    const uint LEGACY_VALUE = 0xDEADBEEF;

    const uint THUMBS_UP = 0xB00BBABE;

    const uint ERROR_TOTAL_FAILURE = 0xFACE0FF;

    const bool FALSE_FLAG = (0xCE0 == 0xDEAF);

    const bool DEBUG_STATE = (0xDECAF + 0xC0FFEE == 0xBAD);