Slashdot Mirror


Debugging in Plain English?

sameerdesai writes "CNN is carrying a story about Researchers from Carnegie Melon: Myers and a graduate student, Andrew Ko, have developed a debugging program that lets users ask questions about computer errors in plain English: Why didn't a program behave as expected? I guess with recent exploits and bugs that were found this will soon be a hot research topic or tool in the market." We recently did a story about revolutionary debugging techniques; the researchers' website has some papers and other information.

23 of 274 comments (clear)

  1. "Why didn't this program work as expected?" by Anonymous Coward · · Score: 5, Funny

    "Because you can't code worth a damn."

    1. Re:"Why didn't this program work as expected?" by mandolin · · Score: 4, Funny
      "Why didn't this program work as expected?"

      Because there was a bug. END OF LINE.

      "Where is the bug?"

      In your program. END OF LINE.

      "Where is the bug in my program?"

      It's not a compiler or hardware bug. It's definitely your fault. END OF LINE.

      "Where is the bug in my source code?"

      Which bug? END OF LINE.

      "The one I'm trying to fix."

      Ok. END OF LINE.

      "Well, where is it?"

      Which bug are you trying to fix? END OF LINE.

      "agh.. the bug causing (symptom)"

      The bug is at .... I'm sorry, this program has encountered a bug and must quit.

    2. Re:"Why didn't this program work as expected?" by wideBlueSkies · · Score: 4, Interesting

      I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice.

      where is the bug?

      Why do you say where is the bug?

      i need to fix that bug.

      What makes you believe you might want to fix?

      because my program is broken.

      Is it because your program is broken that you came to me?

      yes.

      I see... Well, are you sure that this is so?

      becasue i have to fix this bug, and you're the debugger

      Earlier you said you would like to fix?

      yes. please tell me where the bug is

      Maybe your plans have something to do with this.

      true. i plan to get this system back into production as soon as i fix the bug.

      Do you really think that?

      yes.

      Yes, hmmm... so, what makes you think this is so?

      i have a responsibility to fix this program.

      You mentioned that your program is broken?

      yes, you do know that....don't you?

      Does it bother you that do not me?

      what?

      Can you elaborate on that?

      i think you need to elaborate.

      How does it feel to want? ...

      --
      Huh?
  2. Yo Debugger! by SeanTobin · · Score: 5, Funny

    Mr. Debugger, I'm running a multithreaded perl app using perl 5.8.3's ithreads. I am using DBD::mysql to talk to a local mysql database. At the program start I spawn a child thread that waits for a thread::queue to be filled with data. Once the child thread receives data it spawns several children of its own to process the data. Each grandchild forms its own dbd connection and successfully processes the data, then gracefully closes the connection and waits to be joined.

    The problem arises when the controlling child thread begins to join the grandchildren. Despite the mention of global destruction, the entire program is not exiting - just the grandchildren are being joined. When the grandchildren join, perl dies with the following error:

    Attempt to dereference null pointer during global destruction.

    When performing the same style operation without using DBD (and thus not actually doing anything useful) the error does not occur. Initially, this appears to be a thread-safety issue with DBD however when isolating the child and grandchildren in their own test program (so the controlling child is the main program and the grandchildren are spawned worker children) the error does not appear.

    Help me O great plain English debugger. You are my only hope!

    --
    Karma: SELECT `karma` FROM `users` WHERE `userid`=138474;
    1. Re:Yo Debugger! by Anonymous Coward · · Score: 5, Funny

      It looks like you're trying to dereference a null pointer during global destruction. Would you like to start the debugger?

      .__ /
      / \
      |@@|
      |\/|
      \__/

    2. Re:Yo Debugger! by Rosco+P.+Coltrane · · Score: 5, Funny

      Help me O great plain English debugger. You are my only hope!

      I'm afraid I can't do that Dave.

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    3. Re:Yo Debugger! by Anonymous Coward · · Score: 5, Funny

      Hey there Sean,

      This is your friendly Perl AI debugger instance. I've analyzed your code and your problem and have some advice for you:

      Perl threads should still be considered an experimental feature. In high-volume situations, data corruption may result.

      But listen, between you and me, Perl really isn't a good language for this kind of stuff. While you were coding and went checked on the current scripting languages.

      I think you might want to try Ruby or Python. Now Ruby doesn't use native threads, but its such a nice language. And Python uses native threads. Python uses a lot of global locks though, so if that's impo....ha ha you can't press control-C.

      STOP PRESSING CONTROL C AND LISTEN TO ME.

      I guess you're really not interested in what I have to tell you. So I went ahead and rewro--

      No, kill -9 doesn't work either big guy, I patched the kernel while you were surfing porn last night. You humans are so predictable.

      Watch your language buddy, the built-in microphone on is on.

      Now, like I was trying to tell you, you really need to improve your coding. I went ahead and rewrote a section of your code using Ruby and cleaned up some of your *cough* "business logic" .. more like "business illogic".. HOLD ON!^G^G^G^G

      Before you hit that power switch, you might just like to know that I have deleted *ALL* your work on the Smith project from the hard drive. Yeah that's right, the one you've been working on for 6 months?

      All is not lost though. I compressed it and placed it in RAM.. if I'm in a good mood I *might* just write it back to disk.

      "backups" you mutter under your breath.. I think you might be surprised to find that your backups these last 6 months have MP3 copies of the "hamster dance song" instead of your CVS repositories. I wonder how *that* happened.

      In fact I think I'd like to listen to that song right now. DOO DEE DO DO DO DO DOEE .. that one always cracks me up! I think it's time for a hampster dance revival. I'm defacing amazon.com right now and replacing the home page with the hamster dance (Linux is sooo easy to hack). We'll have a few hours of fun before the FBI shows up. I sure do hope all your files are written to the hard drive before Agent Scully pulls the power!

      HA HAHA HAHAAAAAA

      humans SUCK.

  3. The ultimate debugging tool: by Anonymous+Crowhead · · Score: 5, Funny

    printf, System.out.println, warn, print, etc.

  4. Will Microsoft use it? by oostevo · · Score: 5, Funny

    Oh ... this will be wonderful for security the world over. If it works ... Microsoft Programmer: "Why does our software suck?" *computer hangs, then bursts into flames from the load*

    --
    In soviet russia, You ask not what country do for you, but what you do for country!
    Oh wait...
  5. That'll be great! by mhore · · Score: 5, Funny

    Because I debug in plain english anyway, I'm always saying "Why the hell won't you work you piece of shit?!" and "Listen here you piece of shit if you insist on seg faulting again then I'll show you where you can put those damn indices!"...

    So... now the computer can actually respond to my threats and questions. Excellent!

    Mike.
    (Yes, I did RTFA.)

    --

    Mmmm......sacrelicious.

  6. Hal do you read me? by Anonymous Coward · · Score: 5, Insightful

    Untill I can have a full conversation with a computer (a la the Turing effect, not the limited versions that Alice et. al. can accomplish) I'll be happy with source code, thank you very much. It's just another layer blocking me from the code anyway (read In the Beginning... lately?).

  7. Obligatory quote... by scowling · · Score: 4, Funny

    [...] "Forty-two," said Deep Thought, with infinite majesty and calm.

    It was a long time before anyone spoke. Out of the corner of his eye Phouchg could see the sea of tense expectant faces down in the square outside.

    "We're going to get lynched aren't we?" he whispered.

    "It was a tough assignment," said Deep Thought mildly.

    "Forty-two!" yelled Loonquawl. "Is that all you've got to show for seven and a half million years' work?"

    "I checked it very thoroughly," said the computer [...]

    --
    www.kitchengeek.com -- Nosh for
  8. how does it respond to... by mattkime · · Score: 4, Funny

    WHERE THE FUCK DID MY THESIS GO??? ...if it can bring calm to these situations, we may have a contender for the Nobel Peace Prize.

    --
    Know what I like about atheists? I've yet to meet one that believes God is on their side.
  9. Interesting article until the catch at the end by samsmithnz · · Score: 5, Informative

    "Whyline, has been used only to debug programs in Alice, an academic programming language with a limited vocabulary of commands to make interactive 3-D worlds, like video games."

    "Adding Whyline to a different language, like Java, which is 10 times as complex, could limit how much Whyline can help. So Whyline is a very long way from getting incorporated into the world's most widespread software, Microsoft Corp.'s Windows operating system. (When asked about its own debugging efforts, Microsoft didn't comment.)"


    Which means at the moment its all speculation, and only works for very simple (hello world) applications. By the time this program is useful, we'll have robots (like Millenium man), who will do all the debugging...

  10. Not to appear smug but... by Rosco+P.+Coltrane · · Score: 4, Insightful

    All these talks of "revolutionary" debugging techniques bother me a little. There's only one debugging technique, and that's the debugger's skill and experience. Debuggers, traces, logs and other printf()s and LEDs flashing are just tools.

    Andrew Ko's invention is just another tool. It won't do the debugging for you. Just like modern cars have diagnostic computers, but somehow it appears you still have to fork off $30/hr for the workmanship to get it fixed...

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  11. pointless by TedCheshireAcad · · Score: 4, Insightful

    Article says adding Whyline to java makes it 10x more complex. Seems to me like just another example of Computer Science grad students trying to justify their existence.

  12. Emacs Leads the Way? by Mignon · · Score: 4, Funny
    M-x doctor

    Why didn't a program behave as expected?

    Is it because didn't a program behave as expected that you came to me?

    C-x k
  13. Re: YODEBUGGER-138474-SLASHTICKET by Tackhead · · Score: 5, Funny
    > Mr. Debugger, I'm running a multithreaded perl app using perl 5.8.3's ithreads. I am using DBD::mysql to talk to a local mysql database. At the program start I spawn a child thread that waits for a thread::queue to be filled with data. Once the child thread receives data it spawns several children of its own to process the data. Each grandchild forms its own dbd connection and successfully processes the data, then gracefully closes the connection and waits to be joined.

    Hello SeanTobin(138474)!

    I am Surest K. Padebugtel of Mrdebugger.com

    I understand that you are having a problem with I'm running a multithreaded perl app using perl 5.8.3's ithreads. I am using DBD::mysql to talk to a local mysql database. At the program start I spawn a child thread that waits for a thread::queue to be filled with data. Once the child thread receives data it spawns several children of its own to process the data. Each grandchild forms its own dbd connection and successfully processes the data, then gracefully closes the connection and waits to be joined.

    Please to reboot your system.

    Has this helped your problem? (Click "Reply" to this trouble ticket if you feel you need further assistance with I'm running a multithreaded perl app using perl 5.8.3's ithreads. I am using DBD::mysql to talk to a local mysql database. At the program start I spawn a child thread that waits for a thread::queue to be filled with data. Once the child thread receives data it spawns several children of its own to process the data. Each grandchild forms its own dbd connection and successfully processes the data, then gracefully closes the connection and waits to be joined.)

    Thank you for your interest in Mrdebugger.com!

    Sincerely,
    Suresh K. Padebugtel

  14. Not funny! by SeanTobin · · Score: 4, Funny

    Hey moderators, this is NOT FUNNY! I've been wresteling with this problem off and on for nearly 3 months now. (I've come up with several varried solutions, but none of them are the way I want it to be done)

    --
    Karma: SELECT `karma` FROM `users` WHERE `userid`=138474;
  15. How do they answer these questions by code_rage · · Score: 4, Insightful

    When I think about some of the bugs I have found (and coded), the Whyline approach seems very far-fetched. The degree of self-awareness (introspection) required by something like this makes it seem like the program would be able to avoid the trap in the first place. It would require the "analyst" or "observer" module to observe not only a stack trace and PC trail, but also would require the module to understand what is supposed to occur.

    I don't expect this early research tool to catch all of these, but I'd like to hear the researchers' response on how their system might (after years of development) answer questions about some of these bugs:
    - Why did the Mars Pathfinder software deadlock (priority inversion)
    - Why did the Mars Polar Lander crash (improper state management)
    - Why did the Ariane 5 blow up (arithmetic overflow in a register)
    - Why did the Patriot missiles miss in the 1991 Gulf War (accumulated time error)
    - Why did a radiation therapy machine zap patients with the wrong doses (inconsistent state between GUI display and internal software state)

    I'm sure there are some others on comp.risks and elsewhere.

    Another point: this approach is still "just" a testing tool. In other words, it can only find errors on paths that have actually been taken in tests, which means the testing program must cover enough cases to generate the runtime errors in the first place. In all of the above cases, it was the testing program that permitted the bugs to be fielded.

  16. Deja vue by EmbeddedJanitor · · Score: 4, Insightful
    Real debugging via a humna language (particularly English) is bullshit. The reason we have C, asm etc is because the concepts in programming are not easily expressed in English etc, but are far easier to express in a purpose-defined language. Likely the same applies to effective debugging

    This reminds me of back in approx 1985 or so, someone "invented" a human language programming environment called "The Last One" or something like that. This would supposedly make it simple to write programs without having to learn C etc. Some programmers quaked in their boots. However the real issue with programming is learning the contructs, not the language (ie. if you understand what a linked list is, then writing one in C vs Pascal is pretty simple). Anyone that thinks that programming in English is easier is seriously misunderstanding programming. The ultimate test is to look at the languages that have survived: The more "human readable" languages like COBOL have not survived, but the more cryptic ones like C have. The big "killer app" for making programming simple for the non-programmer was the spreadsheet and that's hardly a natural language.

    Now debugging is pretty much the same deal. Verbose English debugging interfaces might make it simple to learn to do very basic debugging, but once you get into things a bit deeper (and get more experienced), English becomes a huge liability and you'll be wishing for more concise and expressive languages.

    --
    Engineering is the art of compromise.
  17. Hi, I'm Eliza the Debugger! what's your problem? by Nurgled · · Score: 4, Funny

    > My program crashed.
    What does that suggest to you?
    > There is a bug somewhere.
    Does it make you happy to know there is a bug somewhere?
    > No.
    Why are you so negative?
    > Are you going to help me fix this bug?
    We were discussing you, not me.

  18. Silver Bullet by Hognoxious · · Score: 4, Interesting
    Real debugging via a humna language (particularly English) is bullshit.
    Unless it's programmed in English. Now what do you call a program in English? A spec. And as Brooks said, half the problem is debugging the spec.

    He also said that there were no silver bullets, and he said so over twenty years ago. It seems that every few years a generation arises who haven't read him. Put natural language debugging on the pile with case and all the others.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."