Hacker News new | past | comments | ask | show | jobs | submit login

Autocompleting DROP TABLE or DELETE is probably not a good idea.



http://www.catb.org/jargon/html/D/DWIM.html

    DWIM: /dwim/

    [acronym, ‘Do What I Mean’]
<snip>

    Warren Teitelman originally wrote DWIM to fix his typos and spelling errors, so it
    was somewhat idiosyncratic to his style, and would often make hash of anyone
    else's typos if they were stylistically different. Some victims of DWIM thus
    claimed that the acronym stood for ‘Damn Warren’s Infernal Machine!'.

    In one notorious incident, Warren added a DWIM feature to the command interpreter
    used at Xerox PARC. One day another hacker there typed delete *$ to free up some
    disk space. (The editor there named backup files by appending $ to the original
    file name, so he was trying to delete any backup files left over from old editing
    sessions.) It happened that there weren't any editor backup files, so DWIM
    helpfully reported `*$ not found, assuming you meant 'delete *'`. It then
    started to delete all the files on the disk! The hacker managed to stop it
    with a Vulcan nerve pinch after only a half dozen or so files were lost.

    The disgruntled victim later said he had been sorely tempted to go to Warren's
    office, tie Warren down in his chair in front of his workstation, and then type
    delete *$ twice.


I used that system, Interlisp, the Warren Teitelman version of LISP, on SRI's DECsystem 2060. I had a similar experience. I typed "EDIT" when in the wrong mode, and got "=EXIT" from DWIM. Interlisp terminated without saving.

It really was keyed to Warren's errors. It would try to correct "9" and "0" into "(" and ")", a mistake he apparently made frequently but I never did.


I also used InterLisp. I had a Xerox 1108. The first 5 minutes I used my 1108 my mind was blown when it corrected a typo in a short program I entered and ran.


I'm planning to add confirmation for those commands to make sure people don't accidentally drop something they don't intend to.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: