"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? 

Published 09 January 05 09:07 by BradA

Comments

# Richard Blewett said on January 9, 2005 9:17 PM:
I quite like RemotingService.Connect because the one this it doesn't do it connect to the remote object
# Richard Blewett said on January 9, 2005 9:22 PM:
Thinking about it I also like the incredibly descriptive

FormsAuthentication.HashPasswordForStoringInConfigFile

I was hopiing to also find a

HashPasswordForStoringInDatabase
HashPasswordForStoringInXMLFile
HashPasswordForStoringInRegistry

But alas I was out of luck
# Dan McKinley said on January 10, 2005 12:39 AM:
# Matt Selnekovic said on January 9, 2005 9:43 PM:
I can't think of any from WinAPI or anything like that, but I have written the following webservice functions:

isServerOn()
isServerOnFire()

I haven't written better functions since. I think I hit my peak with those ones.
# Wesner Moise said on January 9, 2005 10:38 PM:
There was a goto label called ICantBelieveIUsedGoto in the thousands of lines of code contained in DefWndProc (released to public).
# Matt said on January 9, 2005 10:40 PM:
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... :P
# Kevin Dente said on January 9, 2005 10:41 PM:
For sheer length, I always liked:
CoMarshalInterThreadInterfaceInStream (from COM)
# Deleep George said on January 9, 2005 10:50 PM:
I Agree Kevin !
CoMarshalInterThreadInterfaceInStream is the best method name..
# Pavel Lebedinsky said on January 9, 2005 11:42 PM:
AccessCheckByTypeResultListAndAuditAlarmByHandle tramples CoMarshalInterThreadInterfaceInStream.
# Rick Schaut said on January 9, 2005 11:43 PM:
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".
# Stu Smith said on January 10, 2005 2:09 AM:
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).
# Dmitry Shaporenkov said on January 10, 2005 2:59 AM:
How about renaming DangerousGetHandle to UnsafeGetHandle (or GetHandleUnsafe)? SafeHandle.UnsafeGetHandle looks even more funny :-)
# Raymond Lewallen said on January 10, 2005 5:25 AM:
We have a function called "f" that takes "this" as a parameter on my current project.
# Scott Allen said on January 10, 2005 7:02 AM:
Free BSD has (or had) a function named die_you_gravy_sucking_pigdog() in shutdown.c
# PatternGuru said on January 10, 2005 7:45 AM:
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...?
# orangy said on January 10, 2005 7:45 AM:
int IDontKnowWhatThisCodeDoesButItIsUsedTwentyTimesInThisClass(int i) { /* calculates some strange value, 20 lines of code, uses all five private fields */ }

In legacy code.
# Brian Lloyd said on January 10, 2005 7:49 AM:
From Zope, there's the infamous _setBasesHoldOnToYourButts() in ZClass.py.
An immortal Jim Fulton-ism ;)
# Jason Bock said on January 10, 2005 9:33 AM:
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 :).
# Jeffrey van Gogh said on January 10, 2005 10:09 AM:
in the FxCop unittests for the AvoidCallingProblematicMethods rule, there is a test that calls all the problematic methods this rule tests for:

AbandonAllHopeYeWhoCallsThisMethod()
# Mike Dunn said on January 10, 2005 10:50 AM:
I've always liked "MakeSureDirectoryPathExists".

There's an API called "PathMakeUniqueName" which begat "PathYetAnotherMakeUniqueName"
# Justin said on January 10, 2005 11:12 AM:
cloneOMatic9000
# Sean Chase said on January 10, 2005 11:31 AM:
ISingleObjectCollection
# Frank Hileman said on January 10, 2005 12:00 PM:
I once used a "G" prefix on a string abstraction, GString, used to encapsulate a private member.
# C#deSamurai said on January 10, 2005 12:15 PM:
I once came across CFURLCreateStringByReplacingPercentEscapesUsingEncoding and CFURLCreateFromFileSystemRepresentationRelativeToBase available in the Mac Core Foundations framework :-)

http://developer.apple.com/documentation/CoreFoundation/Reference/CFURLRef/Reference/function_group_3.html#//apple_ref/c/func/CFURLCreateStringByReplacingPercentEscapesUsingEncoding
# Jesse said on January 10, 2005 2:03 PM:
My favorite is part of kernel32.dll in XP and above:

ZombifyActivationContext

I would have loved to be at the API review for that one.
# Milan Negovan said on January 10, 2005 3:04 PM:
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!
# smidgeonsoft said on January 10, 2005 3:38 PM:
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.
# smidgeonsoft said on January 10, 2005 3:59 PM:
And, of course, AccessCheckByTypeResultListAndAuditAlarmByHandle (from Pavel Lebedinsky) calls NtAccessCheckByTypeResultListAndAuditAlarmByHandle in NTDLL.
# JFo said on January 10, 2005 9:40 PM:
I rather like ISupportErrorInfo, for it's moral statement about the matter.
# Mike Dunn said on January 11, 2005 11:28 PM:
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.
# mschaef said on January 13, 2005 5:47 AM:
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? :-)

# Mark Mullin said on January 13, 2005 1:30 PM:
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"
# Daniel Moth said on January 15, 2005 9:27 AM:
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
# Keith Hill said on January 20, 2005 1:57 PM:
>> private void System.IO.Ports.SerialPort.MaybeResizeBuffer(int)

Ugh! I could see something like SerialPort.AttemptBufferResize(int).
# Adrian Florea said on January 22, 2005 11:44 AM:
System.Runtime.CompilerServices.AssemblyAttributesGoHereSM
# J.net said on January 24, 2005 10:33 AM:
# SuperJason said on January 24, 2005 8:03 AM:
I have some exceptions called "sex" because they are serilization exceptions.

We also use "ass" as a shortcut for "Assembly".
# SuperJason said on January 24, 2005 8:04 AM:
One more, a guy here wrote a function called "ShowMoreLabelMore". Another wrote one called "HideMostOfMenu".
# Jeremy said on January 24, 2005 8:28 AM:
SuperJason: Would that mean you could have an assembly loading function called AssLoad()?
# Duncan said on January 24, 2005 9:12 AM:
There is a tale ofg a variable called "Live_RSA_Usages" which mutated over time to "Liversausages"..yeuch.
# Matt said on January 24, 2005 10:42 AM:
NdisDestroyLookaheadBufferFromSharedMemory always struck me as a bit lengthy, but Pavel's has it beat by 6.
# Stephen said on January 24, 2005 11:15 AM:
I know this isn't a method, however, It's always puzuled me as to why this registry key exists:

HKEY_CURRENT_USER\Windows 3.1 Migration Status

I'm sure you can't upgrade 3.1 to xp?
# Howard Hoy said on January 24, 2005 9:27 PM:
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.
http://www.doyousnap.com/portal/albums/7/103.aspx
# Jani Järvinen said on February 5, 2005 7:31 AM:
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);
# Luke's Blog said on May 12, 2005 3:20 AM:
# El laberinto de piedra » Blog Archive » SafeHandles said on May 7, 2007 3:48 AM:

PingBack from http://arnulfoperez.com/blog/2007/05/07/safehandles/

New Comments to this post are disabled

Search

Go

This Blog

Syndication

Page view tracker