Snippet (programming)
Programming term for a small region of re-usable source code, machine code, or text
In computer programming, a snippet is a relatively small amount of source code that is stored and later inserted into a larger codebase as part of the process of writing the code. Some development tools such as a code editor or an integrated development environment (IDE) provide snippet management features to enhance productivity by allowing a developer to insert a fragment of code instead of typing it.
Nº Q1120538 ★★
Uncommon · Knowledge
Snippet (programming)
Programming term for a small region of re-usable source code, machine code, or text
In computer programming, a snippet is a relatively small amount of source code that is stored and later inserted into a larger codebase as part of the process of writing the code. Some development tools such as a code editor or an integrated development environment (IDE) provide snippet management features to enhance productivity by allowing a developer to insert a fragment of code instead of typing it.
Last price
—
Floor price
—
7-day median
—
30-day sales
0
30-day range
—
In circulation
0
Price history
median
low – high
sales
No sales in this period
Show table
| Date | median | Low | High | sales |
|---|
Sales history
- Last sale
- —
- 30-day average
- —
- 30-day low
- —
- 30-day high
- —
- Sales 7d
- 0
- Sales 30d
- 0
No sales yet.
Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.
From Wikipedia
In computer programming, a snippet is a relatively small amount of source code that is stored and later inserted into a larger codebase as part of the process of writing the code. Some development tools such as a code editor or an integrated development environment (IDE) provide snippet management features to enhance productivity by allowing a developer to insert a fragment of code instead of typing it. In contrast to an abstraction construct, such as a function, a snippet is a form of copy and paste programming – a macro operation that expands the stored template text and inserts the result into the source code. Snippet insertion is similar to a preprocessor macro except that it's inserting the expansion of the macro definition rather than referencing it. Changing the snippet after insertion does not affect the code as does changing the definition of a preprocessor macro. For this reason, best practice is to use a snippet only for relatively simple code such as a function prototype, control structure, or library import. A snippet is typically used when an abstraction is not available (i.e. not supported by the programming language) or not desirable (i.e. due to runtime overhead). A development tool that provides snippet management typically provides for maintaining a catalogue of stored templates that involves operations such as view, add, delete, edit, and rename. Notable tools that support snippet management include: Eclipse, NetBeans, Visual Studio and Dreamweaver. Snippet features like completion and placeholder substitution can be used in shells such as bash and PowerShell. Integrated development environments often supports snippet by implementing the Language Server Protocol which support snippets.
Text: Wikipédia, CC BY-SA 4.0. · Image: The original uploader was Dreftymac at English Wikipedia. (CC BY 2.5) ·
Related cards
Programming idiom
Recurring construct of code in some programming language
Nº Q490173 ★
Patch (computing)
Piece of software designed to update a computer program to fix or improve it
Nº Q208218 ★★★
Scancode
Parcel of data generated when pressing a computer keyboard key
Nº Q1899220 ★★
Function (computer programming)
Sequence of instructions that can be called from other points in a computer program
Nº Q190686 ★★
Compiler
Computer program that transforms source code into object code
Nº Q47506 ★★★
Input (computer science)
In computing, input of a program or process, i.e. a command or signal from outer sources
Nº Q1125955 ★★