New York arrival
International travelers arrive at John F. Kennedy international airport in New York City, U.S., February 4, 2017. Reuters/Brendan McDermid

An Australian man was asked peculiar questions from officials at the US customs when he arrived in New York. Twenty four-year-old software engineer David Thornton, from Sydney, had expected to be asked tough questions upon his arrival. However, what he experienced was quite unusual.

Thornton had travelled to the United States on a holiday. He had just completed a course in Europe and had stopped in the US before heading home.

He said the questions at first seemed regulation. When asked what he was doing there, he answered that he was vacationing and was going to be in the US for 10 days.

“It was taking longer than usual, but I expected that,” Thornton, who studied computer science and law at the University of New South Wales, said. “When I rocked up and it was my turn to talk to the Customs and Border Protection officer he asked all the regular questions. It was nothing out of the ordinary.”

The officer then asked Thornton what he did for a living. "I told him I'm a software engineer. He asked if I knew Python code, and I said yes,” Thornton said, speaking with News Corp. “It's a programming language, like C or Java, and it's pretty standard.”

But, soon thereafter, the interview steered into a peculiar direction. The officer went on to ask for Thornton’s help in writing a computer program. “‘I’ve got a problem, I’m trying to write a computer program, can you help me?’” the officer said.

Thornton was surprised at this. “I was a little bit taken aback, because I thought I was going to get straight in,” he said. “He started to read off his computer, and I got the feeling he was trying to trick me. I just wanted to get into the US, so I said: ‘Of course’.”

Not only did he have to perform the computer task he was asked, he even had to record his answers on a paper. “[The officer] administered a literal computer science test. It wasn’t a savant-level one like you hear of at Google, but it was definitely a test,” Thornton said. “The vibe I got was weird. He asked me a question, then asked me a follow-up question to prove I wasn’t lying.”

He was eventually allowed entry into the US. In the subsequent days, he explored New York and met with his family friends in Texas.

When one of Thornton’s friends, science and technology journalist Seth Porges, learned about his friend’s experience, he was utterly surprised. "Australian guy I know was just stopped at [the airport]. CBP asked what he does,” Porges wrote on Twitter. “'Computer programmer.' Then had him solve a CS problem. #NotKidding."

The controversial travel ban came after US President Donald Trump signed an executive order on Jan. 27. As part of the ban, citizens from seven Muslim-majority countries were denied entry into the US.