DWIM

Last updated

DWIM (do what I mean) computer systems attempt to anticipate what users intend to do, correcting trivial errors automatically rather than blindly executing users' explicit but potentially incorrect input.

Contents

Software

The term was coined by Warren Teitelman in his DWIM package for BBN Lisp, part of his PILOT system, sometime before 1966. [1] [2] [3]

InterLisp

Teitelman's DWIM package "correct[ed] errors automatically or with minor user intervention", [2] similarly to autocorrection for natural language.

Teitelman and his Xerox PARC colleague Larry Masinter later described the philosophy of DWIM in the Interlisp programming environment (the successor of BBN Lisp):

Although most users think of DWIM as a single identifiable package, it embodies a pervasive philosophy of user interface design: at the user interface level, system facilities should make reasonable interpretations when given unrecognized input. ...the style of interface used throughout Interlisp allows the user to omit various parameters and have these default to reasonable values...

DWIM is an embodiment of the idea that the user is interacting with an agent who attempts to interpret the user's request from contextual information. Since we want the user to feel that he is conversing with the system, he should not be stopped and forced to correct himself or give additional information in situations where the correction or information is obvious. [4]

Critics of DWIM claimed that it was "tuned to the particular typing mistakes to which Teitelman was prone, and no others" and called it "Do What Teitelman Means" or "Do What Interlisp Means", [5] or even claimed DWIM stood for "Damn Warren's Infernal Machine." [6]

Emacs

The concept of DWIM has been adopted in augmented form within the context of the GNU Emacs text editor to describe the design philosophy of Emacs Lisp functions or commands that attempt to intelligently "do the right thing" depending on context. [7] The Emacs wiki gives the example of a file copy command that is able to deduce the destination path from a split window configuration that contains two dired buffers, one of which displays the source path; this behaviour also generalises to many applicable dired actions that take two directory paths for arguments.

DWIM behaviour, when available, is often mentioned in a command's name; e.g. GNU Emacs has a comment-dwim function that comments out a selected region if uncommented, or uncomments it when already commented out, while using comment characters and indentation appropriate for the programming language environment and current context. [8] [9]

This kind of DWIM is often not directly concerned with correcting user error but rather guessing user intent from available context. For example, the Emacs Magit package evinces this design philosophy pervasively. Among its numerous diff commands, there is a magit-diff-dwim command, which requires no further input from the user but simply guesses what the user wants to analyse based on the location of the cursor. The Magit User Manual describes the behaviour of magit-diff-dwim simply: "Show changes for the thing at point". [10]

See also

Related Research Articles

Cygwin Unix subsystem for Windows machines

Cygwin is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.

The editor war is the rivalry between users of the Emacs and vi text editors. The rivalry has become a lasting part of hacker culture and the free software community.

Emacs Lisp

Emacs Lisp is a dialect of the Lisp programming language used as a scripting language by Emacs. It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C, as is the Lisp interpreter. Emacs Lisp is also termed Elisp, although there is also an older, unrelated Lisp dialect with that name.

Integrated development environment Software engineering toolkit

An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools and a debugger. Some IDEs, such as NetBeans and Eclipse, contain the necessary compiler, interpreter, or both; others, such as SharpDevelop and Lazarus, do not.

Genera (operating system)

Genera is a commercial operating system and integrated development environment for Lisp machines created by Symbolics. It is essentially a fork of an earlier operating system originating on the Massachusetts Institute of Technology (MIT) AI Lab's Lisp machines which Symbolics had used in common with Lisp Machines, Inc. (LMI), and Texas Instruments (TI). Genera was also sold by Symbolics as Open Genera, which runs Genera on computers based on a Digital Equipment Corporation (DEC) Alpha processor using Tru64 UNIX. In 2021 a new version was released as Portable Genera which runs on DEC Alpha Tru64 UNIX, x86_64 and Arm64 GNU/Linux, x86_64 and Apple M1 macOS. It is released and licensed as proprietary software.

In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. The utility displays the changes in one of several standard formats, such that both humans or computers can parse the changes, and use them for patching.

Gnus

Gnus, or Gnus Network User Services, is a message reader which is part of GNU Emacs. It supports reading and composing both e-mail and news and can also act as an RSS reader, web processor, and directory browser for both local and remote filesystems.

