3

Since a few years I hear and read the term the coding when they mean the code more and more often. Personally this sounds so absolutely wrong to me and I think it is.

A few examples:

  • "Can I have your coding?"
  • "The coding is buggy"
  • "The coding (containing the invalid instructions) was done years ago"
  • "In this coding you can find xyz"

I would appreciate it if someone (other than me for strategic reasons) could clearly and as concisely as possible summarize when to use:

  • the term coding
  • the term code

so that I can point people to this question every time I hear/read this and they immediately understand the difference (and hopefully start using those terms in their (original) meaning).

PS: My question aims at the context of software development exclusively (so e.g. code as in cryptography or security or other fields are out of context).

Edit: Enhanced 3rd example because the semantics were unclear.

  • 4
    Not to deny the reality of your claim, but I have never heard this misusage. – Jeff Zeitlin May 25 '18 at 14:42
  • Here a few examples: google.com/… – Alex May 25 '18 at 14:49
  • 5
    The third example does not fit the other three. In that example, coding is actually the better term to use: coding is done, code is written. You wouldn’t say that anyone “did the code” years ago; they either did the coding or they wrote the code. – Janus Bahs Jacquet May 25 '18 at 15:11
  • 2
    I would speculate (though I can't confirm it) that most of the cited examples of "give me the coding" are Indian English: or at any rate, not British or American native speakers. – Michael Kay May 25 '18 at 18:47
  • 5
    Where are you located? Are native English speakers saying this? Only #3 is acceptable to me as a native speaker of AmE (who does code daily). – Azor Ahai May 25 '18 at 19:55
14

Code is the result of a coding process. The coding (process) of an algorithm results in executable code (product).

There is a similar question about learn to code vs learn coding. In that case they are equivalent, as they are both verbs.

In your example The coding was done years ago, the usage is arguably correct when you talk about the process. With a different verb it would not work:

*The coding was written years ago
The code was written years ago

Edit: Just for completeness, to code is also a verb. A code is a mapping between symbols, eg Morse code mapping e to '.' and t to '-', or ASCII mapping 32 to ' ' and 65 to 'A'.

  • 1
    "code" is also a verb. i'm gonna code up an algorithm. – robert bristow-johnson May 26 '18 at 4:47
  • Actually, "code" and "coding" are different forms of the same verb. – Hot Licks May 31 '18 at 21:59
  • Ultimately they are all related, of course. Coding as in the example sentences of the question is not a verb, but a noun, derived from the verb (which in turn might be derived from the noun code again). – Oliver Mason Jun 3 '18 at 12:02
2

Say you want to tell your friend that you are going to write a program that would find the solution to a quadratic equation. So you can say,

I am going to code a program that would find the solution to a quadratic equation.

Or you can say,

I am planning on coding a program that would find the solution to a quadratic equation.

You can also say,

I am going to write a program that would find the solution to a quadratic equation.

Also, "code" may be used in a sense that you are going to write the program but haven't started yet. "Coding" in that sense is used when you have stated to program.

0

I'll give it a try myself because I think I have a slightly more formal answer than the answers provided up to now (Oliver and Elsa are going into the same direction but the answers are a little bit vague in my opinion). I'll let the voters decide on the final accepted answer later.

My try:

  1. "Code" is a noun ("here is my source code")
  2. "to code" is the verb (I code, you code,...) and the present participle is "coding".
  3. "Coding" is a Gerund (https://en.wikipedia.org/wiki/Gerund): a verb form that functions as a noun

The intention in the examples is to talk about the (code) object/thing and not about the (coding) action/process (Oliver and Elsa mentioned this as well and I think this is an important distinction). Therefore the noun should be used which is "code" and the examples would be correct if the word "Code" would have been used:

  • "Can I have your (source) code?"
  • "The (source) code is buggy"
  • "The (source) code (containing the invalid instructions) was done years ago"
  • "In this (source) code you can find xyz"

So why would someone use "coding" instead ? I assume this comes from the Gerund mentioned in 3) because the Gerund by definition is used like a noun. But the meaning of the Gerund is similar to the verb because it aims at the action/process and this is not what the examples try to express. Therefore the usage of "coding" in the examples is wrong.

  • When you read the 1st sentence in my question I stated "...I hear and read the term 'the coding' when they mean' the code' " – Alex May 26 '18 at 1:35
  • One would use "coding" when the subject under discussion is the manner of programming rather than the product of programming. "The coding is buggy" means that there are aspects of the way the code is written which are apt to lead to bugs -- poor formatting, poor variable naming, lack of "structure", etc. – Hot Licks May 26 '18 at 1:39
0

Code is the main word of programming, and coding is the process of programming. This is the really important difference between code and coding.

0

A code is a product, and coding is an action.

  • 2
    Welcome to ELU, please add a source to support your answer. – JJJ May 25 '18 at 15:23
  • 7
    My problem with this answer is the use of "A", I would always choose "Code is...". Similarly the use of "I wrote some codes..." bothers me (when talking about developing using a modern development language that generally consists of statements), and prefer "I wrote some code..." (which is discussed here) – Nick A May 25 '18 at 18:28
  • 3
  • @JJJ Ah yes, thank you, that's a much better link than the one I gave – Nick A May 26 '18 at 1:17
-1

One shouldn't use the words "code" or "coding", these should be limited to the output of the compiler, and what the compiler does.

What one does when programming is that one "writes sources". A programmer is writing sources for people, mostly. When needed, the compiler transforms the source into code. It also means a programmer is a writer, not a "coder".

Why? "code" and "coding" has meanings such as "hiding", "obscuring", "ciphering". A programmer is not trying to mask his work, but on the contrary to make it as clear and as easy to understand as possible. It's been a very long time since mainstream programmers have had to decipher or cut code directly.

The use of the "code" and "coding" words is a common mistake in our industry, and comes from mistaking the result with the origin.

  • Seems Cambridge Dictionary (and probably other dictionaries) disagrees with you: code (verb, specialized [computing]): to write computer programs (= instructions): – Andrew T. May 26 '18 at 8:15
  • Is Morse code (around for much longer than computers) used to hide or obscure messages? Some words have more than one meaning, and code is one of them. – Peter Shor May 26 '18 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.