
Australian software engineer got asked algorithm question when entering US - github-cat
http://www.news.com.au/travel/travel-advice/travellers-stories/aussies-weird-immigration-interview-in-the-us/news-story/8222c65d2f12e6691ef27c9b1753e821
======
ericdykstra
People are quick to blame this on Trump, but reading through the comments on a
previous article for this incident ([http://www.news.com.au/travel/travel-
advice/travellers-stori...](http://www.news.com.au/travel/travel-
advice/travellers-stories/aussies-weird-immigration-interview-in-the-us/news-
story/8222c65d2f12e6691ef27c9b1753e821)), it looks like it’s par for the
course to test someone’s knowledge on their claimed profession. Here’s a
comment from one of the users:

> Had the same experience 12 years ago: admitted I am developing linux device
> drivers, and had to explain differences between kernel 2.4 and 2.6 APIs. The
> guy actually understood it.

Testing occupational expertise is not a bad way to find people who are lying.
To be able to explain the difference between kernel 2.4 and 2.6 APIs or how to
balance a binary search tree are questions one could not possibly answer
without actually being in that profession.

Let’s say you’re a hitman traveling to Malaysia to take out the estranged
brother of a dictator. Before you go, you’re given a fake passport and
character sheet telling you your profession, your family situation, etc. It’s
pretty easy to answer questions like “how long have you been working as a
photographer?” or “how did you meet your wife?” but a lot more difficult to
prepare for questions like “What is the best lense for close ups?”

~~~
eigenvector
I've been asked my profession a number of times on entering the US (as a
visitor - not on a work permit). I'm an electrical engineer, but my response
is usually just "engineer". Electrical engineering is such an incredibly broad
profession, including everything from chip designers to radio engineers to
power systems. Just how many quizzes is CBP going to have design to cover
every branch of my profession and not deny an antenna designer entry because
he doesn't know anything about power transformers?

~~~
yummyfajitas
What is ohm's law? What's the difference between AC and DC?

Not very hard. It won't deter someone willing to learn EE 101 but will deter
the guy who plans to overstay his visa and work as a dishwasher in his
cousin's restaurant.

~~~
ProblemFactory
That assumes the border agents are familiar with all professions to come up
with smart questions, or to understand answers that say the same thing with
different terminology.

At best they will google "<profession> interview questions" and ask the first
one, and do word-by-word matching on the answer.

For Electrical Engineering, the first one that comes up for me is "Why star
delta starter is preferred with induction motor?".

------
curryhowardiso
Hey y'all, I'm the person they mentioned in the article.

Because this is a fairly technical forum (and some people were asking about
language specifics or runtime characteristics) I'll let you in on the question
even though I left it out of the journalist interviews - hopefully this
information will help you make sense of the article/interaction for yourself:

Write a Python program to take two numbers as input and if the sun is bigger
than 100, output "this is a large number" but if it is less than 100 output
the sum of the numbers.

Lol!

~~~
ZoeZoeBee
What were you denied entry for previously?

~~~
curryhowardiso
Sorry? I wasn't denied entry ever... Ahh the news.com.au article isn't worded
very clearly: the person in front of me was denied entry (not me!)

------
lb1lf
One cannot but wonder what happens if you answer the question in a different
manner than that suggested by Wikipedia or whichever resource the CBP draws
their questions from.

I think the basic idea - questioning people about things they ought to know,
given who they claim to be - is a good one.

However, it only makes sense if the one doing the questioning is able to judge
the quality of the answer - or, for that matter, determine whether your
inability to answer satisfactorily is because you bluffed - or if you're just
a bit outside your professional comfort zone.

