At first David Thornton, who had flown in from Sydney, said the questions were pretty standard. He informed the Customs and Border Protection officer that he had been to the US before and planned on staying for ten days.
The officer then asked Thornton what he did for a living, to which he replied, "I told him I'm a software engineer. He asked if I knew Python code, and I said yes. It's a programming language, like C or Java, and it's pretty standard," he told New.au.
Thinking he was finally going to be let in the country, Thornton was taken aback when the officer asked if Thorton would help him write a computer program.
"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'."
The engineer was forced to prove his knowledge of programming, with the officer even supplying him with a paper and pen to write his answers down.
"He 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…The vibe I got was weird. He asked me a question, then asked me a follow-up question to prove I wasn't lying."
Thornton jokingly asked,"Do they not allow bad software engineers into the United States?"
He was allowed in the US shortly afterward, and after telling American friends about the strange ordeal, science and technology journalist Seth Porges wrote on Twitter, "Australian guy I know was just stopped at [the airport]. CBP asked what he does. 'Computer programmer.' Then had him solve a CS problem. #NotKidding."
Reflecting on his experience,Thornton advised, "Just make sure you study up before you enter the United States!"