
A Wretched Google Interview Experience - reikonomusha
http://symbo1ics.com/blog/?p=2055
======
mattzito
An acquaintance of mine applied for a product management job, did two
interviews in NY that went fine, then was flown out to MTV for a series of
interviews.

When this person got there, two of the people they were supposed to meet with
were traveling on business and hadn't notified the recruiter. A third was out
sick. The supposed-to-be fourth, now first interview walked into the room and
said, "Look, I don't have any idea how to interview product managers, so I'm
going to ask you calculus questions", and proceeded to start to write
equations on the board. The fifth interview was the first and only that
happened AND dealt with product management.

When they got back to NY, this person was notified that they'd been rejected,
then notified this was a mistake and they'd have to come back to MTV to redo
all of the interviews, including the two that had happened.

Obviously, at this point they told Google to go scratch and went on to do
really good work elsewhere.

I've interviewed at and worked for a number very very large companies before,
and none of them have been as disrespectful at interviewing and hiring as
Google sounds from these stories.

~~~
throwaway86
It's not any better if you get hired.

Google recruiters will tell you whatever you want to hear, including things
that are not necessarily true. I was assured that a minor issue in my
background would not be an issue multiple times (I have email proving this),
then Google hired me and let me work for more than two months. I got
comfortable, I moved to Mountain View, began real honest work and set about
making an impact.

One Monday, I had just finished a feature for an internal monitoring tool and
was discussing it with a teammate. HR scheduled a meeting 30 minutes in the
future on my calendar, then informed me that my employment had been terminated
because of the issue in my background. You remember, the one I disclosed and
discussed repeatedly during the hiring process, before I even signed the
offer. Two people in upper management at Google who had never met me fired me
because of something seven years in my background, two months after hiring me
with the assurance that it wouldn't be a problem.

I bet my teammate wonders where I went. I didn't get a chance to explain
because they threatened me if I told anybody on my team what happened while I
was collecting my things. The same woman had a hearty laugh earlier in the
firing meeting after joking, "I bet you didn't expect your afternoon to go
like this, huh?" Felt like I was back in grade school.

Two weeks after firing me, a Google recruiting coordinator attempted to
connect with me on LinkedIn. Read into a company's competence what you will
based on that.

I can never, ever recommend that anybody subject themselves to working at
Google based on my experience. And that's even before discovering the
absolutely clueless direction that company is taking. You think G+ is annoying
now? Just wait.

The real victim in this is my family. I've never subjected them to no
insurance coverage in my career. Thanks, Google.

~~~
bradleyjg
You may have a legal case for moving expenses and lost wages. Something along
the lines of fraudulent inducement -- especially in California. I'd talk to an
employment lawyer if I were you.

~~~
throwaway86
And blacklist myself entirely from this career? This throwaway comment is
pushing it already in terms of burning bridges, not to mention getting fired
from Google itself after my extended network congratulated me on the position.
Who, in this incestuous valley, would hire the guy that sued Google for an
employment issue?

I've seen it happen, no way. Right to work, too, sigh.

To be clear I moved from the Oakland area down here, so it's not like I came
here from Cleveland. Also, I have no ill will for Google and just hope I can
move on with my life, while warning people what they're getting into.

I've dreamed of working at Google since I was a teenager. Finally my career
trajectory lined up and I got there. Then I have to come to terms with my
dream company acting like an incompetent fast food chain in terms of HR. Tough
enough without a lawsuit.

~~~
ScottBurson
If you have the evidence you say you have, I'd bet a good attorney could get
mid-five figures out of them along with an agreement not to disclose the
settlement.

I don't see what harm there would be in getting a professional opinion,
anyway.

~~~
ufmace
I've never been in the GP's position, but my thoughts on such things have
always been that there's usually not much point in suing your current or
former employer, barring something really extreme that somehow cost you 6
figures or more. The only real upside to it is a one-time payment of a few
tens of thousands, which sounds like a few months of salary at any company in
the industry. Why spend the time with lawyers and courts and risk possible
future issues with then and other companies for that? You're probably better
off in the long run to just forget about it and spend your time getting a job
at a more sane company.

~~~
throwaway86
That's my thoughts, as well, particularly with California's architecture of
at-will employment and the language that Google inserts into their offers.

It's just not worth it, and they know that, which is why they treated me like
shit.

------
cromwellian
I think this is very unfortunate. I've seen a lot of good candidates get
rejected for no obvious reasons. The lack of communication seems driven I
think by the sheer deluge of the number of resumes/interviews going on at
Google, and what appears to be, a reliance on temps and contractors as part of
the process.

I had a friend who interviewed at Google, who is an excellent software
engineer I've worked with for years, but who got rejected with extreme
prejudice because he was interviewed for the wrong position. He was going for
software engineer, they interviewed him for networking/systems reliability,
and asked him all of these sysadmin/network-admin style questions. Even after
he told them they had set him up with the wrong set of interviewers, they
still kept the schedule.

Given the sheer size of Google however, I'd expect lots of false positives and
negatives in their filters.

Also recognize that regular Googlers are selected to do these interviews, and
some of them have little training in giving interviews. If you're unlucky, you
might get a bad interviewer. I consider myself a relatively poor interviewer
and I usually decline to do them unless they intersect my subject area
(compilers, GWT, etc)

~~~
coldpie
My recruiter failed to call me at the scheduled time. Twice. I wasn't too
terribly dismayed, as I was already home at the time anyway, but that put me
in a pretty bad mood to begin with.

I failed the first phone interview spectacularly because he asked about data
structures and estimating powers of two, and I haven't done any of that after
4 years in the industry. I guess fair enough; if that's what they expect of
their employees, I'm not their man.

Overall, a disappointing experience.

~~~
chrisdone
My experience of those interviews that ask CS or “puzzle” questions is that
they are sincerely trying to determine that you are capable of dealing with
inherently novel/theoretic problems or problems you've never seen before.
Unfortunately this notion is misguided because the problems aren't real
problems, and the context in which the problems are solved is entirely
different to what it would be in the actual workplace. As someone who cripples
under observation (sort of like how hearing a siren takes up 50% of your brain
power, the pressure of being observed does similar to me), I am simply
incapable of performing in those types of interviews, despite being competent
for the job. I once crumbled so badly that I couldn't do simple arithmetic,
and the interviewers tried to “break things down” for me and continue despite
my obvious state of stress. I resent those interviews sorely, and will avoid
interviews in the future if I find out ahead of time that they involve
approaches like this.

