• Ritchie (unregistered) in reply to jwenting

    Some time in mid 1995, I infamously added a bad error message to a program. I think there was basically a state machine algorithm to calculate the next state from the previous state using a switch statement. There were a finite number of states so the code (if it implemented the design correctly!) would never get to the default case, so I added a debug message saying "@rse - bug" for the default case.

    The next day, having had a good night's rest, I decided that it would be a bad idea if a customer ever saw that, so I changed it to something more innocent. Unfortunately, the build candidate was made from that morning's code before I had a chance to change it, and the "@rse - bug" message landed on a beta customer site about two weeks later.

    Fortunately, they saw the funny side.

  • (cs) in reply to jwenting
    jwenting:

    d4ddyo:
    Yowza. At $230 or $400 an hour, I'd expect there wouldn't be any errors to begin with.

    Get me a job paying that much and I'll try to not make errors. As it is I get (after taxes) something $10 an hour to write software so I'm excused.



    Not necessarily. You're comparing apples with coconuts. The hourly rate paid by the customer is quite often 5 to 10 times of what the consultant actually makes after taxes, expenses, adjustment for times when he has not paying customer, and (especially) the profit of the consultancy company. So the guy with the $230 rate may well actually earn only about 2 or 3 times as much as you do, though of course he may not deserve that either.
  • (cs) in reply to jwenting
    jwenting:
    brazzy:
    Anonymous:

    Here comes a nitpick! That is the Eclipse icon in the corner there, so this was Java code.



    Which means that "5"  was the message text of the exception. and the WTF of not using strerror() to provide a meaningful error text probably lies within the VM.

    No, the SWT component used here is a heavy component backed by C or C++ code (and is platform dependent).


    Um, how could the GUI component used to display the error message be itself the source of it? Why would a GUI component generate an IO error? Actually, it outright says that the error occurred during a refactoring operation, which I am rather certain is implemented completely in Java (no reason for it not to be).

  • Markus (unregistered) in reply to black_rock
    Anonymous:
    And thus did he reinvent the wheel. As I recall Java already has AssertionError for that purpose. Btw which is easier to understand/write/whatever: assert(var); (C) or if (!(var)) throw new AssertionError(var); (Java)

    In java 1.4 and newer, one can write "assert statement;" and then even selectively enable and disable the assertions at runtime via jvm parameters.

  • (cs) in reply to Javelin
    Javelin:
    Otac0n:
    Satanicpuppy:

    Yea, I had someone send me a screenshot of an error pop-up from a program I'd written. They wanted to know why this error code was, "This will never happen". You'd think I'd have known better. =P

    Raise your hand if you have ever made an eror message like this.

    *raiss hand*


    Yes, and I usually tell them that it was to make sure that whoever ended up troubleshooting/debugging it would know that it was something that was supposed to be impossible. That's important because it suggests that there's a deeper logic bug involved, so hopefully they'll know to look deeper and try to cure the disease, not just the symptom.

    'Course, this kind of message is more appropriate in an error-log for an in-house server app than a dialog for an end-user GUI app.

    I tried that at my first job. Had nearly 100 errors that were something like "Internal software error, this cannot happen at object Foo:bar line 35". About 5 of those errors were seen in test (I really miss the test department there, now the most test my code gets is someone reading the welcome screen for grammar), and I quickly fixed 5 bugs that otherwise would have killed the customers (As in the FDIC would shut them down). The language did not have asserts, which is what I'd try to use now.

    Despite those fixes, management got a list of all errors and made me remove all the can't happen ones, because they look bad to customers. Actually I was allowed to keep any that I could tell support what the customer should do - but since they were can't happen cases I didn't know.

  • (cs) in reply to Satanicpuppy
    Satanicpuppy:
    Anonymous:
    I was bored at work one day and took to running QuickBooks through a debugger, I found the following message box is possible is an item in the db file is not set to 1... http://www.red-stars.net/pictures/quickbooksdebug.gif


    Haha, that's classic! I put my name in it if I'm working in one place for a long time, because if someone hit's one of THOSE conditions, I want to know about it, but I take all that stuff out when I leave, so no one comes around to reproach me with it later.


    How do you put quickbooks through a debugger?
    We are getting a weird error over here that their support could not help us resolve.

    Thanks,
    Dan
  • (cs) in reply to Kiss me, I'm Polish
    Anonymous:
    Ytram:
    And I hate the captcha shit. It doesn't work properly. Get rid of it (please).


    You can take steps to get rid of it, so why don't you?  Just register and you won't have to deal with the captcha.

    Nice try. You want me to register so you can send me more "enlarge your penis" emails. Gotcha. Nah. Captcha.

    For what it worth, I have not seen more Spam since registering here. I don't think Alex is immoral enough to sell my email address. Even if he was, I don't think he has enough to make money, and he is unlikely to get that many registrations.

    I know the Captcha is annoying. However any message board, such as this one, will get tons of "enlarge your penis" Spam each day if they do not take basic precaution to prevent computers from submitting it.

    There are people who write programs with the sole purpose of submitting such junk to as many message boards as they can. If you want to get rid of the Captcha you need to start murdering anyone who would write such a script. When you are able to kill everyone involved in this within days of their starting the problem will solve itself. Just don't make a mistake, because the moment you get an innocent by mistake (and the bad guys will look for way to place the blame on an innocent long before they give up) everyone will be calling for your life.

  • (cs) in reply to jwenting
    jwenting:

    d4ddyo:
    Yowza. At $230 or $400 an hour, I'd expect there wouldn't be any errors to begin with.

    Get me a job paying that much and I'll try to not make errors. As it is I get (after taxes) something $10 an hour to write software so I'm excused.



    His company was billing that much. He's not making nearly that rate in salary.
  • (cs) in reply to dpm
    dpm:
    LaurieF:

    Here's what I got on my Mac last week:

    [image]

    What I like is that it is 80% of the way through.



    2023406814  == 0x789ABCDE

    I'm sure it's just a coincidence, though.

    ok
    dpm


    dpm, how much time do you have on your hands?  How the hell did you notice that?
  • (cs) in reply to Otac0n
    Otac0n:
    dpm:


    2023406814  == 0x789ABCDE

    I'm sure it's just a coincidence, though.

    ok
    dpm


    dpm, how much time do you have on your hands?  How the hell did you notice that?


    It's no big deal.  I simply memorized all the interesting hex values and their decimal equivalents.

    ok
    dpm
  • Anaerin (unregistered) in reply to dpm

    Curiously enough, I clearly recall, whilst copying 23Gb's of data on a Win2k machine, the progress bar going absolutely nuts, With the bar filling to 100% every few Gb's, and the "Time Remaining" having values like "-216978775462 hours" (From memory, but it was DEFINATELY a negative amount.

    I think various flavours of Windows have bounding problems (Using int, not bigint, or larger).

  • Raynet (unregistered) in reply to Anaerin
    Anonymous:
    Curiously enough, I clearly recall, whilst copying 23Gb's of data on a Win2k machine, the progress bar going absolutely nuts, With the bar filling to 100% every few Gb's, and the "Time Remaining" having values like "-216978775462 hours" (From memory, but it was *DEFINATELY* a negative amount.

    I think various flavours of Windows have bounding problems (Using int, not bigint, or larger).
    Yup, all versions of Windows do this. It usually happens when you copy big number of files with different sizes, like couple 4GB DVD-images and 10000 small (couple KBs each) files. And it happens easier if the target or source has low transfer speed.
  • Frakkle (unregistered) in reply to hank miller

    > And I hate the captcha shit. It doesn't work properly. Get rid of it (please).

    What doesn't work about it?  It works fine..

  • Tyler Knorr (unregistered)

    Dude, you find the funniest stuff!:D
    You could sell some of this to anywhere for maney! Good work!

  • (cs) in reply to Satanicpuppy
    Satanicpuppy:
    Yea, I had someone send me a screenshot of an error pop-up from a program I'd written. They wanted to know why this error code was, "This will never happen". You'd think I'd have known better. =P

    Hahaha... In one of my last projects, I had left an error message that said something like "This should never happen. If you have reached this point, something terribly wrong must have happened."

    I really hope no one reaches that point.

  • Hrishikesh (unregistered)

    And just check out the javadoc comments behind the dialog in the last one. "Constructor", "Return the value".

Leave a comment on “Pop-up Potpourri: Sixth Time is the Charm”

Log In or post as a guest

Replying to comment #:

« Return to Article