• (nodebb)

    They use Me, so that already says a lot.

    Addendum 2023-04-22 01:43: Here a link to the default naming rule violation: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009

  • TheCPUWizard (unregistered)

    The "killer" is if someone thinks that is "redundant code" and removes it, when in reality the proper functioning of the application depends on throwing that specific type of exception when nothing is selected..... I am dealing with a code base where significant "program flow" is triggered by null reference type exceptions rather than any checks for null..... NEVER discount what "makes the code work".

  • Hanzito (unregistered)

    Equals False is the icing on the mud.

  • (nodebb) in reply to MaxiTB

    They use Me, so that already says a lot.

    Do you have similar disdain for C# use of "this"?

  • Jaloopa (unregistered) in reply to Ross_Presser

    They use Me, so that already says a lot.

    Do you have similar disdain for C# use of "this"?

    this

  • (nodebb) in reply to Ross_Presser

    I always use "this." prefix in all my code, C# by convention and JS by necessity. I used to do the same for static members, but then decided against because "SomeClassName." prefix is sometimes too long and outweighs the benefit of readability.

  • cellocgw (unregistered) in reply to MaxiTB

    Don't be so quick : maybe their other items are named "Do", "Ray", "Fah", ....

  • Your Name (unregistered)

    Prefixing this needlessly just adds visual clutter.

  • (nodebb) in reply to TheCPUWizard

    a code base where significant "program flow" is triggered by null reference type exceptions

    Unless the catching of those exceptions is extremely close to where they're thrown (as in "next line" close), that's going to be awful.

    Future content for the front page here?

  • LZ79LRU (unregistered) in reply to dkf

    I don't see how proximity would make it any less of a problem.

    Either way you are using what should be logic for handling exceptional (rare and undesirable) events in execution as a method of flow control. Exception handling should only ever recover gracefully from a problem or else make the inevitable failure more human readable.

    Using it to actually direct the flow of your program beyond that is the programming equivalent of using an 747 to drive around on highways without ever taking off or trying to harvest by attaching a plow to the back of a F1 race car. You can do it. But you really shouldn't.

  • MaxiTB (unregistered) in reply to Ross_Presser

    Yes, except for indexers because it's a verbose term in all other cases. Because this was always a fallback in any naming convention (except for one that was hovering around for a year).

  • SD (unregistered)

    Have you guys ever heard about multi-select list boxes? I've got a piece of news for you: selected item in them may be not selected.

  • cat (unregistered)
    Comment held for moderation.

Leave a comment on “Get Selected”

Log In or post as a guest

Replying to comment #:

« Return to Article