~~~
purplelobster
You're not alone. Although it's never been as bad as not being able to do
arithmetic, I can't seem to get a job doing those kinds of interviews. I was
close once at Microsoft, after having done 8 hours of coding and linear
algebra and other math (that I wasn't expecting) without a slip up, and what I
thought was pretty great performance, but alas that wasn't enough either. Most
of the time I freeze up and can't think in those situations though, I don't
know how I pulled the strength to get through that interview. In the process,
due to stress, I developed a huge canker sore in my mouth where there's still
a scar. Interviewers dropping hints just makes it worse, it's not that I need
hints, it's that I can't THINK when you're sitting there judging my
performance, while having to keep explaining my thought process out aloud.
Some people are just not built for that.

~~~
y2kenny
It's great to see comments like this. I thought I was alone. The jobs I have
gotten so far is either behavioural only, talk about past projects, or written
technical (they give you some questions on paper and then leave you alone for
an hour.)

------
727374
I had a google interview about a year ago. The thing I found strangest is that
some interviewers would walk in the room and throw up a coding exercise
without any introduction at all. They literally wouldn't give their names and
what projects they worked on. You don't care that I've been working for almost
10 years in the real world and would rather judge me on my ability to solve a
linked list problem? Really? If anything is "gameable" this is. Just spend a
year playing topcoder in your spare time and you could ace any of the
questions I got.

I have a good friend who works at google and compares the recruiting team to
being "the hot girl in highschool" (no intended sexism). Since google
recruiters are at one of the elite companies in the world, they can treat
people disrespectfully. If you don't like it, there will be a million people
more people to choose from. I actually didn't get this vibe from them, but I
only dealt with a couple recruiters.

~~~
praptak
> Just spend a year playing topcoder in your spare time and you could ace any
> of the questions I got.

I wouldn't call this gaming the system. Doing a year of such training would
raise your _actual_ skill.

~~~
tobyjsullivan
"I cheated on the test by studying really hard"

~~~
seanmcdirmid
I cheated on my ACTs/GREs by using prep material and studying really hard. Got
really good scores, didn't learn a damn thing.

You can always game a test that you know ahead of time by prepping, it has no
correlation on your non-prepping abilities though.

------
spotman
Unfortunately your experience is all too common. I personally interviewed two
times at google. The first time I never made it to their offices, but made it
through 4 phone interviews, that all went well. After I had gone through the
2nd phone interview, I had started interviewing at another company (well, I
needed a job afterall). Within 3 weeks the new company had given me an offer.
I meanwhile went to two more google interviews over the phone, and had been
stalling on accepting the other job offer, because the prospect of working at
google, was exciting. Well 2 more weeks went by, and finally the job offer at
the new company was going to expire, so I had no choice but to take it. At
this point I didn't see the point of continuing the interview with google,
which my internal recruiter at google said would easily last 4 more weeks, as
I had not been onsite yet.

Fast forward 3 years, and I had another poor interview experience with google.
I flew up there this time, and got to interview in person. It was fun to see
the google plex. I had 5 interviews in person scheduled. I felt like I ace'd 3
of them, 1 of them I did OK, and 1 I bombed. 2 days later google informed that
that I was not a "culture fit".

I am not sure what the deal was. I felt like I had rapport with all of the
interviewers, and I also had 2 internal recommendations. So, maybe that was
some canned response way of saying no. Or maybe it was literal.

At any rate, I will never try to apply to google again, even though I too am
contacted by a google recruiter no less than every 6 months. Sigh.

------
300bps
I had a very similar experience. I work at an investment bank and was
recruited by a large company that does proprietary trading including high
frequency trading. I went for the interview which was scheduled to be an all-
day thing.

In addition to having been in IT for a very long time I am also very
knowledgeable on capital markets having successfully taken CFA (Chartered
Financial Analyst) tests. The CFO of the company that interviewed me was
shocked that someone in IT passed those tests. The IT people, it was all
algorithms and programming minutia. After the interview, they strung me along
for weeks and then I just stopped calling them to check up on status and they
stopped calling me. Then they would call me every few months asking me to
interview again. I finally asked them to stop calling me.

The reason I bring this up is because I think sometimes candidates are
excellent candidates for a $100,000 to $150,000 salary position. The only
problem is the candidate is already making $250,000 and the prospective
employer knows it after you fill out the application. I may be just thinking
this to make myself feel better but I just thought the issue with the company
was that I made too much. I probably would've had to literally walk on water
and bring their dead relatives back to life to justify what they would've had
to pay me to steal me from my current company.

Maybe that's the problem Google had with you?

~~~
ryandrake
Honest question, I'm really curious. If you're actually making $250,000 why
would you want to work anywhere else?

~~~
300bps
I went on the subject interview two years ago when I was at the 4 year mark of
my current employer. The reason I was looking is because my current employer
was being acquired and all of us received a letter stating, "We will tell you
in x months whether you have a job or not." It turned out about 80% of my
coworkers got laid off but I did not. But I didn't know it was going to turn
out that way at the time.

I'm not interviewing now, but honestly they're just trying to figure out a way
to cut me out of the picture without torpedoing the business I support.
Eventually they'll find a way though realistically it's another year away. I
have one fall back company I can go to in a snap at equal pay and I do side
consulting about 15-20 hours per week so I'm not worried enough at this point
to be interviewing.

------
j2d3
Just to pile on here, I interviewed at Google in Santa Monica in 2007. I
didn't get hired. The experience was okay, not awful and not incredibly drawn
out. Anyway, I brushed it off and moved on. Then, just this April, I received
an email from a Google recruiter noting that I'd interviewed in 2007,
complementing me on my work since then, and asking whether I'd like to re-
engage in a conversation about working with Google. I wrote back saying sure,
I'd like to discuss the opportunity. I never heard anything back again. Six
weeks later, I wrote again, asking whether there was some issue, and saying it
was strange to reach out to me, for me to reply, and then to hear nothing...
but still... nothing. No response.

Then, a few weeks ago, shortly after I'd accepted a new position that I'm
actually quite happy with, I received another similar email from a different
Google recruiter. I wrote her back and told her about the other recruiter that
had recently reached out to me and then went silent after I responded. She
promptly called me and we talked. She agreed it was strange, said she didn't
see anything in the system about it, but she did apologize and - we had a
discussion about Google, the interview process and what it's like now (as
opposed to 2007). If anything, it sounded like it would be incredibly long,
bureaucratic, drawn out, and fairly ridiculous. I said I'd keep in touch with
her if indeed I did want to re-apply to google, but I think I do not.

~~~
cdjk
I'm pretty sure that the recruiters are all contractors, and are all fairly
independent. I think that's the only think that explains stories like this, as
well as some experiences I've had with them.

------
ghc
I interviewed at the New York office for an SRE job a few months ago. It took
about 10 months for the whole process to play out. In the end, after a full
day interview, I was supposed to get the written up feedback from every
interviewer regardless of whether I got the position or not.

Instead, my last communication with Google was a phone call where I was told
that one of the interviewers still hadn't handed in their written review. It's
now three months later, and that's the last I heard.

That left a sour taste in my mouth. I wasn't expecting to get the job, and
really it was just a backup plan in case Algorithmic.ly didn't work out, but
you'd think they'd have the common courtesy to get back to me. I'm sort of
expecting that 6 months from now I'll hear from them out of the blue...that's
how disorganized the process is.

