• (cs) in reply to Schol-R-LEA
    Schol-R-LEA:
    Could be worse. Lispers often abbreviate the term 'S-expression' (the parenthesized lists that make Lisp programs) as 'sexp'. Take a guess how that is pronounced...

    As well, query functions that return a boolean result are generally suffixed with "p", as in "listp", which tells you if its argument is a list. LISP hackers will use this when speaking, as well, such as "lunchp" (pronounced "lunch-pee")
    to ask if you want to go have lunch.

    cjs
  • zgoda (unregistered)

    What I saw in Delphi code maintained by my friend:

    • ClientAnal;
    • MrFooter;
    • and bunch of auto-generated names such as Checkbox245.
  • Topha (unregistered) in reply to loneprogrammer

    ID as in "Please show me your ID." stands for "Identification Document(s)"

    Id is short for Identity ..and so *should* be the correct capitalisation [8-|]

  • ammoQ (unregistered)

    Because of problems with the Oracle SQL*C precompiler (aka proc) on Linux,
    a lot of my source files start with the following sequence:
    (note: the second part is only active during precompilation, so the wrong type for stderr doesn't matter)

    #ifndef STUPID_PROC
    #include <stdio.h>
    #include <math.h>
    #include <stdlib.h>
    #include <ctype.h>
    #else
    extern double rint(double);
    extern void *calloc(int, int);
    extern void *stderr;
    #endif

  • ammoQ (unregistered) in reply to ammoQ

    oops, the forum software ate stdio.h, stdlib.h etc.
    <stdio.h><math.h><stdlib.h><ctype.h></ctype.h></stdlib.h></math.h></stdio.h>

  • Spidey (unregistered) in reply to ammoQ

    In my old VB6 days I used to have fun calling error traps things like "Hell", "Bed", "The Pub" and "TheBackOfTheClass", so that you could write lines like "On Error Goto Hell", etc.

    Ha ha ha! I kill me! 


  • (cs)

    C++ CORBA ORBs rely heavily on reference counting.  When looking through the generated code from ORBIX (I think) I discoved the functions used to inicrement and decrecment the reference count for an object were bump() and grind(), respectivly.

    That always amused me.

  • Justin Sippel (unregistered) in reply to Charles Nadolski
    Charles Nadolski:

    Ewwwww! You mean other code environments don't have something like IntelliSense?! (for non-windows people: this is an autocomplete feature that shows a dropdown of available methods/objects when typing . or -> or CTRL+SPACE, and narrows the list as you type, completing when you hit ENTER) WTF. Boy am I glad I only code in a Windows environment at work.

    Seriously, when I was at school, SSHing into unix command prompts and being forced to use VIM or EMACS really really really really sucked.
    You're biting yourself in the ass if you pick your entire programming environment (framework and all) by such a cosmetic feature. Sure it's nice, but there are more important things to consider. And it's not all or nothing, working with XCode is still way nicer than using frumpy old Unix editors. On the flipside of my earlier comment, I wish Visual Studio's graphical designer was as nice as Interface Builder on the Mac.
  • (cs)
    Alex Papadimoulis:
    BOOL CSApp::FillDocFmtArrSave(CABDocFmtArr &arr, BOOL bSteve_09_24_2003)
    {
    CString strFilterExt, strFilterName;
    CABDocFmtItm itm;
    if (!bSteve_09_24_2003)
    {
    //ED: Snip
    }

    //ED:Snip
    }



    I saw something like this before. When I was in a large project (accessing SAP with Delphi), Hayo, our QA man, always experienced a crash when he selected a menu item. Nobody else could reproduce this error. Then one of our SAP specialists helped him debugging the code, especially on the SAP machine. Then they found a line in the source, which says something like

    	IF USER_NAME EQ 'Hayo'.

    and in the if-block there was some illegal code, so the execution crashed, whenever Hayo called it.
    Some idiot must've added this line after a hard struggle with Hayo (who doesn't fight with the QA?). After correcting the line, the application ran without any problems, even for Hayo :-)
  • Richard Spindler (unregistered) in reply to Rik Hemsley
    Anonymous:
    love Vim and still use it all day, in parallel with VS.NET, but its code completion is pathetic compared to Intellisense.


    Vim Intellisense:
    http://insenvim.sourceforge.net/

    -Richard

  • herilane (unregistered) in reply to Spidey

    Anonymous:
    In my old VB6 days I used to have fun calling error traps things like "Hell", "Bed", "The Pub" and "TheBackOfTheClass", so that you could write lines like "On Error Goto Hell", etc.

    I like naming my VB6 error traps "EH" (for Error Handler). It adds a nice feeling of befuddlement, I think - error? eh? what?

  • poser (unregistered) in reply to alan

    > Hence, foo_bar.fooId = foo.fooId is better, imo, than foo_bar.fooId = foo.id.

    But even better is:
    foo_bar.id = foo.id
    which is what the discussion is about.

  • me (unregistered) in reply to Richard Spindler
    Anonymous:
    Anonymous:
    love Vim and still use it all day, in parallel with VS.NET, but its code completion is pathetic compared to Intellisense.


    Vim Intellisense:
    http://insenvim.sourceforge.net/

    -Richard



    Bram ought to be writing native intellisense support himself as it is the number one feature on: http://www.vim.org/sponsor/vote_results.php
  • (cs)

    I had a post-doc project which consisted of taking over a project left by a previous post-doc. It was a bit of chemistry-related software. I found the names of variables relating to reactions were almost impossible to use. I forget the specific qualifiers used, but they were things like "NextToDisplay" and such.

    What I do remember quite clearly is that the variable names had five different ways of indicating they were reaction variables. One name was "<qualifier>Reaction", another was "<qualifier>Reaxion". There was also a "<qualifier>Reactn", "<qualifier>Rctn", and a "<qualifier>Rxn". This made it almost impossible to do anything but cut-and-paste to get the name of a particular variable.

    The thing that made it worse was when I looked in a header file and discovered why there were five forms of "reaction":

    int <xxx>Reaction;
    int <xxxxxxx>Rctn;
    int <xxxx>Reaxion;

    int <xxxxxxxx>Rxn;
    int <xxxxx>Reactn;


    That's right: that previous fellow had sacrificed maintainability to make all those variable names the same length, all nice and neat, where they were defined in the header file.

  • (cs) in reply to emacs fanboy.
    Anonymous:
    Seriously, when I was at school, SSHing into unix command prompts and being forced to use VIM or EMACS really really really really sucked.

    Emacs has this. Depending o/c on mode. Don't blame your lack of xp with a tool on the tool.

    Blame the imposable steap learning curve.


    A "powerful" tool with an impossibly steep learning curve is nonetheless a bad tool.  Less time spent learning a tool is more time spent on development.
  • (cs) in reply to Richard Spindler
    Anonymous:
    Anonymous:
    love Vim and still use it all day, in parallel with VS.NET, but its code completion is pathetic compared to Intellisense.


    Vim Intellisense:
    http://insenvim.sourceforge.net/

    -Richard



    This sounds too good to be true.  If it works with GVim, that means I can actually code stuff on my 100 MHz laptop when I'm not on my main box.  Thanks for the head's up!
  • (cs) in reply to Spidey
    Anonymous:
    In my old VB6 days I used to have fun calling error traps things like "Hell", "Bed", "The Pub" and "TheBackOfTheClass", so that you could write lines like "On Error Goto Hell", etc.

    Ha ha ha! I kill me! 


    You can still do this in .Net [:P]
  • (cs)

    At my current (soon to be former) job we have the following class/interface struture helpfully developed by a consultant that left within 3 months of my hiring.

    TerminalOne -> This class is the first terminal in our series
    TerminalTwo -> This class adds support for running 2 terminals at the same time
    Terminal2 -> This class is the second terminal in our series
    Terminal3 -> This adds support for cross terminal talk, something that was required when running 3 or more terminals at the same time
    TerminalThree -> This class is the third terminal in the series

    T1T, T0T, T2T, TAT, TBT, TCT, C0X, C1X, CaX, CbX -> These as the class names for various sub-terminal types typically based off TerminalOne or Terminal2 super classes.

    Try reading through code sprinkled like the following:

    if (T1T == true)
      C0X member = new C0X(T1T);

  • (cs) in reply to poser

    Anonymous:
    > Hence, foo_bar.fooId = foo.fooId is better, imo, than foo_bar.fooId = foo.id.

    But even better is:
    foo_bar.id = foo.id
    which is what the discussion is about.

    uhhh, I think the main reason for wanting to join these two is that foo has a 1-to-N relationship with foo_bar, thus foo_bar.fooId is a foreign key reference to foo's id. Therefore, foo_bar.fooId = foo.id sets the pace for clarity.

  • (cs) in reply to diGriz
    diGriz:
    Alex Papadimoulis:
    BOOL CSApp::FillDocFmtArrSave(CABDocFmtArr &arr, BOOL bSteve_09_24_2003)
    {
    CString strFilterExt, strFilterName;
    CABDocFmtItm itm;
    if (!bSteve_09_24_2003)
    {
    //ED: Snip
    }

    //ED:Snip
    }



    I saw something like this before. When I was in a large project (accessing SAP with Delphi), Hayo, our QA man, always experienced a crash when he selected a menu item. Nobody else could reproduce this error. Then one of our SAP specialists helped him debugging the code, especially on the SAP machine. Then they found a line in the source, which says something like

    	IF USER_NAME EQ 'Hayo'.


    and in the if-block there was some illegal code, so the execution crashed, whenever Hayo called it.
    Some idiot must've added this line after a hard struggle with Hayo (who doesn't fight with the QA?). After correcting the line, the application ran without any problems, even for Hayo :-)

    I did something like this for myself. Only in my case, the username was my own, and the code inside the if opened an XTerm window on the caller's machine. Thus I was able to fiddle around (say: do some maintenance) on even the production machines. Luckily, no QA or security guy ever found out about this [<:o)]

  • (cs) in reply to Schol-R-LEA

    Could be worse. Lispers often abbreviate the term 'S-expression' (the parenthesized lists that make Lisp programs) as 'sexp'. Take a guess how that is pronounced...Thekthpy?

  • Richard Spindler (unregistered) in reply to Charles Nadolski
    Charles Nadolski:

    This sounds too good to be true.  If it works with GVim, that means I can actually code stuff on my 100 MHz laptop when I'm not on my main box.  Thanks for the head's up!


    win32 only :(
  • (cs) in reply to Richard Spindler
    Anonymous:
    Charles Nadolski:

    This sounds too good to be true.  If it works with GVim, that means I can actually code stuff on my 100 MHz laptop when I'm not on my main box.  Thanks for the head's up!


    win32 only :(


    Actually, it IS win32.  Windows 98 SE barely runs on the poor thing :-D
  • John Aldis (unregistered) in reply to TheRider

    When I've got foreign key relations, I usually have the tables called [foo]s and [bar]s -- e.g. books, copies, then the "id" fields called [foo] and [bar] -- e.g. "book" in the "books" table, "copy" in the "copies" etc. That way if I want to make a foriegn key reference, e.g. to say which book a copy is a copy of, then the field in "copies" is also called "book" -- and maps to the "book" field of "books".

    Of course, I only started playing around with SQL a couple of weeks ago, so what do I know? Is there a reason not to do this?

  • (cs) in reply to Scott McKellar

    Anonymous:
    My favorite case of a bad variable was "BEANO", an obscure flag in several thousand lines of spaghetti COBOL with hundreds of GO TOs.  I never did figure out what that name had to do with the variable's function.

    After refactoring it I was distressed to find in my regression testing that my new version didn't give the same results.  I eventually discovered that I had inadvertently fixed an unrecognized bug.  This program -- a general ledger program -- had been quietly corrupting the books for years, shifting money from the occasional account to some random other account.

    I asked my boss what we should tell the accountants.  He said, "Don't tell them anything.  They never noticed it, and we can't go back and repair the damage anyway.  So there's no reason to get them upset."

    Did it occur to you that the account might belong to your boss?

  • Anonymouse (unregistered)

    If you look thru alot of my code that uses Reflection, I like to use:

    Assembly myAss = Assembly.GetExecutingAssembly();

Leave a comment on “A Hodgepodge of Naming”

Log In or post as a guest

Replying to comment #:

« Return to Article