Forgot your password?
typodupeerror
Programming IT Technology

Debugging in Plain English? 274

Posted by michael
from the usually-a-missing-semicolon dept.
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.
This discussion has been archived. No new comments can be posted.

Debugging in Plain English?

Comments Filter:
  • by Anonymous Coward on Tuesday July 27, 2004 @04:51PM (#9815696)
    "Because you can't code worth a damn."
  • by SeanTobin (138474) * <.moc.liamtoh. .ta. .rtnuhdryb.> on Tuesday July 27, 2004 @04:51PM (#9815700)
    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!
  • by Anonymous Crowhead (577505) on Tuesday July 27, 2004 @04:52PM (#9815705)
    printf, System.out.println, warn, print, etc.
  • by oostevo (736441) on Tuesday July 27, 2004 @04:53PM (#9815713) Homepage
    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*
  • by mhore (582354) on Tuesday July 27, 2004 @04:53PM (#9815714)
    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.)
  • by scowling (215030) on Tuesday July 27, 2004 @04:54PM (#9815730) Homepage
    [...] "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 [...]
  • by mattkime (8466) on Tuesday July 27, 2004 @04:55PM (#9815739)
    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.
  • Response (Score:3, Funny)

    by Anonymous Coward on Tuesday July 27, 2004 @04:57PM (#9815766)
    Why didn't a program behave as expected?
    Because the expectations where wrong.
  • Yes, but... (Score:2, Funny)

    by maxchaote (796339) on Tuesday July 27, 2004 @04:57PM (#9815773)
    That's great, but does it understand expletives?
  • by Anonymous Coward on Tuesday July 27, 2004 @04:58PM (#9815777)
    It looks like you're trying to dereference a null pointer during global destruction. Would you like to start the debugger?

    .__ /
    / \
    |@@|
    |\/|
    \__/
  • Re:Response (Score:2, Funny)

    by Anonymous Crowhead (577505) on Tuesday July 27, 2004 @04:58PM (#9815780)
    Why didn't a program behave as expected?

    Because the expectations where wrong.


    I see you didn't debug your post.
  • by Anonymous Coward on Tuesday July 27, 2004 @04:58PM (#9815784)
    and then a happy paperclip pops up and says:
    "you shouldn't be writing complex DB applications in perl, you should be using C# or perhaps VBasic.NET. On a stable Windows(tm) evnironment you wouldn't be having these pro.." [BSOD] .... [Rebooting]...
    the paperclip pops up again:
    "i see recovery files, it appears you forgot to save your files in the last 2 days, may i suggest:
    ( ) a gun
    ( ) OD on random drugs
    (x) submit your resume to SBC-McWalCorp
    "
  • by Zaranne (733967) <zaranne17@gma i l . c om> on Tuesday July 27, 2004 @04:58PM (#9815786) Homepage Journal
    Plain english or not, make it easy for someone to debug and I'll be out of a job. I like finding other people's mistakes and being the one to say "Uh, dude, this is where you screwed up, but I fixed it for you".

    Where's the fun if I can't point out someone's shortcomings?

  • by Mignon (34109) <satan@programmer.net> on Tuesday July 27, 2004 @04:58PM (#9815788)
    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
  • by Zorilla (791636) on Tuesday July 27, 2004 @05:00PM (#9815805)
    I think I'll stick to yelling at the machine when I'm trying to run "make" when a dependency gets left out of the ./configure script and it errors out after 5 minutes of compiling.

    "What the fuck is libmonkey1316-3.so??!!"

    Finding whole RPMs with the name of one known file you need is always fun. On second thought, maybe asking the computer what the hell that file is could help.
  • by Rosco P. Coltrane (209368) on Tuesday July 27, 2004 @05:01PM (#9815811)
    Help me O great plain English debugger. You are my only hope!

    I'm afraid I can't do that Dave.
  • by Tackhead (54550) on Tuesday July 27, 2004 @05:01PM (#9815814)
    > 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

  • Not funny! (Score:5, Funny)

    by SeanTobin (138474) <.moc.liamtoh. .ta. .rtnuhdryb.> on Tuesday July 27, 2004 @05:02PM (#9815832)
    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)
  • by Anonymous Coward on Tuesday July 27, 2004 @05:06PM (#9815870)
    Hello, I found the problem. It is as follows:
    push@{$w{length$_}},$_ for split$/,`cat $f`;$x=$_ for sort{$a<=>$b}keys%w;for$n(
    reverse 3..$x){for$b(@{$w{$n}}){$s=$n-1;$m{$n}=$b;H:for$y( @{$w{$s}}){if($y=~/[$b
    ]{$s}/){$t=$y;$t=~s/$_/X/ for split'',$b;if($t=~/X{$s}/){$m{$s}=$y;if($s==3){for
    (sort{$a<=>$b}keys%m){next if$_>$n;print$m{$_},$/;}exit;}$s--;$b=$y;goto H;}}}}}
  • by GraWil (571101) on Tuesday July 27, 2004 @05:07PM (#9815886)
    debug> Why did my web server crash?
    reply> slashdotting
  • by Tackhead (54550) on Tuesday July 27, 2004 @05:12PM (#9815923)

    So this whole article is about the UPS Debugger. Just One More Hack [colorado.edu], and then he'll put it on the 'net...

    Well, I've written a debugger and it suits me just fine It'll chase away your problems, turn your water into wine
    It's got so many features, in fact it's bloody clever,
    If it can't solve your problem then your problem probably never
    can be solved
    so you might as well pack it on in,
    coz it's the best debugger that there's ever been.

    It's got everything you wanted, everything you desire.
    It'll handle fancy structures, set your soul on fire,
    It'll indirect through pointers, and catch a falling star,
    and if you ask it nicely it'll pop off to the bar
    and tell your friends
    how to solve the problems they're in,
    coz it's the best debugger that there's ever been.

    If you've got a nasty problem and your data structure's bent
    and your pointer's in a tangle with your structure elements,
    If you're losing all your memory coz your allocator leaks
    And your girl's getting nasty coz she's not seen you for weeks,
    then stoke up Mark's debugger
    you know it'll win,
    coz it's the best debugger that there's ever been....

    MP3 version available at: Just One More Hack [nosuch.com] - Mark Wheadon
  • by Anonymous Coward on Tuesday July 27, 2004 @05:22PM (#9816005)
    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.
  • by Anonymous Coward on Tuesday July 27, 2004 @05:23PM (#9816023)
    Can not parse "do what say." Perhaps you have made a grammatical error?

    Error: pre-parse failed. 200406271657.msg, line: 2
  • by Anonymous Coward on Tuesday July 27, 2004 @05:26PM (#9816048)
    Never use an apostrophe followed by the letter "s" unless you mean to indicate possession. What exactly belongs to the melon? Observe:

    I love your mom's peaches; I want to shake her tree.
  • by slashname3 (739398) on Tuesday July 27, 2004 @05:40PM (#9816175)
    My name is Eliza. I am hear to help you with your problem. And how do you feel about that multithreaded perl app using perl 5.8.3?
  • by MntlChaos (602380) on Tuesday July 27, 2004 @06:06PM (#9816391)

    Now all we need is a command line interface that can cut people some slack instead of spouting out "bad command or file name" left and right.
    $ rm -rf a/
    Warning: could not find directory 'a'. Assuming nearest match of /
    $
  • by mandolin (7248) on Tuesday July 27, 2004 @06:08PM (#9816401)
    "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.

  • by Ooblek (544753) on Tuesday July 27, 2004 @06:14PM (#9816447)
    Programmer: "Where is the last golden ticket?" Computer: "I can't tell you, that would be cheating. And don't even think of trying to bribe me a with a lifetime supply of chocolate sux0r!"
  • by Nurgled (63197) on Tuesday July 27, 2004 @06:16PM (#9816462)
    > 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.
  • by eniu!uine (317250) on Wednesday July 28, 2004 @02:01AM (#9819436)
    "It looks like you're trying to dereference a null pointer during global destruction. Would you like to start the debugger?"

    Well, this is a snippet from a response, but it really gets the core of the issue. Global destruction is a very stressful time to do just about anything. I'm by no means a programmer, and I have no idea what you're talking about, but don't you have better things to do when the end of the world comes? I'm even more alarmed if your 'threads' are actually causing global destruction. I beg of you, please stop programming!

  • by JohnQPublic (158027) on Wednesday July 28, 2004 @09:59PM (#9827529)
    The earliest versions of make replied "not war?".

    I guess you had to be there :-)

Computers are unreliable, but humans are even more unreliable. Any system which depends on human reliability is unreliable. -- Gilb

Working...