~~~
jrockway
That sucks. Send me an email if you'd like me to figure out what happened.
(jrockway AT google.com)

One thing though; the interview feedback from each interviewer is only for the
hiring committee, never for the candidate.

------
mathattack
Two thoughts:

1) Larger companies get away with inefficient recruiting because they can. If
the same company abuses you twice, and you go back a third time, what's that
say about you? It certainly goes a long way to explain why they can do it.

2) If you're considering going back on an offer, or interviewing just days
after starting a new job, you don't have much room to complain about bad
behavior on the company's part.

Perhaps another reason that Google contacts many people the same time is their
heuristics. They have analyzed what good potential hires look like, and
instruct their recruiters (who all use the same few online resources) to
screen for it.

~~~
VLM
Honestly I think GOOG (and some others) sometime interview people to fill
time. I was contacted years ago; You want me to do what? What I wanted to ask
was "what could possibly inspire you to think that has anything to do with
me?" but instead I just said k thx bye. Not a effective way to hire, but a
rather effective way to get focused attention. Even though I was kind of
laughing, it certainly got my attention and got me thinking, which is great
PR.

~~~
mathattack
They're much too busy to do that. In fact they've recently shrunk the amount
of interviews per candidate to free up time. The issue you're describing
sounds like a recruiter that doesn't understand the subject that they're
recruiting for.

------
tobyjsullivan
I do enjoy this author's flagrant disregard for Google's NDA they require you
to sign and promise not to discuss the interview questions. I'm curious if
they'll enforce it.

For what it's worth, my one experience with Google recruiting last year was
the polar opposite. They were curious and professional, of more knowledgeable
recruiters I've dealt with, and timely in scheduling interviews. I had my
first and only phone interview within a couple weeks if contract (which I
needed and used to go through the extensive list of prep material they
provided). Then I had an onsite interview a couple weeks later. Bam. Done.

~~~
freework
I did a phone interview with Google last week. I was given the exact same
counter problem as mentioned in the article. I can verify that I was not asked
to sign any NDA at any point.

