• snoofle (unregistered)

    If I had a nickel for every time I had to fix something where someone didn't code for a condition that could never happen...

  • Quite (unregistered)

    I would have thought that would be one of those legendary incidents that one would grow to be proud of ...

    "Oh hey, you're the Ragnarok guy! Nice one!"

    And yeah, he learned something in the process. No WTF, an amusing and colourful incident only.

  • Warren (unregistered)

    So, [how] did the rm command fail silently?

  • AWK (unregistered) in reply to Warren

    With the OS in question being Xenix, the proper question to ask is "Which of the multitude of silent failures was responsible?"

  • Joe (unregistered)

    an 1985 system had flash firmware setup that works as a file system?

  • (nodebb) in reply to Joe

    Flash? I doubt it. Actual disks is more likely. Check the OS: Microsoft Xenix. That was a thing. A UNIX-alike that was licensed from AT&T by Microsoft. It ran in 286 (16-bit) protected mode on relatively ordinary PCs. They later transferred the license to the Santa Cruz Operation (NOT "The SCO Group"...).

  • Bob (unregistered)

    Nice! That's the kind of story that earns you your spurs. We all have battle scars...many self-inflicted ;)

  • DrPepper (unregistered)

    Once apon a time, before there were PCs, I wrote a program that had a bug in it. This was at the University of Minnesota. In those days, you never saw the computer you were working with. You typed in your code into a file, saved it, and ran it. The computer you ran it on was located in a facility about 10 miles away from the university. Output, if any, was printed at that facility and driven by truck to your building. You'd get the output hours or even days later.

    Well, my code had a bug in it, and since there was no such thing as interactive debugging, I put in a print statement to print a "*" at a particular point in the code. I ran it, and sat there wondering what was going on when my program continued to run for several minutes. I broke out of the program, and fixed the bug (it turned out to be a language "feature" I had to work around).

    Later that day, I recieved a stack of fanfold paper about 3 inches high, with nothing but lines and lines of "*".

  • Herby (unregistered)

    Let's see:

    1. The impossible WILL happen.

    2. Cute error messages are nice, but they ARE public.

    3. Messaging to 'all' is a bad thing.

    4. Paging to 'all' is worse.

    5. Xenix. Then again, on the TRS80 Model 16 is wasn't too bad (it had a 68000 processor which cures many ills)

    Lesson(s) learned!

  • Jerome Q. Developer (unregistered)

    Everyone has done this at least once. The mark of a really good developer is they don't do it twice.

  • Jahon (unregistered)

    Sweden and cubicles? Cant believe that. Only in 'murica there are cubicles.

  • disillusioned (unregistered)

    I've simply stopped believing in impossible code states. Nearly every time I try to gloss over something that "could never happen", it bites me. I see (daily) developers talking about reported issues as impossible, assume the user is lying, or misreporting. Sometimes it's a user issue, but just as often it's a false assumption about the system that is preventing someone from accepting the situation.

    int i = 0; // i is now set to 1

    This /can/ happen. Sure it's unlikely, but assuming it's impossible excludes the external factors outside of the code itself; maybe corrupted memory, faulty compiler, hidden gems in the program that modify basic behaviour, threading, .... The real question is how much time you're going to spend safeguarding your code as opposed to the cost of unlikely failure.

  • Foo AKA Fooo (unregistered) in reply to Jahon

    What makes you think it's really in Sweden? It's an Erik Gern article. He likes to theme his articles. Ragnarok is the theme here, so it's set in Sweden. Previously we had a quixotic quest (in Spain) and a ninja (in ... erm ... well ... Germany). #lastnightinvalhalla

  • Gene Wirchenko (unregistered)

    I have a piece of software that I use for generating sort of the code for form classes. I was doing some extensive changes to part of the client billing system I maintain and made one change that did not work. The error message I received from my code generation program was not clear. Fortunately, I had the source and was able to hunt down the error message. I then added a word to make the error message clear and adjusted the date modified. The last modification had been just a few days short of 6 1/2 years prior. All that time, the code generation program had been working fine, and I had not seen that error message.

    The author of the program? Me. Clear error messages help everyone.

  • johnr (unregistered)

    My roommate in college, who was a CS major, was asked by a professor to help figure out what was on a reel of half-inch mag tape. (Hey, this was in the '70s!) After working on it for a few days and looking at the first few records on the tape he was sure he had figured out the format and turned his program loose on it.

    The next day he went to the computer center to pick up his output: an entire box of 132-column green-bar paper covered with ... gibberish. He was persona non grata at the computer center for the rest of the year.

    On the upside, however, he was able to provide our fraternity with scratch paper for very long time.

  • Torontonian (unregistered) in reply to Herby

    Re: "Xenix. Then again, on the TRS80 Model 16 is wasn't too bad (it had a 68000 processor which cures many ills)" -ah, I remember the days when I was a wee little lad taking a computer science course on those TRS80's, we called them the "Trash 80's"!

  • WonkoTheSane (unregistered)

    I was once working on a mess of a classic asp application which had a particularly nasty lookup to the database and then a series of nested for loops (depending on the data returned from the database up to 15 nested loops).

    One particular day I was looking for a bug, and I was fairly sure it was in one of three of the nested loops.. so I did what any sane person would do, I put some debugging code in there to spit out a block of java script to pop up an alert... First block alert('Inside the first loop'); Second block alert('Loop 2'); Third block (where I was convinced the issue was : alert('ITS MONKEY TIME!!!);

    Anyway, the issue was in the second loop, resolved the issue, removed the debug code tested, deployed.

    A few weeks later I get a call from a friend who works in support

    Him : "Whats the time?" Me : "About 2:30, why?" Him : "Thats not what bridgets computer says" (Bridget is the client) Me : SUDDEN REALISATION "F**K"

    They saw the funny side as the conditions to trigger it were pretty strange so we didnt think any actual customers would have seen it... I learned a lesson that day.

  • WonkoTheSane (unregistered)

    Unrelated to the above but still funny.. My first job in IT before I got a development position was working for a small computer sales/repair shop doing tech support and repairing/building computers. There were around six of us and we worked in a small warehouse type building with benches down both sides and racks/shelves for PCs at the back. Each of us had a bay with one CRT a KVM, three keyboards and three mice, so we could work on three PCs at once.

    The bay opposite mine was the one occupied by Ralf, Ralf had the dubious honour of going to the front desk when customers came in because his bay was the closest to the door, so his bay was often unoccupied.

    One day, bored, I decided to have a laugh and took the keys from a few of the keyboards and changed the middle row on one keyboard to read SUCKMEOFF - I was quite young and this was in keeping with the general level of humour.

    Ralf could touch type so it took a while for him to spot it.. but he did, we all had a laugh and that was the end of it...

    BUT because ralf could touch type he never bothered to change it back.

    Several months pass by, one day a call comes in, this butt nugget of a customer needs ANOTHER keyboard because the one we gave him didnt work (This was his third set) - the call comes from management - hes not getting another new keyboard and mouse, give him an old one.

    As I said earlier, Ralf didnt use his bay as often as the rest of us so his kit was cleaner than everyone elses, so the mobile repair guy grabbed the cleanest keyboard and mouse and left... 3 hours later we are all having a break and the penny drops, I think a few of us realised at the same time - there was a shared look of horror and some frantic calls to the mobile repair guy, we got him literally as he pulled up outside the customers house - The van carried spare parts so I had to pay for a new keyboard and mouse for the guy, but luckily that was as far as it went, the keyboard was returned and put on my bay as a reminder of the day I almost got fired.

  • n00b (unregistered)

    I don't understand why there were so many printed lines/SMSs etc? Is it implied that Jonah's code was being executed repeatedly by some unmentioned calling code? Or was it something that Jonah did that caused the multiplicity?

  • n00b (unregistered)

    And sorry about the whale of a mistake with your name, Johan.

  • Doug (unregistered)

    I've put in bizarre user-visible text and had it work out well.

    The software was a collection of apps that used Paradox as their database engine. Whenever one of the apps died (which was fairly often -- this was Windows 9x), the Paradox lock files it had created would not get cleaned up on exit, and would cause everything to run slowly until you deleted them. But woe betide he who deleted lock files while a program was still actually running -- that would prevent apps from knowing that other apps had a valid lock on something.

    So I wrote a utility to let users delete lock files. And the dialog to do that had a banner at the top saying, in large letters, "Danger Will Robinson". And then a bunch of text explaining that you should be absolutely sure that all apps were closed before you deleted locks, and then a button with text something like "Yes, I have read the above and I really want to delete the lock files".

    The good bit was that whenever I talked a user through this on the phone, when they got the dialog visible, they would say, unprompted, "Danger Will Robinson". And so I would know that they were in the right place.

  • Hannes (unregistered)

    The closest like this that I have done is this:

    For testing purposes I set the UserID to a certain female co-worker who I thought was rather cute (yeah, I'm a happily married man, but that doesn't make me blind, ok? :( ). I planned on changing it back to read the UserID of the user who actually logged into the program, but you know how it is: You get distracted, you forget about it and then it goes live. A few weeks later I got a call asking why everything the users did in the program was logged as "certain female co-worker". I could easily talk my way out of it of course and no damage had been done. But this is a pretty good reminder that you don't do anything stupid while coding, like printing out profanities. Even if "ah, this will never happen" is true, some time someone WILL see this message (another developer, maybe). So never ever write a message like "fuck you you fucking fuck" in code, EVER.

    As for the story: NEVER sent an error message to "[email protected]". That alone is a huge wtf. If something fails, mail the person who cares. NOT ALL!

    IF you sent out messages, or print messages, or whatever. Make absolutely sure you only do this ONCE! If everything else fails, include a time check or something like that. "IF time == LocalTime.Midnight sendMessage" prevents that the message is being generated over and over and over again.

  • Kaewberg (unregistered)

    Actually it was a C program. The condition was that unlink had succeded with no error, but b/c sheer paranoia there was then a stat right after to make sure the file was REALLY REALLY gone. So Ragnarok occurs when the file is succesfully unlinked, but is still present. Oh, and it wasn't a dot matrix printer, it was a 2000 lpm line printer behemoth :-)

  • Kaewberg (unregistered)

    PS The message was of course being dumped to the printer in an infinite loop :-) We might as well all go out in style since the world is ending. And I actually had a room, not a cubicle, but we were four guys in it so much the same effect

  • Hannes (unregistered)

    Even when the world ends we can go easy on the resources. After all, there allways will be survivors and I'm sure they're happy about every bit of unsed printer paper they can find! :P

  • Yazeran (unregistered) in reply to Hannes

    Yep.

    We have all done some stupid things in the past.

    For me fortunately the 'cant happen' error was merely a ST reference: 'Space time discontinuity error: you can not reserve in the past' and yet the uses managed to provoke it although the application should have prevented that error in the database from ever being encountered....

    And regarding error emails, once (some 15 years ago) a coworker of mine set up a monitoring script for a experiment where a certain researcher should get a mail if the voltage got below 0.5 volt (it also tried to correct the experimental conditions ensuring only one email). Guess what, day after Christmas, some error not expected by the script happened (and the actions programmed in the script did not alleviate it), and for the rest of the Christmas holiday (some 1.5 weeks) he got an email EVERY MINUTE notifying him about it... Needless to say he was not happy..... (and it took IT a long time to filter all those mails out of his mailbox)

  • Dyspeptic Curmudgeon (unregistered)

    You all know Murphy's Laws. And then there is: Dyspeptic Curmudgeons' Corollary.

    All laws of chemistry and physics to the contrary notwithstanding, if is happened, it must be possible.

    (Said Corollary being the result of an epiphany while listening to one side of an urgent telephone call: 'What? But that's impossible!')

  • Hannes (unregistered) in reply to Yazeran

    Did the researcher at least had set up an "Out of office" automatic reply? And then when the mail server couldn't deliver the message it would reply with "cannot deliver this message", which in turn generated yet another "Out of office" automatic reply? :D

  • Yazeran (unregistered) in reply to Hannes

    Nope, but at an other time (right after we switched to exchange) one researcher set up an autoreply, and just wanted to test it so he sent himself an email... Due to a misconfiguration in exchange it sent an autoreply back......

    Took IT some 4 hours to untangle the mail spool (as he did his test in a weekend...)

  • Loki (unregistered)

    We have had a "this should never happen" error message regularly for the last couple of years now. It's not fatal, but no one has found the real cause yet

  • wizzleard (unregistered) in reply to Dyspeptic Curmudgeon

    Hancock's law: "Any sufficiently complex system will appear to exhibit non-deterministic behavior". Yeah, I know you already rebooted, do it again.

  • Beta (unregistered)

    In my first job out of grad school I had to write some code dealing with aircraft hulls, modeled as closed surfaces, based on an algorithm of my own invention. Along the way I discovered an error condition that was mathematically possible, but could never really happen in an aircraft built in 3-dimensional space. So out of a sense of aesthetics I wrote code to catch it and print an error message.

    On the very first batch of "real" data they give me, sure enough:

    WARNING -- KLEIN BOTTLE TOPOLOGY
    
  • Matthew (unregistered) in reply to disillusioned

    You say "could never happen" states happen, but I've already stripped this out of our codebase. It is not alone:

    if ($foo == $bar) { <thing> } elsif ($foo == 0) { <other thing> } elsif ($foo != $bar) { <more thing> } elsif (1) { <stupid thing> } else { <dear god why?> }

  • Matthew (unregistered) in reply to Matthew

    So trwtf is this comment form?

  • Matthijs (unregistered) in reply to Yazeran

    I've been bitten by reservations made in the future as well. Turns out, if your users are all set to use daylight saving time, and your server is not, and you rely on the time provided by your users, things can go south faster than you can say "how on earth did you make an appointment for half an hour ago?!"

  • dime (unregistered) in reply to disillusioned

    If i is now 1, what makes you think your if condition is intact? Or your instructions, for that matter! There's a certain point where you say screw it, any test I could do for this fault might itself be corrupted.

  • dime (unregistered) in reply to Dyspeptic Curmudgeon

    All laws of chemistry and physics to the contrary notwithstanding, if it happened, the user is probably lying.* (In 9/10 cases, anyway)

  • (nodebb)
    test
    test2
  • (nodebb)

    [bold] test [/bold] test2

    Addendum 2017-07-28 07:50: a

    Addendum 2017-07-28 07:51: b

  • (nodebb)

    hello

  • (nodebb)

    [code] goodbye [\code]

  • (nodebb)

    hello hello goodbye fuck off dogshit

  • (nodebb)

    boldbits

  • (nodebb)

    under_li_ne bits but not other bits

  • (nodebb)

    wtf

  • (nodebb)

    wtf

Leave a comment on “Dot-Matrix Ragnarok”

Log In or post as a guest

Replying to comment #478506:

« Return to Article