There's a lot of debate over truthiness.
Merriam-Webster defines it as:
- truthiness (noun)
1 : "truth that comes from the gut, not books" (Stephen Colbert, Comedy Central's "The Colbert Report," October 2005)
2 : "the quality of preferring concepts or facts one wishes to be true, rather than concepts or facts known to be true" (American Dialect Society, January 2006)
Oxford Dictionaries Online defines it as:
noun
[mass noun] informal
the quality of seeming or being felt to be true, even if not necessarily true.
Origin:
early 19th century (in the sense 'truthfulness'): coined in the modern sense by the US humorist Stephen Colbert
It was used a little bit on Usenet prior to Stephen Colbert, but usually explained as soon as used, such as "the quality of stating concepts or facts one wishes or believes to be true, rather than concepts or facts known to be true".
Back to programming. Regardless of the origin, this modern sense of "truth from the gut, even if not true" is clearly incorrect most of the time when discussing Boolean logic and truth tables: this if
statement is definitely true, and that while
statement is false until (i > k)
. My gut feeling doesn't come into it.
If you're using truthiness in programming, most likely you're using the rare 19th century meaning of truthfulness, and it would be both clearer (and arguably more correct) to use truthfulness or simply truth.
Ngram:
Of course, English changes as usage changes, and some people have started to use truthiness to mean truth in programming. However, I would advise against truthiness to avoid any ambiguity of meaning ("real absolute truth" vs. "my gut feeling of truth, regardless of the facts").
The term 'payload' is used to distinguish between the 'interesting' information in a chunk of data or similar, and the overhead to support it. It is borrowed from transportation, where it refers to the part of the load that 'pays': for example, a tanker truck may carry 20 tons of oil, but the fully loaded vehicle weighs much more than that - there's the vehicle itself, the driver, fuel, the tank, etc. It costs money to move all these, but the customer only cares about (and pays for) the oil, hence, 'pay-load'.
In programming, the most common usage of the term is in the context of message protocols, to differentiate the protocol overhead from the actual data. Take, for example, a JSON web service response that might look like this (formatted for readability):
{
"status":"OK",
"data":
{
"message":"Hello, world!"
}
}
In this example, the string Hello, world!
is the payload, the part that the recipient is interested in; the rest, while vital information, is protocol overhead.
Another notable use of the term is in malware. Malicious software usually has two objectives: spreading itself, and performing some kind of modification on the target system (delete files, compromise system security, call home, etc.). The spreading part is the overhead, while the code that does the actual evil-doing is the payload.
Best Answer
That's really not too far from the programming sense of the word. Context generally has to do with some kind of state that's necessary to perform an operation.
A graphics context is typically an object or structure that contains all the information needed to draw in a particular place. Graphics contexts are often maintained in a stack, and any drawing operations happen using the information in the context at the top of the stack. A graphics context could contain information like the buffer in which to draw, current pen size, drawing color, background color, transformation matrix, pen location, and so on.
Similarly, you could have a database context, a file context, an audio context... none of these things are specifically defined outside the scope of a given API, but they all mean the same thing -- the set of conditions needed to properly carry out operations in the system in question.