~~~
Me1000
Phone screenings do not require signing an NDA (just a "we explicitly ask you
not to share the questions you're asked"), but if they bring you on site you
will be asked to sign one.

~~~
zxer
Except when not. When I was interviewing they didn't make me sign one. They
rejected me for the original position, but later occasionally called me with
some alternate options. These calls usually went like:

\- We would be interested in having you at/as ... but before the specifics,
you signed an NDA, right?

\- No, I have not.

\- Oh, then good luck, bye.

~~~
mikeash
They're doing it ever so slightly wrong if they just take your word for it
like that!

------
johnyzee
Cached:
[http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://symbo1ics.com/blog/?p=2055)

~~~
300bps
Thanks for the MIRROR (to aid anyone else looking for a mirror that didn't
search for cache)

------
zerr
Even in case of success and receiving an offer, I personally have a feeling
that you need to be very very lucky to get the really interesting work in
these BigCo's.

I know a couple of googlers, talented programmers, but they ended up as "yet
another CRUD" python devs there.

~~~
cromwellian
There's lots of interesting projects going on at Google and an internal system
for applying to other teams, and usually no shortage of teams asking for
people. There's not a lot of CRUD apps with the exception of Corp-IT stuff.

~~~
Aqueous
It seems like everything they do are CRUD apps, in the sense that they are
concerned with creating, updating, reading, and destroying database records.
They are just massively parallelized on the backend to deal with all the
traffic.

Sometimes I wonder what all these engineers do every day. Their main apps are
not getting exponentially better, and they have fewer of them. Why is all this
algorithmic knowledge really needed? Do they spend all day optimizing or
engineering and planning new features?

Not trying to insult Google, but I'm not seeing a ton of new features that
would justify this kind of indepth theoretical knowledge. The ability to
actually code, to do so efficiently and quickly, and to properly unit test and
profile it, seems more important than any algorithmic knowledge. Mastery of
the toolchain and the language, and that comes down to - "What have you
produced?"

Maybe this is why Google hasn't had a new hit product in what seems like
awhile. It doesn't need one as long as they maintain their position as search
leader, but it doesn't seem like they have one.

~~~
cromwellian
I think this is being relatively unfair in assessment. Google hasn't had a hit
product in a while? Search and Ads are dominant. Android is the #1 mobile
smartphone OS with 80% of the market. Chrome is now the #1 browser. Google
Maps is the #1 mapping application. Gmail is now #1 in active users. G+ now
has 190 million active posters now monthly now (Twitter only has 110 million
active posters) YouTube is the top video site.

Most of these apps listed above are not CRUD apps. The service based ones have
significant and non-trivial data processing on the backend, lots of machine-
learning, or algorithmic data processing.

Google apps have been getting better over the years, but Google updates them
almost continuously and incrementally because they are web based, and so most
of the changes go unnoticed like a frog slowly being boiled in water.

Is Google Search the same as it was 5 years ago? No, it has Google Instant,
voice search, Knowledge Graph, direct answers, better spam filtering, it's
index is far fresher, etc. For example, just the interactive chart knowledge
panels
([https://www.google.com/#fp=9a975e048e4bd6d6&q=population+of+...](https://www.google.com/#fp=9a975e048e4bd6d6&q=population+of+india))

Google Maps has gotten radically better, and the latest beta maps is probably
the most complex and sophisticated web application ever engineered.

Google search within G+ and Drive actually does _object recognition_ with
neural networks. ([http://googleresearch.blogspot.com/2013/06/improving-
photo-s...](http://googleresearch.blogspot.com/2013/06/improving-photo-search-
step-across.html)) This is a huge improvement in image search, and most people
are totally unaware of it. It just works and they don't notice that it found
it image without even needing descriptive text or tags.

Google apps are slowly getting smarter each and everyday but there's no
"Jobsnote" to laud them, so the improvements are invisible.

~~~
colanderman
> _most of the changes go unnoticed like a frog slowly being boiled in water._

Believe me, I notice. GMail and GMaps get slower and slower every day. I can't
actually use GMail anymore; clicking anything takes several seconds. Wasn't
this way in 2005, and I had a crappier computer then.

------
kevingadd
Google's recruiting seems like it must be at least partially the
responsibility of short-tenure contractors. Every time I've dealt with people
from their recruiting department, even the very nice ones seemed forgetful,
inattentive and poor at communication. The actual Google employees who do the
interviewing are on average very bright, good at actively interviewing
candidates (instead of just rattling off questions), and open to answering
questions, even if a couple of them were clearly inexperienced and
uninterested in doing interviews.

I'd say the actual experience of the interview can be a good thing, but the
process as a whole is a huge waste of the candidate's time - especially if you
don't fit the stereotypical niche of what a Google employee is (4+ years of CS
education, thinks writing linked lists and trees is exciting, etc. etc.) Their
decision to intentionally avoid giving any feedback to candidates probably
stops people from gaming the interview process, but it also makes it a net
negative for candidates who don't meet the unstated criteria Google is after -
criteria that could often be screened for before a candidate ever sets foot on
campus. They refuse to interview candidates for a position or a role beyond
generalizations like 'software engineer', despite the huge breadth and depth
of problems solved at Google - if you're lucky they'll quiz you on the stuff
you actually know, but most likely they won't, and the questions will be very
mundane. This despite the fact that actual hiring choices ARE partitioned to
some degree (as much as they seem to want to pretend they aren't).

Most of the time interviewing with a good company is a 'why not' scenario: The
only thing you have to lose is some time, and you'll learn some useful things
from most interview experiences (even if occasionally the only thing you learn
is 'this company is awful'). Google's interview process feels precisely
engineered to avoid letting candidates learn anything whatsoever.

Companies like Microsoft or Amazon or Zynga all at least have a pretense of
evaluating a candidate's specific strengths and weaknesses to figure out
whether they're useful - if you're a compiler engineer MS will probably have
some Visual Studio/DevDiv people grill you with compiler engineering
questions, if you're a games dev Amazon will have you talk to people from
their games department, and if you're a database guy Zynga isn't going to ask
you game design questions. For Google interviews it seems entirely one-size-
fits-all, despite the fact that they have core products that obviously depend
on niche knowledge and experience.

~~~
at-fates-hands
>>> but it also makes it a net negative for candidates who don't meet the
unstated criteria Google is after - criteria that could often be screened for
before a candidate ever sets foot on campus.

The crazy thing is they don't give feedback, then call back in a few months
and ask if you want to interview again for the same position like the OP said.
Talk about completely confusing people. . .

~~~
doktrin
This is not uncommon. I had the same experience with a certain well known
communications company in SF. After a bungled interview (my fault, not
theirs), the _same recruiter_ contacts me again no less than a month later. By
that point I had accepted a position elsewhere, but it was certainly a mixed
signal bag.

------
smackfu
From those questions, it sure seems like their interview process is aimed at
choosing among recent grads whose resumes are all essentially the same "B.S.
Computer Science from School X".

~~~
AznHisoka
That's what they tell people too. It's great if you just graduated from a
formal CS program because the algorithms stuff is fresh in your brain. Whereas
working 5-10 years in a boring bigcorp, doing CRUD apps will kinda make you
more "dumb"

~~~
Zimahl
Hah, I must be pretty dumb. After over 10 years working on anything from
startup to BigCorp, I doubt I could answer a single one of those questions
right now.

I did learn that in my last round of interviewing (about a year ago) that to
play the game you need to review the junk that you'll never need to keep in
your brain, that you know but don't have at command. Sure, you'll most likely
never use it at the position you apply for, but that's the rub.

~~~
druiid
I genuinely don't understand how it's useful to interview someone this way. It
basically makes it a game of 'Show us what you remember from
CS101/MAE101/etc'. Really why should interviews for people established in the
industry be like that? Sure you should know how to do basic algorithms and
optimization type questions, but having minute detail style programming
questions that every engineer not fresh out of college will have forgotten
since their core discipline classes is just silly.

~~~
chris_mahan
Maybe it's a subtle form of age discrimination?

~~~
druiid
Not sure how it could be considered age discrimination though. You tend to
forget 'knowledge' like this fairly quickly. I know for my part at least I
generally have to brush up on this kind of learning about every six months (or
even less perhaps), if I wanted to retain it.

~~~
chris_mahan
That's why I said subtle.

It would be like requiring you to recite all the marks you received on all
your assignments in all your classes in your last semester of your senior year
of college. I assume that if you had just graduated, this would be easy, but
if you had graduated 10 years prior, this would be hard (feasible if you'd
kept the paperwork--but hard).

------
GBKS
To counter some of the negative sentiment here, I had a great interview
experience at Google. The only big negative was that the whole process took 5
months. But every step involved was very organized and the people were
professional and thoughtful. The in-person interviews were also great and the
questions were all appropriate. I did not take the offer for personal reasons
at the time, but the process was great (except for those 5 months). As with
all big companies though, there is a bit of luck of the draw involved, as the
other stories in this thread show.

~~~
VLM
"questions were all appropriate"

I was asking myself while reading the article, my god, what kind of job was he
applying for, AP test author, programing language standard library author,
puzzle book author, or what exactly?

I haven't gone into a cold interview in many years; its always previous
relationship based now. Are cold interviews where no one already knows anyone,
like that now, focused on weird algos and trivia questions and nothing to do
with the actual job?

You're interviewing the workplace as much as they're interviewing you, and I'm
smart but I have no idea how to evaluate a possible employer based on their
selection of weird trivia questions. Something that at least vaguely relates
to the actual job would be interesting.

~~~
at-fates-hands
>>>>You're interviewing the workplace as much as they're interviewing you.

Not nearly enough people realize this. If they're asking you corny questions
in the interview, how does that reflect on their company? OP said they didn't
even ask him questions about his resume - just these corny trivia questions.
If I was there, I would've asked how someone thinks this is relevant to doing
my job at Google.

After the past three years I've done a ton of interviewing and have learned
the only way to know if the company is good fit is to grill the interviewer on
stuff that matters to you. I've had interviews at fortune 50 companies with
people who had no idea who their competition was or where they wanted their IT
department to be in 5 years. If you're not invested in your company, what
makes you think I should??

~~~
VLM
Interesting idea popped into my head... If candidate is not going to ask good
questions about the job and experiences and responsibilities and challenges
and the company, should the interviewer torture the candidate with random
pages from Knuth until candidate either asks a good question or breaks or runs
out of time. (say yes! say yes!)

The other idea that popped into my head is we could develop a new "secret geek
code" for HN readers where asking candidates endless queuing theory questions
means we're secretly warning the interviewee about long lines in the
cafeteria, lots of tree data structure trivia questions means a warning about
an intensely hierarchical management style, weird trivia questions about
designing thread safe interrupt handling routines means you'll be pestered a
lot when you're trying to work which you may or may not be cool with, that
kind of thing.

~~~
6d0debc071
> Interesting idea popped into my head... If candidate is not going to ask
> good questions about the job and experiences and responsibilities and
> challenges and the company, should the interviewer torture the candidate
> with random pages from Knuth until candidate either asks a good question or
> breaks or runs out of time. (say yes! say yes!)

General etiquette for this sort of sitch seems to be to allow the person with
more leverage to lead. Most of the formulaic/cold interviews I've had they'll
get to the end and then ask you if you've got any questions.

~~~
VLM
"allow the person with more leverage to lead"

Hmm... I'm unemployed that means they have leverage, I'm employed and looking
that means I have the leverage?

Now that I think back over the years, as a stereotypical break the ice event
is at the start of an interview, they usually thank me for taking the time off
from work, at which point I mention I burned a vacation day to meet them and
I've only got X left this year, at which point I tend to feel a little
arrogant, I'm burning a rare limited day off for these guys, they'd best make
it worth my while...

I know they're just fishing to see if I'm ethical enough to burn vacation
instead of calling in sick, or maybe lying about being currently employed...

~~~
6d0debc071
Your leverage is something like, 'Everything someone wants that they think you
can give them, or take from them, for which they think they have no
acceptable, (in terms of their culture,) alternatives that aren't more costly
than whatever you'd impose on them in return.'

There's also an aspect of norms to it - most commonly in terms of consistency
because people generally want to appear reasonable.

Anyway, if you've already got a job, their position looks worse in that
respect since you need them less. Though that doesn't necessarily give you any
more leverage in terms of extracting concessions from them since your job
doesn't necessarily make you a more desirable employee.

Though, for some reason, companies seem to hang themselves in that regard -
placing a great emphasis on whether you're unemployed, (which, personally,
I've never found to be a great predictor.) So, while it's not an 'of
necessity' thing, it probably _does_ convert into some leverage on your part
for a lot of potential jobs.

It is, in a round about way, why it's generally better to try to bargain about
wages after you've got some sort of buy-in established on their side. Since
you'll have the greatest leverage once they've decided they want you.

Things that you can point to that you can quantify, that's generally a good
source of leverage - especially if you're a contractor. Anything I do that I
can hang any sort of number on, I write down to use in interviews - not all of
it goes onto my CV.

------
bloat
I don't know why people get so bent up over this and write these screeds.

Surely everyone knows the drill by now. If Google interview you, you'll get a
bunch of random algorithm questions and you either get hired or you don't and
they won't tell you why. Your CV and your experience only serve to get a foot
in the door. After that its all down to those algo questions. This is not a
secret - I think they are pretty up front about the way it works.

PS - I didn't get hired.

------
nakedrobot2
I think Google prefers false negatives over false positives. I know a few
_extremely_ smart people who didn't "pass" their Google interviews. Most
likely because they didn't have that "totally positive effortlessly nice and
socially easy" vibe.

~~~
leokun
That's probably the right attitude to take in hiring. Bad code is difficult
and expensive to discover and fix and a bad hire is difficult and expensive to
let go.

~~~
reikonomusha
With proper code review, I don't think bad code is difficult to discover. I
also don't think dismissal is very expensive for large corps. For smaller
companies or start-ups, the game is entirely different.

------
morkfromork
I interviewed at Google earlier this year. It was a complete waste of my time.
The questions were unrelated to my skills and the position I was looking for.
You go in there assuming they know what they are doing because they are the
great Google. They don't. It's completely random.

------
cmollis
My interview at Google was a disaster. I passed the phone screens (easy), and
then they flew me out to Mountain View. Now, the job was actually programming
python for YouTube.. which I could have done in my sleep. I've done similar
things for years, for many other companies (even some in the Valley, even
though I live on the East Coast). So whatever, I thought it was going ok, and
then they asked me a bunch of puzzle questions (which I sucked at.. at least
I'm pretty sure I did). (You know, the typical mindless puzzle questions that
are completely unrelated to anything remotely resembling the work you you'd be
doing). I'm sure it sounds like I'm bitter (I'm not), and I'm sure there are
many smarter than I am that do well at those things. But I couldn't help
thinking that they should've asked me something related to what I'd be doing,
or what I'd done.

I didn't get the job, but now Google keeps calling me for interviews. I keep
telling them no, that I'm not 'Google material' whatever the fuck that is. Not
me. Love Google, awesome tools, great stuff.. don't think I could work there.

------
incision
My experience with Google corroborates some of this.

Particularly the unpredictable callbacks and repeated contacts despite being
within the 18 month period and complete lack of feedback post-interview.

Additionally, there was plenty of confusion about which position I was being
asked to interview for. Initially, it was something completely outside my
skill set, later it was a bit more refined, but not at all specific.

I did encounter some questioning where the interviewer seemed to be looking
for one rather specific answer, but nothing nearly as bad as "I wanted you to
use a priority queue. We will just move to another question." or "Time's up.
Maybe you can ask your friend there what the answer is."

Amusingly, a friend of mine who interviewed there not too long ago ended up
receiving and declining an offer only to be called and asked about his "start
date" months later.

That said, my experience was generally positive and I'd do it again given the
chance as most of my difficulties came from the recruiting end.

------
ensmotko
Just to add my experience with Google to the pile:

After the initial screenings and interviews with two different recruiters (one
from Dublin and the second one from Switzerland) I finally get to the first
technical interview. I struggled a bit with some questions, but I did get to
the optimal solution in the end. I felt I could do better, but the second
recruiter assured me that I did really well. He even sort of apologized
because he needed to schedule a second phone interview, before inviting me on
site.

The second interview, as far as I can tell, went the same as the first. I made
some mistakes along the way, but I did get to an optimal solution at the end.
The interviewer told me I'll get the results by the end of the week. Two weeks
pass and still no word from Google. I decided to send an email to the
recruiter, asking for an update. Still nothing. After a month I decided to
send a friendly email to my first recruiter asking for an update - I didn't
know what else to do. The second recruiter replied the next day telling me it
was a "close call" and that I should re-apply in 12 months. No thanks :)

------
Yascade
The obvious reason for this approach to me is that Google is leveraging their
reputation in order to solve difficult problems rather than actually looking
to hire anyone. The answers this particular interviewer appeared to answer
seem to be the kinds of things that a developer would want to know but might
not be able to see the answer to.

The idea here that Google might be leveraging knowledge from a hopeful dupe,
is echoed by their annual code challenges. The company wants to know things.
It's hungry for knowledge.

My feeling that leading on applicants is the best way to be ignored when you
need one because when you cry wolf, only the wolves answer the call
eventually.

------
AznHisoka
"Aside from being terrible at communication, Google implicitly rejected,
without appeal, someone with offers for a PhD and someone who owns two checks
from Knuth. "

I'm glad that Google doesn't just blindly look at credentials alone. If you
got a PhD, and got featured in a CS publication, but couldn't answer their
questions, then you probably shouldn't be accepted. That said, OP just had bad
bad luck. My phone screen question was FAR easier (I still messed up on it,
and got to the on-site too).

Disclaimer: I went to a Google interview last week (got rejected)

~~~
jbooth
It sounded like he aced all of the questions except for the distributed
computing ones, where he put up some reasonable answers but not the exact ones
they're looking for.

I'd note that when Google was first solving those problems, their luminaries
who are now untouchable at the company probably tried those exact same
reasonable answers at first until iterating on them into their current form.

------
bbguitar
Fascinating reading - makes me realise just how rusty my theoretical CS
knowledge is (I haven't used lisp or some of that sets notation since 1990!)

However IMHO the author should have told them NO, and why, much earlier.

Shame on you google - take dozen emu eggs, break into a bowl, whip up and
apply to face.

~~~
reikonomusha
Saying "no" is a hard stance to take. Google undoubtedly does have some very
smart people and some very interesting work, so it's difficult to throw that
away because one perceives them as brain damaged when it comes to
relationships and interviewing.

And of course there's always the "if you say 'no', there's always someone who
will take your spot happily."

~~~
smrtinsert
I dunno. They seem acquire more than they build. The success stories at Google
seem to always be in spite of Google rather than because of them.

------
Balgair
My brother had an interview for their X division. He said it was really
strange. They were very very secretive. My brother has a TS clearance and he
said Google was beyond the US gov.'s paranoia even. It made it a really tough
interview too. He said it felt like they couldn't tell him anything so the
interviewers were trying to psychicly communicate with him. Then they took him
to lunch on campus which was ok and then sat him in front of another guy who
was nicer but still mum. Also they apparently can't talk about the google
glasses even though some lady had just walked out the door with them. Its like
: 'Dude, you can see them right there.' It seems they need to get hungry
again, not be complacent in their domination of our lives.

------
bestest
I had a very similar experience with Google London and Google Zurich. It took
them longer than a year to arrange an interview. Quite disappointing -- I'm
actually glad I decided not to join them.

------
smtddr
Yikes, this story and HN comments sound like disasters.

As a sorta balancing out here, my experience interviewing with Google(June
2012) was fantastic IMHO. We agreed right off the beginning what role exactly
I'm interviewing for(Test Engineer), different from what I applied for(SDET)
and went with it. Note, that I was holding them off for about 2 years. They'd
email/call me every 6-8 months, and I'd say "Hold on, gimme a few more
months". Eventually stuff happened that caused me to email them back and say
"Okay, let's do this." I had the first typical phone-screening, talking about
myself 'n such, why I'm looking for another job, why Google, etc. They gave me
a bunch of blog links to "Life as a TE at Google" 'n stuff. 2nd phone
screening was a programming thing that was kinda hard but not out-of-bounds
PhD stuff. I was a bit intimidated by the fact I spent the whole hour on a
question that was labeled "Question#1". I asked about it, the SoftEng. told me
"Oh, don't worry about that". I asked if there were more questions, he said
again not to worry... hmm. I did talk a lot though so he knew what I was
thinking while trying to code. Anyways, a week later I get an email from a
Google recruiter saying the SoftEng thought I knew what I was doing so we set
up the MTV visit with 5 or 6 people. I was super-excited I made it to the on-
site visit. Did you know Google Maps on mobile behaves differently if you're
on campus? :) Everything happened on time. The interview questions and
conversations we had for those 6 hours were great, eye-opening for me. I will
say that I went into this whole Google thing with an open mind and with the
assumption that all these people had more intelligence in their toe-nail than
I'd ever obtain in my life. In the end, 2 weeks later, I was told that they
"wouldn't be going forward with me". Of course I was bummed, I didn't even
tell my family I was interviewing with Google. I wanted it to be a surprise.
But, they showed me my weaknesses and I fixed 'em. Now I have an awesome
job(SDET2) and I think the only reason I was able to get through this job's
interview process is because Google's interview improved me significantly.

~~~
AznHisoka
Ha, I didn't tell anyone in my family, including my SO I went to interview
with the Big G either. Didn't want them to see how disappointed I would be if
they rejected me.

~~~
AndyKelley
Seems like you should be comfortable sharing disappointment with your SO. I'd
be careful about getting in the practice of hiding things from them.

------
illial
The blog seems to be down. Cache:
[http://cc.bingj.com/cache.aspx?q=http%3a%2f%2fsymbo1ics.com%...](http://cc.bingj.com/cache.aspx?q=http%3a%2f%2fsymbo1ics.com%2fblog%2f%3fp%3d2055&d=767376103032&mkt=en-
US&setlang=en-US&w=ZVYjbjNPJjg8u9ICXsxOeMkg5cb6JCt1)

------
aliston
Google sucks. I had a pretty similar experience interviewing there. Strange,
late interviewers. One guy who barely spoke English and another who literally
asked one question, then said nothing for the rest of the "interview." Then, a
pointless "feedback" call in which they told me they "can't provide feedback
on specific candidates." Overall, just a really poor experience. F- 'em, move
on.

------
epoxyhockey
Are we doing this to ourselves? If we are willing to continually subject
ourselves to hours (and days) of interviewing, followed-up by abusive
responses (or non-response), it seems like this recruiting behavior will
continue.

------
mathattack
The irony of all this conversation is that the people I know at Google are
some of the sharpest, most well adjusted people that I know. It's almost like
they got in and thrived despite the recruiting process. None of them are the
type to stand people up, gloss over interviewing, or be anything other than
decent hard working individuals.

------
ahk
Curious about the 'official' answer to the counter question. I'd have thought
just having something triggered daily to clear out increments older than a day
would be enough.

~~~
stinkypete
I don't know about an official answer but using a simple variation on a round-
robin database (RRD) ought to do the trick. Basically:

    
    
      day count = [last 23 hour buckets] + hour count
      hour count = [last 59 minute buckets] + minute count
      minute count = [last 59 second buckets] + second count
      second count = <running count cleared every 1 second>
    

You end up losing a small amount of accuracy, the worst being for keeping
track of the second counts. You can avoid that by using an actual list of
counter values for the seconds bucket and dumping those out when they get
older than a second, or maybe by introducing another subdivision -- 1/10th of
a second probably is good -- so that you actually have .9 seconds worth of
data and can interpolate the last bit.

~~~
informatimago
The last hour now goes back from 22:45:03.435123897 (remember, nanosecond
timer, but now it is from 22:46:07.223981453. Unless you can round the time
when the last second, the last minute, etc start, you have to keep the full
history of increment events up to the nanosecond for the last 24 hours. That's
O(24 _60_ 60*1e9).

~~~
abalone
But if you _do_ round the time to an acceptable degree of accuracy (say, to
within 1ms of the second count and 1m of the day count) then it does work
within a fixed amount of memory. It's probably the best solution.

It's a lovely exercise in algorithm tradeoffs. In this case it's mainly
accuracy vs. memory, with lots of opportunity to explore implementation
optimizations.

------
joyeuse6701
Let me sum up my response to the article in 2 words: Their loss.

------
freework
I did the same problem during my Google interview last week. Here was my
solution to the counter problem:
[https://gist.github.com/priestc/6284678](https://gist.github.com/priestc/6284678)

------
aberatiu
It's down right now. See Google Cache
[http://webcache.googleusercontent.com/search?q=cache:symbo1i...](http://webcache.googleusercontent.com/search?q=cache:symbo1ics.com/blog/?p=2055)

------
JulianMorrison
Just playing, but "If you have n servers that take requests, and server Sᵢ can
take a request every tᵢ seconds, and you need to distribute requests to them
as efficiently as possible, how do you do it?" can be done very easily in Go.

You have a shared channel which contains the pending requests, and a goroutine
per server that simply loops doing: read from the shared channel, perform the
request, wait for the sleep period, and continue the loop.

And that's all. Each server will get requests as fast as it can consume them.

~~~
nostrademons
And that solution is isomorphic to the one the interviewer was looking for,
where you put the requests in a priority queue keyed by their finish time and
pull out the next one that'll be done. The only difference is that the
priority queue in question is hidden in Go's scheduler.

The reason interviewers ask these questions is so they get a sense of whether
you'd be able to implement Go, starting from first principles. (Or actually,
it's because before Go many servers and load-balancers were written in C++
using async callbacks, and so this is a very pragmatic question that comes up
a lot in real-world usage.)

~~~
JulianMorrison
It's isomorphic and better, because each goroutine performs a synchronous and
easily understood acquire-perform-sleep looping operation with no hairy
coordination. And even underneath, it's somewhat simpler, because neither Go
nor the design I gave cares _which_ of the runnable goroutines (the servers
that have finished their work) takes the next request off the channel. Plus
the blocking behaviour of channels gives you implicit backpressure if the
requests are coming in too fast - the process putting them on the channel will
stall.

~~~
cookingrobot
You probably should care which server gets the request. It's not explicitly
said, but if one server can handle twice as many requests per second, then it
might be completing each request faster. If that's the case, it's a better
service to give more requests to the faster servers. Worth at least discussing
to see if there are other aspects to the problem.

------
myko
Interviewing at Google can be terrible. I was an intern who had high scores in
my reviews (my host rated me just below 'superstar', whatever that means - I'm
not really a superstar and just assume that was some rating jargon they used
at Google).

Anyway when it came to my conversion interviews the person who was supposed to
interview me wasn't at the office. I ended up waiting around for someone to
interview me, and when they came in 15 minutes late we had to trek across
campus to get a room. I was asked a fairly difficult problem and botched it
pretty hard, and of course didn't have the complete time to attempt to solve
it.

I thought I nailed the next interview though! After I answered a couple pretty
complex problems the interviewer literally said there is no way you're not
getting an offer, and we just ended up chatting a bit.

I got rejected a few days later, not totally unexpected as I knew I botched
that first interview. When I asked my host about it later he said the second
interview wasn't even on record.

C'est la vie, I guess. I'd still love to try again, I had a lot of fun working
there, the people are top notch - even of the hiring process is extremely hit
or miss.

------
jff
So, did you not sign the NDA where you agree not to discuss the content of the
interviews, or are you just throwing caution to the wind here?

~~~
smackfu
Practically speaking, Google isn't going to do anything besides blacklisting.
Can you imagine the stories in the tech press if they sued someone for
breaking an interview NDA?

~~~
yapcguy
Better to be blacklisted then get Google recruiters spamming you every few
months!

------
scotth
Does anyone know a good answer for the RealTimeCounter question?

~~~
guard-of-terra
\- have a counter for every bigger interval asnd the last timestamp

If the timestamp is same second as last increment everything, if not increment
where appropriate and rotate everything else to 0.

What am i missing?

~~~
scotth
My reading of the API is that getCountInLastSecond returns the count from the
last billion nanoseconds, not the count from the previous second bucket (as
the clock ticks).

So when he mentions he can't bound memory, it's because he can't easily
discretize the counters.

~~~
rlpb
I feel that this is an important ambiguity. When I read the article, my first
question was whether this interpretation is correct, or the other one. I am
surprised that he didn't clarify this in the article, and wonder if this is a
problem.

Seeing ambiguities in specifications is an important part of software
engineering.

~~~
scotth
I think you're right. Note taken.

------
mzs
I had similar situation many years ago for a different large company. Two
before lunch interviews, and I bombed one. Then the rest of the day's
interviews seemed easier and I did splendidly. I felt great. A few days later,
two job offers from that company, but not from the group I had originally
hoped for. I passed and took another job I was more excited about the group I
would be with. Later I knew a friend that worked there, he told me that they
used the first two interviews to decide which track of second interviews you
get after lunch. So then you are with other candidates for other jobs if you
have not done in the top of the first round. Something like this may have
happened to this fellow, just that the other candidates in the secondary track
won out over him making an even better impression.

------
wizzard
A friend of mine got a call from Google and set up a phone interview. They
never called. The recruiter called again a few days later and apologized, and
set up another phone interview. Once again, no call. The recruiter called
again and my friend told them he was no longer interested.

~~~
devanti
Same thing happened to me with Facebook

------
speeder
Heh.

I interviewed with Amazon once, I reached only the phone part and failed (most
part for my own reason... I fumbled a lot)

But I was really bothered, that they setup "X" to interview me, and when I got
the call, it was "Y" because "X" travelled, and that "Y" was not related to
the position I applied at all, AND was a newbie at Amazon and thus failed to
answer the questions I had about it, AND did not knew any languages I knew,
making the coding part of the interview very weird.

I also saw similar stories here in HN many times... I wonder, wazzup with
those companies that setup interviews and then send the interviewers somewhere
else?

~~~
VLM
"did not knew any languages I knew"

I was the surprise interviewer in the exact same scenario (well, not at
Amazon, but same general idea) and was later cross examined, mostly by HR,
about how well I thought he'd be able to help me if I came to him. The HR
cross examination about his ability was all touchy-feely questions not
technical (did what he say sound nice, not, did what he say make logical sense
when passed thru the well known engineer BS filter). Position had one of those
estimates of 25% helping other people with problems and group work, and he
would have been hanging out near me although somewhat different kind of work,
so it seemed fair for me to ask him noob questions about his expertise, just
to see how he would talk to someone on the team from a different background.
He was an expert in C++ if I recall correctly.

All went pretty well with me, although they didn't hire him (donno why)

The part of the story that was weird is I was an old-timer at that employer
not a noob. Why they'd assign a noob to evaluate indicates either extreme
trust or extreme desperation WRT the noob. Or he was playing you. If you
really needed a question answered HR would take care of it.

------
astrodust
There's something odd with this page that causes Safari to jam up and use 100%
CPU. It shows up as "Processing Math 0%" in the lower left corner while doing
this.

Is there some kind of renegade JavaScript going on here?

~~~
reikonomusha
It's for processing the typesetting of mathematical expressions. See MathJax.

~~~
astrodust
Well, it would be nice if it actually worked instead of jamming up Chrome and
Safari completely.

------
okaram
Interesting, especially since I've just started working for Microsoft, in Bing
Ads, and a big factor in deciding to come was the interview process. The phone
interview involved writing code in a shared environment, the in-person
interviews were all nice (hard questions, non-threatening ways to ask), and I
(and the other 4 guys who interviewed in my time slot) were told yes/no right
after the interview ended.

I assume experiences at large companies vary widely depending on the group,
but I was definitely impressed with Bing's interviewing process.

------
bane
Before anybody goes to try and get hired at a "hot" company, please please
please check out glassdoor's interview experiences and ratings. You'd be
surprised at how shitty some companies treat people during the hiring process.
I've experienced it myself a couple of times.

------
sebnukem2
The worst (actually, the one bad) job interview experience in my life was with
Google. The interviewer was extremely unfriendly, had a thick unintelligible
indian accent, and didn't try to hide the fact he had something more
interesting to do than interviewing me.

------
eyeareque
index billions of web sites, stock around 850+/share... but their
recruiters/interviewers can't return a call/email or show up to give an
interview on time. This something that small and large companies have been
doing successfully for ages.

They seriously need to work on their culture in this aspect. It seems like
such a trivial problem to fix inside of google. What is the hold up? I'm
certain there are more good interviewing experiences than bad interviewing
processes, but it does seem to be a common theme over there.

------
Patient0
Site seems down - is it cached anywhere?

------
abalone
Ok, the RealTimeCounter problem got me thinking. It's a great question. It
seems very simple, but as the author notes even PhD's are stumped by it. Here
my solution.

One very important purpose it serves is to see how well you can identify
problems in algorithms. Probably I'm guessing it's not even important that you
get it perfect, just that you can recognize and talk through the challenges.

One challenge relates to understanding the requirements. It needs to return
the count for the preceding period of duration N, whether N is a second or a
day. It could and usually does start in the middle of the preceding second,
day, etc. It's a constantly moving window. That means if you just reset the
counter each time you pass the absolute boundary of the next N (1:00, 1:01,
etc.), you lose accuracy.

So that suggests that you might have to track each individual increment()
somehow. But there's the next challenge, memory usage. If you just store all
the timestamps, that's linear memory growth every time increment() is called.

So it seems to me like the solution is a tradeoff between memory usage and
accuracy. If you don't call increment() very much or have a lot of memory, you
can get perfect accuracy.

So that's the "theory". Now here's where it gets more interesting from an
engineering perspective. Optimal implementations. Here's what I came up with
in about 15 minutes.

First you minimize memory usage by storing offsets instead of the complete
timestamp. Do this in 2 arrays, one for the preceding interval and one for the
current one. This makes it easy to exploit our knowledge of when we've crossed
the interval boundary, e.g. via now().getSecond(), to clear out old data.

(I am only considering one type of interval like seconds here.. you could
extend this to minutes, hours, days by duplicating this method, or perhaps
theres some way to consolidate more optimally.)

Anyway, increment() takes the offset from the fixed start of the current
interval, i.e. the nanoseconds since the start of the current second, and
appends it to the Current array. It also checks if we've passed into the next
interval, in which case it reassigns the Current array to the Preceding array
and starts a new Current array. The getter functions also do this.

To get the count, the getter simply

1) Finds the nearest offset in the Preceding array to the current offset
(could just loop over it, start in the middle, etc.)

2) Subtracts that index from the array length to count the number of in-scope
increments from that preceding interval (this works because the array is
naturally sorted)

3) Adds that to the length of the Current array (because everything in the
current array is in-scope)

SO, that should be a pretty fast way to do it with minimal memory
requirements. If memory's going to be a problem,

A) you could spend a little more computation to do a kind of garbage
collection. In step 2, resize the array to clear out the out-of-scope indexes.
(Maybe you'd want a more optimized kind of data structure than a vanilla array
for this.)

B) reduce accuracy by quantizing the offsets.

Ok am I hired yet? I'll go wait by the phone.

Just kidding, I'm sure this is wrong in many ways. But the point I'm trying to
make is that it's a great problem for exploring tradeoffs, yet easy to
understand what's being asked and requires no special technical knowledge.

~~~
hughlomas
A few hours ago when reading the article I was also intrigued by the question
and journeyed down a similar path regarding the moving window and the trade-
offs. After toying with a couple of improper solutions I came to a very
similar conclusion. The basic idea being that each time increment() is called,
you store the difference since the last increment, and to count you simply add
up the offsets until you reach your desired time limit. Anyway I emailed
myself the basic idea to post here later. There are probably some obvious
optimizations but it satisfied me as a solution. Pseudocodish javascript
example below:

    
    
      var second = 100000000
        , minute = second * 60
        , hour = minute * 60
        , day = hour * 24
        , current = 0
        , lastIncrement = 0
        , increments = [];
    
      function increment(){
          current = timer.time();
          increments.push( current - lastIncrement );
          lastIncrement = current;
      }
    
      function getCountInLastSecond(){
          var copy = increments.slice()
            , total = 0
            , count = 0;
    
          while( ( total <= second ) && ( amount = copy.pop() ) ){
              total += amount;
              count++;
          }
          return count;
      }

~~~
abalone
Your array will grow indefinitely. Not a viable solution, it seems to me.

Incidentally someone else posted a round robin database solution. It's
probably the way to go. That's more or less where I was headed with quantizing
offsets.

~~~
hughlomas
Well to be pedantic it will grow, at worst, to (24 * 60 * 60 * 1000000000), if
you are calling increment() every individual nanosecond. Though you are right
that it is ignoring realistic memory issues. I was approaching it more as a
thought exercise to address the moving window.

~~~
abalone
No, that's just the maximum possible in a single day.

~~~
abalone
Your bigger problem is with this "trim the array" idea, which is definitely
not an obvious solution. The way you've coded it you'd have to tally almost
the entire days worth of deltas just to determine the trim point. And you may
still exceed that single-day max memory, because you'd accumulate overruns in
between trims. I'll leave you to think about that one.

(Hint: google round robin database. You know, the solution that I mentioned.)

~~~
bjterry
Interestingly, based on the explanation at [1] round robin databases actually
don't precisely solve the question as described in the article. It sacrifices
precision for larger increments, and the author was looking for an exact
algorithm.

1: [http://jawnsy.wordpress.com/2010/01/08/round-robin-
databases...](http://jawnsy.wordpress.com/2010/01/08/round-robin-databases/)

------
bengrunfeld
Large companies often fall into the trap of lack of communication between
departments and individual employees. They get so big they trip over their own
feet. I used to work for Melbourne IT, a behemoth with hundreds of employees
spanning multiple countries. Customer relations was a disaster, with each
customer being told conflicting things by different sales people and customer
service reps. Sorry you had such a bad experience.

------
Yourfags
I don't agree with the fact that they were rude, which is what is it to not
respond in these cases, but they didn't do anything particularly offensive
except for leaving him in the dark. All he needed to do was take a job offer,
if Google really wanted him, they could fix their mistake(s) of waiting so
long. The comments though for this article are pretty egregious, it's too bad
interviewers are that awful.

