• Vera (unregistered)

    My best/worst guess for what this is meant for: aligning something with the longest string. Like, write something to console, CR to jump to start of line, write the "prefix" to console, then write whatever should come after.

    Of course, this is just a guess, but it's the kind of kludge I'd expect with code this clumsy-looking.

  • (nodebb)

    My years of experience tell me that, clearly, the method named "ErrorForm" actually logs and/or emails the exception so that the developers are made aware of the problem and can fix it.

  • Hanzito (unregistered) in reply to dpm

    And once everybody got fed up of errors that were never fixed, public override ShowDialog() {} was added to ErrorForm.

  • (nodebb)

    I've seen this one before but in this instance the inner code did produce a error with MessageBox so in case of error the user had to start closing MessageBoxes until the code ran out of messages. They fixed it by putting all the error messages in a StringBuilder and displaying a single hard to read MessageBox covering half of the screen. Wasted work if you ask me because most users, in my experience, don't read error messages.

  • PedanticRobot (unregistered)

    What a bunch of unnecessary garbage creation, and a for loop wouldn't be any better than a while loop when `new string(' ', maxLength)' would do the job in one line without throwing away any garbage strings.

  • Anonymous (unregistered)

    Why Prefix? Because you then do left(strPrefix, len(strPrefix)-len(strLabel)+strLabel) and get right-aligned labels. Clearly on a fixed-width terminal, even on the new-fangled amber ones :-)

  • (nodebb) in reply to AGlezB

    Wasted work if you ask me because most users, in my experience, don't read error messages.

    Users don't read the error messages even when they say "your error is here and this is how you fix it".

  • (nodebb)

    Users don't read the error messages

    Users, I'm happy when testers and support read error messages. In a previous job, the bug tracker was littered with hundreds of bugs that said "user got an error when ...". In most cases, it turns out that the error (which the support person never read) was "User is not authorized to perform operation XXXX".

  • (nodebb)

    Straight to prison, 25 to life.

  • (nodebb) in reply to Jaime

    I wish some of my fellow developers would read error messages just a little more often...

  • Lothar (unregistered)

    I also like the omission of the and-operator:

    if (filter.InternesKennzeichen != null) { if (filter.InternesKennzeichen.Trim() != String.Empty) { maxLength = getmaxLength(maxLength, AV_MessagesTexte.Reportliste_sf_internesKennzeichen.Length); } }

  • Nick (unregistered) in reply to Bim Zively

    How do people post replies that quote the original message? I have never found the way to make that work…

    Anyway… Bim Zively, you said “I wish some of my fellow developers would read the error messages just a little more often…”

    Once you realise that a “developer” is just a user of the source code (vs. Normal users, who are users of the compiled application), the world makes a LOT more sense. It’s just Users all the way down…

  • (nodebb) in reply to Nick

    How do people post replies that quote the original message? I have never found the way to make that work…

    Copy from the article or the other message, paste in the new message?

    Well, that's how I do it...

  • (nodebb) in reply to Nick

    How do people post replies that quote the original message?

    It's Markdown, so you copy the text you want to quote and prefix it with a > sign like this

    > How do people post replies that quote the original message?
    
  • (nodebb) in reply to jeremypnet

    Wait, these comments support Markdown now?

    Let's find out

    Let's find out more
    

    I've always used [ quote]Text...[/quote], minus the space after the first [

    Addendum 2025-03-19 08:11: Well damn, it really does support Markdown

  • Craig (unregistered)

    The great thing about the handler is that it shows the message, then proceeds to carry on like nothing happened. It's a wonderful combination of annoying the user and an effectively empty catch block.

Leave a comment on “Spaced Out Prefix”

Log In or post as a guest

Replying to comment #:

« Return to Article