1

people use "Code Snippet" or "Code Snippets" everywhere.

"Code Snippet" is a term used to describe a small portion of re-usable source code, machine code, or text.

following lines of code comes from wiki (denote as snippet_1)

temp = x
x = y
y = temp

and another (denote as snippet_1)

Hello {%first_name%} {%last_name%}

it seems that "Code Snippet" is a countable noun. so, snippet_1 and snippet_2 are two "Code Snippets"?

do I use this term correctly?

1
  • 1
    The title you've given your question doesn't seem to match the question itself. Are you asking whether "code snippet" is a countable noun, or whether the example you have posted is actually a code snippet? The answer to the first question is "yes"; I have no idea what the answer to the second question is.
    – Nanigashi
    Commented Jun 20, 2019 at 2:07

1 Answer 1

2

Yes, "code snippet" is a countable noun, so it is perfectly correct to use it as you have. For example:

The following two code snippets illustrate the limitations of the direct approach.

I don't see any errors in your understanding or usage in the question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .