Slashdot Mirror


Software Engineer Detained At JFK, Given Test To Prove He's An Engineer (mashable.com)

New submitter mendred quotes a report from Mashable: Celestine Omin, a software engineer at Andela -- a tech startup that connects developers in Africa with U.S employers -- had a particularly unwelcoming reception when he deplaned at John F. Kennedy Airport and was given a test to prove he was actually a software engineer. A LinkedIn post detailing Omin's challenging experience explained that upon landing in New York after spending 24 miserable hours on a Qatar Airways flight, he was given some trouble about the short-term visa he obtained for his trip. According to the post, an unprepared and exhausted Omin waited in the airport for approximately 20 minutes before being questioned by a Customs and Border Protection officer about his occupation. After several questions were asked, he was reportedly brought to a small room and told to sit down, where he was left for another hour before another customs officer entered and resumed grilling him. Omin was instructed to answer the following questions: "Write a function to check if a Binary Search Tree is balanced," and "What is an abstract class, and why do you need it."

553 comments

  1. USA! USA! USA! by OverlordQ · · Score: 5, Funny

    We're Number #1! /s

    --
    Your hair look like poop, Bob! - Wanker.
    1. Re:USA! USA! USA! by Anonymous Coward · · Score: 5, Funny

      This is completely justified.

      We shouldn't let anyone into the country who can't write a procedure to tell if a Binary Search Tree is balanced, or doesn't know what an abstract class is.

    2. Re: USA! USA! USA! by LiENUS · · Score: 4, Insightful

      Like it or not that's what a sane immigration policy looks like.

      Lol no sane immigration policy has border patrol agents administering visas at the border. This shit woulda been done when the visa was issued waaay before he gets to the border.

    3. Re: USA! USA! USA! by Anonymous Coward · · Score: 5, Funny

      I know I know! An abstract class is one where they talk about binary search trees!

    4. Re: USA! USA! USA! by bobbied · · Score: 2

      No that there is funny!

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    5. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      Aren't you worried about discrimination? Assembly programmers come from a culture without abstract anything. Even an instantiable class is too abstract for them.

      Just because someone is raised to program i a culture of opcode fundamentalism does not mean we have no place for them in America!

    6. Re:USA! USA! USA! by Anonymous Coward · · Score: 3, Informative

      I don't know what an abstract class is or why it's useful. I write in C, not whatever language is hot shit in Current Year(tm). I can, however, balance a binary search tree, so I guess I'm half eligible to not get deported.

    7. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Big fucking deal! I take it he got into the country and took a job from an American software engineer for half the reimbursement?

    8. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      It does if we're talking about Trump's America.

    9. Re: USA! USA! USA! by lgw · · Score: 2

      Like it or not that's what a sane immigration policy looks like.

      While I agree with that, this wasn't immigration, this was a short-term work visa. I guess it's the equivalent of the Canadian border guys saying "what exactly will you be doing and why can't a Canadian do that?", except we probably didn't apologize afterwards.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    10. Re: USA! USA! USA! by AHuxley · · Score: 1, Interesting

      Most nations are smart and know that just having one part of a gov giving out a visa in another nation is not really that secure.
      So a second line of questions are in place to ensure the visa and person are correct when entering the USA.
      The next step will be biometric. Biometrics matches the visa application, the person at the embassy and that person entering the USA are the same.
      The person then returning home from the USA is the person who entered. The US will soon do what every normal nation has been doing, count and reconcile every visa in and out.

      --
      Domestic spying is now "Benign Information Gathering"
    11. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Aren't you worried about discrimination? Assembly programmers come from a culture without abstract anything. Even an instantiable class is too abstract for them.

      Just because someone is raised to program i a culture of opcode fundamentalism does not mean we have no place for them in America!

      Get the memo : assembly programmers are not welcomed in the land of the pussy-grabber.

    12. Re:USA! USA! USA! by AmiMoJo · · Score: 4, Insightful

      Well... I didn't want to go there anyway.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    13. Re:USA! USA! USA! by w1z7ard · · Score: 2

      ...or doesn't know what an abstract class is.

      What about functional programmers?

      --

      "Recursive bipartite matching"- try it!

    14. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      Finger gloves, here! Get y'er finger gloves here! Sale on retina contacts 3 for 1. Warm piss sample, and wigs half off! Finger gloves here......

    15. Re:USA! USA! USA! by Pseudonym · · Score: 1

      We shouldn't let anyone into the country who [...] doesn't know what an abstract class is.

      You do that, America. In the mean time, we'll take all the C and Haskell programmers for ourselves.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    16. Re:USA! USA! USA! by dougdonovan · · Score: 1

      Celestine Omin, have you been disconnected from global reality ( every social media on the planet ) since Trump started campaigning for the President of the United States ? Do you remember what Trump promised the US citizens ?

    17. Re: USA! USA! USA! by PCM2 · · Score: 4, Informative

      Lol no sane immigration policy has border patrol agents administering visas at the border.

      Traveling on a U.S. passport, I've been to several countries where yes, they do indeed issue you a visa at the border.

      --
      Breakfast served all day!
    18. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      You can have all the VB6 work too.

    19. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Byte code programmers and to a lesser extent assembly programmers are the only real programmers.

    20. Re: USA! USA! USA! by LynnwoodRooster · · Score: 2

      And others do not... China, for example. Most EU countries if staying more than 90 days. Much of the Middle East. And some countries, like Thailand, have different rules; if you're entering as a US citizen for tourism, no visa for up to 30 days. For business? You need a visa. Peru was the same way. When I went to visit as a tourist, no problem. When I went to do business, I had to have a visa.

      --
      Browsing at +1 - no ACs, I ignore their posts. So refreshing!
    21. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      we should first limit the office of president to only those who can do that.

    22. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      The USA has been doing biometrics on visas for a while dude. The USA already counts and reconciles every visa in and out. All they need to be doing is verifying that the person on the visa is the one in front of them. Which is the point of biometrics. Anything else is pants-on-head stupid.

    23. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Yeah, those are the countries you have a no-need-for-visa-in-advance treaty with. Those are your friends.

    24. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      iow compilers

    25. Re:USA! USA! USA! by Xyrus · · Score: 1

      But for someone who wants to run the country, it's perfectly fine even if you don't have a high school diploma!

      --
      ~X~
    26. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      Anything else is pants-on-head stupid.

      That's what millions of people wanted. They voted for Trump, and that's precisely what they got, once the electoral collage got around to over-riding the actual popular vote, of course.

      We are literally the laughing stock of the world now.

    27. Re:USA! USA! USA! by Marxist+Hacker+42 · · Score: 1

      The same questions I had to answer for my last 4 Software Engineer Interviews...as a citizen. No work for you unless you can balance a binary search tree!

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    28. Re: USA! USA! USA! by mysidia · · Score: 1

      When I went to do business, I had to have a visa.

      Sounds pretty dodgy..... What's "Business"? Is attending an industry conference for personal education or to meet other people considered business?

      Does it count as business if you're going on vacation, but you happen to meet up with an overseas client to a little chit-chat / smalltalk?

    29. Re: USA! USA! USA! by swillden · · Score: 1

      Like it or not that's what a sane immigration policy looks like.

      While I agree with that, this wasn't immigration, this was a short-term work visa. I guess it's the equivalent of the Canadian border guys saying "what exactly will you be doing and why can't a Canadian do that?", except we probably didn't apologize before and afterwards.

      FTFY. HTH. HAND.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    30. Re: USA! USA! USA! by Cinnamon+Beige · · Score: 2

      And others do not... China, for example. Most EU countries if staying more than 90 days. Much of the Middle East. And some countries, like Thailand, have different rules; if you're entering as a US citizen for tourism, no visa for up to 30 days. For business? You need a visa. Peru was the same way. When I went to visit as a tourist, no problem. When I went to do business, I had to have a visa.

      Actually, you're rather wrong--what you don't need to do is apply for a tourist visa in some countries. What they put in your passport when you're entering is a visa, and it's automatically issued to people from certain countries. The deal is typically reciprocal, though you're not necessarily certain of getting one--usually, from what I've heard, it's when you've gone and come back to try to 'renew' your tourist visa. (If there's a formal/proper process, it's so well-hidden as to be practically not existant.)

    31. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      The US started reconciling entries and exits and taking fingerprints around 15 years ago, after 9/11. I know this, because a friend was pulled aside at immigration over two trips she'd made 10 years earlier, where the records at the time were incomplete, so they matched the first entry with the second exit and concluded that she had overstayed her visa. Eventually she was allowed in, but told she was no longer eligible for visa waiver, and would have to apply for a visa in advance in future. After she got home, she dug up her old passport with the entry and exit stamps, and took it to the US embassy, but was told that they could not do anything.

      Yes America, your immigration policy has been out of control for over a decade already. Nice that it is now getting some attention, but if you're going to wind things back, please wind back to 2000, not to 2016. In no other country are tourists and businesspeople greeted by angry fat men with guns barking at them for every imagined transgression ("PUT THE PHONE AWAY!", "STAND IN LINE!", "KEEP MOVING!")

    32. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      China issues visas at the border (there are conditions, and most trips probably don't meet them, but they do do it).

    33. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      I've had Canadian Immigration make me give a presentation when attending a conference. They cut me off 5 min into it and don't care about the content other than it was obvious I had a prepared talk. I'm not the only one this has happened to, as colleagues have had the same thing happen.

      On the US side, I've never had that, but have had agents want to talk about my research career, but they had already stamped passports and wanted to just waste time talking about something interesting. Even when I tried to cut them short because it was holding up the line, they explicitly stated they didn't care if people got in or not and found the chat more interesting.

    34. Re: USA! USA! USA! by LiENUS · · Score: 1

      For vacation visas sure, not for a work visa.

    35. Re:USA! USA! USA! by ghoul · · Score: 2

      This is completely justified.

      We shouldn't let anyone into the country who can't write a procedure to tell if a Binary Search Tree is balanced, or doesn't know what an abstract class is.

      I agree. In fact we should go a step further. We should start revoking US citizenship and deporting folks who cannot write the same. A much smarter nation will result.

      --
      **Life is too short to be serious**
    36. Re: USA! USA! USA! by ghoul · · Score: 1

      Actually the B1/B2 is a tourism/business visa. Its not a work visa. If he actually said he was going to work in the US the CBP agent should have sent him back. It seems Andela is breaking the law by using B1/B2 for work.

      --
      **Life is too short to be serious**
    37. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Only rockstar programmers wanted here. Low-energy asm bit diddlers OUT!

    38. Re: USA! USA! USA! by lgw · · Score: 1

      I don't think it counts as working unless you're working for more than 2 weeks. Go figure.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    39. Re: USA! USA! USA! by Anonymous Coward · · Score: 1

      The rest of the world doesn't care. I live and work in Germany. People laugh about it sometimes and then move on to their own lives... can people stop saying this. Speaking for a different group of people who aren't yours is stupid.

    40. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Second this. England and Poland are two places I've personally seen this happening.

    41. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Sounds like these are two serious problems in the USA.

    42. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      USA! = U * S * A * (A -1)! where 0! is defined as 1

    43. Re: USA! USA! USA! by GrokvL · · Score: 1

      How is this not a 5? Gold.

    44. Re:USA! USA! USA! by amxcoder · · Score: 3, Interesting

      Agree, I've been a professional programmer for over almost 20 yrs, but I specialize in embedded platforms and automation control. I can't tell you how to balance a binary search tree because in my field, that concept is not even used, or able to be implemented with the limited and custom "subset of C language" compilers I have to work with. I DO however know what an abstract class is though, just from studying OOP programming in general, so I guess I would only get half credit on that exam?

    45. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      What kind of collage is that?

    46. Re: USA! USA! USA! by amxcoder · · Score: 1

      to be fair, I don't think he had a H1B visa to work here either, from another article I read ealier today, it sounded like he had a visiting visa that would normally be used to meet with his prospective employers, but not actually start working. The info I read may be wrong as I'm not sure of the different visa versions and limitations of each.

      To me, it sounds like they were unqualified to actually know if he was correct or not, but were most likely asking him something they found on google to keep him busy while they contacted his sponser/employer and checked out his story. If you were a terrorist and had little to no education in programming, but were using a fake story like "I'm a programmer" to get into the country, I'm sure you wouldn't even know where to begin on answering either of those questions. But I doubt it if the answer to the questions really had much of an impact on whether he got released or not (unless he flipped out and started panicking like he'd been caught in a lie). That is my interpretation anyway.

    47. Re:USA! USA! USA! by SlaveToTheGrind · · Score: 1

      Sounds like a win-win to me.

    48. Re: USA! USA! USA! by Roger+W+Moore · · Score: 4, Insightful

      Most nations are smart and know that just having one part of a gov giving out a visa in another nation is not really that secure.

      No actually they do not know that because that is what every government I have ever applied for a visa from has done. How is this any less secure than a passport?

      So a second line of questions are in place to ensure the visa and person are correct when entering the USA.

      This second line of questions needs to be ones that the border guard is qualified to ask and understand the answer to. Such as who you are, what your business is etc. Having an unqualified individual trying to ask technical questions they do not understand is just stupid. When I worked at Fermilab 10+ years ago a colleague of mine was stopped at the US border and when he said he was a physicist the guard got out a large book, flipped through it, and asked him what "potential energy" was but, despite answering correctly, because he did not reproduce the exact answer given in the book he almost got denied entry.

      By all means protect your borders but please do it in a sensible, effective manner.

    49. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      This is why I don't fly. I can't imagine how many years I'd get for shoving a binary search tree up their functor.

    50. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Would mod you up twice if I could. Thank you AC.

    51. Re: USA! USA! USA! by AHuxley · · Score: 0

      Re 'By all means protect your borders but please do it in a sensible, effective manner."
      That is hard to do when the visa might be given by one part of the gov for some reason and another part of the US has to later ensure the US is protected.
      The US is taking steps to secure every step part of its visa, passport and later interview process.
      A passport and visa is just the start.
      Most nations will ask about health, bank accounts, ability to fund a stay in they nation, reason for entry, social media use, email accounts, education, a persons past.
      Any and all such questions can be reviewed in any way on entry after a visa has been issued.

      --
      Domestic spying is now "Benign Information Gathering"
    52. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      AmiMoJo is SO TRIGGERED right now you guys...

    53. Re:USA! USA! USA! by LostMyBeaver · · Score: 1

      GObject is an abstract class.

      If you were a good C programmer, you'd still have moved to using better programming methodologies by now. It's probably people like you that make it so the software on my car sucks.

    54. Re:USA! USA! USA! by LostMyBeaver · · Score: 1

      Computer science is computer science. Abstract types exist even in most functional languages.

      As for the validity of the question, the guy may be a programmer, but there are many pretty good web developers I know who couldn't even spell binary tree.

    55. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Lol the electoral collage. You kind of outed yourself as an idiot there, buddy.

    56. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      China issues visas at the border at certain special economic zones.

    57. Re: USA! USA! USA! by karlandtanya · · Score: 1

      is a PLC monkey really a programmer?

      --
      "Reality is that which, when you stop believing in it, doesn't go away." - Philip K. Dick
    58. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      An abstract class is mostly a PITA that people use to obfuscate code. Occasionally it is even useful, though such occasions are rare.

    59. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      But who will speak for the trees?

    60. Re: USA! USA! USA! by amxcoder · · Score: 2

      The automation I do is not PLC based. I do AV automation aka Crestron/AMX. Those platforms started out with custom languages that are based on C, but are slowly moving to C#, Java, and one manufacturer is using Python now... so I would say yes, it's real programming, but just within a smaller sandbox.

    61. Re:USA! USA! USA! by Askmum · · Score: 1

      This is completely justified.

      We shouldn't let anyone into the country who can't write a procedure to tell if a Binary Search Tree is balanced, or doesn't know what an abstract class is.

      Moreover, you should kick out everybody who can not identify a valid solution to check whether a Binary Search Tree is balanced from a banana.

    62. Re: USA! USA! USA! by cvdwl · · Score: 1

      And I live and work in Italy, and even they, with their history of Berlusconi and 70-odd governments since WWII, are laughing at us, when they're not shuddering in disbelief. I can, however, imagine that the Germans are moving on with their lives. There are reasons Germany works better than Italy.

      --
      ... grumble, grumble, grumble, mutter, mutter, Millenium... Hand... Shrimp, I tol' 'em, I tol' 'em.
    63. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      The rest of the world is moving on past the USA.

    64. Re: USA! USA! USA! by dbIII · · Score: 1

      So a second line of questions are in place to ensure the visa and person are correct when entering the USA.

      I don't think so.
      It looks to me like pointless busywork in the form of harassment to demonstrate that the people on the checkpoint are working hard to keep us "safe" so are not overstaffed and should not lose their jobs.

      Here is another incident that made someone who loved America (117 trips!) decide it's not worth coming back:
      https://www.theguardian.com/commentisfree/2017/feb/28/in-that-moment-i-loathed-america-i-loathed-the-entire-country?utm_source=TractionNext&utm_medium=Email&utm_campaign=Worm-Subscribe-010317

    65. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      You can program some PLCs with higher level languages like C, C++ etc.

    66. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Are you sure you weren't attending a Trump rally by mistake?

    67. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      C versus other languages is a bit like classical versus pop music. Classical may not be trendy and considered a bit of a niche, but its timeless. Pop music, well better hope your language lasts long enough to survive a project, and don't expect to create anything transcendent. Also, you'll probably be embarrassed by your choice looking back 10 years later.

    68. Re: USA! USA! USA! by Dahan · · Score: 1

      Actually, you're rather wrong

      NO U

      what you don't need to do is apply for a tourist visa in some countries. What they put in your passport when you're entering is a visa, and it's automatically issued to people from certain countries.

      Visa exempt/visa waiver program is distinct from visa on arrival. E.g., Thailand offers visa-free entry for citizens of certain countries, visa on arrival for citizens of other countries, and requires applying for a visa in advance for citizens of yet another set of countries. Travelers who are visa-exempt get a stamp in their passport, but that stamp is not a visa, and may have restrictions compared to an actual visa. E.g., visa-exempt entry to the US cannot be extended, while entry on a tourist visa (and some other non-immigrant visas) can.

    69. Re:USA! USA! USA! by djinn6 · · Score: 1

      Let's start at the top with the president.

    70. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      I've Master of Science and have worked as software engineer and cannot remember (anymore) how to process binary search tree. (when I was writing this answer I came up with a recursive algorithm to do it however).

      At least, they should have asked proper higher level questions like why it is important for tree data structure to be balanced. The abstract class is a easier question but typically you just use programmer language's ready made binary tree class like C++'s map and implement red-black or binary tree as an exercise when you are studying Computer Science.

    71. Re:USA! USA! USA! by AmiMoJo · · Score: 1

      The usual way to check if a binary tree is balanced is with recursion. You have a function like CountChildNodes() that calls itself repeatedly to cover the whole tree. On embedded systems where you want to avoid recursion, it's possible but not very nice at all.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    72. Re: USA! USA! USA! by AmiMoJo · · Score: 1

      If your country has a visa-free travel agreement then you might be issued with a temporary visa at the border. However, such agreements require that your own country vets you on the way out, and when you land it's just a rubber stamp for your passport.

      In this case the guy would definitely have needed to apply for a US visa first. There have been similar cases in the UK where people have not been allowed to board an aircraft because the US flagged them in some database after issuing the paperwork. The airlines won't fly them if the flag is there, visa or not, because of the risk that they might be refused entry and have to fly them all the way back again.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    73. Re: USA! USA! USA! by Gussington · · Score: 1

      And others do not... China, for example.

      They did when I went there about 10 years ago. I believe they changed the rules for the Beijing Olympics, but prior to 2007 you could rock up to the border and get a visa on the spot. I did it twice, once in Shenzhen and once in Pingxiang

    74. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      That's because they don't have a sense of humor ;)

    75. Re:USA! USA! USA! by chris_osulliva · · Score: 1

      we're number NaN

    76. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      You obviously have no understanding of the purpose of the electoral college, so puss off dimwit.

    77. Re: USA! USA! USA! by luis_a_espinal · · Score: 1

      When I went to do business, I had to have a visa.

      Sounds pretty dodgy..... What's "Business"? Is attending an industry conference for personal education or to meet other people considered business?

      Does it count as business if you're going on vacation, but you happen to meet up with an overseas client to a little chit-chat / smalltalk?

      Depends on the country. A visit to a conference can be considered a business trip. That's for the host country to decide.

    78. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      that answer introduces so many wrongs that you might get problems with immigration just because of your rant. you can do everything in brainf*k and derivatives as seen here: https://esolangs.org/wiki/Treehugger because even the weirdest language can be turing complete. look it up! ... and to say that you use a non-turing complete subset of C 'in your field' to write computer software - simply does not compute.

      it isn't the concept's fault that its not used by you! .... now stop wondering why people want to hire immigrants.

    79. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      This might slow down the H-1B process now. Perhaps companies will really only bring 'necessary' talent over instead of the schlubs they have been hiring to replace Americans.

    80. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      The logging industry says the trees like being cut down.

    81. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      That is what I call extreme vetting.

    82. Re:USA! USA! USA! by amxcoder · · Score: 1

      Maybe it is possible in some of the more restricted environments that I use, but my intention was to get the point across that some software developers require some skill sets while other require another set of skills. With the applications I work on, the only real need to sort something would be to alphabetize a contacts lists that was pulled from another device to show the user. In all the cases I've come across this, the size and type of data to sort is so small and trivial that bubble/insert/quick sort methods wouldn't bat an eyelash at. No need for a binary search tree implementation.

      A binary search tree is not used, has no practical applications, and is unrelated knowledge to my field, which is what I was getting at. It's like asking an programmer who specializes in high performance low-level Assembly, a question about a web request of a Restful API that uses JSON and how to convert and store the response into an SQL database. They *may* know the answer to the question, based on the broader understanding of programming, but it's doubtful that they come across a need for this while writing Assembler code. I'd be sorry for them if they did. Or ask a web developer a question relating to low-level hardware interaction, using hardware registers and interrupts, and you'd probably get the same blank stare.

      Let's face it, there are many kinds of software developers out there with various skill-sets. Not everyone is a generalized web (or mobile) developer no matter how much some want to believe that's the case. THAT was my point.

    83. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Canada demands taxes if you enter for a business trip. This isn't a new thing.

    84. Re: USA! USA! USA! by douglas.w.goodall300 · · Score: 1

      A software engineer sees software as a body of code that must be efficient, reliable, and maintainable. I don't believe monkeys can do this work. Just because the machine is more limited in power, or memory size makes it no less challenging. IMHO

    85. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      I would have written it in Z80 assembly language and see if the punk kid who was asking the questions had a clue.

    86. Re: USA! USA! USA! by LynnwoodRooster · · Score: 1

      For tourism? Potentially yes. For business? Nope. Best you can do is "overnight expedited" in Hong Kong.

      --
      Browsing at +1 - no ACs, I ignore their posts. So refreshing!
    87. Re: USA! USA! USA! by ebvwfbw · · Score: 1

      I'm thinking - as if the boarder agent would even know if what he wrote is correct or not.

    88. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      next time he should list occupation as proctologist

    89. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Only to someone who is insane.

    90. Re: USA! USA! USA! by erapert · · Score: 1

      If you're going to as a tourist then you're going to give them money.
      If you're going to try and make some money within their borders then the local "protection" will want a slice of the pie.

      It's as simple as which direction the money is flowing.

      In other words: cui bono

    91. Re:USA! USA! USA! by Anonymous Coward · · Score: 0

      Except there will be no one left to replicate, so we will die out in a generation.

    92. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      Tell your friend we don't want her.

      Fuck travel. Fuck business.

    93. Re: USA! USA! USA! by Anonymous Coward · · Score: 0

      If they don't _know what the concept is_, regardless of whether they use it regularly, I don't want 'em

    94. Re:USA! USA! USA! by Oswald+McWeany · · Score: 1

      This is completely justified.

      We shouldn't let anyone into the country who can't write a procedure to tell if a Binary Search Tree is balanced, or doesn't know what an abstract class is.

      I agree. In fact we should go a step further. We should start revoking US citizenship and deporting folks who cannot write the same. A much smarter nation will result.

      If you deport everyone who can't balance a Binary Search Tree you're left with people who won't reproduce. The population will age and eventually no one will be around to take care of the elderly.

      --
      "That's the way to do it" - Punch
    95. Re:USA! USA! USA! by ghoul · · Score: 1

      Thats such a profiling comment. Shame on you. Not all computer science students have a fear of the opposite sex. This whole trope of smart kids being losers is the worst thing to happen to American Society. It has led to the dumbing down of society. The geeks are now getting their own back. We will automate everything so there are no jobs left for jocks.

      --
      **Life is too short to be serious**
    96. Re:USA! USA! USA! by Coren22 · · Score: 1

      So, no one?

      --
      APK likes to ask for responses to the same things over and over. Maybe he just likes the responses?
  2. Interesting story by Kohath · · Score: 0, Troll

    If true

    1. Re:Interesting story by mindwhip · · Score: 3, Funny

      you fail.. the answer is

      if (story) { interesting = true }

      --
      [The Universe] has gone offline.
    2. Re: Interesting story by Anonymous Coward · · Score: 1

      Forgot the ; You fail! GET OUT!

    3. Re:Interesting story by magarity · · Score: 0

      No commercial airline flight is 24 hours. There used to be a 19 hour one for a Singapore to New York flight but that's no longer in service.

    4. Re:Interesting story by _merlin · · Score: 4, Informative

      I had something similar although less exciting happen to me in early 2004. On claiming to be an electrical engineer, the immigration agent or whatever the US calls him scrawled a physics equation on a piece of paper and asked me what it meant to me. He was satisfied with whatever explanation I gave and let me through. I don't know if they've always done this, or if it's a post-9/11 thing, but it's been happening for more than a decade.

    5. Re:Interesting story by Anonymous Coward · · Score: 3, Informative
    6. Re:Interesting story by ShanghaiBill · · Score: 2

      I am impressed with the questions. These are questions that any competent programmer should be able to answer, but a non-programmer (such as a shoe or underwear bomber) would not have a clue. This actually seems like a pretty good test. If they did this to me, I would be more pissed about having to sit around for over an hour beforehand. Of course, it wouldn't happen to me because, hey, I'm white.

    7. Re:Interesting story by LiENUS · · Score: 1

      Yeah except he was already in the country at that point.

    8. Re:Interesting story by Anonymous Coward · · Score: 0

      That's your takeaway from this?

      While the actual flight isn't 24 hours, the travel time from Lagos to JFK is about 24hrs on Qatar Airways with a 2 hour stop over in Qatar and it's quite possible that he didn't deplane during those 2 hours.

    9. Re:Interesting story by iCEBaLM · · Score: 1, Informative

      No wonder we have so many bugs in software...

      if (story == true) { story = interesting; }

    10. Re:Interesting story by Bartles · · Score: 1

      We've got some smart border agents.

    11. Re:Interesting story by behrooz0az · · Score: 2

      interesting = story;
      FTFY

      --
      Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion. -- Spazmania (174582)
    12. Re:Interesting story by Bartles · · Score: 1

      You aren't in the country until you get through customs.

    13. Re:Interesting story by Anonymous Coward · · Score: 0

      Hmm, so a bomber cannot have a 'day' job? You seem to assume that bombers can't have degrees or skills. While I highly doubt he was going to bomb anything, I presume they checked he didn't have any drinks larger than 100mL with him, all they proved here is that the guy can program as he claimed he could.

    14. Re:Interesting story by Anonymous Coward · · Score: 0

      Your assumption is that the official asking the question actually knows the answer.

      Also, what language was the official expecting? Python? Java? What if I wrote it in C++ or LISP because those are the languages I'm proficient in?

    15. Re:Interesting story by bobbied · · Score: 1

      24 hours doesn't seem too unlikely.

      I've spent 4 hours on an airplane for a 1 hour flight. We got on, got held for an hour on the ramp waiting to depart, then upon arrival got stuck for 2 hours while a series of thunderstorms rolled though and nobody could go near any aircraft for safety reasons to do things like push backs, luggage transfer, blue water removal ect...

      I've also know of trips by air that took 36 hours from original departure to arrival at final destination that involved multiple stops in various countries along the way.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    16. Re:Interesting story by Idarubicin · · Score: 4, Informative

      No commercial airline flight is 24 hours. There used to be a 19 hour one for a Singapore to New York flight but that's no longer in service.

      The Mashable report quoted in the Slashdot summary uses a slightly different phrasing from the original LinkedIn report. The LinkedIn article actually says "after having spent 24 hours cramped in an economy seat on Qatar Airways".

      Poking around a bit on Kayak, I see a bunch of Qatar Airways itineraries from Lagos, Nigeria (LOS) to JFK that involve three segments, with stops in Doha, Qatar (DOH) and western Europe (CDG, FCO, MAN, etc.). Total travel time is 27 or 28 hours, with nominal times in flight adding up to about 23 hours. Add an hour in a holding pattern somewhere (or queued up for takeoff on a taxiway, or waiting for a gate to open up), and the poor guy could easily have spent 24 hours in an economy-class seat on his way to JFK. Yeah, the phrasing's a bit sneaky since he would have had a couple of short "intermissions" to stretch his legs...but still, if we figure he arrived at LOS two hours before his flight, he would have been stuck in the international air transport system for better (worse?) than thirty hours all told.

      --
      ~Idarubicin
    17. Re:Interesting story by nctritech · · Score: 1

      Does C have abstract classes? Does assembly? If not, does that mean all programmers in those languages are incompetent, by your logic?

    18. Re:Interesting story by CaptainDork · · Score: 1

      They didn't say, "programmer." They said, "engineer."

      --
      It little behooves the best of us to comment on the rest of us.
    19. Re: Interesting story by Anonymous Coward · · Score: 0

      Variable type inconsistency. You fail. Back to Mexico with you.

    20. Re:Interesting story by Anonymous Coward · · Score: 5, Interesting

      I am impressed with the questions. These are questions that any competent programmer should be able to answer, but a non-programmer (such as a shoe or underwear bomber) would not have a clue. This actually seems like a pretty good test.

      Call me incompetent, then. I've been making a decent living as a software engineer in this country for 25 years, having graduated from a reasonably prestigious school with a 4 years CS degree. Not once since college have I ever had a need to write code to construct or balance a tree on my own. I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review, nor is there much real world need for most developers to do so.

    21. Re: Interesting story by Anonymous Coward · · Score: 0

      Passport control.

    22. Re:Interesting story by lgw · · Score: 2

      They don't need to know if he got the question correct to be a 95% accurate test. They just need to see how he behaves when given the problem. Very few people can and will bullshit confidently in such a circumstance.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    23. Re:Interesting story by Anonymous Coward · · Score: 0

      Nice how that works huh? Since you're legally not in the country, you also have no legal protections in that no-mans-land known as the terminal of an international airport if the feds decide to question you. We don't do much with it yet but the stories are mounting. Give it time and this story will seem reasonable compared to how messed up it will be after 4 years. We'll all look back at it in wonder.

      "Remember when we used to limit these searches to people whom it was really necessary?"

      "No, because it never was in the first place."

    24. Re:Interesting story by bobbied · · Score: 2

      Um, no, technically he wasn't in the country yet, he had yet to clear immigration and customs. There are a LOT of people who transit though a US airport who are never technically IN the United States even if they are on US soil. They are afforded the privilege of "passing though" to change planes as they move on to another destination and we don't require visa's. Not everybody is granted this, but for the most part we don't care who you are if you are not staying.

      Many countries allow this at major airports. Technically you don't legally enter the country (and don't have to meet their entry requirements) but you must stay within the designated area of the airport until you clear immigration. It's how Snowden got stuck at the Moscow airport in transit after the USA pulled his passport. He got stuck because he couldn't (and didn't want to) get on a plane w/o a passport, couldn't enter Russia unless they let him in.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    25. Re:Interesting story by Calydor · · Score: 4, Insightful

      I am impressed with the questions. These are questions that any competent programmer should be able to answer, but a non-programmer (such as a shoe or underwear bomber) would not have a clue. This actually seems like a pretty good test.

      Call me incompetent, then. I've been making a decent living as a software engineer in this country for 25 years, having graduated from a reasonably prestigious school with a 4 years CS degree. Not once since college have I ever had a need to write code to construct or balance a tree on my own. I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review, nor is there much real world need for most developers to do so.

      Not to mention after 24-30 hours on a plane.

      --
      -=This sig has nothing to do with my comment. Move along now=-
    26. Re:Interesting story by Anonymous Coward · · Score: 0

      Presumably that included a layover. Is your main takeaway from this story really the need to make a pedantic comment about something so obvious?

    27. Re:Interesting story by starblazer · · Score: 1

      The USA does not have any airside international transfers. If you layover in the states, you must clear US passport control.

    28. Re:Interesting story by Anonymous Coward · · Score: 1

      The US Constitution applies to me, as an American, whether I'm walking down Whitehall in London, sitting in Nelson Mandela Square in Johannesburg, or walking through Times Square, NYC. I'm protected from the CIA, FBI, NYPD, and etc., regardless of where I am.

      (Doesn't have anything to do with other countries law enforcement. If the London Metropolitan Police want to illegally arrest me, the US Constitution has nothing to say about that. I have to deal with the British legal system.)

      There are those who like to claim that I'm mistaken, and that there really is some magical no-man's land where my Constitutional Rights don't apply. I don't subscribe to that theory. And I'll be happy to test it in court should it ever come to that.

    29. Re:Interesting story by iggymanz · · Score: 1

      So you've never been on a plane that has landed, been refueled and sent further on its journey I take it. Spending more than 24 hours on a plane, yes I've done it

    30. Re:Interesting story by anarcobra · · Score: 1

      No they aren't.
      There are many domains where you can work as a programmer without ever encountering a binary tree or an abstract class.
      And who just memorizes all these random algorithms just to recite them at a moments notice?
      If I have to implement a binary tree for whatever reason I will read up on it.
      Maybe instead they should have a test to implement the rs-232 protocol or maybe small micro controller simulator.
      Or whatever particular topic some person thinks is absolutely a must know for you to be considered an engineer.

    31. Re: Interesting story by Anonymous Coward · · Score: 0

      It's telling that you said protected FROM and not BY.

      Being not a shitbag criminal, I appreciate the job these public servants do, and know the world would be a worse place without them.

      Can't say the same for you.

    32. Re:Interesting story by ShanghaiBill · · Score: 1

      Not once since college have I ever had a need to write code to construct or balance a tree on my own.

      Neither have I, but it is a trivial task.

      I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review

      Really? You just walk the tree, and return false if any leaf is deeper than the others.

      nor is there much real world need for most developers to do so.

      That is sort of the point. It is a simple, trivial task like "reversing a string" that nobody actually needs, but is still a good test of basic competence.

    33. Re:Interesting story by Anonymous Coward · · Score: 0

      cool = story + bro; // if true

    34. Re:Interesting story by citylivin · · Score: 5, Insightful

      "Very few people can and will bullshit confidently in such a circumstance."

      Except, you know, an expert at getting through borders undetected, or anyone who has experience with social engineering...

      So congrats, you weeded out the amateur criminals, and have a false sense of security about the professional ones.

      --
      As a potential lottery winner, I totally support tax cuts for the wealthy
    35. Re:Interesting story by ShanghaiBill · · Score: 1

      If not, does that mean all programmers in those languages are incompetent, by your logic?

      A professional programmer should be aware of common concepts even if he doesn't use them daily. An "abstract class" is not an obscure concept. Would you hire an EE who doesn't understand amps and volts, just because he specializes on VHDL digital logic?

    36. Re:Interesting story by lgw · · Score: 2

      All security can be bypassed by a sufficient expert. That's just how security works. But almost all criminals are idiots, and are easily caught by simple methods.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    37. Re:Interesting story by Lead+Butthead · · Score: 1

      We've got some smart ass border agents.

      you've missed a word. I took the liberty of fixing it for you.

      --
      ELOI, ELOI, LAMA SABACHTHANI!?
    38. Re:Interesting story by tlhIngan · · Score: 1

      Um, no, technically he wasn't in the country yet, he had yet to clear immigration and customs. There are a LOT of people who transit though a US airport who are never technically IN the United States even if they are on US soil. They are afforded the privilege of "passing though" to change planes as they move on to another destination and we don't require visa's. Not everybody is granted this, but for the most part we don't care who you are if you are not staying.

      Many countries allow this at major airports. Technically you don't legally enter the country (and don't have to meet their entry requirements) but you must stay within the designated area of the airport until you clear immigration. It's how Snowden got stuck at the Moscow airport in transit after the USA pulled his passport. He got stuck because he couldn't (and didn't want to) get on a plane w/o a passport, couldn't enter Russia unless they let him in.

      The US is one of those "exception" countries since 9/11. If your flight stops over in the US for any reason, you will be counted as entering the US. Thus you must have a visa or be from a country that the US doesn't require a visa from, not be on the US no-fly list, etc.

      This applies to flights over US airspace as well. If the airline is carrying anyone on the US no-fly list AND overflying the US (not landing at a US airport), the plane will not be allowed to enter US airspace without handing that person over.

      Most "reasonable" countries do allow transiting without entry. The US is not one of them - landing on US soil counts as entry, even if everyone stays on the plane.

      In fact, Boeing's plans for flights include being able to fly from Canada to Mexico without crossing US airspace (i.e., they have enough fuel to go around).

    39. Re:Interesting story by Yunzil · · Score: 1

      I've been programming professionally for almost 20 years and I couldn't write a function on the fly to balance a binary tree, even if I was wide awake and refreshed; never mind after having been on a plane for 24 hours. It's not something I've ever, ever had to deal with except maybe in when the professor mentioned it in passing during algorithms class in college.

      So I guess I'm incompetent.

      Must be nice to be smart like you though.

    40. Re:Interesting story by frank_adrian314159 · · Score: 2

      They didn't ask him to write an entire balancing algorithm, they asked him for an algorithm to tell if the tree was balanced - a much simpler task, left as an exercise to the reader.

      --
      That is all.
    41. Re:Interesting story by Anonymous Coward · · Score: 0

      Really? You just walk the tree, and return false if any leaf is deeper than the others.

      Really? Well *you're* on the plane back home then. What if the tree has three entries? If it's *two* deeper then you might have a point.

      All I'm saying is that nobody needs to _write a function_ that has to be production-ready. Just explain what you understand the question to mean (that explanation can have a bug or two just as your code will). Surely a basic understanding of the topic can be confirmed from that and then the weary business traveler can be on their way ...

    42. Re: Interesting story by Anonymous Coward · · Score: 0

      Likewise it's telling you you went straight to the ad hominem and tried to insinuate that my choice of words somehow means something more than it does. You may not be a shitbag criminal – you're just a shitbag.

      When these public servants do their jobs in a professional manner and are respectful of people's rights (yes, even alleged criminals have rights) that's one thing. The LEO that shoved the 80 year old woman, and his partner that pepper sprayed the other woman that came to her aid? Those are exactly the kinds of LEO scum that we all need protection from. The world is a worse place with the likes of them wearing badges.

    43. Re: Interesting story by mindwhip · · Score: 1

      no... you passed by spotting the deliberate error ;)

      --
      [The Universe] has gone offline.
    44. Re:Interesting story by rthille · · Score: 1

      No, he just wrote it in Scala.

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    45. Re:Interesting story by Anonymous Coward · · Score: 0

      I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review, nor is there much real world need for most developers to do so.

      Notice the task is only to check whether a tree is balanced. The task is not to balance it. The task is easier than what you thought.

    46. Re:Interesting story by LynnwoodRooster · · Score: 1

      Good practice would be:

      If (true == story) {story = interesting;}

      Avoid that potential assignment up front when someone else mucks in your code!

      --
      Browsing at +1 - no ACs, I ignore their posts. So refreshing!
    47. Re:Interesting story by mindwhip · · Score: 1

      not equivalent code - it may have been already interesting before the truth of story was checked...
      interesting = story || interesting;
      would work tho

      --
      [The Universe] has gone offline.
    48. Re:Interesting story by Anonymous Coward · · Score: 0

      I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review

      Really? You just walk the tree, and return false if any leaf is deeper than the others.

      Reread again what the grand parent was writing. Then reread your answer. Do you still think your answer is right?

    49. Re:Interesting story by Kjella · · Score: 1

      So congrats, you weeded out the amateur criminals, and have a false sense of security about the professional ones.

      No, you just realize that the security level necessary to stop a professional isn't feasible on a broad scale. We can't all run around with a security detail from the Secret Service. Not every building can be as hard to break into as the Pentagon. Advanced threats probably pass a border check with flying colors. But hopefully they're also going after advanced targets that have their own security measures.

      --
      Live today, because you never know what tomorrow brings
    50. Re:Interesting story by Anonymous Coward · · Score: 0

      Former bank robber here. IQ =160. I was locked up with Walter Forbes and John and Tim Rigas. Lots of smart criminals out there. "Mostly idiots" I would accept, but "Almost all..."? Nope

    51. Re:Interesting story by Boronx · · Score: 2

      Why not? If he's good at VHDL, he'll be fine.

      Why wouldn't I want to hire a micro-controller programmer who didn't know what an abstract class was?

      Would you hire a C++ programmer who didn't know what an SPI port was?

    52. Re:Interesting story by Anonymous Coward · · Score: 0

      >former bank robber >iq 160 pick one

    53. Re:Interesting story by Trailer+Trash · · Score: 2, Insightful

      I had something similar although less exciting happen to me in early 2004. On claiming to be an electrical engineer, the immigration agent or whatever the US calls him scrawled a physics equation on a piece of paper and asked me what it meant to me. He was satisfied with whatever explanation I gave and let me through. I don't know if they've always done this, or if it's a post-9/11 thing, but it's been happening for more than a decade.

      Of course it's been happening for a long time. Obama sent more illegals back home than all previous Presidents combined.

      None of that mattered.

      When Trump became President, suddenly this is a big deal.

      I heard the news today talking about the SEAL operation in Yemen where one of our sailors died. They're picking it apart trying to figure out if the operation was a "success", "worth it", etc. What a welcome change after 8 years of nobody talking about *anything* that happened in the Middle East because we had to pretend that the Nobel Peace Prize winner wasn't actually bombing the shit out of something like 5 different countries with drones, killing kids and anyone else who happened to be in the wrong place at the wrong time. I'm guessing that's going to suddenly be a big fucking deal again.

    54. Re:Interesting story by Anonymous Coward · · Score: 0

      what language wouldn't take (story) alone as a conditional if it's a boolean? or are you just being pedantic?

    55. Re:Interesting story by sexconker · · Score: 1

      All classes are abstract. They're classes, not objects. (And someone will come along and say all objects are abstract. And they'd be correct.)

    56. Re:Interesting story by Anonymous Coward · · Score: 0

      This

    57. Re: Interesting story by Anonymous Coward · · Score: 0

      Nonsense. None of us WLAN devs in Meru Networks had any clue what an abstract class was. We were kernel experts.

    58. Re:Interesting story by Marxist+Hacker+42 · · Score: 1

      Better not change jobs. It's a pretty standard interview question these days. The answer is to use recursion.

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    59. Re:Interesting story by Anonymous Coward · · Score: 0

      Stealing money makes you rich, right? So then, stealing an IQ test makes you smart. Obviously.

    60. Re:Interesting story by ShanghaiBill · · Score: 1

      left as an exercise to the reader.

      Here's my solution. Can I visit America?

      #include <stdio.h>

      #define NOT_BALANCED (-1)

      struct BinaryTree {
          struct BinaryTree *left;
          struct BinaryTree *right;
          int value;
      };

      int
      binaryTreeDepth(struct BinaryTree *t)
      {
          if (t == NULL) {
              return 0;
          }
          int depthLeft = binaryTreeDepth(t->left);
          int depthRight = binaryTreeDepth(t->right);
          if ((depthLeft == NOT_BALANCED) || (depthRight == NOT_BALANCED) ||
                  (depthLeft != depthRight)) {
              return NOT_BALANCED;
          }
          return 1 + depthLeft;
      }

    61. Re:Interesting story by Cinnamon+Beige · · Score: 1

      "Very few people can and will bullshit confidently in such a circumstance."

      Except, you know, an expert at getting through borders undetected, or anyone who has experience with social engineering...

      So congrats, you weeded out the amateur criminals, and have a false sense of security about the professional ones.

      That depends on your actual goals, doesn't it? If you all you really want or expect to successfully do to keep out the amateur and idiot criminals because you've got enough of them already, thanks, it works just fine. There are reasons to settle for this, too, such as the possibility that the costs will soar with little to show for it, and the unfortunate fact that a professional criminal may well do better at following local laws than your average tourist...

    62. Re:Interesting story by sabri · · Score: 1

      Most "reasonable" countries do allow transiting without entry. The US is not one of them - landing on US soil counts as entry, even if everyone stays on the plane.

      That's not necessarily because of being reasonable. It is because the physical layout of U.S. airports and the absence of exit control.

      All countries I have been to (with the exception of the U.S.), have exit control as well, meaning that they check your passport prior to exiting the country. In the U.S., when you enter an international departure terminal, you can walk out just like that, most of the time. So if you would arrive on an international flight and would have another one scheduled out of the same terminal, you would still be able to walk out without any immigration control.

      --
      I'm not a complete idiot... Some parts are missing.
    63. Re:Interesting story by bugs2squash · · Score: 1

      No they were problems the Immigration Service were having with some software they are developing. They figure with so many skilled immigrants needing access to the country they have boundless tech support opportunities. I would expect the next traveler to be asked to reset a domain password.

      --
      Nullius in verba
    64. Re:Interesting story by Anonymous Coward · · Score: 0

      It's a bit late to start screening for a shoe or underwear bomber when they're getting off the plane.

    65. Re:Interesting story by Cinnamon+Beige · · Score: 1

      Given what was done on 9/11, odds are the question ended up being which is preferable--risking having to shoot down a flight that wasn't supposed to do anything other than transit US airspace (because it got hijacked, ect, ect, you should know the story) or just having your standard be that if they can't even get to stay for a bit as a tourist, they can't fly over?

      It'd work a lot better if the security was not effective as theater, instead of as actual security, however.

    66. Re:Interesting story by LiENUS · · Score: 1

      Tell that to any potnetial bombs he sets off.

    67. Re:Interesting story by LiENUS · · Score: 1

      He may not legally be in the country but he physically is, if he's an underwear bomber he's at a very busy point in a highly populated area, great place to do his damage. Legal technicalities won't protect people from the pressure or heat wave from his blast assuming hes a terrorist.

    68. Re:Interesting story by Anonymous Coward · · Score: 0

      Are you sure? The last time I had the misfortune to transit at LAX, even though I was only going to be there for 3 hours, I was obliged to clear customs and immigration and "enter" the country.

      They asked me lots of questions of the form "what is your purpose in entering the country?" and "what is your address while staying here?", which I must say were bloody annoying questions to have to try to come up with civil answers to between two 12-hour flights.

    69. Re:Interesting story by Anonymous Coward · · Score: 0

      Interestingly enough, the primary reason for not allowing passengers to disembark while the plane stops for refueling is a security precaution. Apparently that's one bit of security that the guy didn't seem fit to complain about.

    70. Re:Interesting story by ShanghaiBill · · Score: 1

      Why not? If he's good at VHDL, he'll be fine.

      Except his FPGA fails when the clock speed is boosted because he doesn't understand what a bypass cap is for. Fundamentals are important, even if you rarely need to apply them.

    71. Re:Interesting story by bickerdyke · · Score: 1

      but a non-programmer (such as a shoe or underwear bomber)

      A real programmer would have noticed that these are NOT mutually exclusive. Why can't a programmer be a shoe bomber?

      You're not a real programmer just because you know a few algorithms*. But that's how bugs happen. Forgetting to test for a 2nd condition after falsely asuming it would be implied by the first validity test and so on....

      * I probably couldn't do a search tree balancing on a whiteboard, but better programmers couldn't, too

      --
      bickerdyke
    72. Re:Interesting story by ghoul · · Score: 1

      Many smart people are breaking laws for idealogical reasons. The most successfull terrorists for some reason happen to be mostly Engineers (Maybe their education convinces them the normal folks are so dumb that killing normal folks is no different than butchering a pig). Many terrorists could easily pass coding and engineering questions.

      --
      **Life is too short to be serious**
    73. Re:Interesting story by swillden · · Score: 1

      They didn't ask him to write an entire balancing algorithm, they asked him for an algorithm to tell if the tree was balanced - a much simpler task, left as an exercise to the reader.

      Pretty simple, actually. Here's my solution, coded about as fast as I could type it. Basic idea: walk the tree and find min and max depths. If they differ by more than 1, it's unbalanced.

      Note that I have neither tested that code, nor proved it correct. It probably works, though, and I'm sure it would satisfy an immigration agent. I didn't just get off a long plane flight, but I have been working for 12 hours (trying to get stuff done to unblock some other people before I leave on vacation tomorrow).

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    74. Re:Interesting story by jtara · · Score: 1

      The questions asked weren't relevant. At. All.

      Appropriate questions would quiz him about his work and education. With followup if the border agent had the competency to further quiz, which they almost certainly would not. But they could at least try to sense whether he was BSing or not. And presumably, that's a skill that border agents possess, or should (detection of BS.)

      • Tell me a bit about your current work?
      • What is your role in your company and in your current project?
      • Do you write code? If so, what computer languages do you currently use?
      • What college degree (if any) did you receive, and if so, what was your major?
      • How does your team communicate? That is, do you have in-person meetings, teleconferences, use email, instant messaging, etc.? Tell me a bit about it.
      • Explain to me just what a software engineer does?

      The goal should be to determine if he actually does what he says he does for a living. Not to spring a pop-quiz on subjects that may or may not be of any importance in his job.

      Honestly, the first question should be enough. Either the guy will prattle on with detail after detail without hesitation, or will be very vague.

    75. Re:Interesting story by ShakaUVM · · Score: 1

      > I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review, nor is there much real world need for most developers to do so.

      He didn't have to balance the tree, he just had to check if the tree is balanced.

      Pretty easy to do with DFS (which the DHS agent obviously knew):

      int depth_check(Node *n) {
          if (!n) return 0;
          int left = depth_check(n->left);
          int right = depth_check(n->right);
          if (left != right) throw exception;
          return left;
      }

      You could probably simplify it a bit more and use unsigned ints for correctness, but this was off the top of my head.

      The calling function would check for an exception being thrown, and return false, otherwise return true.

    76. Re:Interesting story by jtara · · Score: 1

      They didn't ask him to write an entire balancing algorithm

      That's not what his tweet said. His tweet said he was asked to balance a tree.

      The story states that he was asked to write a function to balance a binary tree.

      It looks to me that the reporter misinterpreted Omin's tweet. The writer was probably winging it a bit, as tech reporters are seldom practitioners in the filed that they report on. Maybe there should be an entry test for tech reporters. A technical reading-comprehension test. If they get it right, they are not a professional tech reporter.

      It's interesting that so many who have posted here missed this. Or they just automatically believed the "fake news", and ignored the source material (tweet) - which was present verbatim in the article - altogether.

      Now, back to reading "The Society of the Spectacle." Seems relevant. More so every single day.

    77. Re:Interesting story by Anonymous Coward · · Score: 0

      The question isn't to write a function to balance a tree, but to write a function that checks whether a tree is balanced. Strike one for not understanding the requirements. Obviously the function could be written in pseudo-code and the problems are basic enough that you don't need any references or anything. I mean, if you went to college you know what a binary search tree is. Strike two for not having basic understanding of a very basic data structure. And then strike three is your inability to even search for the answer to the problem, asking questions where you need to or talking about your assumptions along the way.

      You, sir, failed the test. You should not be working as a Software Engineer and may God have mercy on anybody who has to read your code or fix bugs you've created.

    78. Re:Interesting story by Anonymous Coward · · Score: 0

      So the solution to smart criminals is to not let anyone in.

      Problem solved!

    79. Re:Interesting story by jtara · · Score: 1

      Tell me a bit about your current work.

      Well, I am working on software the walks call-center workers through call scripts, and records answers gotten from callers in a database. It's very interesting, we use AI to analyze the results - Watson, you know Watson? From Jeopardy? So, my company can use the results to improve the effectiveness of the calls. Why, we even analyze voice stress. We found that "Green Dot Moneygram" causes the person's stress to rise, so we have switched to a less familiar money transfer vehicle that is not as familiar, and this seems to increase trust level, and so it is much easier to sc.... secure a sale, that is."

    80. Re:Interesting story by dfsmith · · Score: 3, Funny

      Recursion is always the answer:

      • something with trees: recursion!
      • GUI window placement: recursion!
      • use after free bug: recursion!
      • my stack keeps overflowing: recursion!
    81. Re:Interesting story by njnnja · · Score: 1

      Or someone has found a really creative way to get someone else to answer their homework questions

    82. Re:Interesting story by HiThere · · Score: 1

      It's pretty simple, but I sure didn't immediately think of the answer, and I'm in a low stress condition.

      As for abstract class, I've never needed one. I could easily spout some gibberish about unified descent through to allow common access to methods by instances of derivative classes, but it would be nonsense, as I never do things that way. My real reason for using an abstract class would be something like "I'm stuck using a language that doesn't allow multiple inheritance and also doesn't have interfaces".

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    83. Re:Interesting story by Anonymous Coward · · Score: 0

      No commercial airline flight is 24 hours. There used to be a 19 hour one for a Singapore to New York flight but that's no longer in service.

      Try to go from Rio to Tokyo in less than 26 hours and then come back to me.

    84. Re:Interesting story by Anonymous Coward · · Score: 0

      UPDATE story
      SET interesting = TRUE
      WHERE story.veracity = TRUE;

    85. Re:Interesting story by Anonymous Coward · · Score: 0

      Then you must be one of the reasons computers crash all the time then.
      I'm not a programmer, but I've heard that computers are maths machines and I've had some maths in highschool. We got taught how to use a TI eigthy-something with variables, I cannot remember much though. But it had them. I can guess what a tree is and I looked up what a binary tree is just in case.
      You need to find the highest leaf near the treetop and the most low-hanging leaf. Just go through all the branches in the tree. Every time you step higher or lower you update your current height, every time you find a leaf you update the lowest and highest height of leaves found so far. I guess you'd first have to set these to zero, insanely high and zero, respectively. Then at the end you look at the results and draw your conclusions.
      Now, I couldn't for the life of me figure out how to put this in code, just as I cannot speak Italian. But I have the reasonable expectation that somebody who has studied Italian could translate this, so someone who calls himself a software engineer should be able to code this up. And my method didn't require any deep thought or anything, so if you couldn't figure it out you're probably dull as fuck, and have probably been making a living conning people and making computers crash.

    86. Re:Interesting story by ShanghaiBill · · Score: 1

      And who just memorizes all these random algorithms just to recite them at a moments notice?

      You don't have to "memorize" any algorithms. You just need to be able use your brain, and understand some basic concepts, like "use recursive functions to deal with recursive data structures". That is something any freshman CS student should know. If they don't know it, President Trump should deport them.

    87. Re:Interesting story by ShanghaiBill · · Score: 1

      return left;

      I think this should be
      return left + 1;

      Otherwise, your code looks good.
      Welcome to America!

    88. Re:Interesting story by flargleblarg · · Score: 2, Insightful

      Nope. FAIL!

      Your implementation only works for trees where all leaf nodes are at the same depth.

      A binary tree is still balanced if one branch is depth n depth and the other branch is depth n+1.

      So you have to compare like this:

      (abs(depthLeft - depthRight) <= 1)) {

    89. Re:Interesting story by flargleblarg · · Score: 1

      Nope. FAIL. Not correct.

      Your solution only works if all leaf nodes have the same depth -- which is exceedingly unlikely.

      You want:

      if (abs(left - right) > 1) throw exception;

    90. Re:Interesting story by ozzee · · Score: 1

      I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review

      Really? You just walk the tree, and return false if any leaf is deeper than the others.

      "Deeper"? There are multiple definitions of balanced. The usual meaning of balanced is if the difference in the number of nodes is no more than 1. Depth difference is usually AVL balanced (named after G.M. Adelson-Velsky and E.M. Landis). So, there are an arbitrary set of "balancing" rules. He could have, in theory just returned true. Or false....

    91. Re:Interesting story by Anonymous Coward · · Score: 0

      That was a bad time to ask these kinds of questions, but damn, you should know what an abstract class is if you work in object oriented programming languages.

    92. Re:Interesting story by Kohath · · Score: 1

      Perhaps I just don't automatically believe every story I hear. Especially the "interesting" ones.

    93. Re:Interesting story by Anonymous Coward · · Score: 0

      I've known quite a few incompetent software engineers that made a decent living.

    94. Re:Interesting story by AaronW · · Score: 1

      I totally agree. I've been a software engineer for over 20 years and most of my experience is with C and assembly dealing with hardware issues, device drivers and bootloaders. I'm quite rusty on the details of object oriented programming and couldn't tell you the difference between an abstract class vs a regular class. I don't usually deal at the level of binary trees, though telling if a tree is balanced or not is a fairly simple recursive problem. Now if you ask me about things like i2c, SPI, flash, CPU caches and some low-level networking things I'd do quite well.

      I haven't dealt with binary trees in ages and my C++ experience was many years ago.

      --
      This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
    95. Re: Interesting story by nyri · · Score: 1

      You (and many others) are assuming that border agents require that gives you full marks in university examination. More probably they are observing your general attitude and approach to the question.

    96. Re:Interesting story by jareth-0205 · · Score: 1

      Not once since college have I ever had a need to write code to construct or balance a tree on my own.

      Neither have I, but it is a trivial task.

      I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review

      Really? You just walk the tree, and return false if any leaf is deeper than the others.

      Like alot of things, it's a trivial task *if you know the answer*. If you don't happen to have the answer in your head (and many application-level programmers don't deal with trees directly, so this sort of knowledge isn't immediately available) then it's damn near imposssible, especially in the stressed situation that we're talking about.

      I'm sure you can imagine some questions you can't answer that would be considered obvious by other programmers in other fields.

    97. Re:Interesting story by Anonymous Coward · · Score: 0

      You are a pretentious git, aren't ya.

    98. Re:Interesting story by nctritech · · Score: 1

      Your analogy is faulty. Amps and volts are fundamental forces that apply to everything involved in electronics and cannot be separated from them. Abstract classes are a language-specific feature that does not apply if the languages in use don't offer them in the first place. What is your definition of a "professional programmer?" It sounds like you mean "someone who writes code in certain popular object-oriented languages that support a certain feature."

    99. Re:Interesting story by Anonymous Coward · · Score: 0

      Except this analogy of yours is faulty. You're acting as if abstract classes are as fundamental to programming as amps and volts and capacitors and resistors are to electronics. They're not. The Linux kernel doesn't use a single abstract class; nothing written in C or assembler does because they don't exist. Abstract classes are not fundamentals for programming; they're optional features of object-oriented programming languages only. Amps and volts to electronics is more like addition and Boolean logic are to programming, but abstract classes? That's a very high-level construct that gets boiled down to assembly code in the end anyway.

    100. Re:Interesting story by jarkus4 · · Score: 1

      I remember reading statistical analysis about profitability of being bank robber (how much you can steal before being caught, how long will you spend in prison etc). The results gave a pretty bad outcome compared to just working even for low salary. Still if you consider you dont have to spend anything during your stay at prison it wasnt that bad. Also being actually a smart guy might move this profitability much higher as statistics obviously included everyone that tried it.

    101. Re:Interesting story by Anonymous Coward · · Score: 0

      I doubt very much that I could come up with a function to balance a tree out of the blue with no prep or review.

      He was asked to write a function that checks if a given binary search tree is balanced, which can be easily checked with a recursive depth first traversal of the tree. As you said, we professional software engineers don't usually write commodity data structures from scratch in our daily work, but I could have provided pseudo code in a pinch if asked and I think it's not to much to ask of anybody who calls themselves a professional in our line of work.

    102. Re:Interesting story by ZeRu · · Score: 1

      Nope, it should be:
      if (story.IsInteresting == true)

      --
      If you post as an AC, don't expect me to spend a mod point on you.
    103. Re:Interesting story by ZeRu · · Score: 1

      Or better yet:
      if ((bool)story == true)
      {
      story.Flags.Add("interesting");
      }

      --
      If you post as an AC, don't expect me to spend a mod point on you.
    104. Re:Interesting story by dbIII · · Score: 1

      It's kind of a big deal because it's a new step into someone else's war - Saudi Arabia, that country where we had to put a lot of pressure on them before they finally made it illegal to send money and guns to ISIL/Daash. It needs a bit of picking over to see if we are being screwed over by a faction that wants us all dead or not. Not Trumps fault in any way, but a big deal just the same.

    105. Re:Interesting story by goose-incarnated · · Score: 1

      We've got some smart border agents.

      No. You've got borderline smart agents. There's a difference.

      --
      I'm a minority race. Save your vitriol for white people.
    106. Re:Interesting story by goose-incarnated · · Score: 1

      We've got some smart ass border agents.

      you've missed a word. I took the liberty of fixing it for you.

      Is the ass border the one in the south?

      --
      I'm a minority race. Save your vitriol for white people.
    107. Re:Interesting story by Anonymous Coward · · Score: 0

      Yup. Most news outlets are run by SJWs and the regressive left with an axe to grind with the current administration. Most of these people studied humanities and can only shout slogans such as "fascists! islamophobes!". (I dislike Trump, but I'm not aligned with these snowflakes either.)

    108. Re:Interesting story by MrDoh! · · Score: 1

      Not really, the correct answer would be "I'm sorry, union rules means I can't freelance and offer work without an agreement in place to the pre-agreed rates. This 'early designing/random questions' is specifically prohibited. If you want me to do some work in the side by helping you with your problem here, you'll have to take it up with the office who probably force you to wait until the plumbings been put in".

      --
      Waiting for an amusing sig.
    109. Re:Interesting story by macxcool · · Score: 1

      You know what's interesting. I'm not a programmer but have an amateur's interest in it and have dabbled for years. I couldn't write code to show this out of my head (except in pseudocode) but I knew what a balanced tree would look like from an xkcd comic.

    110. Re: Interesting story by Anonymous Coward · · Score: 0

      Who cares if a sailor dies or we lose a seventy million dollar plane /chopper. We absolutely do nit need to investigate why he died. What for? To save the life of other troops? Not worth the price of investigation. We ned that money for the make Benghazi investigations great again campaign.

    111. Re:Interesting story by coinreturn · · Score: 1

      If you're hiring him for VHDL and not circuit board design, he doesn't fail. The board designer did.

    112. Re:Interesting story by swillden · · Score: 1

      It's pretty simple, but I sure didn't immediately think of the answer, and I'm in a low stress condition.

      Really? This seems very obvious to me, if you just think about what "balanced" means when applied to a binary tree. I immediately thought of two solutions: the min/max depth comparison that I implemented, and another one that involves counting the nodes in the tree and finding the max depth. If ceil(log_2(count)) My real reason for using an abstract class would be something like "I'm stuck using a language that doesn't allow multiple inheritance and also doesn't have interfaces".

      I think that would constitute a solid answer to the question.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    113. Re:Interesting story by ebvwfbw · · Score: 1

      I'd ask you what "Bad boys rape our young girls but violet goes willingly." I've never forgot it since. Now if I could just find Violet.

    114. Re:Interesting story by Anonymous Coward · · Score: 0

      it does not necessarily mean one single flight. It involves a transfer in Qatar (hint he was flying Qatar airways)
      with 2-3 hours connecting flight he can easily make 24 hours from any place in Africa - Qatar - USA
      I assume you were being deliberately obtuse because you did not like this specific bit of news being reported.

    115. Re:Interesting story by Anonymous Coward · · Score: 0

      You have no clue what you are talking about. There is a reason I do not fly through the US

    116. Re:Interesting story by _merlin · · Score: 1

      And I'd respond: Really? I learned it as "Black bastards rape our young girls but virgins go without."

      Another one of my favourites is, "A Pussy So Tight No Dick Penetrates" (OSI network stack - Application, Presentation, Session, Transport, Network, Datalink, Physical).

    117. Re:Interesting story by ebvwfbw · · Score: 1

      Wow... Well I'd let you through. Might want to use the one I use if you teach it today.

  3. In What Language? by lazarus · · Score: 3, Insightful

    Write something in Forth.

    --
    I am not interested in articles about life extension advancements.
    1. Re:In What Language? by GerardAtJob · · Score: 2, Informative

      Brainfuck should be better for this case.

      --
      I can't call that English ;-)
    2. Re:In What Language? by sconeu · · Score: 2

      Even bettter, APL. It's not humanly readable.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    3. Re:In What Language? by OrangeTide · · Score: 5, Insightful

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

      Not a very FORTH friendly question. I'm an old C programmer and while I could make an educated guess, I don't think I would be able to confidently answer the question after a long flight.

      Checking if a binary search tree is balanced is something a student has to do, you usually have to write these sorts of things once or twice in your entire career.

      On the other hand I could sit down and discuss HDMI specification all day and night with border agents. They'd likely pass out from boredom.

      --
      “Common sense is not so common.” — Voltaire
    4. Re:In What Language? by Lab+Rat+Jason · · Score: 2

      I'm pretty sure "pink" would have been an acceptable answer... how the hell is someone in border protection going to know if the answer was right or not?

      --
      Which has more power: the hammer, or the anvil?
    5. Re:In What Language? by MightyMartian · · Score: 5, Funny

      Nonsense. They have tasers. They could keep themselves amused all night.

      You, on the other hand, might enjoy it less.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    6. Re:In What Language? by Anonymous Coward · · Score: 0

      Ah, APL I remember having to write a function in APL for a Final. An hour later, when I went back to check my answer, I had no idea how it worked, literally. I then got the idea of covering my answer and writing it again. I then compared the 2 answers and was able to verify that it was indeed correct. APL is a Write Only language, it cannot be read.

    7. Re:In What Language? by Anonymous Coward · · Score: 0

      Fish. The answer is "fish".

    8. Re:In What Language? by Anonymous Coward · · Score: 0

      That might get you a trip to a black site for further programming questions.

    9. Re:In What Language? by Anonymous Coward · · Score: 0

      It's not too bad. Very entertaining language and fun to use.

    10. Re:In What Language? by BenFranske · · Score: 1

      Perhaps then you would like to explain how to force X Windows/Debian Linux to output over HDMI regardless of the CEC and EDID data (or lack thereof) coming back over the link?

      Two of the banes of my existence are 1) that if I power off an HDMI TV attached to a Linux box and then power it back on some hours later (e.g. for use with MythTV) I am unable to get any output from X unless I reboot the system and 2) that if I power up a Linux box without an attached and powered on HDMI TV (e.g. digital signage which is off during non-business hours and there is a reboot of the box) I am unable to get any output from X unless I reboot the system.

    11. Re:In What Language? by CaptainDork · · Score: 1

      {B = "4"} {"may the with you" = B}

      --
      It little behooves the best of us to comment on the rest of us.
    12. Re:In What Language? by CaptainDork · · Score: 2

      An abstract class is offered at an art school.

      I gotta think of everything.

      --
      It little behooves the best of us to comment on the rest of us.
    13. Re:In What Language? by Anonymous Coward · · Score: 0

      Discussion of the HDMI spec is a taser. Or perhaps a biological weapon. Either way, they'll pass out before they know what's happening.

    14. Re:In What Language? by OrangeTide · · Score: 2, Interesting

      I wonder what the eye diagram for a taser's waveform would look like.

      --
      “Common sense is not so common.” — Voltaire
    15. Re:In What Language? by Anubis+IV · · Score: 1

      Checking if a binary search tree is balanced is something a student has to do, you usually have to write these sorts of things once or twice in your entire career.

      So very true. Arrays, vectors, lists, hash tables, maps, stacks? Depending on the language, I've interacted with all of those and similar structures on a regular basis. But graphs, trees, and heaps? Other than allocating memory from the heap, I'd be hard-pressed to think of a single time I've directly interacted with any of them since leaving grad school, and the notion that my entry into a country could be denied because of that is appalling. If a customs agent decided to start grilling me over something like that, I'd be incensed.

      Though, to be fair, if a customs agent asked me something like that, I expect I'd just treat it like an actual interview and start asking all sorts of questions to get them to fill in the unstated assumptions. Things would fall apart pretty quickly, I imagine.

    16. Re:In What Language? by OrangeTide · · Score: 2

      CEC doesn't matter.
      X11 reads the EDID and parses it itself, you can override the modes all you want.
      The output selection is controlled by the driver. Some drivers tend to be monolithic and kind of a pain to alter the policy, like the VideoCore (Broadcom/Raspberry Pi) or NVIDIA proprietary drivers. Others should be pretty straight forward like the Intel drivers, as there are tables in the laptop firmware that describe the routing and the open source driver knows how to find them.

      I power off HDMI TVs and power them back on without a problem. But this doesn't not necessarily generate a hotplug, as the spec does not require it to. Some TVs do, and some don't. (and simply pretend to be plugged in even though they are off, or possibly even unplugged). But usually TVs that have HDCP will unplug if they go into their lowest sleep state.

      Poking the display driver from outside of X might get it back, echo 4 > blank ; echo 0 > blank but probably not, you'd have to see if any mode is currently set to tell if it might work. If no mode then you have bigger problems and need the hotplug and EDID reading to work again.

      You can probably restart X without restarting Linux and have it poll for the EDID again. You may be able to do event injection to get X to think a hotplug has occurred, causing it to read EDID and re-intialize.

      --
      “Common sense is not so common.” — Voltaire
    17. Re:In What Language? by Anonymous Coward · · Score: 0

      I agree

      I know C++ virtual but never had to use the terminology of abstract. Not to mention each language may have different terminology or implementation so any answer you reply back may not match what the questioner is expecting.

    18. Re:In What Language? by Anonymous Coward · · Score: 0

      Some of us still can..

    19. Re:In What Language? by Anonymous Coward · · Score: 0

      Or whitespace

    20. Re:In What Language? by painandgreed · · Score: 2

      On the other hand I could sit down and discuss HDMI specification all day and night with border agents. They'd likely pass out from boredom.

      I've found that this typically works as they are usually just asking you questions to see if you sweat or have trouble answering them. Even for tourists, they'll ask what you are really looking forward to seeing or what you really liked about your trip. I've found that if you already have something in mind and can just wax endlessly about it till they tell you 'that's enough', that that will also be the end of the interview and they'll let you go. I wouldn't be surprised if in earlier questioning, he was asked about what he did and gave vague answers where if he had gone on about something like HDMI specifications till they passed out from boredom, they wouldn't have made him take that test.

    21. Re:In What Language? by Ichijo · · Score: 1

      Checking if a binary search tree is balanced is something a student has to do...

      That sounds like a computer science problem, not a software engineering problem.

      --
      Any sufficiently unpopular but cohesive argument is indistinguishable from trolling.
    22. Re:In What Language? by PCM2 · · Score: 1

      .( OK!)

      --
      Breakfast served all day!
    23. Re:In What Language? by avandesande · · Score: 1

      African Forth or European Forth?

      --
      love is just extroverted narcissism
    24. Re:In What Language? by Anonymous Coward · · Score: 0
    25. Re:In What Language? by Anonymous Coward · · Score: 0

      Zzzzz. z.zzzz. ....zzz.....

    26. Re:In What Language? by jellomizer · · Score: 1

      I would need to agree. That and combined with the stress of being detained. Getting a pop quiz of terminology and Algorithms that we normally may not need to use.

      Professionally I find myself doing 70% SQL Development and 30% other languages. So under stressed from being detained and given a pop quiz on questions I hadn't had since college, isn't really a fair way to judge my credentials as a software engineer.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    27. Re:In What Language? by Anonymous Coward · · Score: 0

      "What.. is your favourite text editor??"

    28. Re:In What Language? by rtb61 · · Score: 1

      Well, somebody was amusing themselves when they came up with that idea to test software engineers, likely using some porn at the time. First lesson in spy vs spy school do not select unusual and difficult to fake jobs when selecting for fake identity. When selecting fake job, select one for dummies and likely to include travel, obvious one, sales. Lots of travel and lots of empty marketing bullshit. Faking being a software engineer is stupid. So why the grilling, easy, psychology. Clearly the officer in charge took a dislike to the nasty foreigner and simply wanted to fuck with them as much as possible (they were lucky they were software engineer with access to corporate lawyers, else things would have been worse). Screening based upon perceptions of psychological state (for fucking amateurs) obviously hugely empower freaks and those freaks then use that power not for security but to feed their ego and their next trip to the storage closet with some porn.

      --
      Chaos - everything, everywhere, everywhen
    29. Re:In What Language? by Anonymous Coward · · Score: 0

      PolyForth on a Digilog.

    30. Re:In What Language? by Anonymous Coward · · Score: 0

      Fortran

    31. Re:In What Language? by AaronW · · Score: 1

      That's like me. I could discuss various minutia about 10G, 25 and 40G Ethernet or details on SFP+ modules or temperature sensors, SATA, USB and a host of other things that would bore them to death. Just don't ask me details about x86 because most of my work has been with MIPS and am now starting ARMv8. I could talk to them for hours about MIPS assembly language, for example, or how virtual memory works on it.

      --
      This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
    32. Re:In What Language? by vtcodger · · Score: 1

      "Even for tourists"

      Pretty much a thing of the past I should think. If I didn't live here, I can't imagine that I'd choose to visit.

      --
      You can't see ANYTHING from a car, You've got to get out of the goddamned contraption and walk...Edward Abbey
    33. Re:In What Language? by Anonymous Coward · · Score: 0

      I imagine the situation as getting bored as hell while watching the agents tasing themselves for fun and laughing stupidly.

    34. Re:In What Language? by Anonymous Coward · · Score: 0

      Try finishing something in APL where some fscker had nicked the only APL overlay card for the non-APL terminal keyboards in the building.. was happily using it (well, as it was APL, maybe happy isn't the appropriate word here, dementedly maybe?) using before i'd popped out down to the ratfactory for a bite to eat, come back 20 minutes later, it's gone.

      Searched every bloody terminal room (seven floors, 5 main terminal rooms, about 30 other smaller rooms with two/three terminals) couldn't find it..cue lots of 'fun' trying to remember which symbols were where on the keyboard..

      APL on non IBM systems was great fun...and fsck me, was that really 34 years ago now?

    35. Re:In What Language? by dbIII · · Score: 1

      I've never seen those problems on a few hundred machines.
      What sort of hardware does your special snowflake machine have? Maybe a driver update has fixed it.

    36. Re:In What Language? by Anonymous Coward · · Score: 0

      Naw. They would just send you to Somalia.

    37. Re:In What Language? by darthnoodles · · Score: 1

      What is the jitter spec of a human body when a taser is applied?

    38. Re:In What Language? by BenFranske · · Score: 1

      The ones that won't show X if the display isn't turned on when the system boots are Intel NUCs. The one that won't show X after the screen has been turned off for a while and turned back on is a Zotac ZBOXHD-ID40.

    39. Re:In What Language? by Anonymous Coward · · Score: 0

      Dear gosh that sounds like fun. I would love to buy you a beer in an airport bar and talk ins and outs of just about any PHY specification.

    40. Re:In What Language? by ebvwfbw · · Score: 1

      I just wrote an APL program - "GUESS" what it does!

      Good old decwriter.

    41. Re:In What Language? by Anonymous Coward · · Score: 0

      Don't mind me, I'm just a traveling vacuum salesman. Just make sure you clean off any residue from your super spy rifle that looks like a vacuum cleaner.

      But seriously, it's no surprise that we'd find power tripping assholes in organizations like the TSA. Power with little oversight and few responsibilities draws a certain personality type like flies to shit.

      PS - I'm a nasty foreigner in every country but my own (US). So I have self-interest in not wanting xenophobia to spread through the world.

    42. Re:In What Language? by Anonymous Coward · · Score: 0

      Java has a keyword 'abstract'. For that language I think a very general way to describe an abstract class is a class that is a common base for several sub-classes but isn't complete enough to stand on it's own so you wouldn't want to instantiate it.

      You might have a abstract class Furniture. Which has sub-classes Couch, Chair, Table, Bookshelf. And of the concrete sub-classes could be instantiated. But if you were to instantiate Furniture what would it even be, the properties of it wouldn't make sense without the rest of the implementation that the sub-class provides.

      I like to think of abstract classes as half finished mini-libraries that you can use as a framework to complete a concrete class.

    43. Re:In What Language? by OrangeTide · · Score: 1

      I'm a software engineer, but I still have to do computer science from time to time. As well as calculus and statistics. Luckily I don't have to do much English.

      (am I an engineer or a programmer/developer? Well I do read Verilog, run my kernel software using hardware simulations, validate implementations for conformance to specification and sometimes work on software proofs.)

      --
      “Common sense is not so common.” — Voltaire
    44. Re:In What Language? by T.E.D. · · Score: 1

      Not a very FORTH friendly question. I'm an old C programmer and while I could make an educated guess, I don't think I would be able to confidently answer the question after a long flight.

      Which was the whole point. In the USA there used to poll tax laws and literacy tests to vote. Those laws were coincidentally almost all in Jim Crow states, and they were coincidentally only dragged out when a dark-skinned person wanted to vote. One person would ask black applicants, as part of their "test" to give the exact amount of jellybeans in a jar. The entire point was to make them nearly impossible to pass, and them apply them at will to prevent voting from people who they didn't want to vote, but couldn't legally prohibit from it for the actual reason they wanted.

      If you look at these reports, they aren't coming from random people at random times. They are coming from people who would have been covered by Trump's recent executive order, that got blocked by the courts for likely illegally singling out a particular religion. This little legal end-run they appear to be pulling is right out of the White Supremacy handbook.

    45. Re:In What Language? by dbIII · · Score: 1

      Thanks, that's interesting that it's on two different types of systems and must be very annoying.
      It turns out that what I thought was a massive variety of stuff with no trouble is really a lot of machines with Nvidia graphics hardware of similar vintage.

    46. Re:In What Language? by houghi · · Score: 1

      Perhaps the TSA agent wanted somebody to do his homework.

      --
      Don't fight for your country, if your country does not fight for you.
  4. Crowdsourcing! by Frosty+Piss · · Score: 4, Funny

    I donâ(TM)t work for free. If they want me to solve problems, they can sign a consulting contract.

    But hereâ(TM)s an idea, if they are going to force software engineers to do this sort of thing, maybe they can break up some vexing Homeland Security software problem and piecemeal it out, sort of like crowdsourcingâ¦

    --
    If you want news from today, you have to come back tomorrow.
    1. Re:Crowdsourcing! by Anonymous Coward · · Score: 0

      Fix your encoding. Then your brain.

    2. Re:Crowdsourcing! by Frosty+Piss · · Score: 1

      Fix your encoding.

      Are you talking to me or Slashdot?

      --
      If you want news from today, you have to come back tomorrow.
    3. Re:Crowdsourcing! by PhunkySchtuff · · Score: 1

      I donâ(TM)t work for free. If they want me to solve problems, they can sign a consulting contract.

      But hereâ(TM)s an idea, if they are going to force software engineers to do this sort of thing, maybe they can break up some vexing Homeland Security software problem and piecemeal it out, sort of like crowdsourcingâ¦

      I know, why don't they put them to work converting Slashcode to support Unicode?

    4. Re:Crowdsourcing! by is+as+us+Infinite · · Score: 1

      crowdsourcingâ! I like it!

      --
      Quidquid latine dictum sit, altum sonatur. . . . . . . .
    5. Re:Crowdsourcing! by Anonymous Coward · · Score: 0

      "This guy claims to be a software developer from Nigeria entering the country on business, but I don't trust him."

      "Did you give him a test to prove actually he is who he says he is?"

      "Yes, but then he told me I'd need to sign a consulting contract before he would do any work."

      "That proves he was telling the truth. He really is from Nigeria."

    6. Re:Crowdsourcing! by RivenAleem · · Score: 1

      Given how they ask everyone to remove articles of clothing, assume a certain position, and be subjected to groping and fondling, has there just been some giant mixup, where they are actually testing if we're sex workers? Should I be charging them my usual fees?

    7. Re:Crowdsourcing! by Anonymous Coward · · Score: 0

      Fix your encoding.

      Are you talking to me or Slashdot?

      Yes

  5. Shorter lines? by Actually,+I+do+RTFA · · Score: 1

    I cannot wait for a day when only people able to answer (fairly basic) software engineering questions can fly. Security will be a snap. Of course, I assumed I can answer the questions for them -- otherwise I'll be going sans my family and most of my friends.

    The most surprising part of that is that questions were pretty decent. Although an abstract class is not a universal concept, and I'm not sure if we should be limiting things by choice of language. After all, we're the land of the free...

    --
    Your ad here. Ask me how!
    1. Re:Shorter lines? by CaptainDork · · Score: 1

      After all, we're the land of the free...

      YOU are.

      HE isn't.

      --
      It little behooves the best of us to comment on the rest of us.
    2. Re:Shorter lines? by Anonymous Coward · · Score: 0

      I go further, and affirm that bills of rights, in the sense and in the extent in which they are contended for, are not only unnecessary in the proposed constitution, but would even be dangerous. They would contain various exceptions to powers which are not granted; and on this very account, would afford a colorable pretext to claim more than were granted. For why declare that things shall not be done which there is no power to do? Why for instance, should it be said, that the liberty of the press shall not be restrained, when no power is given by which restrictions may be imposed? I will not contend that such a provision would confer a regulating power; but it is evident that it would furnish, to men disposed to usurp, a plausible pretense for claiming that power.

      Alexander Hamilton.
      Federalist No. 84

    3. Re:Shorter lines? by hawk · · Score: 1

      >I cannot wait for a day when only people able to
      >answer (fairly basic) software engineering questions
      >can fly.

      At which point, the rest will be forced to take airplanes, while the technical few spend their days retaliating against pigeons . . .

      hawk

  6. Israel has been doing this by Anonymous Coward · · Score: 3, Informative

    I had to go through a 3 hour interview .. i mean policy interrogation in Israel to leave the country. They'll ask the same questions over and over again to see if you answer correctly.

    1. Re: Israel has been doing this by Anonymous Coward · · Score: 0

      Are you Israeli or Arab? Just curious.

      Also, after an hour, I'd be changing answers out of shear boredom, frustration, and anger.

      What a fucked up World we live in.

      And when you dig into why it is so, the reasons are just idiotic.

    2. Re:Israel has been doing this by Anonymous Coward · · Score: 0

      Oh yeah I got grilled there once. They make you open up a manual or book you're carrying and explain the technical stuff. It's all psychological testing. You can't fake that knowledge and when you try the lying is easy to detect.

      Also got interviewed to get on a flight to India once. The Europeans can be strict too.

      I have no problem if immigration enforcement is tightened. And people traveling on tourist visas for their job are the ones who are going to find out it doesn't work. I've had to get work visas for places I've gone outside America. So we are really just catching up in some respects.

    3. Re:Israel has been doing this by GerryGilmore · · Score: 1

      When I was working for Intel, I went to Israel for training on a new VoIP product developed by a research lab there. On leaving, Israeli customs dude opened one of my training manuals, pointed to a block diagram and asked me to explain what it was. Now, I knew right away that he was completely ignorant of the stuff, but was looking to see if I would do the "hamina-hamina-hamina" thing. Also, they asked a lot of circular questions: what hotel did you stay at? what did you have for dinner on your first night? etc. Very thorough, I must say...

    4. Re: Israel has been doing this by Anonymous Coward · · Score: 0

      Europe is quite easy, we only have two categories: European and subhuman.

    5. Re:Israel has been doing this by Bob+the+Super+Hamste · · Score: 1

      You should go as a guest of a government entity like I did several times. On the front end I got a Mossad background check and then had a document that was provided by the government entity to the airport (I had a copy as well) that for the most part meant I just had to sent my crap through the X-ray machine and that I just had to walk through the metal detector after presenting it and having it confirmed with the copy they had. I did get some questions once because I packed my old metal bodied SLR film camera and metal bodied lenses in the middle of my suite case and they couldn't get a good X-ray of it. At that point I had to cart my crap over to a different area get the item in question out and they asked me about it. When did I get it, where did I get it, how long have I had it, what did I take pictures of, does a camera like that really take better pictures than a digital one, etc. They fire them off one after another mostly looking to trip you up.

      --
      Time to offend someone
  7. Creative answers by Anonymous Coward · · Score: 3, Funny

    He really should have messed with them. Binary tree? That is where we obtain the components for the binary explosive.

    1. Re: Creative answers by Anonymous Coward · · Score: 0

      Brilliant. It would be simpler to just ask to be taken to Gitmo, but your way is funnier.

    2. Re:Creative answers by fyngyrz · · Score: 1

      Or "Binaries don't grow on trees, you fool. Numbers are abstractions!"

      --
      I've fallen off your lawn, and I can't get up.
    3. Re:Creative answers by thegarbz · · Score: 1

      Ha. Liar. Everyone knows it's called a logic bomb.

  8. In light of the previous story by chispito · · Score: 1

    Perhaps he was being given a surprise job interview?

    --
    The Daddy casts sleep on the Baby. The Baby resists!
  9. TSA knows? by qQ7eBMsfM5gs · · Score: 3

    The most surprising in this story that Custom officers were able to come up with the quoted questions.

    1. Re:TSA knows? by Anonymous Coward · · Score: 1

      He sat waiting for an hour while CBP ran down to the local Barnes and Noble to buy a copy of "Interviewing at Google For Dummies."

    2. Re:TSA knows? by Anonymous Coward · · Score: 0

      I think a random individual (other than all the not-racist stuff) being given an aptitude test at the border is the most surprising in this story.

    3. Re:TSA knows? by nanospook · · Score: 1

      They probably just googled some questions. More of a programmer questions than a software engineer..

      --
      Have you fscked your local propeller head today?
    4. Re:TSA knows? by TWX · · Score: 3, Insightful

      He sat there an hour while someone consulted someone else who consulted someone else who knew someone in Government that knew someone in private industry to ask what kinds of questions would be asked of a software engineer.

      In the ensuing game of telephone the declared needs changed. Questions that probably should have been as simple as "What extra include is necessary in C++ over C" and "What is an IDE?" which very few non-programmers could answer anyway were replaced with ones that are harder to answer.

      It's actually not an entirely bad idea to confirm that someone coming in for a specific reason for a specific class of visa is here for legitimate purposes, but if the Government is issuing th visas in the first place then it should not be difficult to know what kinds of questions need to be asked, so that there isn't an hour delay, and so that the questions are considered and reasonable.

      --
      Do not look into laser with remaining eye.
    5. Re:TSA knows? by 93+Escort+Wagon · · Score: 1

      The most surprising in this story that Custom officers were able to come up with the quoted questions.

      I used to have a very controlling and secretive boss - he had very little technical knowledge, but he did not want people to know that.

      For a long time, he would not let the rest of us participate in interviews of job applicants. Instead, he would come to each of us and have us give him questions and answers. I remember one time he asked me to come up with several perl coding questions and answers (my boss did not know perl, but it was a requirement for the position being filled).

      So I am reasonably sure the Customs guys had no idea what the questions meant - they just got the questions from someone who did.

      --
      #DeleteChrome
    6. Re:TSA knows? by Obfuscant · · Score: 1

      It's actually not an entirely bad idea to confirm that someone coming in for a specific reason for a specific class of visa is here for legitimate purposes,

      The story is opaque as to the actual visa involved, calling it only a "short term" visa. I would expect someone coming here to work would not have a short-term visa to start with, so that makes it suspicious. "Software engineer" is such a broad field that seems like a reasonable career for someone trying to enter illegally to pick. I mean, just how could ICE verify? Well, they tried, and I think it was reasonable to question him.

      They also called his employer, which I suspect is why he got loosed.

      but if the Government is issuing th visas in the first place then it should not be difficult to know what kinds of questions need to be asked,

      Ummm, the visas are processed through embassy personnel, who certainly would have no idea what questions to ask.

      Keeping a standard list of questions to ask specific careers would be a waste of time given the huge number of careers possible. For example, my "occupation" when I travel is "scientist". What do you ask a "scientist" to prove that he are one?

    7. Re:TSA knows? by Anonymous Coward · · Score: 0

      "Oooooh praise Allah, peace be upon him, I know all about IEDs! This will be easy! W-W-WAIT WHAT ARE YOU DOING THIS IS AN OUTRAGE! GET YOUR HANDS OFF OF ME YOU INFIDEL!!! I AM SOFTWARE ENGINEER DERKA DERKALLAH DERKA DERKA"

      Fuck the filter error trying to censor yelling. lowercase letters sdfkjgndsflkjgsdflkjghkljsdfhglkjsdfnh
      (boy what a great feature, the garble to defeat it really adds to our posts)

    8. Re:TSA knows? by Anonymous Coward · · Score: 0

      ...and when they told him the answers were incorrect it was probably because what he wrote was not in whatever unspecified programming language the answer key used. Either that or they were trying to play mind games on him.

    9. Re:TSA knows? by R3d+M3rcury · · Score: 1

      "What is an IDE?"

      An Improvised Device that Explodes?

      What do you mean I'm going to Guantanamo?

    10. Re:TSA knows? by TWX · · Score: 1

      See! IT WOULD have WORKED!

      --
      Do not look into laser with remaining eye.
    11. Re:TSA knows? by Anonymous Coward · · Score: 0

      See if he can answer this. what would be the correct ignition timing be on a 1955 Bel-air Chevrolet with a 327 cubic engine and a 4-barrel carburetor?

    12. Re:TSA knows? by Anonymous Coward · · Score: 0

      That's a bullshit question.

    13. Re:TSA knows? by Anonymous Coward · · Score: 0

      He wasn't coming to work. IIRC his stated reason for visit was "vacation"

    14. Re:TSA knows? by Obfuscant · · Score: 1

      He wasn't coming to work. IIRC his stated reason for visit was "vacation"

      Well, that would raise a lot of red flags -- someone who claims to be a software engineer who is actually in the vacation "business". From TFA:

      28-year-old Celestine Omin, who was traveling from Lagos, Nigeria on business.

      And even more red flags if his short-term visa was for work but he claimed to be here on "vacation". Or vice versa.

    15. Re:TSA knows? by Anonymous Coward · · Score: 0

      Easy: "explain the metric system." Only scientists understand that shit. Also, "Fuckin' magnets, how do they work?"

    16. Re:TSA knows? by Anonymous Coward · · Score: 0

      What do you know about Ray Finkle??

    17. Re:TSA knows? by Anonymous Coward · · Score: 0

      Ummm, the visas are processed through embassy personnel, who certainly would have no idea what questions to ask.

      And the border patrol officer did? wow, I did not know being a software engineer was part of the job description!

      For whatever dumb ass reason your embassy thinks it makes sense to hand out visas and ask questions later... regardless of how unnecessary those questions may or may not be, this is obviously the wrong way around.

    18. Re:TSA knows? by luis_a_espinal · · Score: 1

      The most surprising in this story that Custom officers were able to come up with the quoted questions.

      Ever heard of "support specialists" asking you questions out of an effing questionare? Ever talked to a head hunter asking you pre-canned questions about technology when you know damned well the head hunter has no effing clue what each of them mean?

    19. Re:TSA knows? by Anonymous Coward · · Score: 0

      Bad subject. The incident involved CBP, not TSA.

      TSA doesn't let you get onto the plane.
      CBP doesn't let you enter the country.
      If the two agree -- CBP will make you get onto a plane back to your point of origin, and TSA won't let you board it.

      So please, blame the proper government agency.

    20. Re:TSA knows? by Verdatum · · Score: 1

      I best someone just looked up "Software engineer interview questions". I'm surprised they didn't ask him the old Microsoft chestnut about why manhole covers are round.

    21. Re:TSA knows? by timq · · Score: 1

      So, what "extra include is necessary in C++ over C"? I write C++ and C all day and can't think of any.

    22. Re:TSA knows? by bfpierce · · Score: 1

      www.google.com

      "Software Engineer Interview Questions"

    23. Re:TSA knows? by TWX · · Score: 1

      iostream.h? vs stdio.h?

      It's been about fifteen years but that's what I remember.

      --
      Do not look into laser with remaining eye.
    24. Re:TSA knows? by david_thornley · · Score: 1

      "What extra include is necessary in C++ over C"

      None. There are lots of headers that are in C++ and not C, but most C90 programs are valid C++ programs.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    25. Re:TSA knows? by Anonymous Coward · · Score: 0

      A couple of years ago they announced they would be testing H1-B visa holders to make sure they were skilled workers who were who they said they were. Presumably someone designed some tests for Software Engineers.

    26. Re:TSA knows? by timq · · Score: 1

      stdio.h works just fine in C++.

    27. Re:TSA knows? by TWX · · Score: 1

      Yes, but iostream.h doesn't work in straight C.

      --
      Do not look into laser with remaining eye.
    28. Re:TSA knows? by Anonymous Coward · · Score: 0

      He came on vacation and to visit relatives. It *is* a bad idea to quiz him on his job.

  10. I'd fail that binary search tree test by mfearby · · Score: 5, Insightful

    It's been so long since I even looked at having to do one of those, that I would be put back on the next plane home, LOL.

    1. Re:I'd fail that binary search tree test by phantomfive · · Score: 1

      I thought so too at first, but it's only a function to check if it's balanced. That means count the nodes in the left sub-tree and the nodes in the right sub-tree and make sure they are the same (or close enough to the same). That's not too hard to write.

      If I have to write a full red-black tree, then I'm in trouble.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      I always wonder why we were taught AVL trees in CS, but not red-black trees.. I've never had to write my own lib to handle either in my career, of course; but I just found it strange after entering industry everyone talks about red-black but not AVL.

      I guess I should read up on both so I can put this question to rest in my mind before I forget again...

    3. Re:I'd fail that binary search tree test by prefec2 · · Score: 0

      You could solve this with a recursive function:

      function balance (Node node) {
          if (node.left == null && node.right == null)
              return 1
          else if (node.left != null && node.right !=null) {
              val left = balance(node.left)
              if (left == balance(node.right))
                  return left
              else
                  throw Exception("not balanced")
          } else
              throw Exception("not balanced")
      }

    4. Re:I'd fail that binary search tree test by phantomfive · · Score: 1

      I always wonder why we were taught AVL trees in CS, but not red-black trees

      Might have been your particular professor didn't like them?

      --
      "First they came for the slanderers and i said nothing."
    5. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      How do you know he didn't fail the test too? This was a government employee asking, one employed by immigration (aka Homeland Security)....

    6. Re: I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      This is checking for a perfectly balanced tree, the question was for a balanced tree.

    7. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      Too long. Correct code is:

      function IsBinaryTreeBalanced(BinaryTree binaryTree)
      {
            return (binaryTree.BalanceState == BinaryTreeBalanceState.Balanced);
      }

    8. Re:I'd fail that binary search tree test by loufoque · · Score: 2

      That's not how you check whether a binary tree is balanced.
      The answer in the other part of the thread is wrong as well.

      It's scary how some so-called "software engineers" can't even solve such a trivial problem.

    9. Re:I'd fail that binary search tree test by cdrudge · · Score: 1

      Guess what. You just were denied entry into the US if you claimed to be a software engineer.

      While your pseudocode does appear to tell if a BST is absolutely balanced, that's not the computer science definition of a balanced binary tree. A balanced binary tree is one where the depth of the tree is kept at a minimum.

      Imagine a tree with just 2 nodes, a root node and a single child node. By your algorithm, it's not balanced. and there is nothing that you can do to balance it. But it is balanced as the depth is kept to a minimum and only adding a new level once all sibling nodes at the same level have 2 children.

    10. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      I would be able to answer the abstract class, but with the binary tree, I'd be explaining what a binary tree is and why you want to have it balanced so it keeps the O(log n) performance but I wouldn't have found the "just check the height of sub-trees" that I just googled.

    11. Re:I'd fail that binary search tree test by PoopJuggler · · Score: 1

      No you wouldn't:

      #include "SuperTreeLib.h"
      bool isTreeBalanced(SuperTreeLib::BinarySearchTree* bst)
      {
      return SuperTreeLib::isTreeBalanced(bst);
      }

      done. Without any requirements document, the sky is the limit.

    12. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      I missed the diktat which declared"close enough" means something definite. Like if R_node_num = 100,000 and L_node_num = 102,153 is balanced? How about a ratio of 1:1.3? 1:1.6? What would you do if your CEO came into your cubicle and gave you exactly that same problem, with exactly that specification (meaning no specs, no constraints, not even a language, a due date, memory and speed constraints, multi or single threaded, etc. etc.)? Would you be your career that you'd be able to produce code which would be acceptable to him/her? In a couple of minutes? With zero ability to ask about implementation details? This is exactly a "text book" problem which has zero *direct* applicability to real world programming. And let's next discuss how fluent he is in English. I guess if he answered in machine language (of his choice), it wouldn't cause any problems. It's not US Custom's problem that he was exhausted or where and how he had spent his last 24 hours. My first reaction was "wtf does "balanced" mean?" Then after figuring that out, I'm pretty sure I would fail miserably at writing the source code which would actually compile without spending a couple of hours at it - with both my GUI and an internet connection - if I wasn't provided with both, I certainly wouldn't be able to produce functioning code. I suppose they required him to do it with paper and pencil?

    13. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0


      bool IsBinaryTreeBalanced(BinaryTree binaryTree)
      {
            return true; // throw hardware at the problem if it's too slow
      }

    14. Re:I'd fail that binary search tree test by brantondaveperson · · Score: 1

      Count the nodes, find the maximum depth. Deeper than log_2(nodes) + 1 == not balanced.

      I think.

    15. Re:I'd fail that binary search tree test by phantomfive · · Score: 1

      Nice strategy.

      --
      "First they came for the slanderers and i said nothing."
    16. Re:I'd fail that binary search tree test by phantomfive · · Score: 1

      I think you're making an argument against something that no one has written.

      --
      "First they came for the slanderers and i said nothing."
    17. Re:I'd fail that binary search tree test by phantomfive · · Score: 1

      Well aren't you an irate one. Check this out.

      --
      "First they came for the slanderers and i said nothing."
    18. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      That's not how you check whether a binary tree is balanced.

      Yeah, but it's heading in the right direction. It would be a relatively simple leap to go from that initial guess on the whiteboard to a basic recursive depth-first tree traversal, keeping track of the maximum depth reached in that first left-most descent and then continuing the traversal until there are no more pointers to follow, in which case the tree is balanced if the maximum depth was never greater or less than that first maximum depth descent (i.e. balanced), or when the first path from the root to the leaves is found that's shorter than that first maximum depth descent (i.e. not balanced). As for the abstract class, it allows derived types to be treated as instances of the abstract type with the definition of virtual functions such that derived classes can override them to provide alternative implementations which can then be invoked at runtime via instances that are referenced via the abstract class. My definitions might have been a bit rough, but I'm sure that I could have described these well enough or demonstrated on a whiteboard via example that I have at least basic competency in software engineering. Then again, I'm also a US citizen so they couldn't have prevented me from entering the United States anyway or at least not indefinitely.

    19. Re:I'd fail that binary search tree test by Tablizer · · Score: 1

      been so long since I even looked at having to do one of those, that I would be put back on the next plane home

      Same here. The stress wouldn't help my memory either.

      I'd probably write a basic tree recursion traversal and count the total left and total right nodes, and if the final count is equal, display "Balanced! Now let me go." (Please don't cue that Queen song.)

    20. Re: I'd fail that binary search tree test by prefec2 · · Score: 1

      Hey I had an exhausting flight and missed a corner case. I am a software engineer not a programmer.

      But you are right. It is a stupid criteria. I want to know what they will ask me when I have to visit a conference in the US. I am from Germany, this evil country who let some refugees in.

      BTW: How do they test computer scientist in software engineering and modeling? Will I get an UML question? Or will I fail ,let say ,with a B-tree optimization algorithm?

      These Trump/Bannon guys are ruining your country. Now a lot of people will think twice whether they have to visit the US. Not the best situation for the sciences.

    21. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      Even shorter:

      function IsBinaryTreeBalanced(BinaryTree binaryTree)
      {
            return true;
      }

    22. Re:I'd fail that binary search tree test by mfearby · · Score: 1

      That's the correct answer :-) Search the internet for the most appropriate solution first before trying to develop your own.

    23. Re:I'd fail that binary search tree test by mfearby · · Score: 1

      JavaScript FTW :-p

    24. Re:I'd fail that binary search tree test by mfearby · · Score: 1

      Oops. It can't be JavaScript if the AC is passing the parameter type. Me fail programming.

    25. Re:I'd fail that binary search tree test by Anonymous Coward · · Score: 0

      If you check every node of the tree for the condition (at most 1 node difference between left and right subtree), each will have about half of the remaining nodes in that branch. Even if there is always imbalance of 1, the depth difference of lowest and highest leaf will be at most O(log n).

      That does sound good enough to qualify as being balanced.

    26. Re:I'd fail that binary search tree test by Bob+the+Super+Hamste · · Score: 1

      That would have been my answer but that is something I haven't done since my second year of my CS degree 19 years ago.

      --
      Time to offend someone
  11. As a person of Pakistani origin by Anonymous Coward · · Score: 0

    From now on, I should keep a copy of Cracking the Coding Interview with me and use Emirates' onboard WiFi to practice on LeetCode while I'm in air. I don't want to be detained for not knowing how to find the largest prime in a left-ended partially heavy red-black tree in big O of zero.

  12. proctologists and gyanecologist by Anonymous Coward · · Score: 5, Funny

    I wonder what kind of tests do they give them.

    1. Re:proctologists and gyanecologist by TWX · · Score: 3, Funny

      Substitute TSA screener.

      --
      Do not look into laser with remaining eye.
    2. Re:proctologists and gyanecologist by fustakrakich · · Score: 1

      Well, you know it won't be an oral exam...

      --
      “He’s not deformed, he’s just drunk!”
    3. Re:proctologists and gyanecologist by Obfuscant · · Score: 1

      I wonder what kind of tests do they give them.

      1. Are they fresh water or salt water dwellers?

      2. What is their main predator?

      3. What is the airspeed velocity of a gyan?

    4. Re:proctologists and gyanecologist by Anonymous Coward · · Score: 0

      Rectal exam, of course

  13. Not at the border by Anonymous Coward · · Score: 5, Insightful

    It's total nonsense that the USA is detaining and turning away so many people at the border. By the time someone gets to the border (with visa in hand), the only question should be whether they match the visa - whether they are who they say they are. The "extreme vetting", or whatever you want to call it, should have already happened when the were granted the visa.

    Of course, if you really have evidence that someone is planning a terrorist attack on the USA then rather than simply turning them away to try again later you should be letting them in - and then throwing them straight in jail.

    1. Re:Not at the border by TWX · · Score: 1

      There are multiple kinds of visas. I think there are reasonable procedures that could be carried out at arrival for some of those kinds of visas. I don't happen to feel that this particular set of questions was reasonable, but it is not unfair to ask someone here for an occupation-related visa to confirm that they're above-board.

      --
      Do not look into laser with remaining eye.
    2. Re:Not at the border by CaptainDork · · Score: 1

      Getting Visa is no brainer.

      --
      It little behooves the best of us to comment on the rest of us.
    3. Re:Not at the border by Anonymous Coward · · Score: 0

      Microsoft loves their cheap employees that are incompetent. A basic engineering test at the border would weed out many of them.

    4. Re: Not at the border by Anonymous Coward · · Score: 0

      The vast majority of Microsoft hires these days have fake degrees so they couldn't even pass a basic engineering test.

    5. Re:Not at the border by AmiMoJo · · Score: 1

      I'm surpassed the airlines aren't kicking up more of a fuss. When someone is sent back, they have to fly them for free.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    6. Re:Not at the border by Anonymous Coward · · Score: 0

      I've lived in Redmond near Microsoft for nearly thirty years. I haven't yet met a foreign engineer that was competent. I own eight condos in the area and have since the late 80s, and none of my renters could even carry on a conversation about software development. Microsoft loves their cheap and incompetent employees.

    7. Re:Not at the border by Anonymous Coward · · Score: 0

      The time to do that is at the interview, which they are obliged to attend, at the US embassy in the country of origin (most other countries allow you to apply for visas by mail, or online, but the US requires an in person interview as part of the process). As the GP states, the only thing they need to be checking at the border for visa holders is whether the person turning up in the US is the same person who applied for the visa. Having someone override a lengthy background check on the spur of the moment based on their own prejudices is not a system worthy of a first world country. Acceptance of such a system leads to corruption, where border agents will start threatening to turn people away in order to get bribes.

  14. BS by Anonymous Coward · · Score: 0

    This is the second "report" I have heard about that. But the last guy was in Houston and was European.

  15. More to the story by Anonymous Coward · · Score: 0

    There is more to this story that were not getting.

    1. Re:More to the story by Anonymous Coward · · Score: 0

      Pay attention to the news... Northern African countries are in the midst of a nasty conflict complete with Islamic extreamists and terror tacticts being used. Plus, that part of the globe tends to produce some really corrupt and ineffective governments.

      This doesn't come as a suprise to me.

  16. Re:Not in the summary: by OverlordQ · · Score: 5, Insightful

    That's something that should be checked before issuing a Visa, not after they're already on the fucking plane here.

    --
    Your hair look like poop, Bob! - Wanker.
  17. Re:Not in the summary: by Anonymous Coward · · Score: 4, Insightful

    This is an understandable and completely normal security precaution.

    Really?

    Haven't most of the Islamic terrorists who've been caught trying to fuck with airports and air traffic been trained engineers?

  18. I call BS by Anonymous Coward · · Score: 0

    Wow! Computer science degrees are now so worthless in the USA that graduates have to take jobs working customs.

  19. He's lucky it wasn't Canada by future+assassin · · Score: 0, Troll

    They would have made him wait 8 hours with no food, call the RCMP when he got cranky. The RCMP would then tazer him till his heart stopped and then the two officers would try to cover it up.

    --
    by TheSpoom (715771) Uncaring Linux user here. I have nothing to add to this but please continue. *munches popcorn*
    1. Re:He's lucky it wasn't Canada by SirSlud · · Score: 5, Informative

      And then the officer who fired the tazer went to prison for 30 months. Nice of you to leave that out.

      --
      "Old man yells at systemd"
    2. Re:He's lucky it wasn't Canada by Anonymous Coward · · Score: 0

      So... less than 3 year sentence for murder in Canada. Might be best it was left out.

    3. Re:He's lucky it wasn't Canada by Anonymous Coward · · Score: 3, Informative

      And then the officer who fired the tazer went to prison for 30 months. Nice of you to leave that out.

      He didn't go to jail for 30 months for the death or firing the taser.

      He went to jail for 30 months for perjury and colluding with his fellow officers before testifying:

      https://en.wikipedia.org/wiki/...

      Nice of you to leave that out.

    4. Re:He's lucky it wasn't Canada by Anonymous Coward · · Score: 0

      That's what I love about Slashdot - everyone is so fucking nice!

    5. Re:He's lucky it wasn't Canada by Anonymous Coward · · Score: 0

      Pedantic: He only said the officer went to jail for 30 months, he said nothing about why he went to jail.

    6. Re:He's lucky it wasn't Canada by Obfuscant · · Score: 1

      He went to jail for 30 months for perjury and colluding with his fellow officers before testifying:

      And Al Capone went to prison for 8 years for tax evasion, not for the death of seven people in the St. Valentine's Day Massacre. I think most people accept that as a win for the public.

    7. Re:He's lucky it wasn't Canada by Trailer+Trash · · Score: 1

      And then the officer who fired the tazer went to prison for 30 months. Nice of you to leave that out.

      He didn't go to jail for 30 months for the death or firing the taser.

      He went to jail for 30 months for perjury and colluding with his fellow officers before testifying:

      https://en.wikipedia.org/wiki/...

      Nice of you to leave that out.

      Not only that, there were four perps and only one even faced criminal charges. This is, sadly, normal in the US and Canada.

    8. Re:He's lucky it wasn't Canada by Anonymous Coward · · Score: 0

      They only do that to white people from Europe. These days they're more than happy to let non-whites in from anywhere.

    9. Re:He's lucky it wasn't Canada by future+assassin · · Score: 1

      Yes except for perjury not for killing the poor guy. Either way this is how it was.

      --
      by TheSpoom (715771) Uncaring Linux user here. I have nothing to add to this but please continue. *munches popcorn*
    10. Re:He's lucky it wasn't Canada by Boronx · · Score: 1

      And OP said nothing about the officers going to jail.

    11. Re:He's lucky it wasn't Canada by Anonymous Coward · · Score: 0

      And then the officer who fired the tazer went to prison for 30 months. Nice of you to leave that out.

      He didn't go to jail for 30 months for the death or firing the taser.

      He went to jail for 30 months for perjury and colluding with his fellow officers before testifying:

      https://en.wikipedia.org/wiki/...

      Nice of you to leave that out.

      Well, the usual penalty for perjury and colluding with fellow officers before testifying in the U.S. is that the perjured evidence is thrown out of court when it is discovered. There usually is also a promotion involved before the court case in order to have a "decorated officer" as witness. In egregious cases, there are several weeks of paid vacation time ("suspension"). Multiple instances may make you eligible for political office on the "tough against crime (unless committed by myself)" ticket.

      So it is an easy mistake to make for an American to assume that a 30 month prison sentence must have been for something else.

  20. The correct answer: look on stack overflow by mveloso · · Score: 5, Insightful

    The correct answer to all of these questions is "why don't you look on stackoverflow?"

    1. Re:The correct answer: look on stack overflow by Anonymous Coward · · Score: 0

      The correct answer to all of these questions is "JFGI".

      FTFY

    2. Re:The correct answer: look on stack overflow by ljw1004 · · Score: 1

      The correct answer to all of these questions is "why don't you look on stackoverflow?"

      And if you can't write code because you're too exhausted after 24 hours, how do you pull all-night coding binges ?!

    3. Re:The correct answer: look on stack overflow by Anonymous Coward · · Score: 3, Funny

      The correct answer is that solving the problem would incur a consulting fee, but you are not allowed to work on a tourist visa (or as a visitor under a visa waiver program), so he'll have to ask someone else.

    4. Re:The correct answer: look on stack overflow by Anonymous Coward · · Score: 0

      I dont. They are unproductive and wipe me out for the next 3 days.

    5. Re:The correct answer: look on stack overflow by Anonymous Coward · · Score: 0

      And then the answer would be "what do you need a binary tree for? just use standard containers"

    6. Re:The correct answer: look on stack overflow by Anonymous Coward · · Score: 0

      The correct answer is that solving the problem would incur a consulting fee, but you are not allowed to work on a tourist visa (or as a visitor under a visa waiver program), so he'll have to ask someone else.

      Legally the traveler hasn't entered the country yet. So a no-employment-permitted visa would not be relevant.

      Disclaimer: I am not a lawyer, let alone an immigration lawyer.
      Disclaimer 2: If I were, I don't think that would help.

    7. Re:The correct answer: look on stack overflow by CanadianMacFan · · Score: 1

      I don't pull all-night coding binges because my work is done.

  21. Why is this news? by DatbeDank · · Score: 0

    Being stuck for 20 minutes in customs is hardly a reason to complain. I've regularly waited upwards of 30 minues to clear it. Whoop de dee, border control is finally doing its job of making sure people who come into the country are who they say they are.

    Everytime I enter France with my work visa I have to explain explicit work details with them about my job and if I still do it (evan after impossibly long flights too!). What's Mashable really trying to get at here?

    1. Re:Why is this news? by darthsilun · · Score: 1

      You've been stuck in Customs? For 30+ minutes? I usually walk through the "Nothing to Declare" side. Which usually takes about 10 seconds.

      Now Passport Control is another thing entirely. Passport Control and Customs are two very different things. I can totally see being quizzed for lengthy periods of time at Passport Control. (Even if it's never happened to me.)

    2. Re:Why is this news? by by+(1706743) · · Score: 1

      I don't think the "20 minutes" bit is the offending part, it's the "solve these interview questions" that's offensive. Had the dialog been focused on explicit work details -- as you have been subject to -- then sure, this would be a non-story.

      There is a huge difference between being grilled on what you *actually do on a day-to-day basis* and what *people with similar job titles have to answer in interviews*. See other posts from software engineers (presumably gainfully employed) who haven't had to deal with this sort of thing in a very long time (binary trees not common in their work, language doesn't support abstract classes, etc.).

    3. Re:Why is this news? by Anonymous Coward · · Score: 1

      You work in a very, very different IT department than I do then. I would have a hard time finding someone I work with that is pro-trump...

    4. Re:Why is this news? by Anonymous Coward · · Score: 0, Insightful

      Let me guess, you work in one of those "diversity" hell-holes where management is much more concerned about the penis:vagina ratio and could care less about whether or not the people there know what they're doing? And all the competent people have long since moved on to places where they get paid better for knowing how to do the work and aren't just there to be a special snowflake?

    5. Re:Why is this news? by Anonymous Coward · · Score: 0

      Everytime I enter France with my work visa I have to explain explicit work details with them about my job and if I still do it (evan after impossibly long flights too!). What's Mashable really trying to get at here?

      That Trump's "extreme vetting" is dumb policy that only makes sense to idiots who are happy as long as "those" people are being hassled.

      He was quizzed on trivia, not asked to explain explicit work details.

    6. Re:Why is this news? by clonehappy · · Score: 1

      Many tech folks I've met are Pro-Trump. Not all, and maybe not even a majority, but it's a sizeable chunk. However, amongst the "tech" people I know (you know who I'm talking about), it's almost 100% against him.

      It's almost as if people (across any given field) who have no real skills or understanding of business are threatened by someone who would rather see equal chances given to everyone instead of being forced to provide everyone with equal outcomes.

    7. Re:Why is this news? by Anonymous Coward · · Score: 0

      " tech by and large is pro-Trump"

      Oh fuck off. stating opinion as fact is par for the course here, I know. but really, just fuck off.

    8. Re:Why is this news? by Anonymous Coward · · Score: 0

      >He was quizzed on trivia, not asked to explain explicit work details.

      So trivial he couldn't answer the questions. That doesn't inspire a lot of confidence about his work ability.

    9. Re:Why is this news? by Anonymous Coward · · Score: 0

      >He was quizzed on trivia, not asked to explain explicit work details.

      So trivial he couldn't answer the questions. That doesn't inspire a lot of confidence about his work ability.

      I suppose it wouldn't if you were clueless about the breadth and variety of knowledge that falls under the umbrella of "engineering".

    10. Re:Why is this news? by Anonymous Coward · · Score: 0

      Or maybe he's just not that good of a software engineer. He's basically works for a company that drains talent from African nations to work cheap at tech companies abroad. IOW, he's like any other h1-b.

    11. Re:Why is this news? by bobbied · · Score: 1

      You've been stuck in Customs? For 30+ minutes? I usually walk through the "Nothing to Declare" side. Which usually takes about 10 seconds.

      Now Passport Control is another thing entirely. Passport Control and Customs are two very different things. I can totally see being quizzed for lengthy periods of time at Passport Control. (Even if it's never happened to me.)

      I've waited at customs AND immigration (passport control) for hours individually at times. Usually in Miami when all of the South America international flights arrive with in a couple of hours in the middle of the night. It's happened to me multiple times and is why I avoid Miami like the plague.. Well that and because as a fellow traveler once said as we where being herded into various queues for processing.. "I've been in South America for two weeks where nobody speaks anything but Spanish, then when I finally get back to the USA I find myself being yelled at in Spanish!" I told her she wasn't really in the USA yet, just southern FL where Spanish comes before English.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    12. Re:Why is this news? by Anonymous Coward · · Score: 0

      The problem is that while a lot of tech CEOs are anti-Trump, tech by and large is pro-Trump, because Trump plans on doing something about outsourcing, which has ravaged the tech community.

      I want something done about outsourcing, but that hardly makes me pro-Trump. The cure is worse than the disease.

    13. Re:Why is this news? by Anonymous Coward · · Score: 0

      congrats on being a pedantic tool. please find more commonly understood terms and then correct the poster. how you got points for that post is beyond me.

    14. Re:Why is this news? by bmimatt · · Score: 1

      This. I've been writing code for 20+ years, in several languages. Could I write the b-tree piece they asked for after 20+ hours of likely no sleep, from the top of my head? Probably not. If I had to solve the b-tree problem as part of something I work on, I'd not even think to roll my own, I'd look at existing implementations and most likely find a library, where someone much closer to the problem as already solved it properly. Also, this exercise assumes they have someone on hand that would be able to evaluate the solution without bias.

  22. I'd fail both questions, and I'm a USAian! by amigabill · · Score: 2

    It's been too long since I've seen a binary tree to remember that sort of thing, and as someone with mostly experience in C, I don't know much at all about abstract classes...

    1. Re:I'd fail both questions, and I'm a USAian! by Anonymous Coward · · Score: 1

      Prepare to be deported to Mexico

    2. Re:I'd fail both questions, and I'm a USAian! by Anonymous Coward · · Score: 0

      > Prepare to be deported to Mexico

      "Qué es una clase abstracta, y por qué la necesita?"

    3. Re:I'd fail both questions, and I'm a USAian! by Anonymous Coward · · Score: 0

      It's been too long since I've seen a binary tree to remember that sort of thing

      Honestly, any decent software engineer should be able to cobble together the answer to that on the spot. The binary search tree is pretty much the canonical example of a structure lending itself to a recursive traversal and is frequently used to introduce the concept of recursion to undergraduate CS students. The abstract class argument is maybe believable, but it would be very rare for any CS student who studied the subject or worked in the field anytime in the past 30 years to have never worked with or at least been exposed to an object oriented programming language.

    4. Re:I'd fail both questions, and I'm a USAian! by Anonymous Coward · · Score: 0

      I'd fail both questions, and I'm a USAian!

      Well, obviously. There is a reason so many H1B visa are needed to keep the tech industry alive.

  23. Fake News - Part Deaux by Anonymous Coward · · Score: 0

    This has already been listed as exaggerated news - aka fake news. Why do people continue to make s**t up?

    1. Re:Fake News - Part Deaux by Anonymous Coward · · Score: 0

      By whom? Do you have a source you'd like to share that debunks the story?

  24. Easier test by quadrantviewer · · Score: 5, Funny

    Surely it would have been easier to check if he was an engineer by forcing him to try to talk to a girl?

    1. Re:Easier test by Anonymous Coward · · Score: 4, Funny

      Torture is forbidden by law.
      Most of the time anyways.

    2. Re:Easier test by Anonymous Coward · · Score: 0

      Surely it would have been easier to check if he was an engineer by forcing him to try to talk to a girl?

      If he was a real engineer, any girl would have been invisible to him.

    3. Re:Easier test by chooks · · Score: 2

      Would this be torture for the engineer, or torture for the girl?

      --
      -- The Genesis project? What's that?
    4. Re:Easier test by sabbede · · Score: 1

      Tell them to go make friends with a stranger. If they come back with a black eye, they pass.

    5. Re:Easier test by Cro+Magnon · · Score: 2

      Would this be torture for the engineer, or torture for the girl?

      Yes.

      --
      Slow down, cowboy! It has been 4 hours since you last posted. You must wait another few hours.
    6. Re:Easier test by Anonymous Coward · · Score: 0

      Would this be torture for the engineer, or torture for the girl?

      Yes..

  25. BAN THE LUDDITES! by Anonymous Coward · · Score: 0

    They should have forced him to app an app while apping other apps to prove he's a modern app apper instead of a LUDDITE!

    Apps!

  26. Well... by SeattleLawGuy · · Score: 4, Interesting

    I've had border guards not be sure if I was really me when I was driving a rental car across the border. Drug traffickers will sometimes use rental cars and my driver ID happened not to match the location where I had rented the car. I'm not offended by the fact that they double-checked it was me. With this guy, they verified his story with his employer and asked him a question or two. Sure, it wasn't perfect, but there are much bigger things to worry about. And we don't know the circumstances from CBP's POV. (Did he match a pattern of people claiming to be software engineers from nigeria who turned out to be here for criminal purposes, for example? I don't know, and neither does he.)

    Clearly, however, he should have been treated respectfully and with an "I apologize for the delay but we needed to verify your identity. I hope you have a wonderful time." They need to maintain authority, but it's also important to keep the country welcoming.

    --
    Real lawyers write in C++
    1. Re:Well... by T.E.D. · · Score: 1, Informative

      You know, in isolation, I complete agree with this.

      However, this didn't happen in isolation. It happened in an environment where this same organization (part of the Executive branch) has just been found by the Ninth Circuit courts to be attempting to specifically ban as many adherents of a specific religion as they could, including people from this same country, on a transparently flimsy legal pretext. The Administration isn't appealing it any further, which is essentially and admission. This is as close to an objective truth on a political matter as the US legal system has.

      So harassing a valid Visa holder from this same country, in context, no longer looks particularly innocent. It looks very much like someone possibly literally being in contempt of court.

    2. Re:Well... by Anonymous Coward · · Score: 0

      What is going on is the Stanford Prison Experiment.

      CBP staff believe they have broad latitude from Trump to apply 'extreme vetting' and to engage their prejudices.

      Passengers are one class of people. CBP staff another.

      One wonders if each CBP office has someone nicknamed 'John Wayne' yet.

    3. Re:Well... by Obfuscant · · Score: 2, Informative

      It happened in an environment where this same organization (part of the Executive branch) has just been found by the Ninth Circuit courts to be attempting to specifically ban as many adherents of a specific religion as they could,

      First, the executive order suspending immigration did not do so based on religion, only on citizenship in seven specific countries. There was an exemption for refugees from religious persecution, but no mention of Islam or muslims at all.

      Second, the Ninth Circuit made no such finding in their stay. In fact, the article you linked to was quite explicit in saying exactly the opposite:

      The court discussed, but did not decide, whether the executive order violated the First Amendment's ban on government establishment of religion by disfavoring Muslims.

      The Administration isn't appealing it any further, which is essentially and admission.

      "And [sic] admission" of what? And they haven't YET appealed it, but that does not mean it will never be appealed. In fact, the article you linked to explained why it might not be appealed immediately. Did you read it?

      So harassing a valid Visa holder from this same country, in context, no longer looks particularly innocent.

      You know, I hope, that a stay on an immigration policy that bars admission temporarily does NOT mean that there can be no barriers at all to immigration?

      It looks very much like someone possibly literally being in contempt of court.

      It looks like no such thing, once you understand what the executive order actually says, and what the court said about it. The court did not stay any and all immigration policies or practices for those seven countries, just the limited set defined by the executive order.

    4. Re: Well... by Anonymous Coward · · Score: 0

      It isn't. The international view is that USA is effectively closed for business. See you all when you get a serious president.

    5. Re: Well... by Anonymous Coward · · Score: 0

      Maybe they've been given a heads up that someone has figured out how to game the H1b process to sneak in terrorists, and are simply verifying this guy's legit.
      Or maybe we're all being paranoid and it's ridiculous to think anyone wishes Americans harm, and might lie on their visa application to get the chance.
      This guy got delayed at customs, which sucks for him, but delays can happen when entering any country.

    6. Re:Well... by Anonymous Coward · · Score: 0

      but no mention of Islam or muslims at all.

      Ahh, the textualist hand-wave. Don't look at what we said, only look at what we wrote down.
      Trump called it a Muslim ban.
      Guiliani called it a Muslim ban.
      The goal was to create a Muslim ban that didn't look like one on the surface. It was still a Muslim ban.

      (PS - did you see the part of how they are going to delay Muslim Ban 2.0 for publicity reasons?)

    7. Re:Well... by jittles · · Score: 1

      I've had border guards not be sure if I was really me when I was driving a rental car across the border. Drug traffickers will sometimes use rental cars and my driver ID happened not to match the location where I had rented the car. I'm not offended by the fact that they double-checked it was me. With this guy, they verified his story with his employer and asked him a question or two. Sure, it wasn't perfect, but there are much bigger things to worry about. And we don't know the circumstances from CBP's POV. (Did he match a pattern of people claiming to be software engineers from nigeria who turned out to be here for criminal purposes, for example? I don't know, and neither does he.)

      Clearly, however, he should have been treated respectfully and with an "I apologize for the delay but we needed to verify your identity. I hope you have a wonderful time." They need to maintain authority, but it's also important to keep the country welcoming.

      I get stopped at the US Border every time I am asked to present meaningful identification (as in if I present a passport, I get scrutinized, if I am somewhere that a drivers license or birth certificate is sufficient, I am allowed to enter unhindered). The CBP has never indicated why I get stopped. I am sorted into a separate line and have to wait two to three times longer to be see the agent than others on the same vessel as myself. I'm a US citizen. Not once has CBP ever explained to me why this happens. They never apologize for the time they've wasted, and I have to intentionally add hours of layover on connecting flights to avoid missing a connection. This has been going on for over 10 years with no explanation. It did not start immediately after Sept 11th, but sometime in ~2005. I've only made trips to Western Europe since the early 2000's. I have no idea what the deal is, but it's incredibly frustrating.

    8. Re:Well... by jittles · · Score: 1

      First, the executive order suspending immigration did not do so based on religion, only on citizenship in seven specific countries. There was an exemption for refugees from religious persecution, but no mention of Islam or muslims at all.

      While you are correct that the order mentions no religion whatsoever, it has a clause in it that specifically allows people of minority religions in those regions to not only continue to enter the country, but to also get expedited waivers for asylum seekers claiming religious persecution. You do know what the minority religion is in those countries, correct? Christianity. And the majority religion? Islam. So the order DOES specifically bar Muslims as opposed to Christians from those countries.

      "And [sic] admission" of what? And they haven't YET appealed it, but that does not mean it will never be appealed. In fact, the article you linked to explained why it might not be appealed immediately. Did you read it?

      The administration has created a new executive order that was less obvious in its religious discrimination. I would say that is a de facto admission that there were flaws with the previous order. The fact that they did not appeal it was to avoid setting a supreme court precedent that could have potentially made it impossible for them to issue any executive order on the matter.

    9. Re:Well... by Anonymous Coward · · Score: 0

      ....
      Clearly, however, he should have been treated respectfully and with an "I apologize for the delay but we needed to verify your identity. I hope you have a wonderful time." They need to maintain authority, but it's also important to keep the country welcoming.

      "We are the United States Government! We don't do that sort of thing."

    10. Re:Well... by Anonymous Coward · · Score: 0

      Your example seems sensible, but I'm not sure the border guards are. I was a bit annoyed and surprised when they detained and interrogated the former Prime Minister of my country (Norway). It even says so in his diplomatic passport. He's a Lutheran minister and works for a human rights organization. Furthermore, he was on his way to the National Prayer Breakfast, hosted by members of the United States Congress and the President! He sure sounds like a threat.

    11. Re:Well... by Obfuscant · · Score: 1

      While you are correct that the order mentions no religion whatsoever, it has a clause in it that specifically allows people of minority religions in those regions to not only continue to enter the country, but to also get expedited waivers for asylum seekers claiming religious persecution.

      They don't get to "continue to enter the country", they have to meet the religious persecution test before being granted sanctuary. The rules are tougher for everyone from those seven countries, not just one specific religion like many people claim.

      And why is there a problem that we make special provisions for those suffering from persecution?

      You do know what the minority religion is in those countries, correct? Christianity.

      And Buddhism. And Jews. And Every Other Religion you can name. There was no specificity in that order towards ANY specific religion.

      And the majority religion? Islam. So the order DOES specifically bar Muslims as opposed to Christians from those countries.

      No, it does not. Find the words, then you can claim "specifically."

      Why do you have a problem that religious persecution is an exemption? Do you think that the exemption should seriously apply to people of the majority religion? Kinda hard to say it's being persecuted when it is the majority, huh?

      I would say that is a de facto admission that there were flaws with the previous order.

      No, I'd say it was a de facto admission that getting the job done now is more important than wasting months in court getting the Ninth's typically poor decision overturned.

    12. Re:Well... by jittles · · Score: 1

      They don't get to "continue to enter the country", they have to meet the religious persecution test before being granted sanctuary. The rules are tougher for everyone from those seven countries, not just one specific religion like many people claim.

      It's far easier to apply for, and receive asylum once you enter into the US. Second best chance at gaining asylum is to request it at immigration. So, yes, there is a chance that they can be granted asylum at immigration.

      And why is there a problem that we make special provisions for those suffering from persecution?

      There is no problem with that at all. However, Donald Trump has said several times that he intended to ban Muslim immigration then you can see why such special provisions could be considered a violation of the first amendment of the constitution when they specifically work against the religion that Trump has promised to discriminate against.

      And Buddhism. And Jews. And Every Other Religion you can name. There was no specificity in that order towards ANY specific religion.

      Again you're technically correct but, as we've shown before, Trump has specifically said that he planned to discriminate against a specific religion. Besides, how many Jews, Buddhist, and FSM worshipers do you expect to find in Iran or Syria, for instance? In Iran less than 1% of the population is non-muslim. Syria only shows four religions: Islam, Christianity, Druze (a semi-nomadic group that has been in the region for a long time) and, Judaism (not even giving a percentage, just stating that there are few Jews in the country, and only in Aleppo and Damascus). I highly doubt the Druze are planning to leave Syria. So that basically means this executive order targets two religious groups with respect to Syria. When you look at the other countries, it is the same with over eighty percent of the population being Muslim and the remaining 0-20% basically being Christian.

      No, it does not. Find the words, then you can claim "specifically."

      Why do you have a problem that religious persecution is an exemption? Do you think that the exemption should seriously apply to people of the majority religion? Kinda hard to say it's being persecuted when it is the majority, huh?

      I know that critical thinking is hard, so let me spell this out for you. The only exemption to the order is religious persecution. Therefore, it requires you read between the lines and see that only non-Muslims are prevented from being able to enter the US. That does not mean that people of other religions cannot be denied entry, but it absolutely 100% means that Muslims in those countries cannot enter the US. Period. Therefore the executive order specifically bars Muslims.

      No, I'd say it was a de facto admission that getting the job done now is more important than wasting months in court getting the Ninth's typically poor decision overturned.

      And how long did it take for the 9th circuit to review the case? How long would it have taken for the Supreme Court to address the issue? I mean, he's been president since January 20th. It hasn't even been six weeks yet. The 9th Circuit took the case on February 7th. Trump had been president for exactly 18 days at that point. The restraining order against the federal government was entered on February 3rd. That means that it took four days for the US Justice Department to get an appeal. Exactly what do you think was going to happen while the legal process expedited the review of this order? These people were all granted visas by the State Department. A lot of these people had been traveling home on extend

    13. Re:Well... by Oswald+McWeany · · Score: 1

      I've had border guards not be sure if I was really me when I was driving a rental car across the border. Drug traffickers will sometimes use rental cars and my driver ID happened not to match the location where I had rented the car. I'm not offended by the fact that they double-checked it was me. With this guy, they verified his story with his employer and asked him a question or two. Sure, it wasn't perfect, but there are much bigger things to worry about. And we don't know the circumstances from CBP's POV. (Did he match a pattern of people claiming to be software engineers from nigeria who turned out to be here for criminal purposes, for example? I don't know, and neither does he.)

      Clearly, however, he should have been treated respectfully and with an "I apologize for the delay but we needed to verify your identity. I hope you have a wonderful time." They need to maintain authority, but it's also important to keep the country welcoming.

      I get stopped at the US Border every time I am asked to present meaningful identification (as in if I present a passport, I get scrutinized, if I am somewhere that a drivers license or birth certificate is sufficient, I am allowed to enter unhindered). The CBP has never indicated why I get stopped. I am sorted into a separate line and have to wait two to three times longer to be see the agent than others on the same vessel as myself. I'm a US citizen. Not once has CBP ever explained to me why this happens. They never apologize for the time they've wasted, and I have to intentionally add hours of layover on connecting flights to avoid missing a connection. This has been going on for over 10 years with no explanation. It did not start immediately after Sept 11th, but sometime in ~2005. I've only made trips to Western Europe since the early 2000's. I have no idea what the deal is, but it's incredibly frustrating.

      What colour is your skin?

      --
      "That's the way to do it" - Punch
    14. Re:Well... by jittles · · Score: 1

      What colour is your skin?

      White, usually. I tan well but haven't spent that much time in the sun since college.

    15. Re:Well... by Oswald+McWeany · · Score: 1

      Had to ask... I'm "mostly" white too- but I always get stopped. My fault though is being born overseas and having a foreign-looking name.

      --
      "That's the way to do it" - Punch
    16. Re:Well... by jittles · · Score: 1

      Had to ask... I'm "mostly" white too- but I always get stopped. My fault though is being born overseas and having a foreign-looking name.

      I have the most "basic bitch" whiteboy name in the world. So if they're stopping me due to my name, it's because its so common. I might as well be John Smith. I was also born in the US to a family that has been in the US for about as long as any white man could possibly have been here.

  27. Now that my friends... by rockabilly · · Score: 1

    ...is EXTREME VETTING!!

    1. Re:Now that my friends... by CaptainDork · · Score: 1

      All caps is EXTREME VENTING!

      --
      It little behooves the best of us to comment on the rest of us.
  28. Re:Not in the summary: by Anonymous Coward · · Score: 0

    If you agree with checking up on a person's 'bonifieds' at all then what the hell is wrong with '1 last check'. Having a Visa in hand does not grant you cart blanche to come & go as you please, hell having a passport & being a citizen doesn't grant you that right, at least not without being questioned. If you believe it should than lobby for different laws to be applied at the border but equating 'getting on a fucking plane' to 'allowed to enter the country without any further questions being asked' is not the way the world works...

  29. Problem Solved by Anonymous Coward · · Score: 0

    If someone doesn't know if a binary search tree is true, then therefore they are an evil doer. Just send out a test to every person and thing in America. Those who fail go to a privatized version of GitMo! Due process confirmed by test.

  30. your algorithm is ad-hoc by tombak · · Score: 1

    As an Iranian who lives in Canada I have had my fair share of run-ins with the great computer scientists at the CBP. I remember I was coming to the US from Canada in 2008 to attend a conference in Florida and I was selected for a "random" search. I had the poster for the paper that I was presenting with me and the officer asked me to roll the poster open and explain it to her! She even asked a few semi-intelligent questions about it!

    1. Re:your algorithm is ad-hoc by bobbied · · Score: 1

      You where pretty suspicious if you, being a techie nerd type, could carry on an intelligent conversation with a woman.... I'm surprised you got in fella..

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    2. Re:your algorithm is ad-hoc by Anonymous Coward · · Score: 0

      If you match the profile then why do you have a problem with this? I'd rather do what's necessary to keep us all safe. Organized whack-a-doodles are out there constantly testing for future attacks. Rather be in Iran? l0l

  31. Re:Not in the summary: by ClickOnThis · · Score: 2

    Celestine Omin is an Nigerian national. Nigeria a country currently fighting (with US support) its own homegrown terrorist insurgency in the form of Boko Haram. This is an understandable and completely normal security precaution.

    But not an understandable and completely normal procedure. From the Linkedin article linked from TFA:

    On 3/1, a U.S. Customs and Border Protection spokesperson responded to the 2/27 request for comment. He said the agency "does not administer written tests to verify a traveler’s purpose of travel,” but would not comment on Omin’s case specifically. He added that foreigners trying to enter the country "bear the burden of proof to establish that they are clearly eligible" and "must overcome all grounds of inadmissibility."

    So, Omin was required to satisfy the border agent that he was who he said he was, but not with a written test.

    He had a B1 visa, obtained prior to travel. The visa said he's a software engineer, but doesn't prove he's a software engineer. It would have been prudent of him to carry additional documents, such as a transcript of courses he has taken.

    To avoid SNAFUs like this, it's best to talk to an immigration lawyer before you get on the plane. Border agents are supposed to follow the law and their agency's rules, but unpleasant things can still happen.

    --
    If it weren't for deadlines, nothing would be late.
  32. Ooookayyy by Anonymous Coward · · Score: 0

    The 2nd one is reasonable as a cursory check, but checking if a binary tree is balanced!?! That's an interview question ("are you a *good* programmer?"), not one for fleshing out if you are a programmer. I don't even know of many devs I've worked with recently who would be able to answer that (even wrong), since it doesn't involve piecing frameworks together into a web app.

  33. Communist! by Anonymous Coward · · Score: 0

    I thought we fought the Cold War so we could have a country where we didn't have to do this. You people are ruining the USA and you deserve every condemnation and curse possible.

  34. Re: Not in the summary: by Anonymous Coward · · Score: 0

    And Celestine is a muslim first name, right.

  35. I am a Ob/Gyn from Iran by Anonymous Coward · · Score: 0

    Will they quiz me on my knowledge? They might have to provide a visual aide though.

  36. Satisfactory answers so far, but by Anonymous Coward · · Score: 0

    WHAT is your favorite color?

  37. Nothing new by OzPeter · · Score: 4, Informative

    French historian detained for 10 hours
    http://www.cnn.com/2017/02/28/...

    Australian Children's author detained
    http://www.smh.com.au/entertai...

    --
    I am Slashdot. Are you Slashdot as well?
    1. Re:Nothing new by Anonymous Coward · · Score: 2, Informative

      French historian detained for 10 hours
      http://www.cnn.com/2017/02/28/...

      Australian Children's author detained
      http://www.smh.com.au/entertai...

      Both of those stories are from this week. I think that qualifies them as "new".

    2. Re:Nothing new by Anonymous Coward · · Score: 0

      The childrens book author Mem has a convicted pedophile husband that she supports.

      I'd shake that bitch down too......

    3. Re:Nothing new by Howitzer86 · · Score: 1

      If you can do it for that reason - and you're apparently not worried about breaking the law with your misguided sense of vigilantism - you can go after the husband directly. Right now.

      Unless you're a coward.

    4. Re:Nothing new by hawk · · Score: 1

      >French historian detained for 10 hours

      But that quiz is *way* to easy.

      Simply answer every historical question with, "France surrendered".

      Should easily get a 70% or higher . . . :)

      hawk

  38. Fuck, ship me tp Qatar ... by CaptainDork · · Score: 1

    ...

    "Write a function to check if a Binary Search Tree is balanced," and "What is an abstract class, and why do you need it."

    I got nothin'.

    --
    It little behooves the best of us to comment on the rest of us.
  39. Re:Fake News - Part Doh, dough, or d'eau. by Anonymous Coward · · Score: 0

    deux is French for two. I don't know what "deaux" is (although maybe google translate does.)

  40. Re:Not in the summary: by Anonymous Coward · · Score: 0

    bonifieds? srsly? It's Bona Fides. (That's Latin for Good Faith.) Sheesh, what is this world coming to.

  41. Re:Not in the summary: by CaptainDork · · Score: 3

    This.

    The 911 airplanes were hijacked by, among others, ______. (hint: pilots)

    --
    It little behooves the best of us to comment on the rest of us.
  42. similar story by Anonymous Coward · · Score: 0

    Similar story with this Australian python programmer: http://www.news.com.au/travel/travel-advice/travellers-stories/aussies-weird-immigration-interview-in-the-us/news-story/8222c65d2f12e6691ef27c9b1753e821

  43. Almost nobody needs know how to balance a B-Tree by jtara · · Score: 5, Insightful

    Almost nobody today has a need to know how to balance a B-Tree. Unless they happen to work on the innards of a database system, library, etc.

    Sure, I learned this 35 years ago, and sure we had to do it for some class. I suppose Computer Science students still have to do it today. I've even done it in practice, but it was a LONG time ago. I would have to look it up, as would most software engineers.

    In fact, any software engineer that would write something like this off the top of their head is engaging in bad practice. That would be my answer!

    As a practical matter today, if you really needed to do it, you would search for best algorithms. And then question whoever asked you to do this, as B-Trees are pretty old and lame at this point There are better data structures to accomplish the goal.

    What next? Ask somebody to write a compiler? "Sure, get me the Dragon Book..." (But, as well, that is surely obsolete today, as well.)

    The border agent either Googled for some questions to ask a software engineer, or failed a Google interview exam. Which - I've read, Google doesn't do any more, and for good reasons.

  44. Re:Not in the summary: by bobbied · · Score: 1

    That's something that should be checked before issuing a Visa, not after they're already on the fucking plane here.

    How? Sure you can check all you want before they are granted a visa, but how do you know that #1 The person that answers all the questions is who they say they are. And 2. The person who just got off the aircraft and is standing at the immigration counter is the person who answered the questions in the first place?

    --
    "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
  45. Maybe he took a wrong turn ... by fahrbot-bot · · Score: 1

    Omin was instructed to answer the following questions: "Write a function to check if a Binary Search Tree is balanced," ...

    ... and accidentally walked into a Google interview. Was there a whiteboard in the room?

    [ I'll add, seriously, that I couldn't write that function on the fly after a 20+ hour flight. ]

    --
    It must have been something you assimilated. . . .
  46. Uhhhh... by puddingebola · · Score: 1

    I think I remember the quadratic formula, does that count?

  47. Re:Not in the summary: by demonlapin · · Score: 1

    My wife and I are American citizens. Nonetheless, we get a set of basic questions from the immigration officer that are obviously designed to make sure that the person to whom the American passport (or, in this case, visa) was issued is, in fact, the person standing in front of them. I'd be pissed about the wait, but it's an entirely legitimate function. They aren't usually this detailed, but we're American citizens, not foreigners from a country that isn't part of the visa waiver program.

    It's usually pretty perfunctory by air - I'm sure they can see we had round-trip tickets, and that I probably wouldn't leave my traveling companion abroad - but we did get a little more than usual when we came back in from Canada by ground. Even then, though, it was: where do you live? Where are you headed today? Where do you work? Bring anything back with you? Then another set of questions for my wife, again designed to establish that she spoke colloquial American English and had a coherent story. He took a glance at the contents of the trunk and waved us on.

    Now, when you pull up to these, there are at least four or five cameras in the lane. I'm near-certain that the guy had a Google Street Maps picture of my house pulled up on the monitors in his booth. He was just checking to see that we had stories that made sense.

  48. I'd be like, by TheOuterLinux · · Score: 1

    "find . -type f -iname 'fuck you'" and then hand in the test. "And if you'd you need more answers please see consult /dev/null. If not satisfactory, have fun in /var/log universe because I'm going back ~. Bash bitches!"...Throw in some Tux gang signs. "Teeeee Unit!" And just stare at the blank faces in satisfaction because you know the guys giving the test have no clue what any of it means and that's as good as it will get.

  49. Border agents are stupid by Anonymous Coward · · Score: 0

    Customs once harassed me at SFO on my return flight (I'm a citizen.) They kept asking the same stupid questions. About the fourth time, they realized I was giving them the same stupid answers, verbatim, word for word. This irritated them. They threatened me with felony arrest and a few other random nonsense things. I waited. They let me in. From felony arrest to do whatever the fuck I want in 20 minutes. Not to mention they let me take a fucking iPod through international customs without even seeing it. ( i forgot it was in my pocket.) This was in 2006. The Germans didn't have any trouble finding it. LOL. American security is a joke.

  50. Re:Not in the summary: by mi · · Score: 1

    That's something that should be checked before issuing a Visa, not after they're already on the fucking plane here.

    That's true, but a passport with the visa could've been taken away from the rightful owner. Border guards remain the last line — and have always been empowered to revoke any earlier-granted permissions/visas.

    I was once grilled about the shopping malls around my house (or where I allegedly) live — and I am a US citizen... Of course, buying most things online, I was not well familiar with the malls. I guess, my facial expressions and body-language convinced the guy, I was not lying...

    --
    In Soviet Washington the swamp drains you.
  51. if (NULL == story) return 'He took the 5th'; by Anonymous Coward · · Score: 0

    Or maybe immigration would just throw an exceptional fit...

  52. Bet He Failed Earlier Questions by painandgreed · · Score: 1

    Border guards, and not just American ones, always ask questions to see if you can answer them and then grill you harder if you don't answer them convincingly. Even as a tourist, I've been asked what I plan to see or do in a country, or what was my favorite thing I did by such and if I didn't have an answer quickly coming, I'd get the third degree. Since then, I've always had some answers prepped or just whenever they give me a question I can go on about endlessly, I do because after the specifics of who you are, where you are going and for how long, they're just asking you a general personal question to see if you break under questioning. After 24 hours on a plane without any sleep, he was probably asked what he did and mumbled some answer. When they asked him a more detailed one he probably was fairly vague in his description. Eventually red flags get raised and he's past the threshold of getting through with even more questions. I bet if he'd earlier just started talking about something he knew alot about in a technical manner till they told him to shut up, that would have been the end of it and he could have gone on his way.

  53. Aren't most terrorists engineers anyway? by IllSeabass · · Score: 1

    Just sayin'

  54. Never put "gay prostitute" on your short term visa by Anonymous Coward · · Score: 0

    The things you have to remember when travelling abroad.

  55. Re:Almost nobody needs know how to balance a B-Tre by Anonymous Coward · · Score: 0

    Which - I've read, Google doesn't do any more

    Oh, they do. Only a month or two ago, I was contacted by a Google recruiter and given a list of study materials. I was explicitly told to expect stuff like that in the interview. I was also told that there was no rush for scheduling the interview, as candidates typically take months to prepare.

    I told them I wasn't interested.

  56. Re:Not in the summary: by Anonymous Coward · · Score: 0

    You just have to spend thousands of dollars on legal advice before traveling. That's the new normal in the war on tourism.

  57. Re:Not in the summary: by Anonymous Coward · · Score: 0

    > The visa said he's a software engineer, but doesn't prove he's a software engineer.

    This does not matter. All the government should be concerned with is - all other things being equal, would you let this guy in. If the answer is yes, then it is not the government's job - not the State Department, not Customs & Border Protection, not any other agency - to vet domain-specific competence. That's the employer's job, since they're the ones who have to initiate the process of securing a B-1 visa for the employee to begin with.

  58. Re:Not in the summary: by ClickOnThis · · Score: 1

    In this case, the B1-holder's sponsor (Andela) should have hired the lawyer to advise Omin and other foreign candidates what documents to bring.

    Even with valid documents, someone can still be refused entry to the USA. It is not supposed to happen, but it does. Prior consultation with a lawyer can reduce the chance of this happening, but not eliminate it.

    --
    If it weren't for deadlines, nothing would be late.
  59. False positives. by Ungrounded+Lightning · · Score: 1

    Surely it would have been easier to check if he was an engineer by forcing him to try to talk to a girl?

    Thnks to the extreme sexual segregation of islamic cultures, most Jihadis would score as "engineer" on that test.

    --
    Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
    1. Re:False positives. by Bob+the+Super+Hamste · · Score: 1

      No, they would likely score as mathematicians instead. An engineer would talk to a girl but would stare at their chest and ramble on about something. A mathematician would just turn red and stare that their own shoes, or if extra sociable stare at the girls shoes.

      --
      Time to offend someone
    2. Re:False positives. by Ungrounded+Lightning · · Score: 1

      No, they would likely score as mathematicians instead. .... turn red and stare that their own shoes, or if extra sociable stare at the girls shoes.

      A close friend became a convert and studied at a madrasa (Islamic religious school). Her experience, and her description of that of the other "sisters", was that the behavior of zealots ran more toward what we'd consider "abusive or perverted a**holery" than tongue-tied embarrassment

      Something along the lines of "using one's personality as birth control".

      --
      Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
  60. It's a .h with no .c (an interface) by raymorris · · Score: 3, Informative

    Just for fun, it's basically a header file, with the implementation left to the user. You can't run the code as recieved, because there is no implementation.

    That's actually basically the definition of an abstract function (method). The presence of an abstract function makes the entire group of functions amd the struct which points to them non-instanceable. You can't create an instance of a struct which contains a pointer to a function you've not yet implemented.

    Writing objects in C is fun (once).

    1. Re:It's a .h with no .c (an interface) by jimtheowl · · Score: 1

      Still for fun, a class implementation in C would be a group of functions prototypes with the associated structure definition. I know you know this, but the existence of the code in a header is strictly a convention, and for the convenience of being able to include the declarations across .c files.

      I believe you would implement something equivalent to an abstract class by having some of the functions declared as returning a void pointer ie: "void *foo()" so that you can implement that function for the required return type and cast it accordingly upon return.

    2. Re:It's a .h with no .c (an interface) by jandersen · · Score: 1

      You can't create an instance of a struct which contains a pointer to a function you've not yet implemented.

      With the caveat that I haven't done C for a long time, I think you'll find that you can in fact to that in C; all you need is to specify the pointer type, which you can do without implementing the function. I believe that is one of the motivations for introducing pure virtual methods in C++: they make it a compiler error to try to instantiate the class. As for why you might want to specify a (pointer to) an unimplemented functio in C - this would be one way to implement eg. a module that uses a callback function.

    3. Re:It's a .h with no .c (an interface) by Anonymous Coward · · Score: 0

      i do not think that the words mean what you think they do.
      see https://en.wikipedia.org/wiki/Abstract_type before you try to get through immigration.

  61. engineers by kqc7011 · · Score: 1

    Good thing he was not a Mechanical Engineer because they "build weapons".

    --
    Passionately Indifferent
    1. Re:engineers by cdrudge · · Score: 1

      But software engineers can build "cyber weapons".

  62. "I code in Visual Basic!" by Anonymous Coward · · Score: 0

    "You're no engineer! Enjoy your waterboarding, Ahmed."

  63. "As a Customs and Border Patrol Officer... by magusxxx · · Score: 1

    ...I find this line of enquiry perfectly acceptable. I need to verify you are actually a hooker."

    --
    Care killed the cat, but satisfaction brought it back.
  64. Fails Entry Test by fyngyrz · · Score: 1

    shear boredom

    It's "sheer", not "shear." Back on the aircraft with you. We don' t like your kind.

    --
    I've fallen off your lawn, and I can't get up.
  65. Re:Not in the summary: by Obfuscant · · Score: 1

    The 911 airplanes were hijacked by, among others, ______. (hint: pilots)

    IIRC, a few of the 911 hijackers had taken flight instruction for a PPSEL (private pilot single-engine land) rating but not obtained their license. Technically that makes them student pilots. They weren't ATP (airline transport pilots) as your statement would imply.

    Notice that this "pilot" status resulted in changes to security involving even $100 hot dog flyers.

  66. Broken procedure by Anonymous Coward · · Score: 0

    a 'software engineer' can be a lot of different things.
    To figure out if you have one, you need an adaptable interview which goes where the subject has knowlwdge.

    Otherwise, it's a lottery which may of may not ask a question which happens to intersect with something the person can answer.
    Lots of opportunity for false positives and negatives.

    Implementing this requires knowledgeable folks which appears a problem for the implementers.
    On the other hand, this test makes really great theater.

  67. Re:Almost nobody needs know how to balance a B-Tre by jtara · · Score: 1

    BTW, it's unclear what was actually asked.

    Omin's tweet states he was asked to balance a binary tree. But the story states that he was asked to write a function to check to see if a binary tree is balanced. The latter is part of the solution to the former.

  68. Obligatory xkcd by Anonymous Coward · · Score: 0

    https://xkcd.com/37/

  69. Not abstract class, it was absolute ass. by 140Mandak262Jamuna · · Score: 1

    The question was not about abstract class. It was "What is an absolute ass, and where do you find it?". The answer is the US immigration officer, and you find the best ones in NY JFK airport.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  70. What are the real consequences by info6568 · · Score: 1

    I could come with some answer after thinking for a while, but very probably will have some mistakes (after 24 hours flying). So, the best option could be to invent some language and to code that using your own rules based on theoretical libraries (who could argue that this is not a right answer?).

    But the real problem here is that the US is imposing so many incoherent restrictions that soon or later it will stop being the main planet plane hub, hurting the own US economy and forcing to find a more open place welcoming people from other countries to share ideas and to contribute to the improvement of modern society.

    If the US government is not welcoming visitors, then won't have them. Is this the right way to improve internal economy?

  71. Nope by hackwrench · · Score: 1

    Not considering Programmers Are Confessing Their Coding Sins To Protest a Broken Job Interview Process https://developers.slashdot.or...

  72. Write a function by PPH · · Score: 1

    So, write it in Brainfuck.

    --
    Have gnu, will travel.
  73. s/w going to fun trivia by Anonymous Coward · · Score: 0

    Balance functions are scattered all over the net.

    Real s/w question should be, "why do you want to check whether a tree is balanced or not?" "What's the usefulness?"

    Thanks to opensource, s/w has become a team sport. Not a one-on-one thing.

  74. Re:Almost nobody needs know how to balance a B-Tre by swillden · · Score: 1

    Google doesn't do any more, and for good reasons.

    FWIW, Google interviewers wouldn't (or at least shouldn't) ask "Write a function to determine if a binary tree is balanced" because it's too easy, and it's memorizable. Google interviewers ask questions which (ideally) you have never seen or thought about before and which require you to create a solution on the spot. The goal isn't to test your memory, it's to test your ability to think. Google questions also tend to be deliberately underspecified, to see how you go about gathering the necessary information, and to have various possible approaches, to give you a chance to discuss the tradeoffs involved.

    However, the questions do tend to involve basic data structures and algorithms. Questions that involve traversing a binary tree wouldn't be unusual, though there'd need to be a lot more to it than just tracking depths.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  75. Nothing new here. Canada has done this for decades by mbeckman · · Score: 1
    This is nothing new. On a trip to Montreal to speak at a conference a few years ago, I was detained by Canadian customs and quizzed about the conference -- from my own copy of the conference brochure that I had brought with me. They got the brochure because I thought it would be helpful to show the brochure with my name listed as a speaker, but that apparently opened a can of worms. (I know better now).

    For all I know they called the conference organizers to verify my story. The questions to me ranged from what would be my topic (IPv6) and whether I would be paid (I wouldn't; it was an academic conference at a local university), to was I marketing my services to Canadian businesses (no). And many other questions in between that today I would have had the presence of mind to record, but not then. This was five or six years ago, long before the current immigration security flush.

  76. Misleading title by Anonymous Coward · · Score: 0

    Software Engineer Detained At JFK, Given Test To Prove He's An Engineer

    Trick questions?
    Software "Engineers" aren't real engineers.... can't prove that they are no matter what.

  77. Re:Almost nobody needs know how to balance a B-Tre by Anonymous Coward · · Score: 0

    You've got better than log2(n)-comparison search? Damn man, you should patent that and make a killing.

  78. What I would have done by JustNiz · · Score: 1

    Just write a whole bunch of hexadecimal numbers and claim it is machine code for a new processor you're helping to develop.

  79. If this keeps up, why import talent? by Streetlight · · Score: 1

    Eventually more US companies will just move their coding expertise overseas and avoid all this trouble. Besides, it'll cost a lot less - no airplane tickets, no lawyers to bail visitors out of homeland security/TSA/customs custody and other expenses. Will this result in more employment of US citizens who are out of work and might be looking? No disrespect of coal miners, bu how qualified are coal miners at understanding binary search trees and abstract classes? It looks like some programmers posting here don't know or don't remember these subjects.

    --
    In a time of universal deceit, telling the truth is a revolutionary act. George Orwell
  80. So WTF are you actually meant to say? by JustNiz · · Score: 1

    Agent> So where would you find an abstract class?
    Geek> What language?
    Agent> Are you trying to sass me son? English! try again....
    Geek> umm.... Wherever you defined it?
    Agent> Thats not what I have here.
    Geek> In RAM?
    Agent> Final chance
    Geek> Ummm...your question is meaningless....
    Agent> The correct answer is: page 267 of "The C++ Programming Language" by Bjarne Stroustrup . Off to Gitmo with you!
    Geek> aargh!

    1. Re:So WTF are you actually meant to say? by Bob+the+Super+Hamste · · Score: 1

      Agent> The correct answer is: page 267 of "The C++ Programming Language" by Bjarne Stroustrup .

      Lies. In my version of the book (first reprinting with corrections July 1987 copyright 1986) that would be found in chapter 7 which starts on page 191.

      --
      Time to offend someone
    2. Re:So WTF are you actually meant to say? by JustNiz · · Score: 1

      Ah he was talking about the original first draft of the book, because it was also a singleton.

    3. Re:So WTF are you actually meant to say? by hawk · · Score: 1

      >Agent> So where would you find an abstract class?

      Me: Much like elephants, they are rarely lost! :)

      hawk

  81. Most engineers I know by Anonymous Coward · · Score: 0

    The first question most engineers I know would ask is what language? The second they'd ask is why are you putting me in handcuffs?

  82. Re:Not in the summary: by CaptainDork · · Score: 1

    "Technically," they flew the goddam planes.

    People who fly goddam planes are, "technically," called ____. (hint: goddam pilots)

    --
    It little behooves the best of us to comment on the rest of us.
  83. It's been a long time since I did that... by Anonymous Coward · · Score: 0

    ... but if I was asked to do it, I'd write it in a 6502 instruction set, just to piss them off.

  84. Here's how to write the code by Anonymous Coward · · Score: 0

    void balanceTree()
    {static int level = 4;
      switch(level--) { case 1: putchar(0x44); break; case 2: putchar(0x41); break; case 3: putchar(0x4f); break; case 4: putchar(0x46); break; default: return; }
      balanceTree();
    }

  85. Re:Not in the summary: by l0ungeb0y · · Score: 1

    FUCK YOU -- do you know the 1st thing about Boko Haram? Can you actually sit there and state that you have any evidence that shows that Boko Haram has any capability of employing any sort of tactics above brute force warlord style tactics on their immediate locality? Is there any evidence of Boko Haram having any sort of International Network or capability to strike the US? I would liken Boko Haram to be on par with street gangs here in the US Would you cry foul if other nations started detaining random Americans because the US was home to such "terrorist" organizations as the Crips and Bloods, Skinheads and Mexican Mafia? Because each those organizations are more sophisticated, organized and better armed than Boko Haram

  86. Is it April 1st already? by jsm300 · · Score: 1

    The comment says it all. Please tell me I missed a month.

  87. Re:Not in the summary: by Obfuscant · · Score: 1

    "Technically," they flew the goddam planes.

    Oh, I don't know about that. They manipulated the controls of an aircraft that was already in the air, some of the least complicated things a real pilot does. I've allowed many of my passengers to do the same thing, and none of them has had the nerve to claim they were a pilot based on that limited experience. CFIs do the same thing, and they would be insane to pull onto the taxiway after the first landing with a new student so they could hop out and let the new "pilot" make the next take-off by himself.

    Why the hostility?

    People who fly goddam planes are, "technically," called ____. (hint: goddam pilots)

    You claimed they were hijacked by (hint) "pilots". They weren't flying the planes before they hijacked them, so they weren't pilots yet. And if your only criterion for calling someone a pilot is that they've manipulated the controls of an aircraft at some point in their life, your definition is amazingly useless in any serious conversation.

    In the context of "occupations that merit increased interest in immigration interviews" that the AC you "this"d brought up, the fact that some of them touched the yoke in the airplane they hijacked is irrelevant. They weren't pilots in any useful definition of the word, as demonstrated by the ones who wound up in PA instead of NY or DC, and their new occupation as "pilots" has no bearing on any immigration processing they went through before they touched any aircraft controls.

  88. Lojik by Tablizer · · Score: 1

    Without any further explanation, the official apparently said, "Look, I am going to let you go, but you don't look convincing to me."

    They give specific test questions to see if he's a techie, but in the end use a very subjective "don't look convincing".

    Why fucking bother with the test if you are just going to guess out of your ass? Unless, maybe it was a stress test to see if he breaks. Cops sometimes use lie-detectors not to see actual lies, but as a shot in the dark to see if the stress alone induces confessions.

    By the way, how about a more practical test question, like "Fix the Unicode problem on Slashdot."â(TM) If he solves it, give him citizenship.

  89. Detroit to Osaka is 20h by Anonymous Coward · · Score: 0

    WRONG!! I've taken THIS flight multiple times. 20hr in flight, but it usually ends up being about 24-26hrs with taxi time and whatever the fuck jerking off they do up in the COCK pit.

  90. Good by Anonymous Coward · · Score: 0

    Few things are funnier than harassing a nerd. Must have felt like high school all over again. :)

  91. Economic war by seoras · · Score: 2

    Remembering that the cold war was won by bankrupting the CCCP it makes me wonder if, assuming the rumours are true about Trump's strings being pulled by Putin, that their game plan is to destroy the American economy or weaken it.
    Everything I've read about what Trumps has done, said or plans to do comes with a nasty long term economic cost.
    Any other country would give their new borns to attract the worlds best minds to a "Bay Area", hot pot of technology star ups and world leaders.
    Sure there's going to be plenty of abused H1B's but there's also going to be a heap of well deserved work visas which -smart- people won't be so keen on accepting in this current administration.
    Cutting foreign aid, building walls, things that please those deluded enough to vote him in which will have a long term economic impact on the US and well as weakening it's world influence and power.
    America's strength, which has given it world domination, has been it's economy and that's largely been driven by it's technology.
    Pick a handful of American technological achievements and you'll find a large portion of them were created by immigrants not home born "presidential material".
    Wake up America, your fucking yourself. Badly.

  92. Uhh... is everyone missing... by ckatko · · Score: 1

    >after spending 24 miserable hours on a Qatar Airways flight,

    I.. I don't think that's Trump's fault that your flight sucks ass.

    And hilariously, if the flight was "that bad" then it was far worse and longer than the injustice he faced at the airport.

  93. I love it! Competency tests on reentry! by Anonymous Coward · · Score: 0

    This should get us rid of Trump faster than any impeachment.

    Just ask him a set of questions that the president of the United States has to know the answer to in order to do his job.

  94. So what? by Anonymous Coward · · Score: 0

    So what? So some immigration agent was skeptical of this guy for some reason. We pay them to be skeptical . He did his job and did it in the way he/she was supposed to- he scratched the surface of what might have been a cover story.

    By doing this, he successfully arrived at the truth of the matter.

    Good job. Thank you.

  95. Let me be the first.... by OneSmartFellow · · Score: 1

    ...to call BullShit on this story. Assuming someone hasn't already done so)

    Sorry, it's simply not believable that he would have been given such a test, with such explicit, and actually fairly demanding questions.

    Try again.

    1. Re:Let me be the first.... by Mephistophocles · · Score: 1

      ...to call BullShit on this story. Assuming someone hasn't already done so) Sorry, it's simply not believable that he would have been given such a test, with such explicit, and actually fairly demanding questions. Try again.

      Beat me to it. And then to think that a border/customs agent administered it? And then checked his answers? Come on.

      --
      Deja Moo: The distinct feeling that you've heard this bull before.
  96. Pointless test anyway by Anonymous Coward · · Score: 0

    It's particularly pointless given that any halfway competent terrorist or spy would use a cover story that they had a chance of substantiating. So IF he were a "bad hombre" AND his cover story is that he's a software engineer, there's a pretty decent chance that he's picked that because he has former experience as a software engineer and could pass the test. If he used to be a fashion designer before moving into bad hombreism, he'd probably use a fashion-related job as his cover.
    There are plenty of engineers (and doctors and other skilled types) who went to join ISIS: just proving you're an engineer doesn't prove you're not a bad hombre.

  97. It always was like that by Anonymous Coward · · Score: 0

    I first travelled to US in 1994 and it was made very clear to me beforehand that a visa may not gurantee entry. And that's how it works pretty much everywhere. I'm not sure why, but I guess it's the princimple that decisions to let people in must be based on most up to date information.

  98. The government should be as picky... by mschaffer · · Score: 2

    The US Government should be as picky when they hire political cronies that provide goods and services.

  99. I don't see the problem. by Anonymous Coward · · Score: 0

    Good. I'm glad we're actually trying to verify people are who they say they are and are here for the purpose they say they're here for.
    B-tree balancing, ok maybe not his thing or language so then ask for relevant ones relative to your specific subject area, eventually they'll ask something you can anwser, the point isn't to always get the correct or perfect anwser, the point is to get you talking about the subject area and gauge reaction\response. So you were delayed a few hours entering the country on visa, so what, it happens snowflake.

  100. They struggled and now they're mad at the world by Anonymous Coward · · Score: 0

    This is what happens when you put people who barely were able to finish high school in positions of any power.

  101. Or maintain eye contact for more than 20 sec. by jpellino · · Score: 1

    Or start every sentence with "so", or "clearly". Or be as pedantic about these details as I'm being...

    --
    "Win treats sysadmins better than users. Mac treats users better than sysadmins. Linux treats everyone like sysadmins."
  102. Re:Almost nobody needs know how to balance a B-Tre by Bob+the+Super+Hamste · · Score: 1

    There is an updated Dragon Book. Looks like it was published in 06 and still has a dragon on the cover.

    --
    Time to offend someone
  103. Could return any type. Standard example Animal by raymorris · · Score: 2

    The standard example, the "hello world" of abstract classes I've always seen is Animal. Animal has a MakeNoise method. Subclass Pig says "oink", subclass Cow says "moo" - the same data type. You can't create a generic Animal, you have to subclass to some specific type of Animal.

    So what's the difference between an abstract class and an interface? Animal can implement poop(). An abstract class has *some* abstract methods, an interface has *only* abstract methods.

    1. Re:Could return any type. Standard example Animal by hawk · · Score: 1

      That's downright Platonic . . .

      hawk

    2. Re:Could return any type. Standard example Animal by jimtheowl · · Score: 1

      I want to point out that in your example, you could choose not to use the same type (string) for the different instances of the MakeNoise method.

      Its just a little more work in C than in C++. Its not so much of a stretch to imagine that C++ was created exactly because of this, and its existence as a pre-processor before existing as a compiler demonstrates that pretty much anything you could do in C++ was implementable in C. C++ just made it easier to implement those concepts and formalized the implementation.

      There are probably better examples and a more than a dozen ways to this, but Levine's flex and bison O'REILLY's book (I think the PDF is available legitimately online) example 3-8 shows an implementation of an abstract syntax tree (not the same, but the example holds) where a node of the tree may return an integer or a float. The nodetype indicates how to cast the value when needed and is easily extended to treat anything including strings.

      The structure defining the node is simply:

      struct ast {
      int nodetype;
      struct ast *l;
      struct ast *r;
      };

  104. Which btw is what an "event" is by raymorris · · Score: 1

    > I think you'll find that you can in fact to that in C; ...
    > As for why you might want to specify a (pointer to) an unimplemented functio in C - this would be one way to implement eg. a module that uses a callback function.

    Exactly. A callback function is called an "event" in object oriented programming. It should be declared, but not implemented, by the class (module) that calls it. A method is a function that has to be be implemented by the class that calls it. Therefore on OOP we have to distinguish these two types of functions by calling one a "method" and the other an "event".

  105. Samuel L. Jackson TSA agent by DarthVain · · Score: 1

    Say "HDMI" one more motherfscking time! Say it!

    For some reason that whole image popped into my head...

  106. s/calls it/declares it/ by raymorris · · Score: 1

    Replace the word "calls" with "defines":

    A method is a function that has to be be implemented by the class that declares it. An event should not be implemented by the class that declares it, since it's a callback.

  107. Abstract class by luis_a_espinal · · Score: 1

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

    There are several ways to answer this question, many of them not necessarily compatible with one another, with enough differences to throw people into heated debates. I fail to see the intelligence of asking this question upon entry... unless they were monitoring Omin's behavioral response (to see if he would trip.)

  108. Re:Not in the summary: by thegarbz · · Score: 1

    It's almost like America needs a system for approving travel based on a set of responses to questions. We could even administer this system electronically and work with airline around the world to ensure its completed prior to travel. We could even give it a fancy name like ESTA.

  109. Re:Not in the summary: by CaptainDork · · Score: 1

    Sorry for your loss.

    --
    It little behooves the best of us to comment on the rest of us.
  110. Reverse it by Anonymous Coward · · Score: 0

    Can you imagine the howling that would be going on if this we had to go through the same process to enter Canada? "A plumber eh? If water is travelling at 30 liters per minute through a 4 inch drain pipe, what is the drop at 6 inches from the outlet?"

  111. 24 miserable hours? by Anonymous Coward · · Score: 0

    Qatar Airways is pretty good. I flew to India with them one time and I would hardly say that the entire time was miserable.

  112. Yeah, random questions by rickb928 · · Score: 1

    My first civilian job interview for a real job using my electronics education, I was given a schematic of an op amp application, and asked to calculate the gain. I launched into a discussion of internal gain, input frquencies, what part number, and with that I could proceed. When the interviewer challenged me about that, since 741s were pretty simple, I spouted off a dozen part numbers I knew from the military equipment I was trained on, and that I assumed we were not talking about VHF/UHF applications, but probably audio, which two of the exotics I knew of were commonly used in signal processing. He gave in, I knew enough to know which leads to probe for what I wanted to know.

    Mind you, this was for fixing calculators (no op amps there) and tape recorders (not yet using ICs), but he wanted to protect his employer from obvious rubes. I managed somehow to hold down that bench for 7 years before they folded the service department when calculators were no longer worth 15 minutes of work.

    But two random questions at the border isn't doing much.

    On another phone interview years and years later, after working in the desert sun for 6 hours, I was asked Novell questions for a GroupWise admin slot. I blanked on remembering NWAdmin was the primary tool for managing NetWare domains. Darn, that was a great opportunity. two weeks later I was hired for a temp job at Intel racking new servers, and no one including the full timers knew how to access and manage the EFI preboot. Got me two weeks of interesting work before we got those done and moved on to an unending stream of Proliant slices and obsolete images to be fixed without any real support. No one asked me about EFI during the interview process. No one really knew what the job would be, just that I could describe DHCP and iLO operation...

    Random questions are tough. I feel for Celestine.

    --
    deleting the extra space after periods so i can stay relevant, yeah.
  113. Hey, not fair! by gwolf · · Score: 1

    I am a Mexican, and I don't consider myself prone to confuse data types.

    Also, mindwhip's version makes sense in many, many C-derived languages where every statement is evaluated to a truth value. Of course, setting interesting=true makes this code less useful for multi-story usage. I would use story.mark_as_interesting() or story.interesting=true... But that's just sugar :-]

  114. You might read the first sentence of your link by raymorris · · Score: 1

    Pro tip: when you decide to argue, read a source before citing it. The first sentence on the page you linked to says:

    "an abstract type is a type in a nominative type system that cannot be instantiated directly"

    Which happens to be more or less exactly what I said:

    "That's actually basically the definition of an abstract function (method). The presence of an abstract function makes the entire group of functions and the struct which points to them non-instanceable."

    Let's continue to the second sentence as well. Wiki says:
    "Every instance of an abstract type is an instance of some concrete subtype."

    I said the same, giving an example:
    "The standard example, the 'hello world' of abstract classes I've always seen is Animal. You can't create a generic Animal, you have to subclass to some specific type of Animal."

    Third sentence, Wiki says:
    "An abstract type may provide no implementation, or an incomplete implementation."

    Raymorris said:
    An abstract class has *some* abstract methods. An abstract method doesn't provide an implementation. (In other words, the implementation of the class is missing or incomplete.)

    Would you care to continue to the fourth sentence?

  115. Re:Not in the summary: by TechnoJoe · · Score: 1

    Trump is just making good on his promise -- EXTREME vetting.

  116. Re:Not in the summary: by rochrist · · Score: 1

    It's just sad no one vetted Trump.

  117. Re: Not in the summary: by TechnoJoe · · Score: 1

    I believe 62 million Americans vetted him through a process called voting.

  118. This happened to me in Costa Rica! by schweini · · Score: 1

    I wrote "IT Consultant" on the immigration form when entering Costa Rica. To my surprise, the officer started asking what kind of failure a distinct clcking noise coming from the hard drive is. I was impressed that they seemed to have upped the ante on immigration checks!

    Turns out that his kid's computer was doing the clicking, and he was desperate for some information on what to do. Nice guy!

    Pura Vida.

  119. Re: Not in the summary: by rochrist · · Score: 1

    Almost 65 came to the opposite conclusion. But you go ahead and hang with the people who pee down their legs 24 hours a day.

  120. Re:USA! USA! USA! Weird by Keith+Henson · · Score: 1

    The real question to me is how a customs guy knew enough to make any sense of the answers.

    And if he did, what is he doing working for customs?

    --
    End MGM. Get prospective parents of boys to Google: Men do complain
  121. Re:USA! USA! USA! Weird by Larry+Lightbulb · · Score: 1

    The correct answer was the one that matched the answer he had on his piece of paper.

  122. Fuck him for stealing jobs by Anonymous Coward · · Score: 0

    The only reason us employers want African engineers is to underpay them. There are 1000s of qualified under employed engineers that were born here. SCABS DESERVE EVERYTHING THEY GET. US STUDENTS HAD TO PAY $100,000s of dollars for US COLLEGE, THEY CAN'T COMPLETE ON WAGE PRICE EVEN IF THEY WANTED TO.

  123. My Answer by Anonymous Coward · · Score: 0

    Go fuck yourself.

  124. Highly educated TSA agent by Anonymous Coward · · Score: 0

    He was a database programmer prior to his job getting outsourced and having to get a job with the TSA, so he is now exacting his revenge. His B-Tree balancing skills were legendary, but only in the abstract sense.

  125. American is so awesome!! by Anonymous Coward · · Score: 0

    But seriously, you guys are fucked up.