President Trump's heightened security protocols at US borders are at the center of another controversy after border agents have resorted to giving a Nigerian man a quiz on computer science to evaluate if he was a software engineer as he proclaimed.

According to a tweet the engineer posted online as soon as he was granted access to the US, this happened late Sunday afternoon, on February 26.

This was Omin's first visit to the US

The man, named Celestine Omin, is a 28-year-old software engineer who built his portfolio from the ground up by creating church websites for free.

The engineer's talents were spotted by various local startups, and later hired by Andela, a company founded by Mark Zuckerberg and Priscilla Chan, created to help talented African programmers work with top tier US tech giants.

On Sunday, it was Omin's first work visit to the US, where he was supposed to meet with Andela's New York branch about an upcoming project.

Agents didn't believe Omin was a software engineer

After a nearly 24-hour-long travel, Omin was asked by US Customs and Border Protection (CBP) agents to enter a room for further questioning.

In there, it became pretty clear that agents weren't just going through a normal routine. In particular, they were going after the validity of his short-term joint B1/B2 visa.

"Your visa says you are a software engineer. Is that correct?" a CBP agent reportedly asked Omin, who recounted his story to LinkedIn's New Economy Editor Caroline Fairchild.

Omin asked to take a computer science quiz

Immediately after confirming his job position, Omin says he was given a sheet of paper and asked by border agent to reply to ten questions. Two of the questions that Omin recounted are:

Write a function to check if a Binary Search Tree is balanced

What is an abstract class, and why do you need it?

Omin, who says he was too tired after his 24-hour-long flight to answer the first question correctly, and says border agents didn't looked convinced by his answers.

Furthermore, he also suspects that the border agents had absolutely no training in computer science, to begin with, and should not have been giving him this type of test.

Questions looked like they were googled

All the questions looked like some agent googled "questions to ask a software engineer," and compiled a short list. Omin suspects that no agent had the capability to understand his answers anyway and that the test was only an excuse to deny him entry to the US.

Fortunately, another CBP agent had phoned Andela in the meantime and confirmed his identity (occupation and skills). Omin was later granted passage to the US, albeit the engineer now feels extremely bitter and humiliated by the entire experience. Admittedly so.

This is just the latest nightmare scenario that people go through when entering or re-entering the US. This is also not specific to foreigners.

Two weeks ago, a US-born NASA engineer was detained at the Houston airport after returning from Chile. He was denied re-entry to the US until he unlocked his phone so agents could inspect it. The problem was that this was a NASA-issued phone which also contained sensitive information about ongoing NASA technologies and research, which the engineer risked sanctions if he exposed, even in a CBP search. In the end, the engineer gave CBP agents his phone's passcode.