case and paste

case and paste

(programming)(From "cut and paste") The addition of a newfeature to an existing system by selecting the code from anexisting feature and pasting it in with minor changes. Thisusually results in gross violation of the fundamentalprogramming tenet, Don't Repeat Yourself.

Common in telephony circles because most operations in atelephone switch are selected using "case" statements. Leadsto software bloat.

In some circles of Emacs users this is called "programmingby Meta-W", because Meta-W is the Emacs command for copying ablock of text to a kill buffer in preparation to pasting itin elsewhere. The term is condescending, implying that theprogrammer is acting mindlessly rather than thinking carefullyabout what is required to integrate the code for two similarcases.

At DEC, this is sometimes called "clone-and-hack" coding.