Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Examples of Programming Gone Wrong? 674

LightForce3 asks: "I'm a beginning CS student, and in my studies I've come across examples of programmer error causing very large problems, such as the Ariane 5 failure and the Therac-25 accidents, often as tales of caution to beginner programmers such as myself. My (morbid?) curiosity has been piqued, and I'm looking for other examples of programmer error leading to serious problems. After all, it is better to learn from the mistakes of others than from your own, right? ;) What programming-related accidents, incidents, and failures, both well-known and obscure, do Slashdot readers know about, and are there any good resources for researching these?"
This discussion has been archived. No new comments can be posted.

Examples of Programming Gone Wrong?

Comments Filter:
  • by darylp ( 41915 ) on Sunday October 27, 2002 @02:46PM (#4542348)
    When Programming goes Wrong 2! Thrill to our latest reality TV series where we show REAL LIFE footage of poorly thought out database schemas, unchecked buffers and even explicit shots of forbidden goto statements.
    • You thought they haven't featured that before? :)

      Once on TV there was a documtary on a history of computers, talking about Pascal, father of computers, the first programmer, the first vacuum tube computer, and....the first (real)bug found - in closeup shot!

      I found this extremely amazing and couldn't even move my eyes away throughtout the show. Then I found my wife and my mother-in-laws fell into deep coma on sofa...

      Damn! I should have taped the show!
  • by spanky555 ( 148893 ) on Sunday October 27, 2002 @02:47PM (#4542357)
    This book is devoted to just that. It's what you're looking for...go get it and read it.
  • by Kircle ( 564389 ) on Sunday October 27, 2002 @02:48PM (#4542358)
    http://slashdot.org/articles/99/09/30/1437217.shtm l
  • Here are my Top 4: (Score:5, Informative)

    by ekrout ( 139379 ) on Sunday October 27, 2002 @02:48PM (#4542362) Journal
    • by GuyMannDude ( 574364 ) on Sunday October 27, 2002 @05:21PM (#4543252) Journal
      People keep pointint to the floating point error as the cause for why the Patriot system at that time (the PAC-2) let that scud go through. But as I've already pointed out in an earlier post [slashdot.org], the PAC-2 did a crappy job (far worse than is generally known) intercepting scuds not because of coding errors but because the problem of hitting an erratically moving missile was so difficult. I think it's important to get the word out as we approach a new war with Iraq and consider a national missile defense shield. This recent article [atimes.com] briefly discusses Israel's own attempts at missile defense because they don't trust the PAC-2 (for good reason) and it's questionable whether the US is going to give them some PAC-3 batteries.

      Bottom line: that stuff about the floating point error in the PAC-2 system looks neat on paper but it's not at all clear that the faulty calculation was responsible for the loss of life.

      GMD

  • RTM Worm (Score:5, Interesting)

    by rwash ( 16296 ) on Sunday October 27, 2002 @02:48PM (#4542368) Homepage
    In the 80's, Robert T Morris accidentally released a worm that exploited problems in sendmail and other common internet daemons that took down most of what was the internet at that time. This was expecially bad since about half of it was military.
    • The only reason it took thigns down was because a timing loop was messed up, and it was spreading something like 1000 times too fast. It was supposed to spread everywhere, yes, but by crawling slowly.. it was not intended to eat up all connections on all machines.

      Had that been the case, it would have been much more widespread and caused much less damage.
    • Re:RTM Worm (Score:5, Interesting)

      by ProfessorPuke ( 318074 ) on Sunday October 27, 2002 @09:17PM (#4544315)
      "accidentally released" is wrong, or prehaps whitewashing by RTM's friends. The release was fully intentional. What was accidental about it is that he hadn't realized that in addition to infecting virtually every UNIX system it found, it would also DOS them. The worm constantly tried to infect every available system, meaning that a system which was vulnerable would recieve many, MANY copies of the worm, exhausting its processing power.

      RTM had been aware of the possiblilty, and implemented a fix- but he did it wrong. He'd created code so that a new worm, when first arriving at a host, could check if a previous instance of the worm had been there. If so, it could abort its infection process.

      However, he was afraid that this would make vaccinating machines too easy (by sysops faking the "already infected" flag), so he created a 12.5% random chance that an incoming worm would ignored the fact that a machine was already compromised and infect it again. That probability had NO rational basis behind it, (in fact the whole idea of using randomizing like this is flawed), and served to postpone the shutdown of the internet by at most an hour.

      This was an especially bad blunder because it set a frightening example of what hackers could do. If RTM had used a 100% chance of non-reinfection, (and played his cards right from then on), he'd have been hailed as an innovative security analyst who'd prevented security-compromising violations of the Pentagon's systems. Instead he was tossed in prison for years.
  • Y2K? (Score:5, Insightful)

    by Monthenor ( 42511 ) <monthenor@@@gogeek...org> on Sunday October 27, 2002 @02:49PM (#4542373) Homepage
    ...wherein a technique to save memory on older computers resulted in a massive media panic twenty years later. Oh, and it caused a couple glitches
    • Re:Y2K? (Score:4, Funny)

      by Citizen of Earth ( 569446 ) on Sunday October 27, 2002 @07:54PM (#4543941)
      wherein a technique to save memory on older computers resulted in a massive media panic twenty years later.

      Yeah, we fleeced 'em pretty good, eh. We should do that again in 2038 in order to pad my retirement account!
    • by achurch ( 201270 ) on Monday October 28, 2002 @01:19AM (#4545348) Homepage

      If the Y2k bugs hadn't been fixed, things would have broken left and right, and we would have been blamed for not fixing them ahead of time.

      Since the Y2k bugs were fixed, very few things broke, and we got blamed for wasting tons of money to no effect.

      C'est la vie, I guess.

  • by Bolen ( 4896 ) on Sunday October 27, 2002 @02:50PM (#4542385)
    A Central Office (CO) switch is basically a mainframe-class computer programed in assembler. A few years back, a newly-installed switch failed due to a bug in the code, causing a cascading failure of the phone system for a few hours.
  • See RISKS Digest (Score:2, Informative)

    by sotweed ( 118223 )
    ... distributed by SRI. You can browse the archives at http://catless.ncl.ac.uk/Risks

    This is probably the broadest and best source for this kind of information.
  • Risks digest (Score:5, Interesting)

    by wik ( 10258 ) on Sunday October 27, 2002 @02:52PM (#4542394) Homepage Journal
    I'd suggest reading The Risks Digest [ncl.ac.uk]. Its topics tend to be on computer systems and the risks (monetary, time, life, political, etc...) associated with them over the past 17 years or so. Just be aware of the witty remarks the moderator makes.

    As far as other death-inducing systems go, you might be interested in, computer controlled plane accidents (airbus, anyone?), unmanned trains, and nuclear reactors are some classical favorites.
  • by photon317 ( 208409 ) on Sunday October 27, 2002 @02:52PM (#4542396)

    tried to write a peice of software called Slashcode. Look at what happened.

  • Shared Source [microsoft.com]

    Just fill out the forms, sell your soul, and you can browse programming errors for rest of your natural life - and that's supposing that viewing this code won't make you slit your wrists in dispair.

  • by teamhasnoi ( 554944 ) <teamhasnoi AT yahoo DOT com> on Sunday October 27, 2002 @02:53PM (#4542402) Journal
    Professor Falkin was always saying, "Leave a backdoor in any program you write, just in case your code becomes self-aware."
  • RISKS Digest (Score:4, Informative)

    by BinBoy ( 164798 ) on Sunday October 27, 2002 @02:54PM (#4542413) Homepage
    The RISKS Digest is a mailing list and usenet newsgroup that describes all kinds of situations where technology has gone wrong. Many of the stories involve programming errors.

    Google's RISKs Archive [google.com]

  • by Scarblac ( 122480 ) <slashdot@gerlich.nl> on Sunday October 27, 2002 @02:55PM (#4542422) Homepage

    Outlook!

    Built with the idea that code in attachments should be executable, often automatically. Also full of exploitable bugs, to get even more stuff running automatically, regardless of who who sent it. Responsible for a huge amount of damage by all sorts of worms, trojans, etc.

    Someone, somewhere got the idea that email would look better with html; and if it got html, it should get scripting too, that's consistent with web pages! And it's cool if attachments (like pictures) can be opened in their appropriate program automatically - let's run any executables then, that's consistent!

    This is oversimplified, but I really feel that this is a case of stupid consistency that caused multi-billion dollar damage. Email should never be executed by the mail client.

    • by illsorted ( 12593 ) on Sunday October 27, 2002 @03:58PM (#4542797)
      I don't know which is funnier, this post, or the fact that it's modded "+4: Flamebait".
    • by billbaggins ( 156118 ) on Sunday October 27, 2002 @05:30PM (#4543290)
      Not quite. I don't think even Outlook was ever set to just run code automatically. What went wrong was that for a long time (and, in unpatched versions, even today), Outlook would implicitly trust the "Content-type" header for an attachment or message, and, if it was a "safe" type (like text/html or image/jpeg) then the attachment would be handed off to the document-opener to be rendered & displayed inline. Problem was, the document-opener didn't go by the MIME type but by the extension. So if you had something like
      Content-type: image/gif
      Content-disposition: attachment; filename="fux0r.scr"
      then the document-opener would say "ah, this is a screensaver, I should execute it" and before the poor user knew what was going on, all hell was breaking loose...
  • by Ghoser777 ( 113623 ) <fahrenba@NOsPAm.mac.com> on Sunday October 27, 2002 @02:57PM (#4542438) Homepage
    A clear example is: [insert random microsoft product].

    Oh wait... -1 Redundant

    Here's a good site [tu-muenchen.de] though with tons of examples.

    My favorite would be the infamous [fas.org] time when NASA did half its calculation in metric and the rest in SI. ;)

    F-bacher

    • that was not an error in the programming... some dumbass gave all the calculation in English units for acceleration to the programmer who writes his program using SI for units (or metric... same thing...).
  • Failures (Score:4, Informative)

    by Jordan Graf ( 4898 ) on Sunday October 27, 2002 @02:57PM (#4542439)
    MIT runs a class called 6.033: Computer Systems Engineering. These [mit.edu] lecture notes contain a list of projects that had great sums of money spent on them only to be abandoned. Also the reading list [mit.edu] has a bunch of papers that discuss the "big splash" failures like Therac 25.
  • but couldn't find it.

    Anyway, here are a couple of links.
    Software horror stories [tau.ac.il]
    More horrors [yorku.ca]
  • A Great Story (Score:5, Interesting)

    by puppetman ( 131489 ) on Sunday October 27, 2002 @02:58PM (#4542452) Homepage
    that was told to my class about the altitude of fighter jets.

    A company was hired to rewrite the code that was used on one of the models of fighter jets, and they offered to fix an unusual bug.

    The details are: apparently they had two altimeters - one was barometric, and the other I don't remember.

    Anyway, the programmer was coding along, and was writing code to determine what would happen if the altimeters stopped functioning.

    He came to the case where they both weren't working, and couldn't figure out what to do, so called one of the pilots that was acting as an information source for the developers, and asked him what altitude they normally flew at, and he answered, "12,000 feet" or something similar.

    So the programmer wrote,

    if altimeter1 not working
    {
    if altimeter2 not working
    {
    set height = 12000;
    }
    }

    Stupid, but this code could not be changed. The pilots had the following rule deeply ingrained: if the altitude stays at 12,000 for more than a few seconds, pull up, as your altimeters aren't working.

    • by Ghoser777 ( 113623 ) <fahrenba@NOsPAm.mac.com> on Sunday October 27, 2002 @03:02PM (#4542470) Homepage
      Wouldn't setting it to something like 0 be better? I mean, I could miss it sticking at 12,000 for a while, but if I notice that my altitude is suddenly 0, I think my first instinct will be to pull up as fast as possible.

      F-bacher
      • by pongo000 ( 97357 ) on Sunday October 27, 2002 @03:28PM (#4542627)
        Wouldn't setting it to something like 0 be better?

        In most areas of the world (unless you're flying over the Dead Sea, or Death Valley, or New Orleans), if your altimeter reads 0, you're probably already dead. Altimeters used for navigation read MSL (height above mean sea level), not AGL (height above ground). There are radar altimeters that read in AGL, but these are used for close-to-ground maneuvers like landing.
      • by pete-classic ( 75983 ) <hutnick@gmail.com> on Sunday October 27, 2002 @05:44PM (#4543345) Homepage Journal
        From a text I am currently working on:


        The compiler requires you to declare variables, but does not require you to initialize them. Does that mean you can get away with leaving them uninitialized? Well, you might program your entire life without coming upon a reason not to. If you don't initialize them, however, you will almost certainly run into a very difficult bug, probably sooner than later. Using an uninitialized variable is perfectly valid syntax, but is always a logic error. The compiler won't complain, but you will get wild, unpredictable, and wrong results. In the worst case, you might get believable, but wrong results. This leads us to what to use as an initializer. Most people use zero. Using an "obviously wrong" value may be more useful. Often a maximal value (such as int students="65536") is more obviously wrong. [Emphasis added for this post.]


        This isn't variable initialization, but the principal replies. Data that you know are junk should look like junk! Trying to "fake it" or make it "look good" is exactly the wrong thing to do.

        -Peter
    • Re:A Great Story (Score:4, Informative)

      by florescent_beige ( 608235 ) on Sunday October 27, 2002 @08:28PM (#4544112) Journal
      Speaking of aviation: This SAAB Gripen crash [canit.se] was attributed to the coding of the control laws in the flight control computer. So was this [ncl.ac.uk] one. And this [google.ca] F-22. And lets all remember the Apollo 11 [nasa.gov] incident.
  • by solostring ( 620535 ) on Sunday October 27, 2002 @03:03PM (#4542474) Homepage
    I used to work for a 1999/2000 'golden child' dot-bomb which dealt in file trading... a proposed legal form of napster. It was a fucked company from the start, but it still had a lot of traffic in the early days.

    We always had problems with downloading files from the site.... the files kept getting corrupted, and occasionaly, a member would complain that they tried to download a powerpoint presentation and ended up getting 4 way anal porn.

    This perplexed the developers, and it was not until 9 months after going online with the site, did they realise that the java class that dealt with the downloads was a single process shared by all users! :)

    So, your download would go ok IF nobody else tried to download at the same time. If two people clicked download at about the same time, you would download the file that the second person wished to download.

    No wonder they went bankrupt :)
  • Easy, (Score:5, Funny)

    by Phoenix666 ( 184391 ) on Sunday October 27, 2002 @03:03PM (#4542476)
    When they played Heidi over the end of the greatest come-back in football history. Oh wait, you didn't mean that kind of programming, did you?
  • Don't be so narrow (Score:5, Insightful)

    by coyote-san ( 38515 ) on Sunday October 27, 2002 @03:03PM (#4542482)
    Don't be so narrow in your approach. Is it a programming error if a stadium roof collapses because the engineers couldn't understand what the output of their computer model was saying?

    What about when the construction crew quietly substituted what they thought was an equivalent design to what the computer program came up with for a skywalk over a hotel lobby?

    After almost 20 years in this field, I think that at least 80% of the serious "errors" I see are because the user didn't understand the results of the program, and only 20% of them are due to classic development errors.

    The lesson to learn from this: the user interface matters. Give some thought to presenting the information in a meaningful manner (e.g., the infamous pre-Challenger graphs showing O-ring erosion vs. the post-Challenger graph that mapped damage by temperature at the time of launch), and allow users to see the information in the way that makes the most sense to them.
    • by FattMattP ( 86246 ) on Sunday October 27, 2002 @05:00PM (#4543166) Homepage
      The lesson to learn from this: the user interface matters. Give some thought to presenting the information in a meaningful manner (e.g., the infamous pre-Challenger graphs showing O-ring erosion vs. the post-Challenger graph that mapped damage by temperature at the time of launch), and allow users to see the information in the way that makes the most sense to them.
      On a related note, a guy named Edward Tufte wrote a some books on just this type of subject. I believe it was called The Visual Display of Quantitative Information, or something like that. Basically, he goes show how thinking more about how you present the data can help you to communicate your ideas more effectivly. He also talks about the O-ring problem that you mention. He shows the charts from the NASA engineers and then shows the charts he had drawn. You could definitly see the problem much more clearly in his drawings.
  • Train collision (Score:5, Interesting)

    by Shaddup ( 615685 ) on Sunday October 27, 2002 @03:04PM (#4542489)
    A company I once worked for (as an intern) was in the business of what's called "train control" software. Briefly, it's the software that dispatchers use to monitor the status of the switches, the position of all the trains being tracked by the system, etc. One of the features of the system is to provide early-warning of potential collisions. Well, the system is quite reliable (having been in service, in one form or another, since the 70's). However, there have been some accidents.

    Once such accident, in Mexico, was caused by an unexpected combination of several simultaneous failures. One day, for some reason, one of the servers needed to be reset. At the same time, two freight trains were stopped at a switch, in the process of what's called a "pass," where one train turns off onto a side track to let the other train pass by on the main track. Long story short, the status bits of the switch got lost during the server reset (there is a provision for restoring track states when the backup servers take over, but it didn't work for some reason). After asking if the track was clear, the driver for train1 recieved a green light from the dispatch office. The dispatcher, not knowing that train2 hadn't cleared the switch yet, figured everything was ok. The trains collided at very low speed, and not head-on, but nonetheless the collision cost the rail line several million in equipment and downtime. No one was hurt.

    The lesson: When writing bullet-proof software, check every possible condition! More extensive field testing would have caught the failover bug.
    • Re:Train collision (Score:3, Insightful)

      by Reziac ( 43301 )
      IANAP, but I'd think your bulletproof software should also have some way to gracefully account for "impossible" conditions, which users are so clever at creating!!

  • by Anonymous Coward on Sunday October 27, 2002 @03:05PM (#4542492)
    I'm an AC for a reason...

    Let's just say that two years ago a very large international shipping company suffered two days of worldwide failure in the package routings printed on labels. The bug was caused by an incorrectly placed paren in an index offset calculation, leading to truncation of an intermediate result (to a 16 bit unsigned int, when it should have been 32). The bug sat dormant for five years because the result matrix it was indexing into was smaller than 64kbytes. As soon as it grew over that size - boom! What a way to wake up at 2am when the Asian-Pacific region starts calling...

    I didn't make it, but I was definitely involved with the fix. After that we did some very thorough auditing on all of the routing code - and fortunately didn't find any other surprises lurking.
  • Airbus (Score:5, Interesting)

    by That_Dan_Guy ( 589967 ) on Sunday October 27, 2002 @03:07PM (#4542503)
    This isn't really a programming error, but a user training error.

    In the Airbus if the pilot tries to correct (use the flight controls) while the computer is engaged the computer will correct the pilot's correction. Unlike in a car with cruise control where if you hit the breaks it just cuts the cruise control. Many China Airlines planes have crashed due to poor pilot training in this regard. They weren't trained well enough to shut off the computer control before taking control of the plane.

    I'm also sure someone can be a little more detailed than this, but it is, IMO, at least a design error that has caused hundreds of deaths.

    As a side note, my Software Engineer professor refused to ever fly on a fly by wire plane, and was opposed to SDI simply because he didn't beleive that either had been or ever would be debugged properly. (if there is one error in every 10,000 lines of code, and it has 3 or 4 million Lines of Code, how many errors is that? His answer: too many to trust)
  • by generic-man ( 33649 ) on Sunday October 27, 2002 @03:09PM (#4542515) Homepage Journal
    The article summary sounds oddly familiar: are you sure you're not in my Dependable/Survivable Systems [cmu.edu] class? We just covered Therac-25 and Ariane-5. There are a number of other readings [cmu.edu] on topics like dependability that you might find interesting.
  • deep c secrets (Score:5, Informative)

    by lylonius ( 20917 ) on Sunday October 27, 2002 @03:12PM (#4542535)
    Aside from being an excellent text on C Programming, the book, "Expert C Programming", by Peter van der Linden, discusses several such bugs.

    The 1993 $20 million SunSoft Asynchronous I/O bug.

    The 1961 Fortran subroutine used to calculate orbital trajectories at NASA for several Mercury flights.

    A discussion on the 1988 RTM worm.

    Sun's first internationalized Pascal compiler corrupt date strings.

    1961 Mercury software failure (. used instead of ,).

    1962 Mariner 1 software failure resulting in $12 million rocket and probe destroyed.

    among others.
    • The 1993 $20 million SunSoft Asynchronous I/O bug.

      So I looked this one up [ccu.edu.tw]:


      x==2;

      The programmer's finger had bounced on the "equals" key, accidentally pressing it twice instead of once.


      Uh, right... bounced on the key. The story is very light on details as to what the problem was, how they found it, how it slipped past QA, etc, but clearly this was a PROCESS error and not a design flaw.

      If a software bug is holding up the shipment of $20M worth of hardware, then Sun had some real serious problems besides shoddy programming. You don't commit millions of dllars to building hardware when you know there's a bug somewhere. that's just absurd.

      The programmer is really the last person to blame for the $20M backlog. I'd blame QA for signing off on the code, I'd blame the C language and their compiler for letting such a stupid typo slip through without a warning, and I'd blame the suits for trying to fit the software development cycle to their hardware release cycle. If the programmers are to blame at all, it's for structuring the program in such a way that such a bug could easily slip through - the typo itself it forgiveable. With just a few assert()s here and there, this kind of bug is almost impossible to write.

      You just DONT build production hardware when the software isn't ready yet. The system needs to be tested as whole. If the hardware works with a previous rev of the software, then that's all you ship, period.
      • Re:deep c secrets (Score:5, Informative)

        by pvdl ( 621000 ) on Sunday October 27, 2002 @10:10PM (#4544544)
        Sean,
        This was a real bug in Sun's async I/O library back in 1993. The bug had nothing to do with hardware. It had to do with sales. There was one specific customer who had some software that used the async IO library.

        By bad luck, their code tickled this bug (caused it to manifest). As a result, their application failed. By chance, they were on the point of buying $20M of sun servers. Recognizing that they had a huge amount of leverage, they told the salesman "Gee, we'd really like to sign the purchase order, but our app doesn't work, and we
        think it's a bug in your library."

        The salesman called thru to the kernel group and explained what was happening. The right developer (probably Dan) put aside ten other urgent things, and searched for this problem. It was not easy to find, but he did find it quickly, and issued a patch the same day. This almost never happens, but $20M is $20M.

        The customer tested the patch, and everything worked perfectly. The customer was happy. We were happy. And the salesman with the commission on $20M of server hardware was happiest of all.

        I don't understand that suggestion that "you just DONT build production hardware when the software isn't ready yet". Software is never ready. The FCS date is just a milestone on the continuum of evolving and improving the software. The truth is that all systems from all computer manufacturers are developed to the hardware schedule, and they ship as soon as the hardware is ready, in whatever state the software is.

        One of the biggest sins you can commit as a software developer is to cause a slip in the overall product because the software isn't ready.
        There are excellent economic reasons for this, but they are too long to go into here.

        I was going to write a new book based on my experience developing OS software for the SunBlade 100 and 1000 workstations. But to my astonishment, Prentice-Hall were wishy-washy on the project.

        I still think it would have been a terrific book, but it is such a large amount of work to write a book, that I am not going to take it on unless the publisher is 100% behind the project.

        My working title for it was "The Whole of a New Machine - How we built the world's fastest desktop computer" (which it was at the time it launched).
        I did develop the book synopsis, and wrote the entire first chapter. I put them on the CD that comes with the 5th Edition of "Just Java" if you want to see them.
        ---
        BTW, "Expert C Programming" gets the failed rocket software details 100% correct, unlike some of the corrections below.
  • by cat_jesus ( 525334 ) on Sunday October 27, 2002 @03:23PM (#4542598)
    I worked for a programmer back in the 80's who made a mistake that caused all credit card purchases to disappear from the electronic journal. This meant that their purchases were not recorded on their credit card statements. Fortunately for the company the bug did not affect the recording of the transactions on the paper journal. This bug wasn't discovered for a few days and it took quite some time to rekey all the credit transactions.

    Unfortunately this was not her first or last mistake of this magnitude. Retailers often see IT as an expense rather than an asset and are as cheap as possible. This has a tendency to cause shoddy programming since they hire as few programmers as possible and overwork them and often software is put into production without being thoroughly tested. At least this was the case when I worked in retail some ten years ago--I don't think I'll do that again.

    But I am finding that insurance companies have the same philosophy.
  • by Camel Racer ( 134168 ) on Sunday October 27, 2002 @03:40PM (#4542692)
    I can't recomend the risks site too highly. (redundent I know)
    Risks To The Public In Computers And Related Systems
    http://catless.ncl.ac.uk/Risks

    On how to be 0wned by other people: Counterpane: Crypto-Gram . Shares with comp.risks the reframe of "I can't belive people don't learn from this"
    Counterpane: Crypto-Gram
    http://www.counterpane.com/crypto-gra m.html

    Don Norman's _The Design of Everyday Things_ and website also offer insight on how to avoid UI failures relating to failures.
    http://www.jnd.org/index.html

    Also, get a copy of _Code Complete_ and/or _Code Write_ by Steve McConnell [pub: Microsoft Press Which is rich irony) Lots of mistakes and how to avoid them.
    The cautionary note might be that most of these failures are human related at some level. Whether it be at the project level, or the UI level -- there are lots of ways to cause a failure.

    Finally, avoid any kind of carreer in Software QA. There is no better way to just get kicked around at the expense of the people putting the bugs in the software in the first place.

  • NASA software bugs (Score:3, Informative)

    by dstone ( 191334 ) on Sunday October 27, 2002 @03:51PM (#4542756) Homepage
    Someone here was claiming that NASA has never had a software bug. That sounded pretty unbelievable to me. And sure enough, it's not true. In the recent Mars missions alone, they had a bunch of software bugs resulting in things varying from non-fatal vehicle failures to outright loss of spacecraft.

    Regarding the loss of the Mars Climate Orbiter spacecraft [nasa.gov], from nasa.gov: "The 'root cause' of the loss of the spacecraft was the failed translation of English units into metric units in a segment of ground-based, navigation-related mission software"

    Also, here are several [nasa.gov] "software bugs" (their words) relating to the Mars Surveyor Lander Vehicle are described. These bugs were detected and fixed in the field (ie, Mars). At least one of the bugs caused a heater failure in the vehicle on Mars. This failure was recovered from.

    Anyways, those are just two quickies, but NASA has their share of bugs. (And generally some pretty ingenious ways to reprogram and update vehicle software post-launch.)

    On a related note, here's a paper from NASA entitled "The Infeasibility of Quantifying the Reliability of Life-Critical Real-Time Software" [nasa.gov].

  • by calyxa ( 618266 ) on Sunday October 27, 2002 @04:11PM (#4542863) Homepage Journal
    a classic tale:

    http://www.acme.com/jef/netgems/scratch_monkey.htm l [acme.com]

    -calyxa

  • Good site (Score:4, Informative)

    by dumboy ( 602836 ) <mkuentzNO@SPAMgmail.com> on Sunday October 27, 2002 @04:16PM (#4542899)
    Check out this site [tu-muenchen.de]

    http://wwwzenger.informatik.tu-muenchen.de/perso ns/huckle/bugse.html

  • by rufusdufus ( 450462 ) on Sunday October 27, 2002 @04:24PM (#4542938)
    Back when C++ was new, there was an insidious problem with the syntax that never showed up during compilation.

    if(c=='\') //check for \
    slashfound=1; //found one, handle path
    ++index;

    Code similar to this delayed shipment of a commercial product because it caused serious instability.

  • by PghFox ( 453313 ) <afoxson&pobox,com> on Sunday October 27, 2002 @04:27PM (#4542957) Homepage
    The Pragmatic Programmer: From Journeyman to Master [amazon.com], is one of the best resources I've found to avoid common programming mistakes. This book details many of the common errors we make as software developers and describes strategies for overcoming them. Having been in the field for close to two decades, I've found this book to be of immense value, and give it a high recommendation.

    Some of the tips, which may appear obvious to some of us, include:
    • Always Aim for Simplicity, Clarity and Generality
    • Treat all of your code as if you're going to release it
    • Keep subroutines small; break-up code as you go
    • Document as you go, not after the fact
    • Write tests as you go, not after the fact
    • Fix bugs immediately; do not delay fixing them
    • Do not duplicate any code, anywhere
    • Separate form and functionality
    • Subroutines should do one thing and do it well
    • Make your work easy to reuse
  • by PyroX_Pro ( 579695 ) on Sunday October 27, 2002 @05:24PM (#4543264) Journal

    Here are some of the best examples of windows crashing on high visibility systems that are relied upon:

    in the street [squidly.org]
    At the airport [bloomu.edu]
    at the atm [piemaster.co.uk]
    on CNN [piemaster.co.uk]
    At disneyland [piemaster.co.uk]
    On your phone [piemaster.co.uk]
    In an airplane [pyroxpro.com]
    At the bus stop [dropbear.id.au]
  • by Hott of the World ( 537284 ) on Sunday October 27, 2002 @06:05PM (#4543456) Homepage Journal
    Slashdot Math!

    cause we all know 50 + 1 - 1 = 49!

    Ok, that was lame, go ahead and mod me down...
  • Mars Pathfinder (Score:3, Interesting)

    by Kerg ( 71582 ) on Sunday October 27, 2002 @06:48PM (#4543647)
    The little "RC" NASA sent to explore the surface of Mars had a nasty bug in its threading system (priority inversion problem in critical code section) that caused total system resets every 20 minutes or so.

    You can read about it from James Gosling's home page [sun.com] (also has info on Arianne 5 [sun.com]).

    Luckily the engineers were able to upload a patch to Mars. That's remote debugging/patching for you :-)

  • F-16 AOA and WOW (Score:4, Interesting)

    by taaminator ( 185731 ) on Sunday October 27, 2002 @07:25PM (#4543834)
    "Flight instruments don't lie"

    First, BEFORE YOU LEAVE THE GROUND, pilots are taught that instruments don't lie. Specifically, when the human inner ear is placed in flight, things go wrong (the inner ear canals are static, not dynamic, devices; the fluid has no dampening or rate sensors). When there is no external reference, the inner ear canals adjust to the eye's visual presentation. It's called the 'leans.' Bad joo-joo. Many a perfectly good aircraft has been flown into the ground because the pilot believed his ears and eyes and not his instruments.

    Second, IN FLIGHT, angle-of-attack (AOA) is a spectacular indicator of where your airfoil exists within (or outside) the flight envelope for your aircraft. Inside the flight envelope, you can seek best range (mpg) or best endurance (loiter) or best climb.

    In most aircraft, the angle-of-attack indicator is a manual instrument (on the skin is a sensor which looks like a big euro-style handle and it runs to an indicator in the cockpit).

    Many pilots are correctly taught to 'fly' the angle-of-attack.

    Third, ON THE GROUND, when you land, you use the aircraft shape as an airbrake. You hold the aircraft nose off the ground as long as possible to create drag.

    Fourth, ON THE GROUND, when you land, you do not want to hold the aircraft nose too far off the ground or the tail will scrape the runway and your fitness report will reflect and you'll be the butt of bad jokes at Snopes for eternity.

    The AOA is used to assist in the performance of aerodynmic braking. The aircraft performance manual publishes the tried and true range of AOAs for aerodynamic braking. [It also indicates when too much AOA will ding the aircraft.]

    Aerodynamic braking is part art and part science and requires accurate instruments.

    Enter the F-16 ... it has an electronic AOA.

    F-16 pilots were taught to fly the flight direction indicators to land.

    However, many old and new pilots fell back on the old AOA once the wheels touched the ground to do aerodynamic braking.

    Suddenly, F-16 tails were scraping along the runway at an alarming (and expensive) rate.

    [As an aside, the problem was probably ignored until a senior officer ground off a few inches of aluminum THEN there was a problem.]

    The programmers who wrote the AOA routines were rightly told that the AOA is used in flight. So, when the AOA detected that the aircraft had placed weight on the wheels (weight-on-wheels - WOW), it was programmed to quit working. Unfortunately, it kept the last AOA reading ... no matter what the real AOA was.

    Pilot flies, pilot lands, pilot believes instruments, pilot scrapes multi-million dollar aircraft's tail along runway.

    The programming solution was simple: when there was WOW, fade the AOA.

    This was another case when contracts pit spec wording against spec intent against functional application and understanding of how it's supposed to work ... Fortunately, it was expensive and not lethal.

    "Why did they call you 'sparky' and why are you driving school buses in North Topeka?"

  • by iapetus ( 24050 ) on Sunday October 27, 2002 @08:02PM (#4543979) Homepage
    The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.
    -- Nathaniel Borenstein
  • by po8 ( 187055 ) on Sunday October 27, 2002 @09:29PM (#4544357)

    Could we have a new Slashdot category entitled Ask Slashdot To Do My Research/Homework For Me? Then I could mark this category unread and avoid some annoyance.

    There is so much information readily available on the subject of software failures online and in scientific and popular publications. (See other responses to this question for examples.) IMHO, the questioner should go look for the answer to this kind of question directly before bugging the entire Slashdot audience; the editors should enforce this policy.

    • I'm kinda sick of seeing this kind of comment. If it where to hold any merit, WTF would 'ask slashdot' be for? To me, the whole purpose of the 'ask slashdot' catagory is to plumb the experience of the people who frequent this place. If you're not allowed to do that, what would you use it for?
  • by os2fan ( 254461 ) on Sunday October 27, 2002 @09:46PM (#4544430) Homepage
    There was a disaster in the dispatcher software that was written for London Ambulance. This was documented in a book on computer disasters.

    The system did not collapse per se but progressively became bogged down by a series of poor design issues and implementation issues.

    What happened was there was a memory leak, in that not all the memory used when a call was processed was released. This meant that each call chewed up a small part of core.

    As the day wore on, this loss of memory started to make the system run slower, and created more calls as users started to worry about the non-show of the ambulance.

    Meanwhile, back at the control centre, the operators started getting blasted by messages about over-due ambulances, and other system warnings. They were spending time simply dismissing Error dialogues.

    By the end of the day, they were still dealing with the emergency issues notified at 12.00.

    Of course, in the inquiry, there were many different management and design issues to be addressed, including the reliability and scalability of the software. [It was a Visual Basic program.]

    I have seen a number of instances personally, most of these tend to be ignored by management keen to see the system up and running. The most often case for dismissal of problems is "teething problems", and "Luditism".

    In practice, the real issue here is the UI. Not so much "flash chrome", but that the buttons and so forth will actually do what the user expects them to do. The user must be able to understand how to process and correct errors in relation to the application data itself. That is, if I enter 1200, and I mean 1130, I should be able to correct that.

    The other disaster happening out there is that the program must be useful to the operator. So apart from entering data, the operator must be able to extract useful information from it. What the back end does does not really matter.

    For example, a clerk who has to enter data on the screen each sale, in addition to operating the till, would be reluctant to use it. On the other hande, if the program is part of the till operation, and it provides information on how much stock is left, the clerk is more accepting of the change.

    Implementing a system is not about plonking a pc with a program on a user's desk. It's about a user process. Users are looking for outcomes, not process. So if you want to go to a shop, you want to buy something, and the clerk wants to sell it to you. All the rest is administrivia.

    Software design is important. So is user training.

  • by Malic ( 15038 ) on Sunday October 27, 2002 @09:50PM (#4544453)
    I think I've recommended this book serveral times on Slashdot. Simply put, THE collection of computing related horror stories.

    http://www.amazon.com/exec/obidos/tg/detail/-/02 01 55805X/qid=1035769692/sr=8-13/ref=sr_8_13/104-4078 673-1863905?v=glance&n=507846
  • Sleipner A (Score:3, Informative)

    by RallyDriver ( 49641 ) on Monday October 28, 2002 @02:41AM (#4545611) Homepage
    On a slightly different tack - the [umn.edu]
    Sleipner A oil platform sank because of a bad design, caused by inaccurate computer based modelling (using an FEA tool inappropriately). In this case it was the data not the software.

E = MC ** 2 +- 3db

Working...