There have been more egregious episodes of U.S. border agents hassling and/or needlessly detaining citizens and valid visa-holders since the White House changed hands, but perhaps none has been more bizarre – or even darkly comical – than this one.

Celestine Omin, a 28-year-old software engineer from Lagos, Nigeria, was traveling to the U.S. on Sunday as part of his job with Andela, a startup backed by Facebook’s Mark Zuckerberg and Priscilla Chan. Upon arrival at JFK Airport, he was questioned by one border agent, waited for an hour, and then was brought to a different room to be questioned by a second agent. From a LinkedIn story:

“Your visa says you are a software engineer. Is that correct?” the officer asked Omin in a tone the engineer described as accusatory. When Omin said it was right, the officer presented him with a piece of paper and a pen and told him to answer the following questions: “Write a function to check if a Binary Search Tree is balanced.” “What is an abstract class, and why do you need it?” To Omin — who now hadn’t slept in more than 24 hours — the questions seemed opaque and could have multiple answers. While he is a skilled software engineer with more than seven years of experience, Omin later (said) that the questions looked to him like someone with no technical background Googled something like, “Questions to ask a software engineer.”

He did the best he could to answer the questions, and after first being told he had flunked the pop quiz, was nonetheless allowed to go, presumably because in the meantime Omin’s employer had been contacted and vouched for him.

Omin then shared his experience on Twitter.

Now, there’s nothing funny about U.S. customs agents using seat-of-the-pants antics to do their jobs, but reading of Omin’s experience immediately brought to mind one of Monty Python’s most famous movie gags: “The Bridge of Death.” (You can skip ahead to the 50-second mark.)

I’m thinking those border agents might be Monty Python fans.

Welcome regulars and passersby. Here are a few more recent buzzblog items. And, if you’d like to receive Buzzblog via e-mail newsletter, here’s where to sign up. You can follow me on Twitter here and on Google+ here.