Please, please, stop using "foo" and "bar” in code documentation. Give us real examples that mean something. Not "if (foo > bar)," but “if (height > limit)." Not “foo++” but “counter++”. Give us a logical hook to hang our hat on, not nonsense words.
@waldoj I came across this one time in Wikipedia and it completely ruined the ability to understand what the hell they were talking about. Then I edited the article to use real words and it was immediately understandable
@SwiftOnSecurity Every time I read the jq manual, I get annoyed at how hard it is to follow for this reason. It's a great tool but its manual is really dragged down with all the foo/bar/baz nonsense. https://stedolan.github.io/jq/manual/#Basicfilters
jq Manual (development version)

@waldoj @SwiftOnSecurity It has never made things much worse for me, but I've never been particularly sure why it was a practice either.

@lispi314 @waldoj @SwiftOnSecurity I have to say I am a bit baffled that people find the foo/bar convention to be confusing when used to document in a generic way. To me, it is just like the convention of using x in math.

The whole point is they are easy to recognize as things you need to replace.

However I realize some newer programmers consider this convention to be a kind of gate-keeping by us old-timers, and that would be bad. So maybe it is time to stop using our cherished foo and bar.

@eob @lispi314 @waldoj @SwiftOnSecurity I think there is cognitive cost of imagining what could go in place of foo and bar and replacing it. If you are not a beginner you might not feel the cost. Offering a contextual example makes things easier in some cases, but on the other hand it makes the example less general/abstract which can be a problem too.
@villares @eob @lispi314 @waldoj @SwiftOnSecurity feels like it needs a new dimension convention added to technical language conventions: a distinctly visually different set of symbols for generic variables (entirely different font, which I've seen, or, since all of this lives on the web, even a subtle floaty animation), or alternatively, when read aloud, a different intonation or voice from the rest of the surrounding code (also feel like I've heard this technique used in teaching spoken language)

@dtipson @villares @eob @waldoj @SwiftOnSecurity #AuditoryIcons (https://en.wikipedia.org/wiki/Earcon) might also be usable, for audio interfaces.

#Emacspeak is what introduced me to the concept, where they're used to denote lexical/syntaxic information for programming (among other things).

#Earcon

Earcon - Wikipedia

@lispi314 @villares @eob @waldoj @SwiftOnSecurity love this concept! Given that computers are a few years away from consumer-level being able to live track eyes and know exactly what word I'm reading at any given moment, they could decorate and score the text with all sorts of subtle audio cues that convey meaning

@dtipson They're pretty much already there.

I'd strongly suggest never enabling that in any networked software.

@lispi314 idk, I'm fine with every human and computer on the planet reading along with me, I read great stuff

@dtipson Unless you tightly control exactly what is displayed on your screen & what you read, that'll mostly be used to uniquely optimize spam/ads for your consumption (nevermind all the other privacy implications).

LLMs will make that even easier now.