(I would probably have to answer 'software engineer', as that is what my
business card says - however, I am much more of a hardware/systems guy in
practice, only our HR department is completely unable to change my title to
something a bit more descriptive. If speaking to another engineer, I wouldn't
have any problems convincing him of my bona fides - however, if a CBP officer
just looks up question #13 in the 'SW engineer' quiz - I may be in trouble.

~~~
bbcbasic
> I think the basic idea - questioning people about things they ought to know,
> given who they claim to be - is a good one.

It's an awful idea. False negatives. Discriminates against people with harder
professions. Wouldn't keep out determined people

~~~
lb1lf
As to the last part, if people are sufficiently determined, you're in for a
hard time, anyway. A 30-second screening at the border is pretty good at
sorting out the Epsilon minus semi-morons, though. (Whose numbers, one would
suspect, vastly outdoes the really determined ones.)

As for false negatives, I wouldn't be too concerned as long as you got to talk
to someone reasonably well versed in your field. Also, as suggested by
golergka and rconti - they probably use the questions as a way to elicit a
response from you and judge that, more than your actual answers. That makes a
lot of sense to me, now that I pause to think of it for a second.

------
hiharryhere
I think lots of people on this thread are missing the point. This won't
necessarily detect a determined spy who's done their homework. It's not meant
to. It's a quick and effective sanity check to make sure that a person hasn't
fudged their visa credentials and they're well in their rights to ask and
exercise their discretion. They've been doing it for years.

I doubt a perfect answer to their trivia question is required. If it's in your
field you'll be able to say something halfway intelligent in response, if
you've lied on your visa it will become obvious pretty quickly.

Outrage about confiscating phones and demanding passwords is justified. This,
on the other hand, seems pretty reasonable.

------
d--b
It's actually fairly typical. When you enter on a H1B visa they ask you
questions to see if your occupation (the one you got the visa for) is not made
up.

I work in Finance, and when I was on a H1B visa (back in 2010), the
immigration officer asked me some bond-related questions, just to see if I had
any clue.

They also asked my wife what I was working on.

It's pretty annoying to feel that you're not being trusted, but yes, they
don't trust you.

Also the fact that he's Australian is a reassuring proof they don't base these
question on color of skin...

~~~
dmode
Is this true ? I have entered the US at least 30 times on H1 and never been
asked anything like this and have never heard anything like this from my
friends either

~~~
d--b
it's nothing like interview questions, just "hey so what did the 30y bond was
headed last week?". Or "So should I buy stocks?".

Probably just to check whether I would start crying and confess I didn't know
a thing about finance.

They also asked my wife if she knew all my first names (I have 4!).

But yeah they definitely asked some occupation-related questions.

------
lstamour
Original, with a little bit more detail:
[http://www.news.com.au/travel/travel-advice/travellers-
stori...](http://www.news.com.au/travel/travel-advice/travellers-
stories/aussies-weird-immigration-interview-in-the-us/news-
story/8222c65d2f12e6691ef27c9b1753e821)

> “The vibe I got was weird. He asked me a question, then asked me a follow-up
> question to prove I wasn’t lying.

> “Do they not allow bad software engineers into the United States?” Thornton
> joked.

See also, more recently: [http://money.cnn.com/2017/03/02/technology/andela-
engineer-c...](http://money.cnn.com/2017/03/02/technology/andela-engineer-
customs/index.html)

------
BugsJustFindMe
_“‘I’ve got a problem, I’m trying to write a computer program, can you help
me?’”_

"My software consulting rate is normally $400/hr, plus an initial startup fee,
but I'm not authorized to work in your country, so, no."

------
djhworld
I always found the cold, hard manner of border agents in the US quite off
putting in general.

Last year I was fortunate enough to attend AWS Re:Invent, standing in the
queue at McCarran airport, I saw the guard laughing and joking with the people
in front of me so I thought ah, maybe they're all not like this!

As soon as it came to me the guy completely changed, he went cold, he spent
the most amount of time asking why I'd ticked "business" on my customs form,
as I didn't know what to tick, then proceeded to ask me what conference I was
going to and what it was about and why I was attending. I know that's his job
and he's just making sure everything lines up, but it just felt unwelcoming.

~~~
taway_1212
I've read somewhere that, if border controls were abolished, about a billion
people from all across the world would move to the US. I'm guessing that,
since people already want to come to US pretty badly, being welcoming is not a
high priority for border personnel.

~~~
passivepinetree
What possible source do you have for 1/7th of the world wanting to abruptly
uproot their lives and move to the U.S.?

------
dragony4
I am not surprised by this. When I was at Newark the conversation with
immigration guy was something like this:

Him: What do you do? Me: I am an entepreneur.

Him: Haha, ... we are all entepreneurs, now really, what do you do? Me:
Websites

Him: I've heard there is a Sillicone Valley in Russia and they want to take
over that ours. Me: Um, okay. (I am from Czech Republic)

------
reledi
A few days ago a Nigerian software engineer was asked to balance a BST at JFK
airport:
[https://twitter.com/cyberomin/status/835888786462625792](https://twitter.com/cyberomin/status/835888786462625792)

~~~
rezashirazian
I think he was asked to write a function that will return true if the tree is
balanced, not to actually balances it, which in my opinion is an exponentially
easier question.

------
chvid
Don't blame this on Trump; it goes on all over the world.

If the border police officer for any reason decides that you are suspicious
then they will toy with you as they please. That includes asking arbitrary
questions under the threat they can send you back to home country for any or
no reason. Plus they can fingerprint you and go thru all your travel goods
including phone and laptop.

As foreigner you have no rights standing at the border of the country you are
entering.

And the border police operates without the checks that a normal police force
operates under.

If you are a frequent traveller you better get used to being interrogated;
answer short and precise without using any trigger words.

------
pav3l
One of my math professor (Canadian) once told us a story (~10 years ago) that
the US border control asked him to "state and prove Rolle's theorem" after he
had told them he was traveling to a math conference. Apparently he answered
"it's something to do with the mean value theorem, right?" and that was good
enough.

------
lordnacho
I don't like the nervous atmosphere they make at the US border. It's the only
country apart from Cuba where you get the feeling they might deny me entry for
no reason. And it's the only country that I personally know people have been
denied entry for no reason.

It's the way the questions come out, like a movie. The words come out slowly
while the guy looks for something in my eyes.

I haven't been grilled on professional questions, but I wonder what I should
say I do. Programmer or Trader are both legit. If I say programmer, I might
get a technical question. If I say trader, maybe I just have give him a random
stock tip.

~~~
Markoff
ever travelled to Israel? their immigration interviews are legendary.

~~~
lordnacho
I have, and it was not memorable?

------
js8
This reminds me of a George Gamow's story (which can be an urban legend
attributed to him) in Soviet Russia, I think when he was trying to flee.
Allegedly, he was detained by some local warrior group in Caucasus(?). The
local chieftain didn't believe he was a theoretical physicist, so he asked him
to derive the n-th error term of the Taylor expansion. Fortunately, he was
able to do that and save his life!

I take it as one of those lessons of usefulness of mathematics in daily life.
:-)

