Slashdot Mirror


Algorithm Glitch Voids Outcome of US Green Card Lottery

jayminer writes "Results for the United States Diversity Visa Lottery for 2012 were declared void due to a programming glitch in the random selection algorithm. At first, the results were published as promised on May, 1st. Then, on May, 6th, the results were withdrawn with the web site claiming to experience 'technical difficulties.' Today (May, 13th), it is declared that the results are invalid due to an algorithm glitch; the computer program has been fixed and the lottery will be re-run. The final results are expected to be published July 15th."

131 comments

  1. Must have let too many smart people in by Anonymous Coward · · Score: 0

    After all, we want the lottery to be "fair" for everyone.

    1. Re:Must have let too many smart people in by Anonymous Coward · · Score: 0

      You do realize that this runs in addition to immigration schemes for talented/brainy people, don't you?

  2. Could be worse by AEton · · Score: 2

    Picking 90% of the winners from the first two days of applicants is not great, yes.

    Give them credit for owning up to their mistakes, at least. It could be worse -- it's widely believed that the 1969 draft lottery was so un-random that people born in later months were dramatically more likely to be picked for an early draft!

    --
    We recently had heard in the office over one of the Yellow Machine that's made by Anthology Solutions.
  3. Offshoring... by Nexzus · · Score: 2

    Wonder if this was offshored to a country that was eligible to be part of this lottery. Could be ironic, paradoxical or just plain funny.

    --
    Karma: Can only be portioned out by the Cosmos.
  4. It's real? by Carewolf · · Score: 4, Funny

    Wait, what! The visa lottery is real?? I thought it was just SPAM. This raises so many questions.

    1. Why?
    2. What is purpose of that? Larry Niven style luck evolution?
    3. And why are you spamming people about it?
    4. Really, why is the US sending out thousands of SPAM emails about it.
    5. And last, but not least: WTF?

    1. Re:It's real? by Anonymous Coward · · Score: 0

      3. And why are you spamming people about it?
      4. Really, why is the US sending out thousands of SPAM emails about it.

      The spam is probably just actual spammers exploiting it to make money...

    2. Re:It's real? by QuasiSteve · · Score: 5, Informative

      Is this where we point you to wikipedia?

      1. Wikipedia
      2. Sorta. More like not wanting to be a total dick. The opposite - selectively accepting visas - is already in place. If you're rich, a great sportsman/woman, a world-class academic, etc. you can pretty much get in anyway. The flipside of that would be to turn everybody else away. Although that sounds rather appealing to some, most people understand the unfairness of such a system. Hence a lottery (or other solutions), which is reasonably fair.
      3. they're not - that's usually scam companies trying to make it look like their services will make it more likely for you to BE A WINNER!!!!. There are legit green card lottery companies that make sure you've got all the forms filled out right and such, for a fee, but those tend not to spam.
      4. See 3.
      5. Not sure what you're questioning there... I guess the answer is "See 1-4"?

    3. Re:It's real? by NimbleSquirrel · · Score: 2

      Yes, there is a lottery.

      But in order to enter, you have to apply and meet certain qualifying criteria.

      Even if you win a lottery place, you don't automatically get a visa.

      Instead you win an invitation to apply for a visa. Even then you can get turned down.
      I'm fairly sure, but if you get turned down the lottery win just disappears: it doesn't mean that someone else then gets a chance.

    4. Re:It's real? by jackbird · · Score: 1

      Because the applicants:slots ratio is >1.

    5. Re:It's real? by FRiC · · Score: 1

      I live in Asia, and before the diversity visa lottery was made into

    6. Re:It's real? by Anonymous Coward · · Score: 0

      You can read wikipedia about it, but people who are spamming you are not US government. There are enterprises that take your money to enter your name into a web form and well, it seems that they are making some money!

    7. Re:It's real? by Anonymous Coward · · Score: 0

      Because the applicants:slots ratio is >1.

      Are you sure that >1 are willing to learn English, though?

    8. Re:It's real? by Anonymous Coward · · Score: 1

      I think Americans just like lotteries. In San Francisco, if you want to convert a building into condos you have to enter a lottery -- which you have almost no chance of winning for the first seven years. The twist is that if you want to convert a building from condos back to a single family home, that's almost impossible. They don't like creating new condos, they don't like getting rid of old condos... but they like the lottery.

    9. Re:It's real? by Hognoxious · · Score: 2

      Even if they did, they'd have to unlearn it again when they arrive in the US.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    10. Re:It's real? by drinkypoo · · Score: 1

      Hence a lottery (or other solutions), which is reasonably fair.

      What's fair about taking anyone but those you want the most? We're not talking about a political asylum lottery. We'll still extradite a motherfucker.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    11. Re:It's real? by Carewolf · · Score: 1

      3. they're not - that's usually scam companies trying to make it look like their services will make it more likely for you to BE A WINNER!!!!. There are legit green card lottery companies that make sure you've got all the forms filled out right and such, for a fee, but those tend not to spam.
      4. See 3.

      So, why are the emails not charging any money and the only links on them direct links to official forms and the official guide to filling out the form on dot-gov addresses?

      They do look like something a 3rd party scamer would send, but I haven't never figured out the what the scam would be, since the emails are send from dot-gov addresses and only links to dot-gov addresses. And yes the links are not fake, I've checked the source, it is non-suspect links to dot-gov addresses.

    12. Re:It's real? by RDW · · Score: 1

      ...unless you're the Academy of Art University, in which case you just go ahead and convert the bulding into whatever you like:

      http://sf.curbed.com/tags/academy-of-art-university

    13. Re:It's real? by AlterEager · · Score: 1

      Hence a lottery (or other solutions), which is reasonably fair.

      What's fair about taking anyone but those you want the most? We're not talking about a political asylum lottery. We'll still extradite a motherfucker.

      The problem is that the people selected by the non-lottery process are maybe the people who uou want the most, but they're not necessarily the people you need the most.

  5. Is it so hard... by jd · · Score: 1

    ....to use /dev/urandom rather than the built-in rand() function?

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Is it so hard... by HaeMaker · · Score: 2

      Probably not the problem... I imagine there are further requirements regarding percentages of people from certain countries, gender requirements, etc. I would guess it was the weighting that was at fault, not the randomness.

    2. Re:Is it so hard... by DarwinSurvivor · · Score: 1

      actually, you should use /dev/random. when the entropy runs out (or gets too low), /dev/random will wait for it to go back up, /dev/urandom will REUSE it, seriously impacting the "randomness" of your results. urandom is fine for game data, graphics, etc but to NOT use it for anything important.

    3. Re:Is it so hard... by Cyberax · · Score: 1

      Actually, /dev/urandom uses cryptographically secure random number generator. If you've used a reliable /dev/random seed then /dev/urandom is secure for all practical purposes.

    4. Re:Is it so hard... by Anonymous Coward · · Score: 0

      If you can predict the output of /dev/urandom, I suggest you contact the NSA and name your price. Hell, it would be impressive if you can even distinguish it from truly random data. Because that is something that professional cryptographers and top mathematicians have collectively spent years trying to do. With no success at all.

      Protip: please, don't offer security advice on the internet when you clearly don't know the first fucking thing about cryptography.

    5. Re:Is it so hard... by Anonymous Coward · · Score: 0

      I would expect the government to use something like this for something as important as this green card lottery. At around $2k, it seems worth it to avoid relying on system entropy to seed the random number generator. As impressive as pseudo-random generators are, seeding them introduces an attack vector that physical random number generators avoid.

    6. Re:Is it so hard... by jd · · Score: 1

      Ah, well, to weight correctly, you would create a pool for every possible combination and select randomly the correct number from each pool. At first I took it that they tried to do exactly that but it wouldn't take a month to generate a valid sample with such a method. Which means that they're randomly selecting from everyone and then seeing if the sample meets the criteria. I can think of no other way it can take so long.

      Which means the problem exists between keyboard and IDE.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    7. Re:Is it so hard... by jd · · Score: 1

      Your first mistake is to combine "government" and "logic" in the same thought. Your second mistake is to confuse spending rationally versus the normal procurement method which is to spend the least.

      Other than that, you're entirely correct.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    8. Re:Is it so hard... by Gorobei · · Score: 1

      Even with a random source, you still need to write a fair "choose M of N" algorithm. Most people cannot do this.

    9. Re:Is it so hard... by darkonc · · Score: 1

      It's pretty hard to do if you're a WIndows programmer... Not everybody uses a Unix-based computer.

      --
      Sometimes boldness is in fashion. Sometimes only the brave will be bold.
    10. Re:Is it so hard... by arth1 · · Score: 1

      When the entropy pool is zero, it's not hard to predict urandom.

      And unpredictable isn't the same as random anyhow. I've seen rng test implementations that were quite unpredictable, but suffered from other flaws like favourite numbers, or the calculation time being proportional to the random number, or certain numbers being impossible to generate.

    11. Re:Is it so hard... by jd · · Score: 1

      That's so incredibly sad. It should be a requirement that people writing such algorithms read and understand such books as "The Unfinished Game".

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    12. Re:Is it so hard... by DarwinSurvivor · · Score: 1

      1) Yes, the same as /dev/random, the difference is that once it runs OUT of "cryptographically secure random numbers", it starts to REUSE the seed values. NOT GOOD.
      2) Even if you can't predict which numbers are coming out, it will most likely make guesses more accurate.
      3) "cryptographically secure" means NOTHING unless you can state the type (with parameters) of the cryptography. rot13 is technically "cryptography", albeit a weak one.

    13. Re:Is it so hard... by Cyberax · · Score: 1

      1) NO!!!! IT DOES NOT! It uses a PRNG to generate more 'pseudoentropy', mixing in new entropy if it's available.
      2) No, you can't. That's a property of cryptographically secure PRNGs.
      3) It means exactly what it means. RTFM: http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator

    14. Re:Is it so hard... by DarwinSurvivor · · Score: 1

      A counterpart to /dev/random is /dev/urandom ("unlocked"/non-blocking random source[4]) which reuses the internal pool to produce more pseudo-random bits. This means that the call will not block, but the output may contain less entropy than the corresponding read from /dev/random. While it is still intended as a pseudorandom number generator suitable for most cryptographic purposes, it is not recommended for the generation of long-term cryptographic keys.

      Source: http://en.wikipedia.org/wiki//dev/random#Linux

      A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entropy in the entropy pool, the returned values are theoretically vulnerable to a cryptographic attack on the algorithms used by the driver. Knowledge of how to do this is not available in the current unclassified literature, but it is theoretically possible that such an attack may exist. If this is a concern in your application, use /dev/random instead.

      source: http://www.kernel.org/doc/man-pages/online/pages/man4/random.4.html

    15. Re:Is it so hard... by Cyberax · · Score: 2

      Note the word 'theoretically'. It's used in the same sense as in: "theoretically RSA encryption might be vulnerable if someone solves the problem of fast factorization".

      In practice, there are no serious attacks on PRNG used in Linux.

    16. Re:Is it so hard... by DarwinSurvivor · · Score: 1

      Yeah, I guess it all depends on how "secure" you consider to be secure.

    17. Re:Is it so hard... by Cyberax · · Score: 1

      Let's say that if Linux's PRNG is broken then you'd have other problems, much much much worse.

      Currently it relies on hashed counters, with mixed-in real entropy.

  6. Immoral in principle by Anonymous Coward · · Score: 0

    The idea of a lottery for immigration is immoral. They should instead set some standards -- for example, you have to be educated, no pending criminal past -- and approve EVERYONE that applies and meets such standards. No lottery bullshit.

    1. Re:Immoral in principle by Ultra64 · · Score: 1

      Um, a pending past?

    2. Re:Immoral in principle by WrongSizeGlass · · Score: 1

      Um, a pending past?

      It means you have to leave the QED box unchecked on the lottery form.

    3. Re:Immoral in principle by rhook · · Score: 1

      I believe that would be pending charges or an active investigation.

    4. Re:Immoral in principle by Anonymous Coward · · Score: 0

      Yep, you need intelligent, noncriminal, college.degree holding, elite sportsmen to flip burgers at Denny's.

      It's a fucking lottery, it's entirely possible that the very first 10000 applications are selected by pure, random chance.

    5. Re:Immoral in principle by SuricouRaven · · Score: 1

      The lottery doesn't get people a green card. It gives them the chance to apply for one, an application that may or may not be granted. It's basically just there as a publicity thing, to try to make the US look less judgemental than it really is.

    6. Re:Immoral in principle by Noughmad · · Score: 1

      Um, a pending past?

      It means you have to leave the QED box unchecked on the lottery form.

      But if I prove I'm innocent, can I still check the QED box? Or does my last name have to be Feynman for that?

      --
      PlusFive Slashdot reader for Android. Can post comments.
    7. Re:Immoral in principle by WrongSizeGlass · · Score: 1

      But if I prove I'm innocent, can I still check the QED box? Or does my last name have to be Feynman for that?

      I'm so sorry, but Mr Feynman was a natural born citizen and did not have to submit to this type of lottery. I'm sure if he'd had to at least one of his book would have been devoted to this subject and its inherent complexities.

    8. Re:Immoral in principle by Noughmad · · Score: 1
      --
      PlusFive Slashdot reader for Android. Can post comments.
  7. Well technically... by vga_init · · Score: 1

    Technically, the results were indeed random. If you get results based on a bug or glitch in your algorithm, those are obviously the results you weren't expecting. Unexpected results are, by definition, random. Who could have predicted the glitch? The results then were not "random" enough because they weren't the results you were expecting? Give me a break.

    1. Re:Well technically... by Anonymous Coward · · Score: 0

      Any lottery is based on the equal chance of each ticket to be the winner. If this bug altered the odds and gave me twice the chance of winning compared to you, wouldn't you prefer we redo it properly?

    2. Re:Well technically... by Lundse · · Score: 1

      Unexpected results are, by definition, random.

      Except when the results are expected to be random :-)

      All kidding aside, it is not the particular results that are themselves random or not (once picked, any result has a probability of 1), but rather the method of choosing them. Or to be more precise, as our anonymous friend pointed out, that they had an even chance to be picked before they were even results.

      --
      IAIFARSIJDPOOTV - I Am In Fact A Reality Star; I Just Don't Play One On TV
    3. Re:Well technically... by joh · · Score: 4, Insightful

      Unexpected results are not neccessarily random. You may just have missed some bug that generates very predictable results which were just unexpected because you didn't knew about that bug.

      Still, true randomness is hard. While I don't think this applies here, randomness also includes random clusters. People accept these if the process that generates the randomness is very obvious random, but do the same with a computer or by sieving through large amounts of data and they see patterns and don't accept these as random anymore.

      Example: There have been discussions about clusters of cases of certain kinds of cancer around nuclear reactors. Can't be random, you think. Well, if you look at many different kinds of cancer and check the distribution of those you'll find random clusters for one or more of them. One of those clusters may be found around a reactor. May still be random, but nobody will ever believe you. In fact, if you sieve the data fine enough and have enough reactors and NONE of these clusters coincide with a reactor, the conclusion would be that nuclear reactors PROTECT against cancer. But explain that to people.

      Other example: Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug! Well, no. Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

      Randomness is hard and can be spooky.

    4. Re:Well technically... by mortonda · · Score: 2

      Unexpected results are, by definition, random.

      Perhaps you should actually look up the definition of random before declaring it?

      1. Having no specific pattern, purpose, or objective: random movements.
      2. Mathematics & Statistics: Of or relating to a type of circumstance or event that is described by a probability distribution.
      3. Of or relating to an event in which all outcomes are equally likely, as in the testing of a blood sample for the presence of a substance.

      The pertinent definition is the mathmatical one, which needs a probability distribution. It's very easy to observe a data set that does not have an appropriate distribution. Also, definition 3 speaks of have equal likelihood of the outcome, which the discovered bug proved was not. I couldn't tell from the article if they saw a pattern or simply discovered the bug, but it could have been invalidated by the first definition as well.

      So *by definition*, it truly was not random.

    5. Re:Well technically... by Anonymous Coward · · Score: 0

      Imagine the flaw makes someone always ineligible every year. It would only be "random" once.

    6. Re:Well technically... by Anonymous Coward · · Score: 0

      "The results were not valid because they did not represent a fair, random selection of entrants, as required by U.S. law."
      If the algorithm used could not possibly have picked certain entrants it might be random but it isn't "fair" -- which presumably means that each entrant has an equal probability of being selected.

    7. Re:Well technically... by TapeCutter · · Score: 4, Insightful

      Technically, the results were indeed random.

      No, technically your conflating two different things, the random glitch, and the non-random output caused by the glitch.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    8. Re:Well technically... by nxtw · · Score: 1

      Other example: Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug! Well, no. Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

      I've never had an iPod with a random feature. However, it does have a shuffle feature, which implies that each song will be played once (assuming repeat is not enabled), and this is exactly what the feature does.

      iTunes has a random Smart Playlist feature that can randomly select songs from a selected set of songs.

    9. Re:Well technically... by artor3 · · Score: 2

      You're using the mathematical definition. The common usage of the word is far less restrictive. To quote Merriam-Webster's definition: "without definite aim, direction, rule, or method". That certainly applies in cases where an unexpected bug affects the results.

      For example, if I randomly say a string of ones and zeros, it almost certainly won't be random in a mathematical sense, but it will be in the common usage sense: it won't have a definite aim, direction, rule, or method. This is an analogous situation. When I'm speaking in binary, there's some "bug" with the human brain that makes us really bad at making mathematically random sequences. It's even "bugged" in a predictable manner -- my run lengths will be too short.

      As a side point, this isn't the only time that mathematical and common usage definitions differ -- see the word "or".

    10. Re:Well technically... by larry+bagina · · Score: 1

      not if I won and you lost.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    11. Re:Well technically... by Anonymous Coward · · Score: 0

      The problem with the mathematical definition you've listed there is that you're using it to describe the results rather than the process for generating the results. The goal of the lottery should be to have a random selection process, not random results.

      Any random number generator that is not capable of generating results that appear non-random during a limited period isn't truly random. To put it another way, think of the million monkeys randomly typing for a million years where one of them eventually types something from Shakespeare. That individual result of the process would be decidedly non-random, but that doesn't mean the process isn't entirely random.

      None of this argues that the selection process was, in fact random. It just means that the definition you provided needs to be applied to the selection mechanism, not the results of that selection mechanism. You can't conclude from the results that there was a selection bias. But if the results suggest that and a review of the code uncovers a bug that confirms it, then you can make that determination.

    12. Re:Well technically... by Anonymous Coward · · Score: 0

      not to be pedantic but a point distribution is still a distribution. In other words deterministic algorithms are still "random" just not in an interesting way. so basically anything we can compute is random...

      just sayin...

    13. Re:Well technically... by Hognoxious · · Score: 1

      Unexpected results are, by definition, random.

      That's so funny it's not even wrong.

      If I toss a coin three times and get snake eyes and the eight of clubs that's random "by definition", is it?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    14. Re:Well technically... by Hognoxious · · Score: 1

      My first mp3 player (one of those chunky blue and silver Archos jobbies) had a similar feature, but it was predictable. The first time [after power up] you shuffled a playlist you always got the same order. If you shuffled again you got a different order to the first time, but it was always the same as any other second shuffle.

      I assume the seed was hardcoded on bootup.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    15. Re:Well technically... by dachshund · · Score: 1

      Other example: Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug! Well, no. Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

      What you are describing is a (pseudo-)random permutation of a playlist. It's still random, just chosen from a different distribution.

      And in the case you describe it's arguably a much better choice in terms of what users want. The users weren't being unreasonable, Apple just screwed up.

    16. Re:Well technically... by darkonc · · Score: 1

      The method used to choose the applications was 'random' (as in unexpected. The error was kinda random (well, 'stupid') -- but, once you understood the method/error, the results were entirely predictable and, thus not random.

      --
      Sometimes boldness is in fashion. Sometimes only the brave will be bold.
    17. Re:Well technically... by Gorobei · · Score: 1

      Unexpected results are, by definition, random.

      That is just not true. The a priori lack of knowledge of an observer has nothing to do with the statistical properties of the thing being observed.

      Even if it were true, it doesn't produce "fair outcomes" as people generally understand "fair." E.g. If a bug causes twins and triplets to always get drafted as a group, no one is going to consider the results "random," and few will consider the results "fair."

    18. Re:Well technically... by dgatwood · · Score: 1

      Agreed. Would it really be so bad for them to fix the algorithm, use that to randomly select a second batch of winners this year, and add those to the first batch rather than invalidating their wins?

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    19. Re:Well technically... by plover · · Score: 1

      But there were two sources of randomness at play here. The first was the cocked-up algorithm, which turned out to not be "random." However, that source of randomness was not known nor understood by the the applicants. Applications came in essentially at random, too; at least they did not arrive in a way that was able to exploit the failed randomness of the selection algorithm.

      So the first results were actually fair to the applicants. However, since they were not evenly distributed, they did not meet the goals of the DIV lottery.

      --
      John
    20. Re:Well technically... by mortonda · · Score: 1

      Actually, I'm using the first definition that popped out from Google.

    21. Re:Well technically... by Hognoxious · · Score: 1

      Apple introduced random playlists on iPods years ago. Now people noticed that some songs got played more than once before all others were played. Can't be random! There's a bug!

      Well, that's Apple users for you.

      Still, Apple had to modify their software to make the choice actually LESS random (by have no song being played twice) to make it appear "really" random to the users.

      I wouldn't say it's any less (or more) random. It's like the difference between drawing cards with or without replacement - both staples of probability questions in maths/stats. Clearly the latter is what you'd want for a playlist shuffler, but it's harder to implement.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  8. Sucks for the first batch of people... by nebaz · · Score: 2

    How would you feel if you got a notice saying you got a green card, but then two days later were told "sorry, just kidding."? The second batch of people might not want to celebrate just yet.

    --
    Rhymes that keep their secrets will unfold behind the clouds.There upon the rainbow is the answer to a neverending story
    1. Re:Sucks for the first batch of people... by akintayo · · Score: 1

      The US State department doesn't check their results before they publish?! Ok.

      --
      Woe be on to them, all who rise against poor people, shall perish in a the end. Buju Banton
    2. Re:Sucks for the first batch of people... by Anonymous Coward · · Score: 0

      It's you who have to do the checking...

  9. Green Card Lottery by countertrolling · · Score: 1

    YAY! My golden ticket to get off the plantation!

    You're a free man now
    No general, I's expensive!

    --
    For justice, we must go to Don Corleone
  10. Guaranteed random algorithm from xkcd by Beryllium+Sphere(tm) · · Score: 1
  11. win a visa, move here by Anonymous Coward · · Score: 0

    and and join the rest of the 9% unemployed.

    That probably looks pretty good to the unemployed in, e.g. Zimbabwe.

    1. Re:win a visa, move here by MrEricSir · · Score: 1

      Also, Goobacks.

      They took our jobs!

      --
      There's no -1 for "I don't get it."
    2. Re:win a visa, move here by larry+bagina · · Score: 1

      Some immigrants have a better work ethic and will create their own jobs.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

  12. Common programming error by Anonymous Coward · · Score: 1

    They had

    if (bribe.amount = 0) application->delete();

    This is why you always put the constant value on the left-hand side.

    1. Re:Common programming error by MavEtJu · · Score: 1

      Crank up the warning level of your compiler and make it warning free.

      --
      bash$ :(){ :|:&};:
    2. Re:Common programming error by Anonymous Coward · · Score: 0

      What would a "bribe" object do other than contain the value of the amount? Should be application.bribe!

    3. Re:Common programming error by Noughmad · · Score: 1

      Method of receiving, currency, date of transaction, etc.

      --
      PlusFive Slashdot reader for Android. Can post comments.
    4. Re:Common programming error by plover · · Score: 1

      Keeping the bribe object as a member of the application would be a pretty poor design as it doesn't allow for multiple bribes per application. I'd expect a better design would include a collection of bribes, and would evaluate their sum.

      More importantly, a bribe isn't an application, so there's no "is-a" relationship. An application "has-a" bribe. It's aggregation, not composition.

      --
      John
  13. Random selection? by NimbleSquirrel · · Score: 0

    So, what they're saying is that the numbers didn't appear random enough to them. Maybe it selected a few too many undesirables for their liking. Sometimes random numbers can appear not to be random. That's the problem with randomness, you can never be sure.

    Instead they are saying that:
    "A new selection process will be conducted based on the original entries for the 2012 program."

    I'm willing to bet that new selection process certainly won't be random.

    1. Re:Random selection? by sandytaru · · Score: 1

      Or it could be like the first FFXI Mog Lottery, in which all "random" numbers selected for PS2 users followed the pattern "even odd even odd even" meaning it was impossible for anyone on PS2 to win anything, since the (truly random) winning numbers all broke that pattern somehow.

      --
      Occasionally living proof of the Ballmer peak.
  14. Glitch by HaeMaker · · Score: 4, Funny

    Bob Slydell: So we just went ahead and fixed the glitch.
    Bill Lumbergh: Great.
    Dom Portwood: So, uh, Milton has been let go?
    Bob Slydell: Well, just a second there, professor. We, uh, we fixed the *glitch*. So he won't be receiving a paycheck anymore, so it'll just work itself out naturally.
    Bob Porter: We always like to avoid confrontation, whenever possible. Problem is solved from your end.

  15. Obligatory... by rthille · · Score: 1
    --
    Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
  16. Government Accountability by Anonymous Coward · · Score: 5, Interesting

    My girlfriend was one of the initial winners. I don't have to tell you how furious/disappointed we both are.

      The incompetence demonstrated by the State Department is fucking mind boggling. They have 6 months to draw winners, sample the results -make sure everything is OK. They don't. Instead of drawing 100,000 applicants they draw 22,000 most of which were no randomly drawn, but were among the first to apply. They post the results and after a week shut down the website with no explanation. People email the Kentucky Consular Center to make sure everything is OK before they send in their documents (It can be very expensive for internationally tracked packages, especially from people all around the world-many of whom are not well off.) The KCC emails people telling them everything is fine and to continue sending in documents, even they know at this point that the whole lottery is a clusterfuck. Then they announce that the first drawing was not random and has been disqualified.

    Why wouldn't the State Department at least try to request permission from congress to increase the number of VISAs awarded to 75,000 up from 50,000 or randomly draw another 78,000 names to that 78,000 would be random and the initial 22,000 would be less random.

    It just seems so unfair to announce winners and then revoke that announcement two weeks later, all the while telling people everything is OK.

    Saved the best for last: The State Dept has announced that they will not be taking disciplinary action against anyone involved in the "Incorrect results" being posted. I would like to know of any other job on the planet where you can fuck up 15 million visa applications, blame a computer for what clearly is a persons job to ensure the results are accurate before posting them, and not even receive disciplinary action.

    David Donahue should resign in shame and Hillary Clinton should make a public apology at the very minimum

    1. Re:Government Accountability by thisisauniqueid · · Score: 1

      I'm just glad I didn't check the results until after the website became inaccessible. I'd rather not go through what you and your girlfriend went through. Will be checking back on July 15th for sure -- but now I have to wonder if their programmers are competent at all.

    2. Re:Government Accountability by rastoboy29 · · Score: 1

      Most people don't understand computers at all, the way we do (slashdotters).  Their feelings about it could be summarized essentially as "Zeus has frowned on us" and that's that.

      Truly a special bummer, but that's life, isn't it?  And I hope your girlfriend gets lucky for real on the next draw.

    3. Re:Government Accountability by Anonymous Coward · · Score: 0

      These ones - probably not, but that is what you get when there is no disciplinary actions taken if you screw up. The problem I envision is that the software was never fully tested and probably there was no unit testing (or any testing at all). This isn't really programmers problem since we all write bad code, it is rather management - they see testing is waste of resources. We have to realize that well written software always includes a well designed testing plan to verify that the software works as it should, sadly companies do not do testing and this is only realized once the software is implemented.

      To be fair, this is a speculation and maybe there are testing rules. To remedy the problem, one must examine the software life-cycle to verify that it makes sense (testing, releases) as much as one must figure out if the programmers are competent. It is important to do both because (1) programmers are humans and sometimes they are overworked/under payed and have to deal with all this (you people can't do your job) while maintaining several existing versions of code with inadequate tools (or worse - not tools) and being prohibited to do extensive testing (unbelievable short deadlines) and (2) sometimes the maintainers make bad decisions (forgot to comment out testing procedure), and sometimes it is just that - a random glitch. All of these problems can be resolved (or at least detected) by better software development management and using the tools necessary.

  17. I can't believe... by drchc15 · · Score: 1

    That nobody's made a Debian/OpenSSL joke yet...

  18. and if your girlfriend hadn't been selected... by YesIAmAScript · · Score: 2

    Would you be screaming for heads to be cut off?

    Your girlfriend was selected in an unfair lottery. It wouldn't be right to let all that stand.

    How do you know the KCC was informed the results weren't accurate at the point they were telling people to send in their documents?

    --
    http://lkml.org/lkml/2005/8/20/95
    1. Re:and if your girlfriend hadn't been selected... by Anonymous Coward · · Score: 2, Informative

      I'm not screaming for heads to be cut off, i'm asking for a little bit of accountability. This is a very avoidable situation which was handled with incompetence and people should resign because of it.

      Two wrongs don't make a right. Even if the initial drawing wasn't "fair or random" (and btw you could not a lot worse than favoring people who were first to apply), telling people they had won and then taking it back is just as unfair.

      The website was taken down for almost a week. People saw this and were concerned, so they emailed the KCC which ensured applicants that everything was normal and to keep sending in their documents. These response emails were posted on immigration forums.

    2. Re:and if your girlfriend hadn't been selected... by AK+Marc · · Score: 1

      Your girlfriend was selected in an unfair lottery.

      But the process is a black box to the applicants. -So what's wrong with saying "oops, we'll take the wrongly posted ones and the whole set of rightly posted ones this year."

    3. Re:and if your girlfriend hadn't been selected... by Anonymous Coward · · Score: 0

      I'm not really sure it was 'unfair'.

      Not random, certainly.

      But nobody knew in advance how the selection would be made, and as such, everyone had an equal opportunity for being in the group that was overly selected from.

      From a technical standpoint, virtually no number generated by a computer is random anyway. It's just 'random enough'.

    4. Re:and if your girlfriend hadn't been selected... by supercrisp · · Score: 2

      I'm not sure what sort of paperwork it takes to apply for a greencard through the lottery system because my wife applied as, well, my wife. That stack of paperwork was about six inches high, and the fees eventually ammounted to just under three thousand dollars. That's not counting the fees for the attorney advising us, nor three trips to cities 400 and 150 miles away to be interviewed and fingerprinted twice. The initial outlay in effort and cash was rather big too, but I'm afraid I can't remember it, as I've done my best to block this giant pain in the butt from my memory. So, yep, if the initial application is anything like the initial application I filed, with it's big nonrefundable fees, then sure people who got selected to apply have every right to be mad for being yanked around emotionally AND having lots of time and money wasted.

    5. Re:and if your girlfriend hadn't been selected... by dachshund · · Score: 2

      Your girlfriend was selected in an unfair lottery. It wouldn't be right to let all that stand.

      It's really not a zero-sum game, just a simulation of one. The US can afford to admit all of the 22,000 accidental winners and hold a second lottery for the full 100,000 quota.

      This was a monumental fuckup that cost people significant amounts of time and money. Hopefully it was a one time fuckup. Given that the US already hands out a relatively low number of green cards, we can afford to eat an extra 22,000 this one time.

      Your version of justice would probably have Solomon's men cutting the baby in half.

    6. Re:and if your girlfriend hadn't been selected... by Anonymous Coward · · Score: 0

      Is a different application from the standard greencard application. This is just the initial response for visa lottery, they don't have any fees other then mailing. Thou I understand the rage of the people selected initially, sometimes life just gives you lemons. You don't have any right to hold accountable State Department, because you are not american citizen yet and you have no rights in US as long you are not an american citizen. On the other hand an apology will be nice from State Department for the f-up.

    7. Re:and if your girlfriend hadn't been selected... by Anonymous Coward · · Score: 0

      This whole immigratino lottery thing is a scumbag business. Also they have tricks - they send you application forms several times (after you are drawn) and if your signature differs only slightly, you are rejected. Not to mention that everything else also has to be identical or you are rejected. I guess they are paid based on how many people they reject.

    8. Re:and if your girlfriend hadn't been selected... by zippthorne · · Score: 2

      We can't have too many legal immigrants, or we might eat into our slave labor supply of illegal immigrants....

      --
      Can you be Even More Awesome?!
  19. But of course! by r00t · · Score: 2

    Selecting the best would be elitist, and we can't have that.

    Granting green cards to every English-speaking non-muslim would be seen as unconstitutional or something, even if it would be practical and go over rather well.

    We simply can't pick and choose without being politically incorrect, and thus the lottery.

    1. Re:But of course! by Anonymous Coward · · Score: 0

      I respect the noble intention behind the DV lottery. But you "can't pick and choose without being politically incorrect?" How about introducing a points-based system where you get points for speaking English, having work experience, going to college, getting an MS/PhD, like they have in many other countries (Canada, Australia, NZ)? How about making it easier for foreign students educated in American universities to stay with a green card, instead of encouraging them to go back home and compete with US interests? I don't see why race has to be involved in any of these things. If anything, the current immigration system explicitly has quotas that makes it much harder for Indians, Chinese, Filipinos, Dominicans and Mexicans to immigrate - read having to wait 5-10 more years than people of other nationalities, not taking into account the populations in some of those countries!

  20. Obligatory Knuth by colinrichardday · · Score: 4, Insightful

    Random numbers should not be generated with a method chosen at random The Art of Computer Programming, Vol 2 (emphasis in original)

  21. Nice troll from the government by Anonymous Coward · · Score: 1

    "Hay you want to be a real American? You won! You can has citizenship!"

    Then later..."LOL YHBT UMAD?"

  22. Bad algorithm by goodmanj · · Score: 1

    Yes, the algorithm for choosing green card recipients is flawed. It should be:

    if (applicant.wanted_for_crime = false) then
        grant_green_card(applicant);
    else
        human_review(applicant)
    end

    On a more serious note, does anyone know what the error was?

    1. Re:Bad algorithm by sycomonkey · · Score: 1

      I agree. I'm personally of the opinion that absolutely anyone who wants to immigrate should be able to, assuming they pass a security check and have a reasonably clean criminal record in their former country. We should be thrilled that people want to move here. Many first world countries are actually losing population and it is very hard on their economies.

      --
      --The universe will not be altered by forum threads, even those which are very wry. --Tycho Brahe (Penny Arcade)
    2. Re:Bad algorithm by Anonymous Coward · · Score: 0

      It should be:

      if (applicant.wanted_for_crime = false)

      Remind me never to hire you as a programmer...

      On a more serious note, does anyone know what the error was?

      No, but it was probably just a rookie mistake. You know, like an assignment instead of compare.

    3. Re:Bad algorithm by Wingman+5 · · Score: 1

      No, but it was probably just a rookie mistake. You know, like an assignment instead of compare.

      Or like not noticing something is VB where they use = as a comparator.

    4. Re:Bad algorithm by larkost · · Score: 1

      What you are missing is the absolute flood of people that open immigration would result in. It would very quickly distort both the economy and social structure.

      I am completely in favor of this lottery for many reasons. Chief among those reasons has to be that my wife came to the US under the program, but I am also in favor of it for purely ideological reasons: we are a nation of immigrants, many of whom fit any resonable definition of "your tired, your poor", and who made a productive life for themselves on these shores. While we can't take the huge tidal wave of people an open policy would bring, we still owe it to those who came before us and let (most of) our ancestors in to again "pay it forward".

    5. Re:Bad algorithm by Anonymous Coward · · Score: 0

      Never mind allowing immigration, how about making EMIGRATION easier? If things in this country continue down the path they've been going, remaining here will likely mean either a trip to a "work/ reeducation camp" or goose-stepping down main street in support of our "Dear Leaders" in Wall Street.

      Which reasonably civilized countries has the U.S. NOT pissed off yet? Will they take liberal refugees of a Neocon police state??

    6. Re:Bad algorithm by cocoajunkie · · Score: 1

      Side effect of your algorithm in C would be setting applicant.wanted_for_crime to false>7b>.

      Comes as an outcome of not distinguishing between = and ==

      Now all criminals had better apply :-)

    7. Re:Bad algorithm by Cochonou · · Score: 1

      It's not C. Notice the "then" operator.

    8. Re:Bad algorithm by Anonymous Coward · · Score: 0

      What you are missing is the absolute flood of people that open immigration would result in. It would very quickly distort both the economy and social structure.

      Would it? That may depend on your definition of "flood" and "distort".

      A while back I was having lunch with some people from other countries and someone asked me why more Americans don't live in Hawaii - in particular, whether there were laws restricting people from moving to Hawaii from other states. Now, I suppose that there are a lot of people on Hawaii who consider themselves to be "native" who would like to have less of the people they consider to be not "native" living on Hawaii. But there doesn't seem to be a catastrophic flood of immigrants from the continental USA to Hawaii either.

      Or, why don't more people from South Central Los Angeles (very poor) move up to Malibu or Beverly Hills (quite wealthy) in the north of Los Angeles? One can even get from South Central to Malibu in just a couple hours on public busses (at a cost of a few dollars).

      What if the USA did something like the European Union - a "North American Union" with essentially unrestricted immigration between Canada, the USA, and Mexico. Would there be a "flood" of immigration? Depending on your definition of "flood", the European Union experience suggests not.

      Word on the street is that Obama is planning to tackle immigration next. My impression is that immigration doesn't really matter, per se - that pretending that the fate of the USA depends on immigration policy only gives people the illusion of control (while distracting from other issues that really do impact quality of life in the USA). But maybe this time around Obama will do more than just give nice speeches and actually collect some hard data and base his policies on facts rather than ideology (not that this mess with the lottery selection gives me much hope on that).

    9. Re:Bad algorithm by SorcererX · · Score: 1

      And to think I used to wonder why some people looked at VB experience as essentially worse than no experience at all...

      --
      Any sufficiently advanced technology is indistinguishable from magic.
    10. Re:Bad algorithm by Ultracrepidarian · · Score: 1

      I wonder what he take of the Australians is on this?

    11. Re:Bad algorithm by goodmanj · · Score: 2

      This is not a programming language, it's pseudocode, intended to be read by humans who can infer the obvious intended meaning. Unfortunately Slashdot isn't a good place for that.

    12. Re:Bad algorithm by goodmanj · · Score: 2

      What you are missing is the absolute flood of people that open immigration would result in. It would very quickly distort both the economy and social structure.

      Yes, just as immigration distorted the US economy and social structure during the 19th and early 20th century, transforming the US from a backwater agrarian hinterland into the most powerful center of industry and technology the world had ever seen. I fail to see the problem.

      While we can't take the huge tidal wave of people an open policy would bring

      You make a clear case for the benefits and moral obligation of immigration, but your description the cost is a flimsy raft tied together with untested assumptions.

  23. New program or the same as last year? by Anonymous Coward · · Score: 0

    If they used the same program as previous years, are they going to "fix" those lotteries too?

    If it isn't the same program, I wonder why they wrote a new one. What bugs did the old program have?

  24. affirmative randomness by Anonymous Coward · · Score: 0

    can you imagine if a true "random" selection were done, and no women won? or if no blacks won?

    yeah, this will not be random.

  25. Just marry her by Anonymous Coward · · Score: 0

    . . . and dispense with the lottery. To pin one's hopes on a lottery is foolishness.

    1. Re:Just marry her by Anonymous Coward · · Score: 0

      If the OP is not American (he doesn't say), then marrying her won't help.

  26. I Hate To be That Guy... by Anonymous Coward · · Score: 2, Insightful

    But how about we just cancel the whole darn thing?

    I'm going to assume that most of you here are Americans. And as such, you probably feel like America kicks butt and that we rock and everyone wants to come here (and you'd be correct). You've probably heard how it's REALLY HARD to come to America legally and probably have some view on illegal immigration. What you probably aren't aware of, because you've probably never tried, is just how difficult it is to immigrate to other countries.

    These same countries that are condemning our immigration system offer an even more rigid, more unforgiving system. And these are really crappy countries. Countries that, objectively, are the equivalent of a tiny state in the US. 'Hey crappy EU country; you are the size of Iowa and have 1/2 GDP, who exactly are you trying to keep out?'

    These countries don't have lotteries. They have standards (high standards). Upper middle class, educated, high paying job? If so, you've got a tiny shot....only if you happen to work in one of these 3 professions and only if you can line up a job while on the other side of an ocean. Anything less? No. Marry a citizen. That's it.

    It's harder to immigrate into Mexico than it is the US. Stop and think about that for a second. Screw em. You don't want us? Well, we sure as heck don't want you. /Bitter //Really amazed at how difficult it is ///Will almost certainly be an 'illegal alien' in the next six months

    1. Re:I Hate To be That Guy... by Anonymous Coward · · Score: 0

      Nah the real problem is getting your fat asses and gobs through our small European doors and small chairs.

    2. Re:I Hate To be That Guy... by Anonymous Coward · · Score: 0

      These same countries that are condemning our immigration system offer an even more rigid, more unforgiving system. And these are really crappy countries. Countries that, objectively, are the equivalent of a tiny state in the US. 'Hey crappy EU country; you are the size of Iowa and have 1/2 GDP, who exactly are you trying to keep out?'

      Since I *am* from a tiny EU country the size of Iowa (not sure about the GDP, I don't know Iowa's)... I'm just wondering, do you have any specific countries in mind there? Ones that a) condemn your immigration system and b) have even more rigid ones themselves? How many EU countries' immigration systems do you know, anyway?

      Bonus points if you can name a country where the people condemning the USA's system are the same people who have the power to change the system in their own country.

      (As for the rest, I kinda agree with the notion that the USA aren't really under any obligation to allow immigration, and that it might be an idea to just cancel the greencard lottery altogether. But most of your post seems to be a convoluted diatribe, complete with finger-pointing and name-calling, rather than any sort of reasoning to support your position.)

    3. Re:I Hate To be That Guy... by Anonymous Coward · · Score: 0

      Actually the US is under obligation to allow immigration as are all countries.

      If there was no immigration and aslyum then Human Rights would be an issue.

    4. Re:I Hate To be That Guy... by tokidokix · · Score: 2

      Well, the thing is that the smaller european countries have much less space to spare. US is basically an empty land by european standard, so it's much easier to accomodate a big number of immigrants coming in.

      To give a sense of scale, Germany has about 8 times the population density of the US. To put it in a different way: if the US had the same population density as Germany, there would be around 2.5 billions US citizens (twice as much as Chinese!).

      There are of course other reasons (cultural, political and economical) for the different immigration policies; but your comment about the fact that a country the size of Iowa should not care about immigration seems paradoxical to me....

    5. Re:I Hate To be That Guy... by Anonymous Coward · · Score: 1

      What you probably aren't aware of, because you've probably never tried, is just how difficult it is to immigrate to other countries.

      I am an American expatriate. This means that not only have I tried to immigrate abroad, but I have succeeded. I thus certainly do know exactly how difficult it is to emigrate to other countries.

      While, generally speaking, I agree that it is difficult to immigrate to other countries, the level of difficulty varies greatly from country to country, and I find that your broad-brushed stereotyping is every bit as unwarranted as the ignorant American perspective that you so deride. Many countries have more restrictive immigration policies than the US, but many other countries have less restrictive policies. Presently, I am an immigrant in Canada. While I'm not interested in discussing the details of my own case, one can easily verify by any reasonable objective standard that immigrating to Canada is easier than the US.

      I know people who have immigrated to Australia and New Zealand. Their experiences indicate that AU and NZ are also easier to immigrate to than the US. (How do I know, you ask? Read on.)

      These countries don't have lotteries. They have standards (high standards). Upper middle class, educated, high paying job? If so, you've got a tiny shot....only if you happen to work in one of these 3 professions and only if you can line up a job while on the other side of an ocean. Anything less? No. Marry a citizen. That's it.

      Interestingly, you picked a very bad example, one which totally undermines your position; in fact you could hardly have picked a worst example. Marrying a citizen would indeed get you in the door in any other country, even countries with otherwise very restrictive immigration laws, but it doesn't always suffice for US immigration! Here's a typical example of such a story. Another example closer to home is my own story. My wife is married (obviously) to me (an American), but she does not qualify for immigration, since I don't live in the US, so we cannot prove immigrant intent (which is required for immigration). Additionally, she does not qualify for a non-immigrant (visitor) visa, since being married to an American constitutes presumed immigrant intent, which is a disqualifying factor for visitor visas. Now go re-read the previous two sentences and tell me how my wife is supposed to legally enter the US.

      Point is, there are a surprisingly large number of situations where marrying an American does not allow you to immigrate to the US. The US is practically the only country in the world that restricts spouses of citizens in this way.

  27. How the system should be by Anonymous Coward · · Score: 0

    We can't automate a system like this yet properly -- a naive random number generator is nowhere as good as the selection process could truly be.

    First, for women: it is to be assumed that all women are here for prostitution and reproduction. Photos of every candidate will be submitted to a masturbation panel; these will be highly paid government jobs. That gentleman from a year or two ago who spent his entire day at his desk job masturbating to and downloading porn on government time is a model candidate. Of these women, the cream of the crop (top 5%) will be given their cards immediately; it is important for America to reward such fine stock with success as they deserve.

    The next fifteen or twenty percent will have the option to come in for further screening. The best of the masturbators -- those with the most personality and people skills, as is the case in every hierarchical system -- will meet with them in luxury hotels for trial periods. It goes without saying that they will be penetrated vaginally and anally, and the agent's screening procedures are at the discretion of that particular agent. For example, he could run his own version of "The Apprentice" with the twenty or so at a time he would be charged with. A percent or two of this total pool would receive their cards.

    For the men: there will be a more diverse group of these that are eligible to be taken. The majority of these will be STEMs. The ideal personality traits are an eager supplicancy and eternal gratitude to simply work in his field of interest.

    A few entrepreneur types will be let in. They will have to be vetted by a board staffed by members of their industry peers. Essentially, priority here goes to implementations that can be loaded up and majority-held with existing funds through the hands of the board members and their associates.

    A percent or two of the men and women is saved for miscellany. Most of these particular slots will go to direct bribery and the shemales.

  28. s/mathematical/correct; s/common/ignorant/ by Hognoxious · · Score: 1

    You're using the mathematical definition. The common usage of the word is far less restrictive.

    We're talking about computer algorithms here. It's pretty obvious which is the correct usage in that context.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  29. Why do so many incompetent programmers exist ... by wisnoskij · · Score: 1

    And are somehow still able to get work?

    --
    Troll is not a replacement for I disagree.