News for hackers. Stuff that matters.

Ask HN: “code” or “codes”?

There seems - subjectively - to be a recent (years) uptick in the use of "codes" referring to source code. But because the terms are generic, it's hard to get data (e.g. google trends is unhelpful.)

What's others' perception on this? Is there an increase in use of "codes"? Do you see any cultural/regional correlation?

(And, perhaps controversially, does "codes" still sound wrong? - it conflicts with the grammar of an uncountable / mass noun)

( 16 comments | 4 points | on HN )
Re:Ask HN: “code” or “codes”? by dusted on Monday October 03, 2022 @03:56AM (#33064682)
I've heard people referring to code as "codes" which seems silly to me for some reason..

I kind of dislike both terms, "codes" seems to refer to each individual statement in isolation, which makes zero sense at all. "The code" I think, refers to the entirety of a program/function/system, and makes a bit more sense.

However, code suggests something that is difficult to understand, which is the opposite of what's actually going on..

You're not "coding", you're writing a program or even programming.. If anyone is coding it's the compiler or assembler translating your easliy understood programming text into the binary machineCODE, which is actually annoying and hard to understand.

Re:Ask HN: “code” or “codes”? by breadj on Monday October 03, 2022 @02:15PM (#33071465)
I've thought about this, too, but it's sort of like the "hacker" term in pop culture. What do you think might be better one/two word descriptors? Program source, maybe?
Re:Ask HN: “code” or “codes”? by dusted on Tuesday October 04, 2022 @07:13AM (#33078778)
In Danish I refer to the it as the source text, "kildetekst", in English I use "source" mostly, program source or source code are a bit long feeling to me.
Re:Ask HN: “code” or “codes”? by brennvin on Monday October 03, 2022 @12:29AM (#33063487)
"Codes" is correct when the intended meaning is access codes and the like, but not for source code, which is a non-countable noun.

I think the uptick is due to the increased number of participants who are not native speakers, mainly from Asia and eastern Europe I would presume--I'm not a native speaker either but the distinction between countables and non-countables is natural to me, coming from another Germanic language.

Re:Ask HN: “code” or “codes”? by jhugo on Monday October 03, 2022 @08:03AM (#33066274)
> There seems - subjectively - to be a recent (years) uptick in the use of "codes" referring to source code.

I agree that there is an uptick in the last few years, but I've never encountered "codes" used by a native English speaker with an understanding of software (occasionally, even 10+ years ago, I've heard it used by non-technical people).

> And, perhaps controversially, does "codes" still sound wrong?

To my (native English speaker) ears, yes, very wrong, and all of the people I've encountered who use "codes" when referring to source code make numerous other common mistakes which I consider "codes" to be one of.

Re:Ask HN: “code” or “codes”? by an1sotropy on Monday October 03, 2022 @01:07PM (#33070421)
Here's an informative google search:

https://www.google.com/search?q=%22finite+element+codes%22

I don't know about a recent uptick in "codes", but I know it is incorrect to attribute using "codes" to non-native English. As I noted in another comment, software for numeric and scientific computing is very commonly referred to as "codes". Finite element simulations are a good example of something where the code has been written and refined over many decades, and so the result is a treasured collection of discrete objects that are passed down. You can see that in how "codes" is used in the search results above.

Re:Ask HN: “code” or “codes”? by jhugo on Monday October 03, 2022 @09:55PM (#33075983)
There is quite a different vocabulary between academic/numerical/scientific computing and "commercial" software engineering. Perhaps my previous comment should have been more explicit that I was talking about software engineering, but given the context I think it should have been clear.
Re:Ask HN: “code” or “codes”? by ThrowawayR2 on Sunday October 02, 2022 @08:16PM (#33061862)
You could just Google it: https://english.stackexchange.com/questions/20455/is-it-wron...

"Codes" seems to be considered valid in the context of scientific computing but not generally elsewhere in the software industry.

Re:Ask HN: “code” or “codes”? by an1sotropy on Monday October 03, 2022 @01:15PM (#33070555)
Yes - the answer from "Glorfindel" is the important one.

Another way to think about it: when you're inside a web browser, you're using "code".

When you're inside an airplane, or driving a car over a bridge, or at the top of any modern building, you're benefiting from someone having used "codes" to numerically simulate the material properties and dynamic responses of those systems, to increase your safety.

Re:Ask HN: “code” or “codes”? by Am4TIfIsER0ppos on Tuesday October 04, 2022 @03:35PM (#33085577)
Depends if I can have 1 code. In common use it is the opposite to data which is the plural. When was the last time you heard (in English) of a singular datum?
Re:Ask HN: “code” or “codes”? by nathanaldensr on Sunday October 02, 2022 @11:22PM (#33063145)
Code by itself is not countable IMO; therefore, it's code. Lines of code are countable, however.
Re:Ask HN: “code” or “codes”? by an1sotropy on Sunday October 02, 2022 @08:55PM (#33062143)
"Codes" is absolutely standard and common in settings like numeric or scientific computing (like, fluid dynamic simulation, large matrix linear algebra, constrained optimization). You could say this is because that community more often has old people who talk different.

Or, imho, you could imagine that those pieces of code, for doing very precise things under specific constraints (of memory, or CPU, etc) is software that received maybe thousands of person-hours of attention and wisdom, over many years or decades, so they are battle-tested, esteemed, and highly trusted objects. Software that was written in Fortran when Fortran was the only language with good optimizing compiler, and the software is still running in Fortran because the Elders were wiser than we are. A collection of such software is sensibly called “codes”.

Software in many other circumstances is more of a fluid and maleable thing, shifting in form and purpose in response to a changes in needs and fashion. “Code” here is more like air or bread, a medium we inhale and emit, not a collection of specific venerated objects.

Anyway, that’s how I understand the code vs codes divide, having seen both sides of it.

Re:Ask HN: “code” or “codes”? by yuppie_scum on Sunday October 02, 2022 @07:56PM (#33061693)
Codes sounds wrong. Code is a collective noun.
Re:Ask HN: “code” or “codes”? by FroshKiller on Monday October 03, 2022 @06:50AM (#33065751)
Uncountable, not collective.
Re:Ask HN: “code” or “codes”? by uberman on Sunday October 02, 2022 @07:59PM (#33061728)
I have never heard the term "codes". If one were to use it, I would assume that they are non native speakers
Re:Ask HN: “code” or “codes”? by Smar on Monday October 03, 2022 @03:13PM (#33072262)
I like calling it as a wild duck.