I just read this article, titled A software engineer was detained by U.S. Customs - and given a test to prove he's an engineer.
While the actual situation is slightly different - he tried to enter it with a correct visa but I almost always enter any country with a visa-free tourism requirement - I got shocked to see these things happen at the immigration.
Since filling in "no job" or unemployed" in the occupation field could lead to a higher rate of interrogation, I usualy write myself as a Software Developer. That said, I'm more of a hobby dev than a working guy and I have no official job history or educational attainment to be honest.
In fact I couldn't answer the questions asked in the case, which are the followings:
Write a function to check if a Binary Search Tree is balanced.
What is an abstract class, and why do you need it?
So the immigration officers would likely deny my entry if I were the man. It is too scary to say the least.
Is this kind of things common in passing through the immigration? Is it only in US, only for specific types of visa applicants, or maybe is it more related to which passport a travler has?
Is there anything that I can do to avoid the situation happens, or at least mitigate the possibility, as a traveler (always solo)? Now I wonder it might be better to declare another, more obscure job title such as a tech consultant...