DEV Community

Cover image for Trivia #1: Who cursed us with 'foo bar'?

Trivia #1: Who cursed us with 'foo bar'?

Sylwia Vargas on February 04, 2020

Welcome to my little CS trivia series. Every week I will post a new trivia piece because it seems that my mind is made of pieces of knowledge that ...
Collapse
 
k_vhouston_d11d3aeca5156 profile image
K V Houston

Thank you

Collapse
 
axelledrouge profile image
AxelleDRouge

I would never name my function toto, but when I must use dozens of console.log then it will be console.log("toto") ou console.log("coucou") "coucou" being "hello" in a familiar french.
And yeah I don't like foo and bar either. They confuse me more than anything else

Collapse
 
sylwiavargas profile image
Sylwia Vargas

Totally! Iā€™m a huge advocate of naming your functions, objects and variables descriptively :)

Collapse
 
axelledrouge profile image
AxelleDRouge

Like many of us. How many articles on naming is there on dev.to ? probably a lot!
Which is why foo and bar should be banned. Good practices on naming right from the start and everywhere

Thread Thread
 
sylwiavargas profile image
Sylwia Vargas

I grew very frustrated recently with a documentation where they used ā€œfoo barā€ a lot and started wondering where these nonsensical words came from šŸ˜“ maybe we should write an extension that replaces metasyntactic variables with ones that have some logical relationship to each other ĀÆ_(惄)_/ĀÆ

Collapse
 
mccurcio profile image
Matt Curcio

I was told by old-timers in WWII that

Fubar = f___ (or fouled) up beyond all repair.

That's what Gramps said. ;))

Collapse
 
sylwiavargas profile image
Sylwia Vargas

Well, at least foobar has some positive connotations for you šŸ™ƒ

Collapse
 
iamschulz profile image
Daniel Schulz

I use a lot of "blubb", "bla" and "schubidu" for prototyping :)

Collapse
 
sylwiavargas profile image
Sylwia Vargas

That does sound fun! āœØ

Collapse
 
katnel20 profile image
Katie Nelson

Wibble, Wobble and Wubble sound like great names for functions. I might use those next time a have a triplet to write!

Collapse
 
sylwiavargas profile image
Sylwia Vargas

Yes! At least they are fun! But 'foo' and 'bar'?! I am very much not impressed šŸ‘ŽšŸ‘ŽšŸ‘Ž