• (cs) in reply to Real Advertiser
    Real Advertiser:
    Silverhill:
    Real Advertiser:
    If I was paying a newspaper to run my ads and they decided to put out an issue whenever they darn well felt like it, I'd immediately pull my ads and sue them for damages.
    BFD. You're not paying Alex anything for his freely-provided work, and you think you have a right to complain? Grow up, weenie.
    Oh...you must have the ads on the side blocked then.

    How does your foot taste?

    No, I don't have the ads on the side blocked; I just don't let them bother me. (Some of them are even interesting, BTW, and I've looked at what they offer.)

    Feel free to report on the taste of your foot, instead.

    (As depressed cheescake asked, "[W]hy do you give a shit about whether advertising revenue is well spent on this site?")

    Addendum (2012-04-19 17:34): (Also, note that the adas are served to the browser even if the main content has not been updated. The advertisers still get the agreed-on number of displays, as long as people at least check to see if the site has updated.)

    Addendum (2012-04-19 17:34): s/adas/ads/

  • someone else (unregistered) in reply to Darth Paul
    Darth Paul:
    The first .NET project I worked on made use of "temperate" variables and "temperate" tables.

    Perhaps it was the same guy?

    Variables and look-up tables are premature optimizations. Real programmers use functions for everything. And "temperate" "functions" sort-of exists: http://en.wikipedia.org/wiki/Distribution_%28mathematics%29#Tempered_distributions_and_Fourier_transform

  • Alexis (unregistered)

    The developer who wrote this function opted for the solution requiring absolutely no thought whatsoever. It's actually infuriating to see something this lazy.

  • beefiron (unregistered) in reply to configurator

    Not to mention threeteen

  • A. Nonymous Coward (unregistered)
    ' would return: thirteen million three hundred and eighty seven thousand two hundred and eighty one.

    TRWTF is that when writing numbers out like this, an 'and' signifies a decimal point.

  • lol dalmations (unregistered) in reply to A. Nonymous Coward

    I've seen "One Hundred and One Dalmations". I've seen en_US sentence punctuation inside a quotation. so, Is it known in the US as "One Hundred One Dalmations"? Is it known in the US as "One Hundred One Dalmations?".

  • streaky (unregistered)

    This guy clearly studied at Gnome University's School of Annoying to Write Code.

  • Vietcongster (unregistered)

    ... And now a classic, meaning I can easily find and comment in it.

    Seriously though, I see so many WTFs that even I (quite newbie in programming in general) spotted at least the most obvious ones...

    1. If p_mode is empty, replace with a string... Only to be re-replaced by an empty string.
    2. Assume p_mode might still be empty after making sure p_mode is not empty.
    3. If p_mode is not empty, replace it with itself
    4. p_mode can only really be a hard-coded string, so why bothering with validating it before?
    5. Only valid with integers (good luck if you have a circle)
    6. Giant If-Elseif-Else monolith with hard-coded values
    7. Grammer (intentional)
    8. Values only up to fifteen
    9. This is Enterprise Edition, maybe the Lite or Home Editions will only print it is invalid
    10. How can 3 be only sometimes printed to 4?
    11. Where are the "Expert" settings?
    12. Why the hell does it need an API?
    13. I can't even fathom how long would the long name be...
    14. Implementing all those cases might take longer than the heat death of the universe
    15. You didn't even notice that I repeated number 5 among all those WTFs.

    Almost a perfect WTF-to-Version ratio of 1... Or maybe I didn't spot some other WTF.

  • BLAKEYRAT (unregistered)

    ALEX!!!

    I hate your STUPID FACE and I hope you will GET TURBO SKIN CANCER AND BURN IN SUNLIGHT FOREVER >:DDDDDDDDD

  • Ahmed (unregistered)

    Can't be real, sorry.

  • Robert (unregistered) in reply to Ryan

    I wonder if any business with this problem (amount in words is too long to fit on a check) hasn't tried something like:

    (randomly chosen amount for the examples: $70275325.95)

    SEVENTY MILLION TWO HUNDRED SEVENTY-FIVE THOUSAND THREE HUNDRED TWENTY-FIVE DOLLARS NINETY-FIVE CENTS (too long: 101 characters)

    SEVEN ZERO TWO SEVEN FIVE THREE TWO FIVE POINT NINE FIVE DOLLARS (64 characters: is this still too long?)

    SEVENTY MILLION 275 THOUSAND 325 DOLLARS 95 CENTS (49 characters, reasonably short)

  • Simon (unregistered) in reply to Robert

    They could always round up to the next dollar, i guess they could afford the five cents. Nah.....

    (Actually, many British government agencies do this, to the nearest 50p or £1. On PAYE pay-as-you-earn income tax, for example. The shortfalls and overpayments balance out over the year because it's calculated on a running total of earnings.)

  • putchar (unregistered)

    I always imagine what would be if everything was lost except this one piece of 'code' in the year get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function('pass_a_number', '947') years from now on. Would the future predominant species say: "we found that humans of the past knew how to cook", or would they say "humans of the past, as this ancient cave painting shows, knew how to solve extremely challenging mathematical problems, as of today, had an incredibly vast scientific knowledge and understanding of an advanced, yet not fully understood, prehistoric technology - and agriculture". ... 'Exceeds word range.'

  • (nodebb) in reply to Vietcongster

    You didn't even notice that I repeated number 5 among all those WTFs.

    I didn't notice because markdown made it right ;)

  • AndrewS (unregistered)

    This has got to be a fake example, or a real example with added stupidity! OK, maybe not but how would the calling functions even work correctly with the misspellings?

  • (nodebb)

    Programmer do not want to enter comments in code, so she named function this way. I applaud this programmer.

  • harmonica india (unregistered)
    Comment held for moderation.
  • ppu-prof_Hag (unregistered) in reply to RandomGuy

    Забота о обители - это забота о благополучии. Утепление наружных стен - это не только модный облик, но и обеспечение теплового комфорта в вашем удобном уголке. Мы, коллектив экспертов, предлагаем вам превратить ваш дом в идеальный уголок для проживания. Выполненные нами проекты - это не просто тепловая обработка, это творческий подход к каждом&#1

  • Teplo_Dom_Hag (unregistered) in reply to RandomGuy

    Измучились замерзать зимой и излишне выплачивать за отопление? Утепление фасада – решение проблемы! Компания "Тепло и уют" с 2010 года предлагает профессиональные услуги по термоизоляции фасадов зданий любой сложности. За это время мы зарекомендовали себя как безопасный и честный партнер, о чем свидетельствуют разнообразные отзывы наших к

  • Kirby Wallace (unregistered)

    "Future plans:" " 'Add number range over 100000000"

    Yeah.... Good luck with that.

Leave a comment on “get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function”

Log In or post as a guest

Replying to comment #:

« Return to Article