------
kirillkh
This makes me wish some of my colleagues were issued an airplane ticket to the
US. Possibly one-way.

------
mwidell
I've also been asked for my occupation, and then my business card, and then my
website – which they actually started browsing as I was standing there in the
passport control. This was back in 2009.

------
HappyTypist
I'm in the US right now. Upon arriving in SFO (from Sydney) on a holiday
(ESTA), I was asked the following non-standard questions:

"So you're a software engineer? What is your most proficient language?"

Response: "Javascript"

"What does the atob function do?"

I was quite taken back and asked to repeat, and the CBP agent spelled out "a t
o b". I answered something to do with base64 decoding and was let through

~~~
ubersoldat2k7
Haha! Shit! The only time I've used atob in 20 years of doing JS was to read
the ProtectionHeader of a SmoothStreaming manifest file recently. I'll bet
little to none JS programmers know specifically what it does or if it even
exists.

------
dmitrykoval
It's a little bit strange that even though Python was mentioned there's not a
hint about the actual problem in question.

~~~
curryhowardiso
I didn't tell the journalists the question because it wouldn't mean anything
to their target audience.

Most of these reposts (including this one in hacker news) have not reached out
to me for additional or audience-specific details :)

------
eps
The fact that this has started happenning in parallel with H-1B crackdown is
not a coincedence. Someone somewhere issued a note that too many fake
programmers are slipping in, so that's the result.

------
seesomesense
A investment banker I know ( private equity, with a well know firm that has a
AUM of $340 billion ) was asked :

"Why do you you hate the USA ?"

when he last flew to the US.

------
karg
Why not just strap them on a lie detector and ask if they have any intention
to do anything illegal?

------
jondubois
I just don't believe this. It's fake news. This line made it clear to me:

"He said the officer appeared to be mid to senior level, and there’s no chance
the conversation would have been overheard by anyone else in line."

So basically there is no one who can corroborate with his story. This trash
should not be allowed into any publication which calls itself 'news'.

I'm surprised that people actually believe that stuff by default. In this new
world, the default should be to distrust the media and that line I quoted
above gives a very good reason to distrust it.

~~~
curryhowardiso
I was the person in the story and I'm pretty sure this person could!
[https://twitter.com/cyberomin/status/835888786462625792](https://twitter.com/cyberomin/status/835888786462625792)

~~~
jondubois
I don't believe that either. It's such a specific question - I don't know if
even Facebook or Google would ask such a question in their interviews.

This guy you just linked to has posted 11K tweets in the past; obviously an
attention/status seeker. Also his follow-up tweet gave it away:

"So @Twitter I can now get the blue tick, yes?"

He almost didn't get any retweets before his 5 minutes of fame.

Wow people on HN can be so gullible.

~~~
curryhowardiso
Out of curiosity, what threshold of evidence would you accept that I provide
to verify that I was indeed asked to write code at the US border?

I'm almost certainly not going to provide it, but I'm still curious if you're
willing to elaborate.

