One-off Code

One-off code is a computer program written for a specific purpose the programmer expects not to reuse.

For example, a person might need to categorize a set of text files according to some criteria. If there are hundreds of files and he knows a suitable programming language (e.g. Perl), he might write a program to automate the process, especially if he expects the effort spent on writing a computer program to do the task will be less than that required to categorize the files manually. Further, if he expects never to have to repeat the task, a different approach than that suitable to regular categorization tasks will be likely.

One-off code tasks may feature less formal code writing, a lack of in-code comments, and quick and dirty techniques. Conversely, a programmer expecting to have to do a given task regularly might spend more time on making the program parameterizeable, general, usable as a component or subroutine, and "presentable": suitable for publication under the programmer's name.

Historically, interpreted languages were geared towards such one-off coding, while compiled languages existed for programs of lasting value. Today, that difference has vanished for two reasons: many interpreted languages are used in large projects (Perl, Python, etc.), and, on the other hand, some compiled languages contain facilities specifically aimed at one-off programming. For example, the compiled programming language D employs very rapid compilation (comparable to the first phase of running a Perl program), and the compiler provides a "compile and run at once" switch, many users use D for tasks where one would typically use Perl, Shell, or Python.

Read more about One-off Code:  See Also

Famous quotes containing the word code:

    Hollywood keeps before its child audiences a string of glorified young heroes, everyone of whom is an unhesitating and violent Anarchist. His one answer to everything that annoys him or disparages his country or his parents or his young lady or his personal code of manly conduct is to give the offender a “sock” in the jaw.... My observation leads me to believe that it is not the virtuous people who are good at socking jaws.
    George Bernard Shaw (1856–1950)