15/06/2017

Please stop referring to source code as "a code"

I follow programming-related topics on Quora. Lately, I've stumbled upon an odd turn of phrase. I'm speaking of the tendency to refer to code as "a code," as in "I wrote a code for a game."

I see these questions with increasing frequency:

How can I make a code harder to hack?

What does it mean to 'debug' a code?

What are the steps from writing a code to having a complete software?

What is the difference between a code and an algorithm?

How to reuse a code in Java? 

How do I write a code for login application in java?

How can I write a code for a rectangular box to write text in it?

How can I make a code that access a website and do things?

And so on. Unfortunately, this isn't a moment's lapse. I usually like it when people play with language, but this time, I balk. A typo is forgivable, but this isn't a typo. It's a hideous misapprehension inflicted on language itself. It's wrong.

Code is is never "a code." Code is code. I've been trying to discover why I am so repulsed by the addition of a simple pronoun. Why does it bother me so much?

It could just be snobbery on my part. I take pride in using language correctly. I'm frustrated when I feel other people aren't making the same effort.

It could be unfamiliarity with the vernacular. After all, I see a lot of Indian posters referring to it as "a code." The term alone shouldn't be offensive. If this is a mere colloquialism, it would be stupid and wrong of me quibble over minutia.

It could be gatekeeping: as a middling programmer, I could subconsciously be trying to exclude people based on arbitrary criteria and some notion of what a "pure" programmer should be, in order to keep the field more exclusive. (God, I hope that's not it.)


Regardless, I'm pretty sure it has to do with my perception of what programming should be. Because for me, as dirty a slog as coding ever gets in practice, the idea of programming is something beautiful. It's creation. It's building things out of things you've built, turtles all the way down.

"A code" can mean many things. It could be an opcode, or a secret message. But my most visceral association is that of cheat codes on 16-bit computers. You don't have to understand the game or the code: you enter it, you bypass the challenge, and are declared winner.

So when someone asks me, "could you give me a code for printing a file," what I actually hear is, "could you enter the cheat code for me?" A impression, I add, that isn't helped by so many of these questions being demands for a complete solution.

That, to me, feels like a mockery of what programming should be. Sadly, it seems there's a whole lot of CS students out there who subscribe to this idea of rote memorization, and a whole lot of faculties who encourage the practice.

Then again, should programming be hard? It used to be harder by far; the tools were worse, the information was unreliable and difficult to find, and you had to expend a lot more effort to reach the same result and reliability. Better tools, a democratization of techniques and information, and a more permissive approach to teaching meant anyone could become a programmer. The rise of open source and the quickened feedback loop of error reporting have made commercial programs more reliable than ever. So if programming is getting easier, is it really such a bad thing?

In short, do we as programmers prefer it to be an arcane domain, or do we embrace the paradigm shift?

I think the salient point is that no matter what happens, and no matter how the parameters of the profession change, a good programmer is one who resolves to remain a professional. If programming is made easier, why, then we use that freed-up headspace to learn more about the field.

A professional can't rely on cheats: they have to write programs that work. That program must be written judiciously, by a programmer who knows their domain and the language. And when such a program is done and compiled, it will do the job.

At that point, the misuse of a pronoun is a minor issue. Still heinous and disturbing, of course, but minor.

(Seriously though, please make them stop.)

No comments:

Post a Comment