I was reading the PostgreSQL official documentation and in every other page I read something like, foo and bar.
Foo, Bar and PostgreSQL
PostgreSQL documentation has 675 instances where the word foo is used.
Understanding the concept of database, PostgreSQL came up with the example.,
CREATE DATABASE foo WITH TEMPLATE template0;
Understanding the concept of creating table, PostgreSQL came up with the example.,
CREATE TABLE foo (fooid int, foosubid int, fooname text);
Even columns.,
1 2 3 4 5 6 7 |
SELECT * FROM items_sold; brand | size | sales -------+------+------- Foo | L | 10 Foo | M | 20 Bar | M | 15 Bar | L | 5 |
I stopped reading and thought of knowing what does this foo and bar really mean?
Then I came to know about this interesting fact!!
The choice of “foo” coupled with “bar” is derived from the colloquial acronym FUBAR (pronounced FOO-bar). Legendarily from the military world, it represents the phrase: “Fucked Up Beyond All Recognition” (in ‘mixed company’ the first word could be “Fouled”
The use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from circa 1960
Wiki says,
The terms foobar, fubar, or foo, bar, baz and qux (alternatively, quux) are sometimes used as placeholder names (also referred to as metasyntactic variables) in computer programming or computer-related documentation. They have been used to name entities such as variables, functions, and commands whose purpose is unimportant and serve only to demonstrate a concept.
The origin of foo and bar is found here
Considering the example., if I have to explain how a database is created in PostgreSQL
if I use
create database monkey;
The above code lets you fall back on your knowledge of real world things.
If you are trying to explain a concept where the important part is not what is being done but on how it is being done, you can try
create database foo;
Here you concentrate on creating database some name instead of monkey 😉
Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.
If you want to be updated with all our articles
please follow us on Facebook | Twitter
Please subscribe to our newsletter.