"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
- Anonymous
January 09, 2005
I quite like RemotingService.Connect because the one this it doesn't do it connect to the remote object - Anonymous
January 09, 2005
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 - Anonymous
January 09, 2005
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. - Anonymous
January 09, 2005
There was a goto label called ICantBelieveIUsedGoto in the thousands of lines of code contained in DefWndProc (released to public). - Anonymous
January 09, 2005
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 - Anonymous
January 09, 2005
For sheer length, I always liked:
CoMarshalInterThreadInterfaceInStream (from COM) - Anonymous
January 09, 2005
I Agree Kevin !
CoMarshalInterThreadInterfaceInStream is the best method name.. - Anonymous
January 09, 2005
AccessCheckByTypeResultListAndAuditAlarmByHandle tramples CoMarshalInterThreadInterfaceInStream. - Anonymous
January 09, 2005
The comment has been removed - Anonymous
January 09, 2005
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). - Anonymous
January 09, 2005
How about renaming DangerousGetHandle to UnsafeGetHandle (or GetHandleUnsafe)? SafeHandle.UnsafeGetHandle looks even more funny :-) - Anonymous
January 09, 2005
We have a function called "f" that takes "this" as a parameter on my current project. - Anonymous
January 09, 2005
Free BSD has (or had) a function named die_you_gravy_sucking_pigdog() in shutdown.c - Anonymous
January 09, 2005
The comment has been removed - Anonymous
January 09, 2005
int IDontKnowWhatThisCodeDoesButItIsUsedTwentyTimesInThisClass(int i) { /* calculates some strange value, 20 lines of code, uses all five private fields */ }
In legacy code. - Anonymous
January 09, 2005
From Zope, there's the infamous _setBasesHoldOnToYourButts() in ZClass.py.
An immortal Jim Fulton-ism ;) - Anonymous
January 10, 2005
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 :). - Anonymous
January 10, 2005
in the FxCop unittests for the AvoidCallingProblematicMethods rule, there is a test that calls all the problematic methods this rule tests for:
AbandonAllHopeYeWhoCallsThisMethod() - Anonymous
January 10, 2005
I've always liked "MakeSureDirectoryPathExists".
There's an API called "PathMakeUniqueName" which begat "PathYetAnotherMakeUniqueName" - Anonymous
January 10, 2005
cloneOMatic9000 - Anonymous
January 10, 2005
ISingleObjectCollection - Anonymous
January 10, 2005
I once used a "G" prefix on a string abstraction, GString, used to encapsulate a private member. - Anonymous
January 10, 2005
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 - Anonymous
January 10, 2005
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. - Anonymous
January 10, 2005
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! - Anonymous
January 10, 2005
The comment has been removed - Anonymous
January 10, 2005
And, of course, AccessCheckByTypeResultListAndAuditAlarmByHandle (from Pavel Lebedinsky) calls NtAccessCheckByTypeResultListAndAuditAlarmByHandle in NTDLL. - Anonymous
January 10, 2005
I rather like ISupportErrorInfo, for it's moral statement about the matter. - Anonymous
January 11, 2005
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. - Anonymous
January 12, 2005
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? :-) - Anonymous
January 13, 2005
The comment has been removed - Anonymous
January 15, 2005
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 - Anonymous
January 20, 2005
>> private void System.IO.Ports.SerialPort.MaybeResizeBuffer(int)
Ugh! I could see something like SerialPort.AttemptBufferResize(int). - Anonymous
January 22, 2005
System.Runtime.CompilerServices.AssemblyAttributesGoHereSM - Anonymous
January 24, 2005
The comment has been removed - Anonymous
January 24, 2005
One more, a guy here wrote a function called "ShowMoreLabelMore". Another wrote one called "HideMostOfMenu". - Anonymous
January 24, 2005
SuperJason: Would that mean you could have an assembly loading function called AssLoad()? - Anonymous
January 24, 2005
There is a tale ofg a variable called "Live_RSA_Usages" which mutated over time to "Liversausages"..yeuch. - Anonymous
January 24, 2005
NdisDestroyLookaheadBufferFromSharedMemory always struck me as a bit lengthy, but Pavel's has it beat by 6. - Anonymous
January 24, 2005
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? - Anonymous
January 24, 2005
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 - Anonymous
February 04, 2005
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); - Anonymous
May 06, 2007
PingBack from http://arnulfoperez.com/blog/2007/05/07/safehandles/