What does "Foobar " or "foo" or "bar" mean? [closed] - variables

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
These words seem to be widely used to naming variables.
What do these words stand for and why are they so frequently used?
By the way, what's the origins of them?

These two words are just placeholders in computer programs. Wikipedia https://en.wikipedia.org/wiki/Foobar seems have a good answer. There are several origin of foo:
A nonsense word in the 1930s comic Smokey Stover by Bill Holman due to having seen it on bottom of a jade Chinese figurine in Chinatown, San Francisco, meaning "good luck".
US Army WWII acronym FUBAR, "F-ed Up Beyond All Recognition", which also explains the origin of bar.
The use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from circa 1960.

It comes from the term FUBAR, which again stands for Fucked Up Beyond All Repair/Recognition. More on it from Wikipedia, here https://en.wiktionary.org/wiki/FUBAR

They have been used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept. The words themselves have no meaning in this usage. Foobar is sometimes used alone; foo, bar, and baz are sometimes used, when multiple entities are needed.

Related

What is the scope of the Single Responsibility Principle? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Another engineer at my job asked me today about "what is this single responsibility thing?" and my answer was as follows:
"Every scope of your code, be it an if statement, a function, a class, a module, should have one reason to change".
But everywhere I read this, people talk in the context of a class. Was I wrong for telling him that SRP applies to every scope he has in his code?.
Bob Martin has tried to clear this up on multiple occasions. The problem is that there are two different principles in play here; and it's extremely unfortunate that one of them doesn't really have a name, which is why it's commonly conflated with the SRP.
Functions should do one thing. They should do it well. They should do it only. --Clean Code (page 35)
That section of the book is simply titled, "Do One Thing" but it is not talking about the SRP. Martin makes this even more clear in his next book.
A function should do one, and only one, thing. We use that principle when we are refactoring... at the lowest levels. But it is not one of the SOLID principles–it is not the SRP. --Clean Architecture (page 62)
The best online explanation of the SRP is Martin's blog, which is summarized in the tag wiki. In the blog, and in his books, Martin is (fairly) consistent in using the term module to describe the scope in which the SRP applies. A module is simply a source file, and that usually just means a class file.
A module should be responsible to one, and only one, actor.

What is the hreflang-equivelant way of targeting different regions? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
One of my projects is going through a global expansion and we have multiple top-level domains with local TLDs for the different countries (I've seen this great answer and I think I'm well aware of the do's and don'ts).
The content is largely the same from one country to the next, except for a few customer products that are/aren't available from country to country and of course, the currency, prices, delivery information, local store addresses, etc, etc..
We can't use canonicals because each domain needs to rank within its own country. But critically, we cannot use hreflang links because all websites are in the same language (in English).
ie.:
We have something like this...
https://www.website.co.uk/ for customers in the uk, in english
https://www.website.com.br/ for customers in brazil in english
https://www.website.ca/ for customers in canada, in english
https://www.website.fr/ for customers in france, in english
In future we'll publish language variations as a directory
https://www.website.fr/en/ for customers in france, in english
https://www.website.fr/fr/ for customers in france, in french
Is there anything like hreflang that we can use to give a strong signal that each domain is specifically tailored to users in that region even though they are in the same language?
Thanks in advance!
ps.: this answer from Google is very useful but our situation just doesn't fit their definition of "country-based language variations".
You don't need a way that's equivalent to hreflang -- you need hreflang :)
Hreflang was designed to signal not just the correlation between pages that have different languages but also scenarios like yours where you have the same language but targeting different geos.
So go ahead and use en-GB, en-BR, en-CA and even en-FR. However, since your content is all going to be in English, you will have to be extra careful to localize the content. Google has been known to disregard weaker sites if they encounter duplicate content, even if it's Hreflang'ed.
To ensure your sites don't get ignored as duplicates, make sure there is country-specific information on every page. The currency and shipping content is an obvious way to differentiate all the pages so make sure that content is highlighted on the pages.

I don't get the joke [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
In ZMQ messaging library there is large number of patterns derived from a base "Pirate" pattern. To quote the documentation:
I like to call the Pirate patterns (you'll eventually get the joke, I
hope).
I have a pretty through understanding of the ZMQ architecture, having worked with it over a half dozen projects and couple of years. Despite this, and reading basically the entire guide, I don't get the joke.
Perhaps there isn't one, but I can't help the itch that I am missing something fairly obvious. Thanks.
From the docs:
reliable request-reply (RRR) patterns that I like to call the Pirate patterns
Pirates say 'arrrr!' like RRR, hence pirate patterns.

Database of similar baby names [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
We are currently building a SQL project that will be searching through a list of baby names. The current search function on our blog (http://www.BabyNamesLog.com) is a simple Wordpress search function and would like to have something more advanced going fwd.
What I would like to do is to return results on a query that would search similar baby names for boys and girls.
For example, if you search for "Nick" you would get results like "Nicolas".
Do you happen to know any databases (preferably public) for this type of task to populate a relationship between nicknames and names?
Thanks in advance guys!
Which database server are you using?
Some have an implementation of the soundex algorithm that you might be able to leverage. Consult http://databases.about.com/od/development/l/aasoundex.htm
An alternate algorithm is at http://en.wikipedia.org/wiki/Match_Rating_Approach
If you absolutely had to, you could add encodings from these algorithms to your database and use them for queries.

How to describe a platform to non-developers? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've been trying to describe the concept of platforms to some non-developer people on my team. I'm trying to explain how platforms are more than just tools and environments. For example, the Facebook Platform. How to describe the fact that the platform is more than just the website, but includes protocols like XFBML, opengraph, etc.
Facebook Platform is one example, but I would be interested if anyone has an abstracted way to describe what 'platforms' are in the tech world. I've had difficulty explaining this concept before in situations unrelated to flash.
Analogies that aren't tech related would be helpful as well.
I would say something about it being all-inclusive and extending to include all functionality that the entire ecosystem around that particular piece of software needs to thrive.
The Wikipedia page might help in putting it into words: http://en.wikipedia.org/wiki/Computer_platform
I use a "restaurant" metaphor, myself: Think of the kitchen, the bar, the dining room as components to the platform. How the decor can change in the dining room without changing the function, but can affect how customers perceive the business. How the recipes instruct the cooks, and the interactions with the wait staff can all affect different aspects of the business much like different pieces of your platform can be modified to affect different aspects of your business. Oh, and don't forget management!