We can describe the world only within the limits of our vocabulary. Basically we want to describe thinking about new things with existing words.
In case of programming we are building new concepts and it might be the case when there is no word to properly describe that concept. So we try to find the best approximation. This task alone is very hard, specifically because there are two layers of modeling: first we model the domain into abstract programming concepts then we need to create a model (approximation) of these concepts that we now want to code to be able to find a word for them.
We can see it simply with a variable: we can use common names for variables which have a clear, easy to see around us purpose: counting => count/counter, indexing => index, ordering => order ... but when we have a variable that should retain an intermediate abstract value to be used futher then this concept cannot be found so easy.
Let's say we need to save the name of a class - generated on the spot - to be used further in the code.
What is the name for this variable?
- "class" - seems the first one, but in most languages this is a restricted word
- "klass" - here we are already creating a new word
- "bucket" - this is more easy to find around us as "a place to put things in", but it does not fit maybe the current code as it is a too large concept
- "intermediate_class_name" - now again this is inventing new words by glueing them together. Might work, might not work depending on coding guidelines and other restrictions
If you're able to envision the main decomposition and flow of the program before building (or rebuilding) it, you'll be much better off. Also be mindful of invariants or points in the process where certain constraints are met. The stuff between these points are to get you from here to there.
If there were only 20-ish, using “foo”, “bar”, etc, or “red”, “yellow, etc, or even “x1”, “x2”, etc. would be good enough (not perfect, but people could easily get used to it, just as they get used to the (mostly) arbitrary name tags we put on people in our social circles)