Interlisp is a programming environment built around a version of the programming language Lisp. Interlisp development began in 1966 at Bolt, Beranek and Newman in Cambridge, Massachusetts with Lisp implemented for the Digital Equipment Corporation (DEC) PDP-1 computer by Danny Bobrow and D. L. Murphy. In 1970, Alice K. Hartley implemented BBN LISP, which ran on PDP-10 machines running the operating system TENEX. In 1973, when Danny Bobrow, Warren Teitelman and Ronald Kaplan moved from BBN to the Xerox Palo Alto Research Center (PARC), it was renamed Interlisp. Interlisp became a popular Lisp development tool for artificial intelligence (AI) researchers at Stanford University and elsewhere in the community of the Defense Advanced Research Projects Agency (DARPA). Interlisp was notable for integrating interactive development tools into an integrated development environment (IDE), such as a debugger, an automatic correction tool for simple errors (via do what I mean software design, and analysis tools.

Keyboard shortcut Series of computer keys to quickly invoke a software program or perform a preprogrammed action

In computing, a keyboard shortcut also known as hotkey is a series of one or several keys to quickly invoke a software program or perform a preprogrammed action. This action may be part of the standard functionality of the operating system or application program, or it may have been written by the user in a scripting language. Some integrated keyboards also include pointing devices; the definition of exactly what counts as a "key" sometimes differs.

In aspect and functional programming, advice describes a class of functions which modify other functions when the latter are run; it is a certain function, method or procedure that is to be applied at a given join point of a program.

In computing, minimalism refers to the application of minimalist philosophies and principles in the design and use of hardware and software. Minimalism, in this sense, means designing systems that use the least hardware and software resources possible.

EINE and ZWEI are two discontinued Emacs-like text editors developed by Daniel Weinreb and Mike McMahon for Lisp machines in the 1970s and 1980s.

Common Lisp Interface Manager

The Common Lisp Interface Manager (CLIM) is a Common Lisp-based programming interface for creating user interfaces, i.e., graphical user interfaces (GUIs). It provides an application programming interface (API) to user interface facilities for the programming language Lisp. It is a fully object-oriented programming user interface management system, using the Common Lisp Object System (CLOS) and is based on the mechanism of stream input and output. There are also facilities for output device independence. It is descended from the GUI system Dynamic Windows of Symbolics' Lisp machines between 1988 and 1993.

... you can check out Common Lisp Interface Manager (CLIM). A descendant of the Symbolics Lisp machines GUI framework, CLIM is powerful but complex. Although many commercial Common Lisp implementations actually support it, it doesn't seem to have seen a lot of use. But in the past couple years, an open-source implementation of CLIM, McCLIM – now hosted at Common-Lisp.net – has been picking up steam lately, so we may be on the verge of a CLIM renaissance. – From Practical Common Lisp

Aquamacs

Aquamacs is an Emacs text editor for macOS. It is based on GNU Emacs, currently tracking the GNU Emacs version 25.3 branch. Although GNU Emacs has had native UI support on macOS using the Cocoa API since version 23, Aquamacs modifies the user interface to conform with macOS standards in favor of Emacs standards.

Warren Teitelman was an American computer scientist known for his work on programming environments and the invention and first implementation of concepts including Undo / Redo, spelling correction, advising, online help, and DWIM (Do What I Mean).

GNU Emacs GNU version of the Emacs text editor

GNU Emacs is a free software text editor. It was created by GNU Project founder Richard Stallman. In common with other varieties of Emacs, GNU Emacs is extensible using a Turing complete programming language. GNU Emacs has been called "the most powerful text editor available today". With proper support from the underlying system, GNU Emacs is able to display files in multiple character sets, and has been able to simultaneously display most human languages since at least 1999. Throughout its history, GNU Emacs has been a central component of the GNU project, and a flagship of the free software movement. GNU Emacs is sometimes abbreviated as GNUMACS, especially to differentiate it from other EMACS variants. The tag line for GNU Emacs is "the extensible self-documenting text editor".

Emacs Family of text editors

Emacs or EMACS is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor". Development of the first Emacs began in the mid-1970s, and work on its direct descendant, GNU Emacs, continues actively as of 2022.

Larry Melvin Masinter is an early Internet pioneer and ACM Fellow. After attending Stanford University, he became a Principal Scientist of Xerox Artificial Intelligence Systems and author or coauthor of 26 of the Internet Engineering Task Force's Requests for Comments.

Magit Emacs interface for the Git version control system

Magit is an interface to the Git version control system (a Git Client), implemented as a GNU Emacs package written in Elisp. It is made available through the MELPA package repository, on which it is the most-downloaded non-library package, with almost three million downloads as of July 2021.

References

  1. Warren Teitelman, "PILOT: A Step towards Man-Computer Symbiosis", M.I.T. Ph.D. Dissertation, Project MAC MAC-TR-32, September 1966. DTIC AD0638446 Archived 2012-04-18 at the Wayback Machine PDF, p. 51
  2. 1 2 Warren Teitelman, "Toward a programming laboratory", in J. N. Buxton and Brian Randell, Software Engineering Techniques, April 1970, a report on a conference sponsored by the NATO Science Committee, Rome, Italy, 27–31 October 1969, p. 108ff.
  3. Donald E. Walker, Lewis M. Norton (Eds.): Proceedings of the 1st International Joint Conference on Artificial Intelligence, Washington, DC, p 715, May 1969.
  4. Warren Teitelman, Larry Masinter, "The Interlisp Programming Environment", Computer (IEEE) 14:4:25-33, April 1981. doi : 10.1109/C-M.1981.220410 pdf
  5. Guy L. Steele Jr., Richard P. Gabriel, "The Evolution of Lisp", in History of programming languages---II, 1996, ISBN   0-201-89502-1 doi : 10.1145/234286.1057818, p. 16. pdf
  6. "DWIM".
  7. "Do What I Mean".
  8. "Comment Tips". Generally speaking, the M-; (comment-dwim) command automatically starts a comment of the appropriate type; or indents an existing comment to the right place, depending on the number of semicolons.
  9. "Comment Commands". The command to create or align a comment is M-; (comment-dwim). The word “dwim” is an acronym for “Do What I Mean”; it indicates that this command can be used for many different jobs relating to comments, depending on the situation where you use it.
  10. "Magit User Manual: 5.4 Diffing".

Further reading