• first (unregistered)

    This doesn't return an error like 'too many attributes' why?

  • Jack (unregistered)

    I once had a double asian. Twins are fun!

  • first (unregistered) in reply to first
    first:
    This doesn't return an error like 'too many attributes' why?
    Ah i see now, because I counted badly :(

    I certainly hope st doesn't mean string

  • Arthur (unregistered)

    Alex, can I have permission to include today's code in my new book, 50 Shades of Fail? It would pretty much save me from having to find 49 more.

  • Caelan (unregistered)

    WHITE POWER! WHITE POWER! WHITE POWER!

  • Race Driver (unregistered)

    OK, this is the first code I've ever seen that has a chance of accurately representing race. You could be 60% white, 30% asian, and 10% hispanic!

  • Andrew (unregistered)

    Good evening, 2.0680885238724826912272548561731e+57 3.3224479973352664296547694221706e+43. How may I help you today?

    No sir, our system does not support black people.

  • nagesh (unregistered)

    This codes discriminate me! Not review by India quality control teem. I go market sidewalk, buy life chicken, sacrifice to curse developers.

  • (cs)

    At least there's plenty of room for expansion of the number of digits in the SSN.

  • insourced (unregistered) in reply to Race Driver

    I just tried to figure that out. Nice code challenge.

  • TheSHEEEP (unregistered)

    Storing stuff in doubles instead of strings. Finally someone did it right!

  • Danielle (unregistered)

    Wow! And I thought our code was bad!

  • robert (unregistered)

    I object. "White" is a degoratory and racist word. In future, address me as "Cacausian."

  • Nagesh (unregistered)

    Indian is asian also, idiot.

  • Larry (unregistered)
    "...I don't even know where to start with the WTFs!" writes Rachel.
    Wait, what? Someone who knows the owner of a website I frequent got an email from a girl?!!! We must develop a new crowdsourced peer-to-peer data harvesting system to glean all available info about this specimen.

    Oh, and very carefully so as not to frighten her and get arrested again. They say the penalties are tougher the third time.

  • Stev (unregistered) in reply to Larry
    Larry:
    "...I don't even know where to start with the WTFs!" writes Rachel.
    Wait, what? Someone who knows the owner of a website I frequent got an email from a girl?!!! We must develop a new crowdsourced peer-to-peer data harvesting system to glean all available info about this specimen.

    Oh, and very carefully so as not to frighten her and get arrested again. They say the penalties are tougher the third time.

    Considering the nature of this site, I wouldn't be surprised if Rachel was a man.

  • frits (unregistered) in reply to Andrew

    I'm pretty sure that you could get into a lawsuit if you start basing loans on whether someone is black or not.

    Your not too smart, are you?

  • Dave (unregistered)

    What this code really needs is a race condition to check if the customer is white before setting it.

  • Rachel (unregistered)

    No need to go to so much trouble, guys. I'm right here. What do you want to know?

  • The Irritainer (unregistered)

    Could a negative value on white indicate a black person? Or is that when multiple race values are filled in, eg like an mixture.. Anyway, this is a nice WTF

  • (cs)

    "Don't allow software that treats your customers like just a number. Our software treats 'em like six, huge, massive numbers!"

  • Missed Opportunity (unregistered)

    I really thought it was going to be:

    case white:
      ds.set_consumer_info(... 1,1,0,0);
    case hispanic:
      ds.set_consumer_info(... 1,0,1,0);
    case asian:
      ds.set_consumer_info(... 1,0,0,1);
    case indian:
      throw new error ("Nagesh!");
    
  • (cs)

    We need to all change our names to numeric values. It'll prepare us for Borg assimilation.

  • Larry (unregistered) in reply to Rachel
    Rachel:
    No need to go to so much trouble, guys. I'm right here. What do you want to know?
    Ummm, uhhhhh...

    Errrr....

    (Dammit, where's my beer!)

  • F (unregistered)

    "The naming convention is inconsistent", it says. So why are you all assuming that this has anything to do with personal data? It could easily be storing the lengths of the sides of some triangles, converted from centimetres to inches ("st.NumberOfAccounts" = 2.54), for example.

  • Peter (unregistered)

    It's pretty clear that the intent of this code is not what one might think at first. It is poorly described, but it must (surely) be to do some analysis on all consumers in the database. The values are recording what percentage of accounts have first name set, what percentage have SSN, what percentage are asian etc. It's still pretty poor, but I don't believe that it's as moronic as it has been presented.

  • Sergei (unregistered) in reply to Missed Opportunity
    Missed Opportunity:
    I really thought it was going to be:
    case white:
      ds.set_consumer_info(... 1,1,0,0);
    case hispanic:
      ds.set_consumer_info(... 1,0,1,0);
    case asian:
      ds.set_consumer_info(... 1,0,0,1);
    case indian:
      throw new error ("Nagesh!");
    

    The Law Against Racism and All Forms of Discrimination (Spanish: Ley 045 Contra el Racismo y Toda Forma de Discriminación; often called the Law Against Racism) is a statute passed by the Plurinational Legislative Assembly of Bolivia as Law 045 and promulgated by President Evo Morales into law as Law 737/2010 on 10 October 2010.[1] The law prohibits discrimination and discriminatory aggression by public and private institutions and individuals, creates a governmental Committee Against Racism and All Forms of Discrimination, and bars the dissemination of racist and discriminatory ideas through the mass media. The provisions of the law applying to the media caused extensive controversy and were opposed by mainstream publications and media worker associations.

  • Golly (unregistered) in reply to F
    F:
    "The naming convention is inconsistent", it says. So why are you all assuming that this has anything to do with personal data? It could easily be storing the lengths of the sides of some triangles, converted from centimetres to inches ("st.NumberOfAccounts" = 2.54), for example.
    By Golly, I believe he's got it! Source code obfuscation For The Win!
  • poogles (unregistered) in reply to Andrew
    Andrew:
    Good evening, 2.0680885238724826912272548561731e+57 3.3224479973352664296547694221706e+43. How may I help you today?

    No sir, our system does not support black people.

    Awesome!

  • Missed Opportunity (unregistered) in reply to Sergei
    Sergei:
    Missed Opportunity:
    I really thought it was going to be:
    case white:
      ds.set_consumer_info(... 1,1,0,0);
    case hispanic:
      ds.set_consumer_info(... 1,0,1,0);
    case asian:
      ds.set_consumer_info(... 1,0,0,1);
    case indian:
      throw new error ("Nagesh!");
    

    The Law Against Racism and All Forms of Discrimination (Spanish: Ley 045 Contra el Racismo y Toda Forma de Discriminación; often called the Law Against Racism) is a statute passed by the Plurinational Legislative Assembly of Bolivia as Law 045 and promulgated by President Evo Morales into law as Law 737/2010 on 10 October 2010.[1] The law prohibits discrimination and discriminatory aggression by public and private institutions and individuals, creates a governmental Committee Against Racism and All Forms of Discrimination, and bars the dissemination of racist and discriminatory ideas through the mass media. The provisions of the law applying to the media caused extensive controversy and were opposed by mainstream publications and media worker associations.

    EDIT: This post is Copyright (C) 2012. Permission to read is denied for anyone in Bolivia.

  • (cs)

    If names are hashed as numbers, we run into a problem with roundoff errors.

    If person A is 1.23456 and person B is 1.23457, what happens if a calculation gives: 1.234565? Must they merge, mate and reproduce to generate the person representing that value?

  • ColdHeart (unregistered)

    waitwhat? If I'm reading that right, EVERYONE is white?? I'd love to see the original design documents (assuming there are any) which decided a person's race should be stored are separate doubles. Then the update which made Indian redundant. Then the update which decided everyone was white.

  • Duhhh (unregistered)
    st.ConsumerName/st.NumberOfAccounts
    The reason your name is divided by the number of accounts you have is so that when they prepare your statement they can just do a simple sum(accounts). The resulting balance field will have your net balance across all accounts, and the resulting name field will add up to your original name. Brillant!
  • Anymouse (unregistered) in reply to Race Driver
    Race Driver:
    OK, this is the first code I've ever seen that has a chance of accurately representing race. You could be 60% white, 30% asian, and 10% hispanic!

    Yes, but how many hispanics are there in Hispaniola? Do they really deserve an entire category all to themselves?

    And what about Pacific Islanders. You've got to be able to count the Aussies and Kiwis.

    And the Blacks. You'd not want to mistake them for real South Africans.

  • Le Forgeron (unregistered) in reply to Duhhh
    Duhhh:
    st.ConsumerName/st.NumberOfAccounts
    The reason your name is divided by the number of accounts you have is so that when they prepare your statement they can just do a simple sum(accounts). The resulting balance field will have your net balance across all accounts, and the resulting name field will add up to your original name. Brillant!

    Bogus. "st" stands for statistic. ConsumerName is the number of names...

    Same for the other fields, they want to have some %.

    Now, If I could understand the first part, that would be enormous.

  • frg567 (unregistered) in reply to Nagesh
    Nagesh:
    Indian is asian also, idiot.

    Indians from India - no, they are not. They belong to the White/Caucasian race.

  • Le Forgeron (unregistered) in reply to Le Forgeron

    My bad, 2!!

    They are using double to store the index key, and it must be limited to 0-1 range, otherwise they might encounter a precision issue...

    a true WTF

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Missed Opportunity
    Missed Opportunity:
    case white: ds.set_consumer_info(... 1,1,0,0); case hispanic: ds.set_consumer_info(... 1,0,1,0); case asian: ds.set_consumer_info(... 1,0,0,1); case indian: throw new error ("Nagesh!");
    Nagesh is (... 0,0,1,1);
  • Bill (unregistered) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    Nagesh is (... 0,0,1,1);
    An undocumented hispanic asian. You've achieved a remarkable level of data compression there sir!
  • (cs)

    How the What the HUH?

  • Darth Paul (unregistered) in reply to Nagesh
    Nagesh:
    Indian is asian also, idiot.

    Actually, Indians are caucasian, by definition.

  • Darth Paul (unregistered) in reply to robert
    robert:
    I object. "White" is a degoratory and racist word. In future, address me as "Cacausian."

    Not all caucasians are white.

  • (cs)

    but if the consumer name isn't a number, how do you divide it by the number of accounts?

  • (cs) in reply to mott555
    mott555:
    We need to all change our names to numeric values. It'll prepare us for Borg assimilation.

    I seem to recall a court case in Minnesota where a guy tried to do exactly that (change his name to a number, not get assimilated.) The court ruled that he could, but he had to spell it out. "Dear Mr. Forty Two: "

  • (cs)

    Actaully... I think that code sample was brilliant! I mean...

    1. At least the method returns true if you call it! Otherwise.... how else would you know if you called that method if it didn't return true!
    2. What possible data type could better encompass what percentage of you is white, hispanic or asian than a double? I mean... seriously... nobody is 100% anything anymore.
    3. Everybody knows that indians don't count anyway... but EO requires that we give them special treatment. By adding a parameter for Indians, we get to comply with EO without actually using any indians!
    4. There is nothing at all misleading about requiring names and SSNs to be represented as doubles. Strings take up too much space after all... and seriously... how many names and such can there be? You get the lugsury of specifying a name as well as a means of indicating how precisely that name applies!
    5. Object oriented programming is vastly overrated. Much better to use arrays for everything and simply memorize the index that is relavent to your info!

    And the final... most brilliant manuever in this entire code set! Hard coding everyone as white... so that everyone gets treated equally.

  • Ben Jammin (unregistered)

    Just like all your colors on the monitor are RGB numbers, your race can be calculated in HAI (hispanic, asian, indian). The white scale is just your transparency.

    1,0,0,0 is a white person 0,1,1,1 is a black ghost

  • (cs)

    And India was part of Asia last time I looked at the map.

    By the way where does it say you can't be black African/American/European in there? Just have all those fields zero (I presume).

  • (cs) in reply to Ben Jammin
    Ben Jammin:
    Just like all your colors on the monitor are RGB numbers, your race can be calculated in HAI (hispanic, asian, indian). The white scale is just your transparency.

    1,0,0,0 is a white person 0,1,1,1 is a black ghost

    0,1,1,1 is a black indian hispanic. All Indians are Asians but not all Asians are Indians.

  • Joe Shmobinsky (unregistered)

    In this context, maybe "indian" should have been "native american" or just simply "native"?

    Assuming that someone who wrote this is able to distinguish between the two is giving an awful lot of credit where it ain't due....

  • Peter (unregistered) in reply to Darth Paul
    Darth Paul:
    robert:
    I object. "White" is a degoratory and racist word. In future, address me as "Cacausian."

    Not all caucasians are white.

    I'm not white. In fact I've never met a white person. I'm actually kinda pink.

Leave a comment on “The Race Case”

Log In or post as a guest

Replying to comment #388525:

« Return to Article