• (cs) in reply to Suede
    Suede:
    How do you 'swat' a fly with an atomic bomb. I hear they're kind of heavy things?
    Simple. Tie the fly down first so it doesn't run away. Or if you're an accountant, just read from the company report and stupefy the poor thing.
  • oheso (unregistered) in reply to Al
    Al:
    I started using yyyymmdd when it was pointed out to me that it sorted correctly as a string.

    We have a winner!!

    I've worked in organizations that have thousands of files stored in a single directory, with dates as their file names, formatted dd-mm-yyyy. WTF???

  • AshG (unregistered) in reply to annoyingcowherd
    annoyingcowherd:
    Using SQL to divide two integers is like using an atomic bomb to swat a fly.

    Appropriate when you really need to be sure you get the fly, er quotient.

    Appropriate, yes, if you are not worried about the aftermath: some other gigantic two-headed three-dicked fly that comes to mate with you the next day.

  • (cs) in reply to Moredate Madness
    Moredate Madness:
    I notice this gem was born on 08/29/08.

    So is that YMD or DMY?

    Who knows? Wacky stuff goes on in that 29th month...

  • Lee K-T (unregistered) in reply to AshG
    AshG:
    annoyingcowherd:
    Using SQL to divide two integers is like using an atomic bomb to swat a fly.

    Appropriate when you really need to be sure you get the fly, er quotient.

    Appropriate, yes, if you are not worried about the aftermath: some other gigantic two-headed three-dicked fly that comes to mate with you the next day.

    Wow, my softs never do that? Do you have a 3D printer or something?

  • (cs) in reply to snoofle
    snoofle:
    Ironic aside: why is it that these companies, which have much more cash than us, always have us using much older versions of software and lamer hardware than we buy for ourselves at home? </rant>
    These companies have much more cash than us because they always have us using much older versions of software and lamer hardware than we buy for ourselves at home.
  • (cs) in reply to Evil Code Monkey
    Evil Code Monkey:
    Do you tell someone that you're going to a concert on 2009 June 10 20:00? Or do you tell them your going to a concert on June 10 at 20:00?
    As a matter of fact, not being an American, I'd be more likely to tell them I'm going to a concert on the 10th of June. That's the tenth. Of June. 2009.
  • db guru (unregistered) in reply to i can explain everything
    i can explain everything:
    there's a perfectly valid reason for doing this you've all missed. if the application was a database based application that could use multiple providers, each of which performed integer division in a different fashion, and you wanted to ensure that whatever database you used, the integer division within the app was done in the same way as the database, this would be the way forward.

    Ah of course, because otherwise you'd need a separate table to configure whether (x / 0) was NaN or Infinity.

  • WTFCalc (unregistered)

    Reminds me of the TDWTF-contest. There was a calculator which used the Google search engine to do the math.

  • CeilingCat (unregistered) in reply to Steve the Cynic

    Actually, ceil() would be appropriate in this case, since the goal is to find out how many pages it takes to print all the rows (apparently). Using floor(...) + 1 would result in a useless blank page if the number of rows is evenly divisible by 56, but ceil(...) would not waste any pages!

  • k1 (unregistered) in reply to Whoevar
    Whoevar:
    Can someone expose this as a web service, please? I'm in desperate need of division but cannot set up an SQL server!
    You can email the operators to SQL server, then it throw an http call to the web server with the answer as a parameter.

    CYA

  • (cs)
    I guess Math.Floor(Num / Denom) was too easy.

    No, it's too hard! VB.Net can do integer division:

    Dim result As Integer = Num \ Denom
  • Anonymous (unregistered)

    Wow, if this is for real it's a beauty. Haven't seen a WTF as egregious as that in a long time.

  • Rich (unregistered) in reply to Evil Code Monkey
    Evil Code Monkey:
    Do you tell someone that you're going to a concert on 2009 June 10 20:00? Or do you tell them your going to a concert on June 10 at 20:00? Or just a concert at 20:00?
    Except that's not a relevant example, because (as you in fact point out), "June 10 at 20:00" doesn't mention the year at all. It therefore follows a sane progression of specific-ness: Month > Day.

    The whole MM/DD/YY thing is crazy because there's no nice linear progression there. Year > Month > Day works (and is good for sorting), as does Day < Month < Year.

    So there. Of course, some people couldn't care less about whether things actually make sense or not...

  • Kufe (unregistered) in reply to Claxon
    Claxon:
    That doesn't supprise me. In the company where I work excel is used for everything from data storage to bug reports (even though we have proper database and bug reporting solutions in place - they just don't get used).

    I know someone who uses Excel to make blueprints for furniture.

  • (cs) in reply to snoofle
    snoofle:
    girly programmer:
    I notice this gem was born on 08/29/08.

    So is that YMD or DMY?

    and the 29th month is...?

    ...WTFuary!

    You're a genius!

    But does one pronounce it W-T-F-uary or Whathefuckuary?

    Or maybe Worsthanfailuary?

  • plaga (unregistered) in reply to Numeromancer

    No wonder it was his last day.

  • RandomUser423651 (unregistered) in reply to Capt. Obvious

    Precisely my point. Since some groups find the numeric form "retarded", I figured they may find that written form equally "slow", so I thought I would save time by providing a likely origin for it as well.

    And, as I posted shortly after, there is significant inertia in moving to a, so-called, "intelligent" numeric date format because children are taught that that is "just the way it is". By the time they have the insight to be able to realize it is odd, they're used to it. Never underestimate the human ability to accept the perceived status quo, no matter how stupid or annoying.

  • RandomUser423651 (unregistered) in reply to Capt. Obvious

    And that was in response to this. Forgot the quote.

    Capt. Obvious:
    RandomUser423651:
    Of course, it is not entirely uncommon (at least in US English) for the comma to indicate that items have been transposed. Thus, "Doe, John Alva" would represent "John Alva Doe" and "Boring Book Title, The" would represent "The Boring Book Title". In this way, the date may have originally been formatted as "2009 June 10", but was reordered so as not to begin with digits.
    What is interesting about your examples is that they all make sense. Refering to someone by last name (except within a family) is usually a good way to go, with additional qualifier added on as an afterthought. "Boring Book Title" is more important than "The". While a full date was likely originally formated "2009 June 10", it makes sense to refer to dates this year as "June 10", and add extra information when relevent (in conversations at least... data backups, not so much).
  • Buddy (unregistered)

    Just shocking.

    I've seen examples where someone coded a RNG in a Java plug-in (or bean or whatever they call them) because he was too lazy to make up a big enough seed in the native RNG.

    It took all of two lines to get the date in seconds plus milliseconds of running time mod 1000 for 30+ billion seeds in a year (fairly uniform, too - global site active 24/7).

    Despise Java with a passion...

  • the Unreal WTF (unregistered) in reply to amischiefr

    The real WTF is that 'Month - Day - Year' is considered a standard! it makes no sense at all!

  • Gunner (unregistered) in reply to dpm
    dpm:
    I not only believe this code is in production somewhere, I cannot help but admire the "Who: ????" as well.

    Which indicates that not only did someone write that and put it into production, but at least one other person looked at the code to determine what it did in order to add that comment, and didn't see anything wrong with the SQL call.

  • (cs) in reply to Gunner
    Gunner:
    dpm:
    I not only believe this code is in production somewhere, I cannot help but admire the "Who: ????" as well.

    Which indicates that not only did someone write that and put it into production, but at least one other person looked at the code to determine what it did in order to add that comment, and didn't see anything wrong with the SQL call.

    Nice theory, but I think the submitter replaced the perpetrator's name with question marks to protect the guilty.

  • boingle (unregistered) in reply to Moredate Madness
    Moredate Madness:
    amischiefr:
    Moredate Madness:
    I notice this gem was born on 08/29/08.

    So is that YMD or DMY?

    How about neither, unless on your planet there are 29 months...

    How about the standard Month - Day - Year?

    Whoosh!

    Best comment ever!

  • boingle (unregistered) in reply to snoofle
    snoofle:
    Dinnerbone:
    ...written at work on Visual Studio 2008 and my last ones at home on Visual Studio 2010.
    Ironic aside: why is it that these companies, which have much more cash than us, always have us using much older versions of software and lamer hardware than we buy for ourselves at home? </rant>

    I might be missing something here, because the answer to this is too obvious.

    The last time I checked, Visual Studio 2010 was still a beta product.

  • facilisis (unregistered) in reply to Dinnerbone

    I work in a place where powerpoint is the program that management uses to write documentation. I've tried to explain to them a number of times just how retarded they are. And I still didnt get fired the last round of layoffs. Instead they seem to appreciate my honesty. >.< they even told me so on my last IPM, and gave me a 1000 bucks raise.

    Argh!

    I have to get out of here.

  • (cs) in reply to Matt
    Matt:
    It makes me wonder if there's something inherently wrong with HP's Quality Center when all bug reports are done in plaintext files.
    I don't know about HP's Quality Center, but in another job I was project leader in a project aimed to provide a better control over one of the Pavillion repair facilities. When I got there to gather requirements I was astonished to see that they "controlled" everything with an Excel sheet.

    Now it wasn't really HP's fault, because they hired Solectrum to provide repair to Pavillion notebooks and that was their way to do it. The interesting part: I was just an undergrad, in a student company (sorry, but I don't know what are they actually named in english). We did a job so good that this project saved HP a couple millions per month and shortened the time a notebook stayed in repair. It didn't take long to have it spread to every other HP repair center; at least that's what I heard later (because I had to leave before the project was over due to my graduation).

  • (cs)

    Yeah right.

    "How do you disarm the alarm?"

    "..."

    "Well?"

    "There was a little man ... in his hair."

    Name the show and you win five pounds.

  • WyrdestGeek (unregistered)

    hmm using SQL and a database to divide a pair of integers... Yeah that's a Real WTF.

    I mean that one got me. I was reading along with the function declaration, everything was in order (except that it was totally ridiculous that it existed) and then the SQL hits wham!.

    That's insanity.

    -- Furry cows moo and decompress.

  • WyrdestGeek (unregistered) in reply to kastein
    kastein:
    Whoevar:
    Can someone expose this as a web service, please? I'm in desperate need of division but cannot set up an SQL server!

    http://www.google.com/search?q=[insert math to perform here]

    Done. It's even abstracted to handle assorted unit conversions, trigonometry, complex numbers... the list goes on!

    Now you just have to write a neural network to learn how to extract the answer from any arbitrarily formatted Google result page (what if they change the logo?) and you're all set. No Quack.

    In Humor's name, I LoL at thee! :-D

    -- Furry cows moo and decompress.

  • WyrdestGeek (unregistered) in reply to Alan
    Alan:
    my name is missing:
    Using SQL to divide two integers is like using an atomic bomb to swat a fly.

    No, its more like catching the fly and putting it in a box that you then post to your accountant with instructions for him to swat the fly and send it back to you.

    Yes, and the instructions are written such that if any exception on fly swatting should occur, the account is to send the box back empty, and you then proceed to send that empty box along to whomever called you, again with no explanation. Well, I guess that way the beta testers have more of a challenge, eh?

    -- Furry cows moo and decompress.

  • Foo Bar (unregistered)

    For those who doubt whether this sort of thing happens in real programming, I've seen similar things. I once had a colleague whose code for removing duplicate items in a list (in Java) opened a socket to a database, created a database table, dumped the list into the table, and then did a SELECT DISTINCT on it. This person had previously bragged about getting an A in a graduate-level Algorithms course at university.

  • (cs) in reply to Foo Bar
    Foo Bar:
    This person had previously bragged about getting an A in a graduate-level Algorithms course at university.
    That makes sense, actually. If you're bored to death by the standard algorithms, brighten up your day by inventing enterprisy new algorithms :)
  • Anon (unregistered) in reply to Evil Code Monkey
    Evil Code Monkey:
    In normal conversational usage, it would seem to me that the month and day would be more important than the year. Do you tell someone that you're going to a concert on 2009 June 10 20:00?

    So then why don't you write 'June 10 (2009)'? Or you could make '2009' a footnote - footnotes are used when reading of the text in a footnote is optional.

  • Andrew (unregistered)

    I can always count on thedailywtf to make me feel like a good programmer

Leave a comment on “The Int Divide”

Log In or post as a guest

Replying to comment #:

« Return to Article