The Function Name Hall of Shame: Round Seven



  1. // Where? Why are you asking me?
    private string AppendWhere(string ColName, int Index);
  2. // If you’re going to pass back a boolean through an ‘out’ parameter instead
    // of having the function simply return it, then you should indeed get
    // another job…and it should not be coding
    private void GetNextJob(out bool IsActive);
  3. // I think that there’s some confusion here between ‘validate’ and ‘analyze’
    public bool AnalyzeData(string);
  4. // No, you go ahead and do that without me. As for me, I’m going to keep
    // my appetite intact.
    const FILE* OpenDataSores(string);
  5. // You’re right, we needed that function. Good call.
    string CreateTruncateSql(string Table)
    { return “TRUNCATE TABLE ” + sTable; }

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

Advertisements

The Function Name Hall of Shame: Round Six



  1. // I prefer shaken, not bubble sorted
    const ABC_ERR_CD AbcParser::Gen007xRecords(…);
  2. // You’re more right than you know – this whole project is loco
    const ABC_ERR_CD AbcParser::AppendLocoSubjects(…);
  3. // Now, the implementation does check to ensure all digits are
    // greater than zero…but still, between the questionable grammar and the
    // name itself, that’s truly legendary stuff
    bool AbcParser::IsAllDigit(int);
  4. // Just get a Brazilian at the salon and get it over with
    const string TrimSpillover(string);
  5. // Sometimes the jokes write themselves
    bool AbcParser::DropDump(fileHandle, string);

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

The Function Name Hall of Shame: Round Five



  1. // Nothing is more arousing than numbers inside function names
    bool IfBefore01011900ModifyIt(string& dateString);
  2. // Could we make this functionality any less generic?
    string SubtractOneDayFromDate(string& sDate);
  3. // Looks like it’s time to call Mulder and Scully
    void EncodeFileX2();
  4. // Let me tell you about this new member function of the String class
    // called ‘replace’…
    int ReplaceCharacters(targetString, charExisting, charReplacement);
  5. // Good thing Mulder and Scully are here. Now arrest that man for crimes
    // against humanity.
    int CreateTransactionSeqForIllegalProcedure(…);

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

The Function Name Hall of Shame: Round Four



  1. // Not for any other reason except it’s just a fun thing to do
    const bool OpenReadClose();
  2. // I think that you’re only using ‘_’ to make yourself look more important
    // in the eyes of the kernel
    char* Read_Whole_File(name);
  3. // Simple and to the point
    void DoEverything();
  4. // I’m gonna go out on a limb here…but you probably don’t need
    // a whole function dedicated to that
    int RemoveAllCarriageReturns(line);
  5. // Pack your bags…we’re going to Hollywood!
    void Producer_Offer(…);

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

The Function Name Hall of Shame: Round Three



The previous lists can be found here and here.

  1. // Apparently we have given up on using enums or arrays
    // or other products of common sense (On a side note…sOriginPoint?!?)
    const string DecodeBoolean(const bool bBoolean)
    {
    string sOriginPoint = (bBoolean) ? “TRUE” : “FALSE”;
    return sOriginPoint;
    }
  2. // Whatever excuse is made to justify calling it, the answer is still “no”
    bool EnsureFunctionIsCalled()
    {
    bool bSuccess = true;
    return bSuccess;
    }
  3. // I’m lost now, and I need GPS
    void LoadPreLoadMapForPostUnloadProcessStep(…)
  4. // Well, yeah, it would only be one of them…but that still doesn’t explain what
    // a return value of ‘True’ means…

    const bool RealErrorOrNotError(string& sMessage)
  5. // Personally, I like my programming to be a little more decisive
    void SetIsHashableIsMayBeHashable(string& sIsHashable)

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

The Function Name Hall of Shame: Round Two



The previous list can be found here:

  1. NOTE: I don’t think this means what he thinks this means…
    private bool EvaluateSimplePhrase(a, b, c, d, e, f, g)
  2. NOTE: Is that possible outside of a trailer park?
    public bool AreChildrenParents(…)
  3. NOTE: Shouldn’t that return more than just a bool?
    public bool GetTransactionSeqAndInitialJobCharacteristics(…)
  4. NOTE: Sounds illegal, if you ask me
    private int InsertChildrenIntoParents()
  5. NOTE: You’re right…an informative message isn’t necessary. Just the ObjectID will do.
    public void LogObjectID(objectID)

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

The Function Name Hall of Shame



Over the years, I’ve participated in numerous code reviews, and I’ve seen a few function names that were worthy of true shame. However, the Hall of Shame demands only the best (or the worst, depend on your point of view), and so, I have whittled it down to a few of the most worthy. Consequently, I nominate the following for the Hall of Shame:

  1. NOTE: Could this function be any more ambiguous?
    private string GetTableData()
  2. NOTE: Our new programmer just might be dyslexic or suffer from something worse
    public int ManageJoinUsingDelete(…)
  3. NOTE: Do we need to know every step involved in the name?
    private int GetUpperRangeOffsetBySubtractingProductOfTwoSums()
  4. NOTE: I hope that this ‘body’ refers to text and not a dead hooker
    public void EndStreamingNoAttachIfBody(…)
  5. NOTE: This function needs more ‘temp’
    public int PopulateTempTemporaryTransfer(…)
  6. NOTE: This seems so wrong on so many levels
    public bool IsFalse()
  7. NOTE: He’s not exactly creative, is he?
    public void TransformData(…)
    public void TransfromDataPlus(…)
    public void TransformDataPlusExtra(…)
  8. NOTE: They do say that string mathematics is a dying art
    private string CalculateNextLessThanOrEqualNumber(string)
  9. NOTE: ???
    private string GenerateTempGetUpdateOrGetInsertWhereCriteria(int)
  10. NOTE: I like it…straightforward, single in use, and stupidly simplistic
    private string SurroundWithParantheses(string)

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.