foobar
by Daniel Simmons
丹尼尔·西蒙斯(Daniel Simmons)
You’re just sitting at your desk, minding your own business, trying to get some work done. Then, as inevitably happens, you hit a minor roadblock: your code throws a cryptic error message.
您只是坐在办公桌前,专心经营自己的生意,试图完成一些工作。 然后,不可避免地发生了一个小障碍:您的代码抛出了一条隐秘的错误消息。
“No problem” you think. This isn’t your first rodeo. So you copy and paste the error message verbatim into Google and see what you get.
您认为“没问题”。 这不是您的第一个牛仔竞技表演。 因此,您将错误消息逐字复制并粘贴到Google中,然后看看会得到什么。
No luck.
没运气。
There are plenty of search results, but none of them fit your situation closely enough to really provide a useful answer.
搜索结果很多,但没有一个能完全满足您的情况,无法真正提供有用的答案。
And so begins the creative Googling process. You try several combinations of the error + the context that you’re using it in. You try including the name of the library that you’re using. You know you’re getting closer…
因此,开始了创造性的谷歌搜索过程。 您尝试使用错误和上下文的多种组合。尝试包含正在使用的库的名称。 你知道你越来越近了…
Now on your sixth attempt, you try another combination of search terms and hit return. The page loads and you’ve just begun skimming over the results when, suddenly, your browser window splits open and you see this:
现在进行第六次尝试,您将尝试搜索字词和点击返回的另一种组合。 该页面加载完毕,并且当浏览器窗口突然打开并突然看到以下内容时,您才开始浏览结果:
“You’re speaking our language. Up for a challenge?”
“您在说我们的语言。 准备挑战吗?”
“Wait, what?”
“等等,什么?”
“Where did this come from?”
“这个是从哪里来的?”
“Some sort of challenge from Google… Is this based on my search history?”
“来自Google的某种挑战……这是基于我的搜索历史吗?”
You forget about the bug in your code entirely. You are now completely engrossed in the bizarre situation that you find yourself in. And, as interesting as all of this already is, you notice something that only adds to the intrigue. Alongside the message, you see that the first button says:
您完全忘记了代码中的错误。 现在,您完全沉迷于发现自己的怪异情况。而且,尽管这一切已经很有趣了,但您会注意到一些只会增加好奇心的东西。 在消息旁边,您看到第一个按钮显示:
“I want to play”
“我要玩”
Oh, so this is a game? Interesting…
哦,这是游戏吗? 有趣…
Overcome with curiosity, you accept. The split in your browser window slowly grows to reveal a large black screen, which then fades away. You are then redirected to www.google.com/foobar/. A black screen fades in and some text appears. It looks like a Unix shell.
接受,克服好奇心。 浏览器窗口中的拆分缓慢增长以显示大黑屏,然后逐渐消失。 然后,您将被重定向到www.google.com/foobar/ 。 黑屏消失,出现一些文本。 它看起来像Unix shell。
The aesthetic of the page (the retro computer font, the hidden terminal, the lack of a modern UI) combined with the “007 — Your mission, should you choose to accept it” feel of this whole experience makes you feel like you’ve been drawn into a secret world. You are now completely engrossed.
页面的美感(复古的计算机字体,隐藏的终端,缺少现代的UI)与“ 007-您的任务,您应该选择接受它”相结合,对整个体验的感觉使您觉得自己已经被吸引到一个秘密的世界。 您现在全神贯注。
There is some text at the top of the screen:
屏幕顶部有一些文本:
“Google has a code challenge ready for you”
“ Google为您准备了代码挑战”
Just below, there is a paragraph of blueish text that sets the stage for a sci-fi adventure:
在下面,有一小段蓝色文字为科幻冒险奠定了基础:
“Success! You’ve managed to infiltrate Commander Lambda’s evil organization, and finally earned yourself an entry-level position as a Minion on her space station. From here, you just might be able to subvert her plans to use the LAMBCHOP doomsday device to destroy Bunny Planet. Problem is, Minions are the lowest of the low in the Lambda hierarchy. Better buck up and get working, or you’ll never make it to the top…”
“成功! 您已经成功渗透了兰姆达指挥官的邪恶组织,并最终获得了在她的空间站上担任小黄人的入门级职位。 从这里开始,您也许可以颠覆她使用LAMBCHOP世界末日设备摧毁“兔子星球”的计划。 问题是,奴才在Lambda层次结构中是最低的。 更好地承担责任并开始工作,否则您将永远无法达到顶峰……”
“Alright, then. So it looks like I can either explore the terminal or start the challenge…”
“那好吧。 因此看来我可以探索航站楼或开始挑战……”
Your curiosity gets the better of you again and you think “I can’t just start the game without snooping around a bit”. So you type “help” and hit return. A list of shell commands pops up.
您的好奇心会再次使您变得更好,您会认为“我不能不偷窥就开始游戏了”。 因此,您输入“ help”并点击回车。 弹出shell命令列表。
“Very interesting. So we’re clearly going to be working with a file system. But this is a pretty limited list of options.”
“很有意思。 因此,我们显然将要使用文件系统。 但这是一个非常有限的选项列表。”
You decide to see if any of the unlisted common commands are available, so you try something simple:
您决定查看是否有任何未列出的常用命令可用,因此您尝试一些简单的操作:
foobar:~/guest$ pwd
It works! You see:
有用! 你看:
/home/guest
Awesome.
太棒了
“Alright, let’s take a look at that home directory. There’s bound to be some more interesting stuff there”
“好的,让我们看一下该主目录。 那里肯定会有一些更有趣的东西”
So you try:
所以你尝试:
foobar:~/guest$ cd ..
And…
和…
Nothing.
没有。
You get a new line with no error but when you run pwd
again, just to check, you still see /home/guest
. Ok so this thing probably isn’t the open-world unix shell chocked full of easter eggs that you’d hoped it was. So you decide to just get on with the challenge.
您会得到一条没有错误的新行,但是当您再次运行pwd
时,仅检查一下,仍然会看到/home/guest
。 好的,这件事可能不是开放世界的unix外壳塞满了您希望的充满复活节彩蛋的东西。 因此,您决定只接受挑战。
You type in the word “request” and hit return.
您输入“ request”一词,然后按回车键。
A prompt appears, warning you that this is a timed challenge and you will have 48 hours to complete it.
出现提示,警告您这是一个定时挑战,您将有48个小时来完成它。
“Wow. Ok, so it’s timed…”
“哇。 好的,是时候了……”
You agree and proceed.
您同意并继续。
More sci-fi narrative, and then you see that something called solar_doomsday
was added to your home folder. So you navigate to the folder, open it, and find four files:
进行更多的科幻叙述,然后您会看到名为solar_doomsday
已添加到您的主文件夹中。 因此,您导航到该文件夹,将其打开,然后找到四个文件:
constraints.txtreadme.txtsolution.javasolution.py
Readme seems like the obvious place to start. You open the readme file and see the following:
自述文件似乎是显而易见的起点。 您打开自述文件,然后看到以下内容:
“Ok” you think “when you strip away the narrative, they want me to write a function that returns a sorted array of all the square numbers (including 1) that add up to a given number, starting with the largest.” Pretty cool.
“好吧”,您认为“当您删除叙述时,他们希望我编写一个函数,该函数返回所有平方数(包括1)的排序数组,这些平方加起来等于给定的数字,从最大的数字开始。” 很酷
“So this is the kind of challenge that Google uses to test problem solving ability?”
“那么,这就是谷歌用来测试解决问题能力的挑战吗?”
“Well, I’ve already gone this far. Might as well give it a shot!”
“嗯,我已经走了这么远。 还可以试一试!”
The above is a description of Google’s Foobar challenge: a kind of easter egg in Chrome that is ostensibly used to source new talent for Google’s engineering team; although Google doesn’t seem to have acknowledged Foobar in any meaningful way (at least, not that I’ve found). There are, however, plenty of first hand accounts by developers who went through the process that make it clear this is what it’s all about.
上面是对Google Foobar挑战的描述:Chrome中的一种复活节彩蛋,表面上用来为Google的工程团队寻找新人才; 尽管Google似乎并没有以任何有意义的方式认可Foobar(至少不是我发现的那样)。 但是,开发人员有大量的第一手资料,他们经历了整个过程,从而清楚地说明了全部内容。
The unique thing about the Foobar challenge is that it finds you. And not in the way that an unsolicited recruiting email or salesy text message “finds you”. It finds you by tracking your search activity and (seemingly) matching it to known needs in Google’s engineering departments. Furthermore, the sudden visual disruption of something that is otherwise so constant & unchanging, the Google search results page, is jarring enough to really draw you in — certainly a very clever use of Google’s assets.
Foobar挑战的独特之处在于它找到了你 。 而不是以不请自来的招聘电子邮件或销售性短信“找到您”的方式。 它通过跟踪搜索活动并将其(看起来)与Google工程部门的已知需求相匹配来找到您。 此外,Google搜索结果页面上突然间发生的视觉混乱,这些事物本来就如此恒定和不变,这足以吸引您,这确实是对Google资产的非常巧妙的利用。
Given Google’s access to (1) your personal browsing activity and (2) the platform that you are browsing the internet on, they really do have the perfect opportunity to snag talented people no matter where they are in a really direct and engaging way. They seem to try and suss out your basic skill level & area(s) of competency based on your search history, and then try to engage you to enter their talent funnel with this “game”, which, if completed successfully, might or might not lead to an interview invitation.
鉴于Google可以访问(1)您的个人浏览活动和(2)您正在浏览互联网的平台,无论他们身在何处,以真正直接和吸引人的方式,他们确实有绝佳的机会吸引人才。 他们似乎试图根据您的搜索历史来确定您的基本技能水平和能力领域,然后尝试通过此“游戏”吸引您进入他们的才能渠道,如果成功完成,则可能或可能不会导致面试邀请。
The first mention of the Foobar challenge seems to have been this post on HackerNews from back in 2014.
Foobar的的挑战的第一提及似乎一直这篇文章上HackerNews从2014年回来。
When you’re on the Foobar challenge page, if you open devtools and look at the DOM, you will see that the whole page is in an iFrame, whose source is: https://foobar.withgoogle.com/?eid=... When I first saw this I thought “Withgoogle.com? What on Earth is that?”
在Foobar挑战页面上,如果打开devtools并查看DOM,您将看到整个页面都在一个iFrame中,其来源是: https ://foobar.withgoogle.com/?eid =。 ..当我第一次看到此内容时,我以为“ Withgoogle.com? 那到底是什么?”
Again, this is a total aside from the whole topic of the Foobar challenge, but it turns out that the challenge itself lives on google’s “side project domain” called “withgoogle.com”. If you dig into this a bit you will find some other pretty interesting projects. Here are just a few that I came across:
再说一次,这与Foobar挑战的整个主题无关,但是事实证明,挑战本身是存在于Google的“ withproject.com”的“副项目域”上的。 如果您对此进行深入研究,将会发现其他一些非常有趣的项目。 以下是我遇到的一些问题:
Paper Signals, Quickdraw, CSFirst, QiblaFinder, AIYProjects, ScienceJournal
纸信号 , 快挂 , CSFirst , QiblaFinder , AIYProjects , ScienceJournal
foobar