Is it wrong to use the word "codes" in a programming context?

Is it wrong to use the word "codes" in programming context?

I shall use these codes.


As a programmer, I cringe when hearing this!

In computer science, "code" is used as a mass noun, specifying the collection of instructions in a specific arrangement as a whole and in no specific quantity. Whether it's one line of code or ten pages, it is still referred to as code, not codes.

When "codes" is used in computer science, it typically refers to values or constants used to specify a trait, access or properties, though in my experience, the actual name of those types of items is used over the word "codes". For example, instead of:

Use these codes to specify the read/write permissions of the file.

You would write/say:

Use these constants to specify the read/write permissions of the file.

Or: Use this enumeration to specify the read/write permissions of the file.


With regard to the use of "code":

Use this code to open a file.

Use these functions in the source code to access the database.

This program code needs to be tidied up.


Yes, it is wrong to use the word "codes" in the programming world if source code is implied:

Noun

source code (uncountable)

  1. (computing, uncountable) Human-readable instructions in a programming language, to be transformed into machine instructions by a compiler, interpreter, assembler or other such system.

Uncountable noun (my emphasis): "a noun that cannot be used freely with numbers or the indefinite article, and which therefore takes no plural form".

The same if code refers to a computer program:

(uncountable) A computer program, or more generally, any defined computing process.

In some other contexts it is all right, for example, access codes.