• Anon (unregistered) in reply to operagost
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    I shouldn't feed an obvious troll, but here:

    http://2010.census.gov/2010census/how/interactive-form.php

    That should answers your questions, but I suspect that you don't care what the answers are because that might conflict with your tin-foil hat world view.

  • Anon (unregistered) in reply to Lewis Crawford
    Lewis Crawford:
    The US Census Bureau beats this WTF: They make every citizen calculate their own DateDiff by making them enter their age as well as their birth date. No DateDiff needed by the Census Bureau.

    Obviously it's a government plot. All those people who can't do this simple math will be rounded up and shot.

  • Leo (unregistered) in reply to Anon
    Anon:
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    I shouldn't feed an obvious troll, but here:

    http://2010.census.gov/2010census/how/interactive-form.php

    That should answers your questions, but I suspect that you don't care what the answers are because that might conflict with your tin-foil hat world view.

    Um, you're completely missing the point. Just because they say they want it doesn't make it any more constitutional.

  • justsomedude (unregistered) in reply to Hatterson

    [quote user="Hatterson] The relationship between SSNs and people is supposed to be 1:1 although in practice (do to change someone's number for various reasons) it ends up being many:1

    The one thing it is not is 1:many

    Simply because I use (illegally I might add) someone else's SSN doesn't mean it still isn't an identifier unique to them.[/quote]

    Are you sure about that? Let's see, SSNs are of the form ###-##-####, which means 1,000,000,000 unique numbers. If SSN's are never recycled, how many years do you think they last from inception to exaustion?

  • ideo (unregistered) in reply to Anon
    Anon:
    Well in a MVC architecture it is important to keep the abstractions cleanly separate.

    CAPTCHA: consequat - This WTF is the consequat of adhering strictly to MVC design.

    Idiot.

  • Massive Debt (unregistered) in reply to evilspoons
    evilspoons:
    jasmine2501:
    Theoretically I would agree with you, but I've had to do this before for an insurance company database, when after testing with sample data, the deployment to production revealed that social security numbers were not unique.

    This is the funniest/scariest thing I've heard all day.

    Great! Jane Smith has my SSN too. Looks like I have health insurance after all!

  • quisling (unregistered) in reply to frits
    frits:
    Aw isn't that cute. They let the DBA write some code.
    You're still a jerk. I like you.
  • sino (unregistered) in reply to Slicerwizard
    Slicerwizard:
    Alex Papadimoulis:
    But an even rarer breed are those that, like Paul’s predecessor, who to use built-in code… but from an entirely different platform.
    You might want to fix that.
    Naw, dude, naw. This crap will continue until we stop making Bowytz cry over every crap over-editorialized article he posts.

    Alex is trolling to make Mark feel better.

  • Massive Debt (unregistered) in reply to justsomedude

    [quote user="justsomedude"][quote user="Hatterson] The relationship between SSNs and people is supposed to be 1:1 although in practice (do to change someone's number for various reasons) it ends up being many:1

    The one thing it is not is 1:many

    Simply because I use (illegally I might add) someone else's SSN doesn't mean it still isn't an identifier unique to them.[/quote]

    Are you sure about that? Let's see, SSNs are of the form ###-##-####, which means 1,000,000,000 unique numbers. If SSN's are never recycled, how many years do you think they last from inception to exhaustion? [/quote]

    SSNs may not fill the whole number space. I believe that the first 3 digits describe US states. So, they are limited to less than the 1,000 possibilities. Also, I've never seen a zero in an SSN.

  • ideo (unregistered) in reply to SCSimmons
    SCSimmons:
    frits:
    Aw isn't that cute. They let the DBA write some code.
    Yah, you can just kiss my grits.

    OK, I'm just cranky at the moment, because of the application developers who are asking me to add a column to the primary key of a 1M row table. In production. They don't seem to like my idea of doing some kind of testing first. I know, those darn curmudgeon DBAs!

    What I heard: "Whine, whine whine, my DBvaginA has sand in it."

    Backup the database, restore the table with a different name, make the change, drop or rename the table, and make the atomic rename change on the restore; scan for and import the change differences from the 10 minutes the previous op took.

    And stop crying, you fucking hardware monkey.

  • ideo (unregistered) in reply to foxyshadis
    foxyshadis:
    SCSimmons:
    frits:
    Aw isn't that cute. They let the DBA write some code.
    Yah, you can just kiss my grits.

    OK, I'm just cranky at the moment, because of the application developers who are asking me to add a column to the primary key of a 1M row table. In production. They don't seem to like my idea of doing some kind of testing first. I know, those darn curmudgeon DBAs!

    That hardly makes sense - if a primary key is functioning, why would you need to modify it, as opposed to adding a new index (clustered or not)? It sounds like the requestor is confused or asking for a quick way to wreck the database.
    Applications change. You fail a lot.
  • sino (unregistered) in reply to jasmine2501
    jasmine2501:
    foxyshadis:
    SCSimmons:
    Yah, you can just kiss my grits.

    OK, I'm just cranky at the moment, because of the application developers who are asking me to add a column to the primary key of a 1M row table. In production. They don't seem to like my idea of doing some kind of testing first. I know, those darn curmudgeon DBAs!

    That hardly makes sense - if a primary key is functioning, why would you need to modify it, as opposed to adding a new index (clustered or not)? It sounds like the requestor is confused or asking for a quick way to wreck the database.

    Theoretically I would agree with you, but I've had to do this before for an insurance company database, when after testing with sample data, the deployment to production revealed that social security numbers were not unique.

    Lady and Gentlemen, TRWTF. <applause />!!!!

  • sino (unregistered) in reply to Right Wing-Nut
    Right Wing-Nut:
    Franz Kafka:
    foxyshadis:
    ...

    That hardly makes sense - if a primary key is functioning, why would you need to modify it, as opposed to adding a new index (clustered or not)? It sounds like the requestor is confused or asking for a quick way to wreck the database.

    Who said the PK was functioning properly? It's possible (probable) that this is to support some application change they want in production. Of course, the real question is who the hell made a PKEY with real data in it?

    If you must know, there is a long-raging debate among DBAs about whether or not separate PKs are a good idea or recipes for disaster. Web frameworks are in love with them, but they are late to the party.

    The DBAs in the recipe for disaster camp are fucking idiots.

    Or you just made the whole thing up.

  • ideo (unregistered) in reply to somedude
    somedude:
    A compound PK? Developers are asking for changes to a primary key because... I mean are they trying to resolve some performance issue or something?

    Am I missing something here, or are this poor man's devs engaging in serious WTFery? Were the devs thinking "index" and it somehow came out "primary key"?

    I sense a whole host of WTFs in play.

    No, shut up. There are many reasons to change a PK from one to many or many to one.

    Stop helping. You're not.

  • (cs) in reply to Massive Debt
    Massive Debt:
    SSNs may not fill the whole number space. I believe that the first 3 digits describe US states. So, they are limited to less than the 1,000 possibilities. Also, I've never seen a zero in an SSN.

    Really? Do you actually deal with SSN's? I deal with them all the time and see plenty of zeros. In fact, my SSN has a zero in it.

  • justsomedude (unregistered) in reply to ideo
    ideo:
    And stop crying, you fucking hardware monkey.

    You do realize without hardware monkeys you wouldn't have a paycheck, right?

    Disclaimer: I am a software monkey.

  • justsomedude (unregistered) in reply to Massive Debt
    Massive Debt:
    justsomedude:
    Hatterson:
    The relationship between SSNs and people is *supposed* to be 1:1 although in practice (do to change someone's number for various reasons) it ends up being many:1

    The one thing it is not is 1:many

    Simply because I use (illegally I might add) someone else's SSN doesn't mean it still isn't an identifier unique to them.

    Are you sure about that? Let's see, SSNs are of the form ###-##-####, which means 1,000,000,000 unique numbers. If SSN's are never recycled, how many years do you think they last from inception to exhaustion?

    SSNs may not fill the whole number space. I believe that the first 3 digits describe US states. So, they are limited to less than the 1,000 possibilities. Also, I've never seen a zero in an SSN.

    Very true, I was trying to error on the large side since it makes the point even stronger. On a side note, I believe the first three digits are not specific to US states, they identify the SS office that issued the number.

  • ideo (unregistered) in reply to justsomedude
    justsomedude:
    ideo:
    And stop crying, you fucking hardware monkey.

    You do realize without hardware monkeys you wouldn't have a paycheck, right?

    Disclaimer: I am a software monkey.

    Nope, you're dumb. I have a paycheck because I have within me the means to produce, to create [value,wealth], not because of some random chain of events that resulted in computing as we know it.

    Way to approach evolution from a results perspective, you... educated designist thinker, you.

    Disclaimer: This software monkey is usually called upon to solve hardware problems once the hardware monkeys have fucked it all up. And blamed it on the software, because that's all they know. Blame.

  • Beta (unregistered) in reply to rudraigh
    rudraigh:
    Massive Debt:
    ...I've never seen a zero in an SSN.

    Really? Do you actually deal with SSN's? I deal with them all the time and see plenty of zeros. In fact, my SSN has a zero in it.

    Aha! We just narrowed it down by 38%! A few more uninformed statements and we'll have you!

  • Bob (unregistered) in reply to usitas
    usitas:
    Peter Spierenburg:
    That's nothing. The code where I work queries the database once a second, to find out what time it is.

    I kid you not.

    Peter.

    How does it determine if it is time to query again?

    sleep

  • bacon (unregistered)

    I think the real WTF is the data layer clearly supports parameters, but the submitted query has hard-coded times. The poor database doesn't even get the chance to reuse a previous query plan!

  • Nobody You Know (unregistered) in reply to justsomedude
    justsomedude:
    On a side note, I believe the first three digits are not specific to US states, they identify the SS office that issued the number.

    My brother and I applied for our SSNs at roughly the same time (i.e. within minutes of each other) and at the same place, and they differ in the first three digits. (This was, obviously, back in the days before the tax law required all dependents to have SSNs, and our social security cards were carved into bear skins with stone chisels.)

  • ideo (unregistered) in reply to ideo
    ideo:
    justsomedude:
    ideo:
    And stop crying, you fucking hardware monkey.

    You do realize without hardware monkeys you wouldn't have a paycheck, right?

    Disclaimer: I am a software monkey.

    Nope, you're dumb. I have a paycheck because I have within me the means to produce, to create [value,wealth], not because of some random chain of events that resulted in computing as we know it.

    Way to approach evolution from a results perspective, you... educated designist thinker, you.

    Disclaimer: This software monkey is usually called upon to solve hardware problems once the hardware monkeys have fucked it all up. And blamed it on the software, because that's all they know. Blame.

    Sorry, forgot to add: Fuck you, you apologetic dumb-fuck.

    Disclaimer: I have no problem with anyone who does their job correctly, from bagging groceries and mowing lawns, to writing application software or administering server farms. The issue here is the dumbass that thinks IN ALL SITUATIONS, ADDING A COLUMN TO A PKEY IS A MISTAKE. At least the original DBA whiner was mostly honking about having to do anything at all(outside of his normal job description of nothing, nothing, nothing, mine-sweeper, nothing, solitaire, nothing, nothing, halo and nothing), and took the time and professional courtesy to couch that complaint by claiming the app developers were insisting he deploy untested code to production.

  • Brian (unregistered) in reply to caper
    caper:
    How about a Date to spend some Time with the Irish Girl.

    or perhaps Time for a Date with same Irish Girl

    (Happy St Paddy's day too!!)

  • Simo (unregistered) in reply to operagost
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    And who's going to know if you are answering them truthfully?

    If you don't think they should be asking the question, either don't answer it or LIE!!

  • Anon Ymous (unregistered) in reply to Hatterson
    Hatterson:
    The relationship between SSNs and people is *supposed* to be 1:1 although in practice (do to change someone's number for various reasons) it ends up being many:1

    The one thing it is not is 1:many

    Simply because I use (illegally I might add) someone else's SSN doesn't mean it still isn't an identifier unique to them.

    An insurance company in the US has absolutely no need for a social security number whatsoever, nor must you have one in order to buy insurance. If the insurance company asks me for my social security number and I refuse to give it to them, they'll end up putting garbage in the field (it's required because an ignoramus assumed it must be unique and made it the key).

    It is not illegal to provide someone else's social security number unless you are attempting to represent yourself as that individual. (i.e. If I give them 123-45-6789 to protect my privacy and all my other information is true and correct, then I haven't committed a crime whether or not it happens to be the real SSN of someone unknown to me.)

  • Scorpio (unregistered) in reply to Leo
    Leo:
    Anon:
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    I shouldn't feed an obvious troll, but here:

    http://2010.census.gov/2010census/how/interactive-form.php

    That should answers your questions, but I suspect that you don't care what the answers are because that might conflict with your tin-foil hat world view.

    Um, you're completely missing the point. Just because they say they want it doesn't make it any more constitutional.

    FFS: OP#1 said 'Why do they need to know...' OP#2 said 'Here is there explanation'

    Where has he missed the point? He wasn't justifying it, merely pointing out that there is an explanation. Didn't actually see him say that it meant it wasn't unconstitutional!

  • Virgo (unregistered) in reply to Scorpio
    Scorpio:
    Leo:
    Anon:
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    I shouldn't feed an obvious troll, but here:

    http://2010.census.gov/2010census/how/interactive-form.php

    That should answers your questions, but I suspect that you don't care what the answers are because that might conflict with your tin-foil hat world view.

    Um, you're completely missing the point. Just because they say they want it doesn't make it any more constitutional.

    FFS: OP#1 said 'Why do they need to know...' OP#2 said 'Here is there explanation'

    Where has he missed the point? He wasn't justifying it, merely pointing out that there is an explanation. Didn't actually see him say that it meant it wasn't unconstitutional!

    Ah, Scorpio... You came here expecting logic and reason, from fellow professionals in a field of logic, and...uh, well, reason.

    Get used to disappointment.

  • Frank Earnest (unregistered) in reply to Massive Debt
    Massive Debt:
    Also, I've never seen a zero in an SSN.
    Well that just shows how ignorant you are! Mine has two zeros in it: 520-30-

    Wait! Crap! You almost had me! Nice try.

  • Mr Zero (unregistered) in reply to Massive Debt

    An SSN is made up of an Area Number (first 3), Group Number (next 2) and Serial Number (last 4). Any of the three parts can have a zero, but any part must have at least one non-zero number.

  • Anon Ymous (unregistered) in reply to Simo
    Simo:
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    And who's going to know if you are answering them truthfully?

    If you don't think they should be asking the question, either don't answer it or LIE!!

    Title 13 of US Code (authorized by an act of Congress)

    Sec. 221. Refusal or neglect to answer questions; false answers

    (a) Whoever, being over eighteen years of age refuses or willfully neglects, when requested by the Secretary, or by any other authorized officer or employee of the Department of Commerce or bureau or agency thereof acting under the instructions of the Secretary or authorized officer, to answer, to the best of his knowledge, any of the questions on any schedule submitted to him in connection with any census or survey provided for by subchapters I, II, IV, and V of chapter 5 of this title, applying to himself or to the family to which he belongs or is related, or to the farm or farms of which he or his family is the occupant, shall be fined not more than $100.

    (b) Whoever, when answering questions described in subsection (a) of this section, and under the conditions or circumstances described in such subsection, willfully gives any answer that is false, shall be fined not more than $500. (c) Notwithstanding any other provision of this title, no person shall be compelled to disclose information relative to his religious beliefs or to membership in a religious body.

  • The Wanderer (unregistered) in reply to Scorpio
    Scorpio:
    FFS: OP#1 said 'Why do they need to know...' OP#2 said 'Here is there explanation'

    Where has he missed the point? He wasn't justifying it, merely pointing out that there is an explanation. Didn't actually see him say that it meant it wasn't unconstitutional!

    He missed the point in that OP#1 actually said "Why do they need to know [XYZ] to make a head count for the House of Representatives?".

    The page linked to may answer the question "why do they need to know these things?", but it does not appear to answer the question "how is knowing these things necessary to coming up with a head count for the House of Representatives?".

    There may in fact be a legitimate answer to that question; even if not, there may be other constitutional justification for asking these questions in the census, beyond simply allocating House seats. I don't see any such answer or justification on that page, however.

    CAPTCHA: nimis. Hey! I don't think I've seen that one before!

  • Paul R (unregistered) in reply to Anon Ymous
    Anon Ymous:
    ...Title 13 of US Code (authorized by an act of Congress) Sec. 221. Refusal or neglect to answer questions; false answers ...

    The Constitution trumps any act of Congress, since the Constitution created and empowers Congress.

    Constitution of the United States, Section 1, Article 2: Enumeration shall be made within three Years after the first Meeting of the Congress of the United States, and within every subsequent Term of ten Years, in such Manner as they shall by Law direct.

    Enumeration means counting, not a detailed survey. You don't even have to give your name. Just the number of people where you live.

    Amendment X

    The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people.

    If the Constitution does not explicitly give Congress the power to do something, they can't (legally) do it.

    Of course, the Constitution is just a flimsy joke since the last 50 to 100 years, but anyway, that's what it says.

  • Fred (unregistered) in reply to Anon Ymous
    Anon Ymous:
    Simo:
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    And who's going to know if you are answering them truthfully?

    If you don't think they should be asking the question, either don't answer it or LIE!!

    Title 13 of US Code (authorized by an act of Congress)

    Sec. 221. Refusal or neglect to answer questions; false answers

    (a) Whoever, being over eighteen years of age refuses or willfully neglects, when requested by the Secretary, or by any other authorized officer or employee of the Department of Commerce or bureau or agency thereof acting under the instructions of the Secretary or authorized officer, to answer, to the best of his knowledge, any of the questions on any schedule submitted to him in connection with any census or survey provided for by subchapters I, II, IV, and V of chapter 5 of this title, applying to himself or to the family to which he belongs or is related, or to the farm or farms of which he or his family is the occupant, shall be fined not more than $100.

    (b) Whoever, when answering questions described in subsection (a) of this section, and under the conditions or circumstances described in such subsection, willfully gives any answer that is false, shall be fined not more than $500. (c) Notwithstanding any other provision of this title, no person shall be compelled to disclose information relative to his religious beliefs or to membership in a religious body.

    What does that mean? It means that it will cost you 'not more than' $600 to avoid answering those questions.

    How strongly do you feel about it? - if it really bothers you, $600 (in fact, less than $600) is a small price to pay....if it doesn't bother you so much, grin and bear it!!

    I know someone who always tried to write in ineligible scrawl on census papers, although that's not so easy for Check Box questions....

    While were on information they don't need:

    • Name (they need this to make sure people return a census form, but it shouldn't actually be a part of the census - just like when you vote your name shouldn't be part of a ballot paper)
    • Exact Address (They need suburb, maybe street to assess demographics, but they should have no interest in which particular house you live in)
    • Contact Number (If they can't work out what the answer means, then ignore it. The Census collects Statistics. Statistics (by definition) are not an exact reflection, and any calculation allows some error. The more exact they try to make the statistic, the more incorrect their final result will be)

    In fact (as with almost any form you fill in these days) it seems like they ask for way too much unnecessary information.

    I think questions on race are potentially important to assess demographics. However, the question could be better written (anything question that needs an 'other' option shouldn't be a check box to begin with). I think Question 8 is wrong too (you could get the same information asking a question that doesn't appear to target a particular group).

    Of course, I'm not a yank - I assume Census' (Censii?) in the US are used to establish demographics. I also think the Census is a crock for the most part, but I hate statistics in general....

  • (cs)

    Sadly, I've seen a variation on this before. My particular favourite was the guy who was a friend of the boss who often asked us for programming advice (he was a C programmer). He had a currency string and wanted to strip all the non-integer symbols out of it (e.g. wanted $3.00 to become 300). Before we could respond with an answer, we got another email saying he'd solved the problem. His answer? To pass it to the SQL engine, not once, but twice. The first time to strip the '$' out, the second time to take care of the '.'. (He didn't specify exactly how he got SQL to do that, and that probably would've opened up a whole new can of WTFs unto itself)

    The most worrying thing about it was that he actually had clients who paid to use his software. Scary stuff.

  • lesle (unregistered) in reply to Fred
    Fred:
    Anon Ymous:
    Simo:
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives? Why do they need to know my race-- have they not heard of the 16th amendment?

    At least it's better than Clinton's ridiculous multi-page survey.

    And who's going to know if you are answering them truthfully?

    If you don't think they should be asking the question, either don't answer it or LIE!!

    Title 13 of US Code (authorized by an act of Congress)

    Sec. 221. Refusal or neglect to answer questions; false answers

    (a) Whoever, being over eighteen years of age refuses or willfully neglects, when requested by the Secretary, or by any other authorized officer or employee of the Department of Commerce or bureau or agency thereof acting under the instructions of the Secretary or authorized officer, to answer, to the best of his knowledge, any of the questions on any schedule submitted to him in connection with any census or survey provided for by subchapters I, II, IV, and V of chapter 5 of this title, applying to himself or to the family to which he belongs or is related, or to the farm or farms of which he or his family is the occupant, shall be fined not more than $100.

    (b) Whoever, when answering questions described in subsection (a) of this section, and under the conditions or circumstances described in such subsection, willfully gives any answer that is false, shall be fined not more than $500. (c) Notwithstanding any other provision of this title, no person shall be compelled to disclose information relative to his religious beliefs or to membership in a religious body.

    What does that mean? It means that it will cost you 'not more than' $600 to avoid answering those questions.

    How strongly do you feel about it? - if it really bothers you, $600 (in fact, less than $600) is a small price to pay....if it doesn't bother you so much, grin and bear it!!

    I know someone who always tried to write in ineligible scrawl on census papers, although that's not so easy for Check Box questions....

    While were on information they don't need:

    • Name (they need this to make sure people return a census form, but it shouldn't actually be a part of the census - just like when you vote your name shouldn't be part of a ballot paper)
    • Exact Address (They need suburb, maybe street to assess demographics, but they should have no interest in which particular house you live in)
    • Contact Number (If they can't work out what the answer means, then ignore it. The Census collects Statistics. Statistics (by definition) are not an exact reflection, and any calculation allows some error. The more exact they try to make the statistic, the more incorrect their final result will be)

    In fact (as with almost any form you fill in these days) it seems like they ask for way too much unnecessary information.

    I think questions on race are potentially important to assess demographics. However, the question could be better written (anything question that needs an 'other' option shouldn't be a check box to begin with). I think Question 8 is wrong too (you could get the same information asking a question that doesn't appear to target a particular group).

    Of course, I'm not a yank - I assume Census' (Censii?) in the US are used to establish demographics. I also think the Census is a crock for the most part, but I hate statistics in general....

    It's now $5,000

    From http://www.prisonplanet.com/census-data-not-so-confidential-after-all.html

    Unfortunately, choosing privacy now costs more: legislation recently passed raises the fine for “anyone over 18 years old who refuses or willfully neglects to complete the questionnaire or answer questions posed by census takers” from a limit of $100 to $5,000—a fact not advertised even in the small print.

    It's worth reading the whole article.

  • (cs) in reply to Franz Kafka
    Franz Kafka:
    SSN/DOB is supposed to be unique, but people swap digits (no check digit) and use each others' numbers enough that relying on SSN as being unique is just a bad idea.
    Yeah … but not if someone changes name and/or address and/or sex. That could easily cause a duplicate SSN/DOB key, if "someone" doesn't delete the original records.

    This actually happened in one production DB I had the good fortune to work with. Luckily, the records also had a UNIQUEID field which was auto-allocated by the DB on an INSERT.

  • Formal Norm III (unregistered) in reply to Cad Delworth
    Cad Delworth:
    Luckily, the records also had a UNIQUEID field which was auto-allocated by the DB on an INSERT.
    Luckily? So are you suggesting there are databases that do it any other way? WTF!
  • (cs) in reply to Lewis Crawford
    Lewis Crawford:
    The US Census Bureau beats this WTF: They make every citizen calculate their own DateDiff by making them enter their age as well as their birth date.
    Speaking as a UK born-and-bred resident, I would guess that the results to that question are used to generate the "n% of Americans can't do simple arithmetic" statistics!
  • (cs) in reply to Formal Norm III
    Formal Norm III:
    Cad Delworth:
    Luckily, the records also had a UNIQUEID field which was auto-allocated by the DB on an INSERT.
    Luckily? So are you suggesting there are databases that do it any other way? WTF!
    Nope. What I'm saying is that it's lucky that that table had a UNIQUEID column in it. They are optional, y'know!

    And of course, if you're using MS SQL Server, there's the ever-popular option of a column of type GUID.

  • artie (unregistered) in reply to Massive Debt

    also can't start with 666 or have all 0's in any of the 3 sections, and other restricted ranges of numbers set aside for special uses.

  • (cs) in reply to Zequel
    Zequel:
    Kinda funny, I HAD to to get the current time from the SQL server using a stored procedure vs. using C#'s DateTime. It's a synchronization application and the web server's clock may differ from the client AND the web server (where the c# code executes). The SQL server's clock is used since it's the one that's used for datetime stamping the records.

    Datediff on the other hand...

    This is about the most extreme example of "everybody must use stored procedures because I said so" I've ever seen.

    SELECT GETDATE()

    There is zero benefit to wrapping this in a stored procedure. It won't be faster. You can't manage security with the stored procedure because there is no possible way to deny a user the right to execute this statement directly. I can't think of any reason to add complexity to this process other than "Do it, monkey, because I said so". Did somebody think that the implementation of retrieving the current date and time would change some time in the future?

  • Simon Wright (unregistered)

    Sorry dudes, but the code makes perfect sense to me. Date calculations are notoriously dangerous if you want any kind of accuracy, particularly if you deal with multiple time zones, and especially if there's variation in Daylight Saving Time periods, or if you care about second accuracy (Leap seconds can be a bitch), or if you have no control over the clock configuration on the client app.

    Ideally all dates should be stored in GMT which solves most of these conundrums, but when you have tons of legacy code, ideal is rarely practical.

  • partisan (unregistered) in reply to Lewis Crawford
    Lewis Crawford:
    The US Census Bureau beats this WTF: They make every citizen calculate their own DateDiff by making them enter their age as well as their birth date. No DateDiff needed by the Census Bureau.

    TRWTF is they ask you how many people are in your household on April 1 . . . In March.

  • (cs) in reply to ideo
    ideo:
    SCSimmons:
    frits:
    Aw isn't that cute. They let the DBA write some code.
    Yah, you can just kiss my grits.

    OK, I'm just cranky at the moment, because of the application developers who are asking me to add a column to the primary key of a 1M row table. In production. They don't seem to like my idea of doing some kind of testing first. I know, those darn curmudgeon DBAs!

    What I heard: "Whine, whine whine, my DBvaginA has sand in it."

    Backup the database, restore the table with a different name, make the change, drop or rename the table, and make the atomic rename change on the restore; scan for and import the change differences from the 10 minutes the previous op took.

    And stop crying, you fucking hardware monkey.

    Hee-hee. I'd probably be offended if I were a real DBA. Since I'm really just a database developer who got saddled with administration by a process I'm still puzzled about, I'll just laugh with you.

    That is the plan for implementation, by the way, what you suggested. And despite all the TRWTF'ers, there is in fact a reasonable explanation for wanting to expand the compound PK on this table from two columns to three. Of sorts. As the person who owns the ETL process that loads data to this table every night and will therefore hear about any data issues, I'm very happy that they've agreed to develop new reports against a test table.

    (That's TRWTF in my story. I work for a Fortune 100 company, and I *design tables, *design ETL process to load them, *administer the ETL processes, and *administer the database in question. And it's taken all of my work-shirking expertise to not get saddled with any of the front-end application development, which I undoubtedly would have ruined by writing functions that determined the current date & time with database calls.)

    (And TRTRWTF: I've recently been promoted to supervisor. So in theory, I guess I should be telling someone else to do all those things. I'm still working on that part.)

  • Shinobu (unregistered)

    There were a bunch of links to related articles on the Old New Thing recently: http://blogs.msdn.com/oldnewthing/archive/2010/03/12/9977245.aspx Enjoy.

  • (cs) in reply to operagost
    operagost:
    The real WTF is the Census Bureau. All but one (arguably two) of the questions on that form are unconstitutional. Why do they need to know if I own my house, or my phone number, to make a head count for the House of Representatives?
    What, is that really /all/ that the US census data is used for? Round here, questions about who owns their own houses in the census data are used to determine how many /don't/ own their own houses and therefore what areas need more central funding allocated to improve housing. (And likewise for many other areas of planning and resource allocation).
    operagost:
    Why do they need to know my race
    Well, funnily enough, it turns out that poverty is not evenly distributed according to merit.
  • Mike (unregistered) in reply to Plz Send Me The Code
    Plz Send Me The Code:
    SCSimmons:
    frits:
    Aw isn't that cute. They let the DBA write some code.
    Yah, you can just kiss my grits.

    OK, I'm just cranky at the moment, because of the application developers who are asking me to add a column to the primary key of a 1M row table. In production. They don't seem to like my idea of doing some kind of testing first. I know, those darn curmudgeon DBAs!

    And we're still waiting so quit browsing the web and give us our new column!!!

    +1

  • Mike (unregistered) in reply to Hatterson
    Hatterson:
    Franz Kafka:
    evilspoons:
    jasmine2501:
    Theoretically I would agree with you, but I've had to do this before for an insurance company database, when after testing with sample data, the deployment to production revealed that social security numbers were not unique.

    This is the funniest/scariest thing I've heard all day.

    They never were - SSN/DOB is supposed to be unique, but people swap digits (no check digit) and use each others' numbers enough that relying on SSN as being unique is just a bad idea. Also, your PK would then be PII, which is just bad in itself.

    The relationship between SSNs and people is supposed to be 1:1 although in practice (do to change someone's number for various reasons) it ends up being many:1

    The one thing it is not is 1:many

    Simply because I use (illegally I might add) someone else's SSN doesn't mean it still isn't an identifier unique to them.

    What I've always wondered about SSNs is that there are 9 digits, which means there are 1,000,000,000 possible SSNs. Now the number is further reduced because they are dispersed regionally and by birth year, with the first three and next two digits representing those values. Further remove the numbers that are PROBABLY not used, 000-00-0000, etc, and you have fewer than 1 billion SSNs available. Now, the federal government says that dead peoples' numbers are not and will not be reused, so have there seriously not been 1 billion people in history that have been issued a Social Security Number?

  • Mike (unregistered) in reply to Massive Debt

    [quote user="Massive Debt"][quote user="justsomedude"][quote user="Hatterson] The relationship between SSNs and people is supposed to be 1:1 although in practice (do to change someone's number for various reasons) it ends up being many:1

    The one thing it is not is 1:many

    Simply because I use (illegally I might add) someone else's SSN doesn't mean it still isn't an identifier unique to them.[/quote]

    Are you sure about that? Let's see, SSNs are of the form ###-##-####, which means 1,000,000,000 unique numbers. If SSN's are never recycled, how many years do you think they last from inception to exhaustion? [/quote]

    SSNs may not fill the whole number space. I believe that the first 3 digits describe US states. So, they are limited to less than the 1,000 possibilities. Also, I've never seen a zero in an SSN.[/quote]

    I have a 0 in my frist three digits. Kentucky, issued 1974.

Leave a comment on “A Better Date Diff”

Log In or post as a guest

Replying to comment #:

« Return to Article