The answer to this question is found in the “usage”.
OP:
Is it wrong to use the word “codes” in programming context?
I shall use these codes.
It depends on what you are referring to, even in programming context.
If you mean a list of passwords, references (eg ‘error codes’), a series of long character strings and formulas for computation, or sub-kernel/sub-C level lines used by compilers or interpreters that Bill Joy might use to make binary talk to the hardware, then no, it is not wrong.
If you mean a section of JavaScript, HTML embed snippets, or even multiple Python files, then yes, it would be wrong from an English usage viewpoint.
In the ESL world, we would say that the word “code” in reference to the many lines of, say, a PHP web app or system process written in C is “uncountable”. This echoes a concept in another answer about “mass nouns”.
English Club:
uncountable nouns are substances, concepts etc that we cannot divide into separate elements
This does not mean that nouns must always be used as only countable or uncountable. Note, that explanation from English Club does not describe “words” themselves as only being either countable or uncountable, but the “substances, concepts” etc nouns may refer to. Take for example “water”…
Uncountable:
He spilled water on the floor.
Countable:
Please bring me a water. (a glass of water)
Minnesota has many waters. (bodies of water)
As a coder myself, if I said, “Use these codes,” I would be referring to something like what Google provides, discussed in this linked article, which uses “codes” in the plural as part of the title:
Google:
Sign in with backup codes
Right away, because “codes” is plural, I know this Google article is not a PHP or Python script; it is a group of passwords.
Personally, I don’t often say, “codes,” in reference to exit codes, though I might; I say, “exit codes,” for clarity, largely due to the reasons behind this question.
In the uncountable, “code” is often treated like water, rice, or pasta—they don’t have “noun-number” (plural/singular). “Code” in reference to the contents of a software application is like a giant bowl of pasta and each “line” is like a noodle. That imagery could serve as a guide.
I suppose one could say…
Here are the codes you can use on our server.
…in reference to a series of short commands or code snippets, but I think it rather amateur to use the plural countable it that way. And, I might not hire a person simply based on hearing that, whether for teaching English or for a coding job. It would tell me a lot about the quality of English usage the coder would be putting into UX instructions in an app and the lack of exposure the applicant had to experienced people in the industry. But, now I’ve just crossed into other topics of Workplace and UX.
If I want to use a plural noun to describe “code” in reference outside passwords and encryption keys, I prefer either “commands” or “lines of code” (also known as LOC).
I write partially from my experience, having my own computer course at github.com/inkverb/vip and my own English course with style guides at write.pink. This is how I use the word in my work.