I’m adding a new section to the blog. It’s called “Explaining Names.” In it I explain names.
Why bother explaining names? I explain names because names are rarely accidents. The name of a thing is what it’s discoverer, or author, or publicist or whoever thought would be a good way for everyone in the world to remember the thing. When we explain names, we guess what this originator of the name was thinking, which, because the originator of the name presumably understood what he or she was naming, tells us a lot about the thing.
Names for things are just words, or, since we’re in a particular subject area, we’ll call them terms. I will focus on explaining the names for very common terms for several reasons. First, common terms represent particularly successful attempts at naming a thing. Like ‘Kleenex’. That is a registered trademark of some company that makes soft paper that people blow their noses into. But the name stuck. It represents a successful attempt at rendering a concept (soft tissue for blowing one’s nose into) into a sound (“Kleenex”). Second, common terms are the ones that people use more, so understanding them is more valuable. And lastly, common terms are the ones where people are most likely use them without really thinking about what the name is, or to use them without really knowing exactly what they mean.
So let’s begin this section with an example:
In computer programming, you can have variables and “literals.” What is a literal? (This is literally the five-thousandth normal English word that the programmers have coerced into meaning something programming-specific.)
First thing’s first: What does this term mean in programming? It means a value that is represented directly in source code, like ‘3’.
So if I have code like,
int myFavoriteNumber = 3; string url = “https://willmurphyscode.wordpress.com”
We can see that I am naming values. I have an integer, I want to name it “myFavoriteNumber,” but I want the value to be “3”. In this example, “3” and “https://willmurphyscode.wordpress.com” are literals.
In Latin, littera means ‘letter.’ So if a value is “literally” present in source code, then the letters (or digits) that make it up are actually there in the code. Like 3, the symbol we use for integer after 2, is actually what you type.
You can think of the name as being short for “some programmer literally typed this in the code.” For example, if we say, “We have to recompile to change the URL because some genius programmer put in the source code as a string literal” you can just translate the last bit to “some genius programmer literally typed the string of letters into the code file.”
So there you go. A literal is a value that is literally typed into the source code.
If you’d prefer a less helpful definition of the word, please check here.
If you have a term that you’d like to have explained in one of these posts, please leave a comment below.
Till next week, happy learning.