0

According to the Cambridge Dictionary, the word source code is countable, even if usually used in its singular form.

I would like to know if it is correct to use the plural to mean the source code of more programs or a collection of source code.

For example, is it correct the sentence:

The source codes of these programs are all under Apache license.

Laurel
  • 66,382
Mark
  • 11
  • 8
    I have been involved in IT for over 30 years, and I disagree with Cambridge: I never treat source code as countable. However, the synonymous usage of source may in fact be considered countable, and the sources of these programs are all under Apache license would be reasonable. – Jeff Zeitlin May 18 '22 at 17:06
  • How many source code have you written? Huh? What now? How much of that source code did you write? – Lambie May 18 '22 at 22:11
  • Thank you for the answers. – Mark May 24 '22 at 08:47
  • 1
    @Lambie — How many times does this hypothetical sentence arise? Never, because in the real world one would ask "How many programs have you written?" – David May 24 '22 at 21:44
  • @David I know I am a pain in the patoutie, but look at this: Legacy codes can be understood as source codes that are derived or inherited from an earlier version of the program or software from someone else. https://www.codegrip.tech/productivity/legacy-code-and-its-improvisation/ Also, I can imagine saying: The source codes of legacy programs. blah blah, blah. That said, I do take your point. – Lambie Jun 03 '22 at 20:05

1 Answers1

-2

It’s a question of opinion. I would avoid it all costs because of my encounter with different codes such as the Morse code and the Genetic Code before the application of the word to computer programming.

An easy way to do so in this case is:

“The source code of each of these programs…”

David
  • 12,625
  • 1
    Glad the poster found my answer useful. Would be interested to know why the three people who downvoted it didn't. Was it because they think it's not a matter of opinion, and that this is a black or white situation? Sadly I don't know because they didn't say. – David May 24 '22 at 21:48