• Terra (unregistered)

    Other than what looks like static buffer usage (bad, but might be called for in some embedded scenarios?) and unnecessarily short variable names, I'll join the chorus of "not a WTF" here.

    It looks reasonably fast, could (admittedly) be more readable, and is a tiny tool for a tiny job. If you need some general number formatting, it is not the right tool. It should work for what it strikes out to be, and that is the goal for a tiny tool.

  • Pax (unregistered) in reply to ZPedro
    ZPedro:
    I'm going to have to join the chorus here: I don't see much of a WTF; especially the "few minutes to figure out" argument doesn't hold, for me "I came, I saw, I understood"

    I agree; as soon as I saw the "d = 3" and checked back to see that it returned a char*, I instantly thought it was a number prettifier. The ',' character down below just confirmed it for me. Total time to figure out what it did: about 5 seconds.

  • Jimmy Jones (unregistered) in reply to Jay

    I read straight through it, understood it, didn't see any problem.

    Where's the WTF?

  • rcc (unregistered)

    Or, maybe, out of your league?

  • Cookie (unregistered)

    I might have a quarrel with the rather horrible LOC-driving formatting, the global storage it uses for a buffer, the undocumented constant 20 (which is actually a bit short, think log10(2^63)+2 for sign and terminator) and the failure to put the comma under a define or (my preference) an enum. Also a minor nit that there are at least two other characters (dot and apostrophe) used for the same function, elsewhere. But not with the method.

    The backwards'' approach to make happen what this does is pretty much the natural one. To see why, try and come up with an elegantforwards'' method. In fact, I have a function that does variable base number-to-ascii (but without comma support) in the same way and it doesn't even add a terminating NUL. Why? The subsequent write function takes a length argument, and why not? The information is available already. Might as well use it.

  • Cookie (unregistered) in reply to Cookie

    And right after I post it, I realise I forgot another: the 20 isn't just short, as commata take space too. whoops. Buffer overflow!

  • Jeltz (unregistered) in reply to methinks
    methinks:
    Jeltz:
    And single letter variables are not bad in any way as long as they are few and their scope is short. I have never understod this fobia.

    I do agree about the variables. But single letter transcriptions of certain greek letters are definitely not ok ;o)

    They sure are in Swedish. Thanks for pointing out my typo.

  • (cs) in reply to Cookie
    Cookie:
    I might have a quarrel with the rather horrible LOC-driving formatting, the global storage it uses for a buffer, the undocumented constant 20 (which is actually a bit short, think log10(2^63)+2 for sign and terminator) ... And right after I post it, I realise I forgot another: the 20 isn't just short, as commata take space too. whoops. Buffer overflow!

    Oh, c'mon guys!

    In the C99 spec you find:

    ISO/IEC 9899:1999:
    — minimum value for an object of type long int LONG_MIN -2147483647 // -(2^31 - 1)
    strlen("-2,147,483,647") < 20

    Yes, this can be overridden by the implementation, but in many environments (especially embedded systems) the compiler implementation is fixed and well understood by those writing the code.

  • James (unregistered) in reply to Jay

    The WTF is, they could have just done this:

    /* must call setlocale(LC_NUMERIC, "") before calling. */ static char *nice_num(long n) { sprintf(prtbuf, "%'ld", n); return prtbuf; }

    (Meaning, the whole function is unnecessary; it's better to avoid using a static like prtbuf for this anyway)

  • Gumpy Gus (unregistered)

    I don't see any major problems with the code. Modulus math is the only way to do this, short of subtracting powers of ten. You can't do it three digits at a time without ending up with "1, 74" and the like. It's a bit flaky returning a pointer into a static, but not terribly bad.

    I usually do this with a sprintf %d, then add the commas.

  • fluffy777 (unregistered) in reply to Gumpy Gus
    You can't do it three digits at a time without ending up with "1, 74" and the like.

    ever tried printf("%03d", 42); // prints "042"

    printf can do about 80--99% of what you want and could reasonably expect it to do. If you know the magic codes.

    My favorite trick is

    printf("%*s<stuff>", indentation, "", ...args for stuff...);

    it beats

    for(int i = 0; i < indentation; i++)
        putchar(' ');
    printf("<stuff>", ... args for stuff ...)

    and the code sample here is not a WTF. Is the source of WTFs drying up? Has TDWTF made an impact?

  • Chris (unregistered)

    How the hell is a function called "nice_num" not a WTF?!

  • (cs) in reply to James
    James:
    The WTF is, they could have just done this:

    /* must call setlocale(LC_NUMERIC, "") before calling. */ static char *nice_num(long n) { sprintf(prtbuf, "%'ld", n); return prtbuf; }

    That function just writes 'ld for me. Believe it or not, not everyone uses Linux.

  • Cookie (unregistered) in reply to GettinSadda
    GettinSadda:
    In the C99 spec you find:
    ISO/IEC 9899:1999:
    — minimum value for an object of type long int LONG_MIN -2147483647 // -(2^31 - 1)
    strlen("-2,147,483,647") < 20
    So sorry, but it's not relevant. The argument to the fn was given as "int", which still means it is entirely permissible (and it does happen) that the argument ends up being 64 bits. In that case you have a potential buffer overflow, which could've been prevented IF ONLY someone had written a larger 20. But that isn't my real complaint.
    GettinSadda:
    Yes, this can be overridden by the implementation, but in many environments (especially embedded systems) the compiler implementation is fixed and well understood by those writing the code.

    You can't on the one hand claim standards conformance and on the other hand say that everybody does something else anyway. Especially claiming common sense on TDWTF is a bit capricious.

    The problem is that "20" is not an adequate way to document the assumptions behind that particular use. Code does get ported, so documenting platform assumptions isn't a bad thing. Not doing that arguably is.

  • AdT (unregistered) in reply to mscha
    mscha:
    A function that has variables?? Shocking! :-P

    I was thinking the same thing. Fortunately, I was able to rewrite the beast in a language that has no variables in the first place – Haskell!

    shows_nice_num n =
      ( if n < 0 then showString "-" else id ) . foldr (.) id (
        ( intersperse (showString ",") . ((shows $ last l):) .
          reverse . map (\n -> foldr (.) id (replicate
            (3 - length (show n)) (showString "0")) .
            shows n)) (init l))
      where
        l | n == 0    = [0]
          | otherwise =
              unfoldr (\x -> if x /= 0 then
                Just (x `mod` 1000, x `div` 1000) else Nothing)
                (abs n)
    

    Now testing the new function is as simple as

    main =
      (getLine >>= return . shows_nice_num . read) <*>
      return "\nThis is insane!" >>= putStrLn
    
  • Bisom (unregistered) in reply to AdT

    Like someone else said, the only complaint I can think of is the divide ops ..maybe the WTF is the WTF. A meta-WTF!

  • anon (unregistered)

    I found this snippet on the Web:

    http://www.eskimo.com/~scs/c-faq.com/stdio/commaprint.html

    Hmm, what a surprise. It uses the exact same technique, only it happens to have a bigger buffer and support for system locale.

    Multiple calls will overwrite the buffer, but that's what strdup is for.

  • ML (unregistered) in reply to lolwtf
    lolwtf:
    Gieron:
    In Sweden we use spaces: 1 000 000
    That must get fun when you have two numbers next to each other separated by spaces.
    I have a lot of CPUs! In fact, I have 96 386 CPUs!
  • (cs) in reply to Programmer
    Programmer:
    ... understand a piece of code any college freshman with a programming 101 should be able to grasp...
    While I'm happy to rely on people with a better grasp of C than me that this is not a WTF, it really irks me that so many people think not understanding this code indicates a lack of intelligence. Some of us took "programming 101" in the last five year, at colleges / universities that concentrated on modern OO languages (you know, the ones a lot of modern commercial software is written in), and have only a passing familiarity with C - I'm not a bad programmer, but having no knowledge of the language it'd take me a while (and possibly a textbook!) to figure out what this actually did (pointers? C-strings? Youwhatnow?!?).

    Knowledge is not the same thing as intelligence, people...

  • methinks (unregistered) in reply to John
    John:
    Robajob:
    JPhi:
    We don't want this to be like that English nazi site with 1000's of posts making fun of signs that use "your" instead of "you're".

    I do.

    I do too!

    But what REALLY puzzles me is that some writers confuse 'then' and 'than'

    It may be understandable for someone for whom English is a second or third language, but this is the kind of basic detail grasped by young kids.

    At least, I thought so.

    for puzzlig mix-ups, you might add:

    "their" / "there" / "they're" "its" / "it's"

    It's baffling me every time - judging from various online forums, chats etc. native speakers are more likely to make these mistakes.

    It might be that you have to learn spelling from the ground up when learning a new language (after all you continuously have to use a dictionary even for simple words in the beginning).

    Perhaps if you learn a language mainly by listening (which is the case for one's mother tongue) you tend to mix up homophones (i.e. words that sound alike) if you never get formal training and/or do not read a lot, as reading a word repeatedly helps in "anchoring" the pattern of how that word is spelled correctly.

  • lukas (unregistered)

    Nicely written function. It's actually nice to see such a nice code written in pure C.

  • methinks (unregistered) in reply to Jeltz
    Jeltz:
    methinks:
    Jeltz:
    And single letter variables are not bad in any way as long as they are few and their scope is short. I have never understod this fobia.

    I do agree about the variables. But single letter transcriptions of certain greek letters are definitely not ok ;o)

    They sure are in Swedish. Thanks for pointing out my typo.

    They are in Swedish? I see...

    In Germany, Austria and Switzerland there was a reform of the official orthographic rules some years ago. Apart from some quite sensible stuff, the transcription of greek words was also "simplified", which is in part really stupid: "th" signifies a different letter (gr. "theta") than "t" (gr."tau"), after all, the same goes for "y" (gr. "ypsilon") and "i" (gr. "iota").

    These "simplifications" therefore tend to destroy information and moreover make some classic words butt-ugly ;o) (the latter being a point of personal taste, of course... "symphonie" vs. "sinfonie" is an example)

  • Procedural (unregistered)

    There's no problem with the code; that's the kind of thing you expect to see in buffer-management code. I think the WTF is in the mind of the proposer: that all code should use APIs and libraries (to the extend that the proposer never actually saw such ordinary code before). It is a programmer's responsibility to know the algorithmic path of every byte in and out of memory; just relying on higher-level functions and leaving the gory details to the black box doesn't sound like the work of a senior to me.

  • Ken (unregistered)

    Depending on the situation, this is may not be surprising. I have encountered situations where programmers have been forced to write such code. It could be during crunch time where they don't have the time to lookup the APIs, or the original programmer has left, leaving us with no option but to "temporarily" employ someone who we know is not qualified (in one instance, my manager), or we realize that the library that provides such functionality is not available/is too slow/consumes too much memory on the arcane target platform.

    Heck! I remember code that was originally written for Windows 3.1 where we had to code some seemingly basic functions that were available in Unix (and eventually in Windows XP onwards). We have not had the time to rewrite the 15+ year old code until now (for Vista). It's more like we really did not bother to do so as the original coder understood portability issues and coded it in such a way that it could be recompiled verbatim on any OS.

    I am sure that all of us will have a nice laugh at the old code, if I put it up, but we probably saved half a million dollars over all these years by not having to maintain it. I always encourage people to rewrite old code, if they are capable of coding and testing it properly.

  • Bryan (unregistered) in reply to Paolo G

    Zomg, you're like the python of currency

  • RTH (unregistered)
    You use sprintf to get the number into a string, and then you simply add a comma every 3 spaces in some kind of loop... It takes all the "math" out of the equation and turns the problem into a simple string manipulation.
    Talk about making something that's, 'okay', into a wtf! What do you think sprintf is doing to get the digits in the first place? And you think futzing around shifting digits in a string is simpler than executing a few 'OOH AHH' ***MATH*** instructions?? Surely there's a limit on how ignorant one is allowed to be and still go near a computer in a programming capacity?
  • Rambaldi (unregistered) in reply to neophrene
    neophrene:
    Rambaldi:
    Standard C doesn't have a bool type.

    WAOUH

    I just found a time machine to travel 10 years in the past. Yeepee!

    (and i also found TRWTF: it's Rambaldi)

    Best response to my incorrect statement, not sure what the equivalent is for this site but want a cookie?

    Its my bad for being a student and using non what ever the latest version of C is C compilers for embedded systems. hates having to keep things on the same line when it would be much easier to understand if they were on multiple

    If this was for an embedded system sprintf might not be an option, its less so an issue now but if you are using old hardware then the standard libraries can take up a fair chunk of your rather limited resources.

  • Bisom (unregistered) in reply to methinks
    methinks:
    It's baffling me every time - judging from various online forums, chats etc. native speakers are more likely to make these mistakes.

    You just wait 15 years. Then it's gonna be something like

    English style guide of 2023:
    Although "they're" is the correct writtrn form for the contraction of "they are", "their", "there" and "thei're" are in such wide usage that they are considered generally accepted standard English. This is after the NY Times finally conceded there defeat on this linguistic issue in 2019. LOL.

    And nobody will understand C code either.

  • Bisom (unregistered) in reply to Bisom

    A flame war about number formatting and whose code has hairier balls. It's nice to see such passion still exists. :)

  • K (unregistered)
    1. have written code that does this, so immediately obvious
    2. the group comma thing is +10 seconds mental parse time
    3. expect every C programmer to grok this in about 30 sec max
    4. bufsize = 5sizeof(n) / ought to be safe here */
    5. "n = -n" may trap with signed long (LONG_MIN). Anyway, for your IA32 homecomputor, nice_num(-2147483648) will produce junk like "-.,/,),,(-,*,(". Or, if you compile with gcc -O0 -ftrapv, it SIGABRTs. Need unsigned arithmetic here! This 5. could be TRWTF, except:
    6. This article itself reads like a meta-WTF. Boo!!!
  • Naveen (unregistered)

    Seems perfectly OK to me except that it needs some comments. I have seen much more cryptic codes than this.

  • pwned (unregistered) in reply to Naveen

    Surely this submission has to have come from TopCod3r.... havn't seen an article starting a thread like this in a while - and no real mentions of TRWTF

  • Tomtefar (unregistered) in reply to ML
    ML:
    lolwtf:
    Gieron:
    In Sweden we use spaces: 1 000 000
    That must get fun when you have two numbers next to each other separated by spaces.
    I have a lot of CPUs! In fact, I have 96 386 CPUs!
    That's not a problem. What you do is insert the unit of count "st" (short for "stycken" meaning "pieces").

    The sentence ML wrote becomes: "Jag har många CPUer! Faktiskt har jag 96 st 386-CPUer!"

  • Bisom (unregistered) in reply to Tomtefar

    Back when I was young we'd convert longs to prettified char strings by toggling binary switches.

    That's noting. All we had was a soldering iron and a bunch of magnetic relays.

    Relays, eh?? Luxury. We had a ball of string, a twig and some pine cones.

    Bah! You were lucky to have a twig! All we had was a pebble and a handful of river water.

    Etc.

    :)

  • cactus (unregistered) in reply to DC

    I think the worst case for a long would require a 15 character buffer.

  • (cs) in reply to K
    K:
    5. "n = -n" may trap with signed long (LONG_MIN). Anyway, for your IA32 homecomputor, nice_num(-2147483648) will produce junk like "-.,/,),,(-,*,(". Or, if you compile with gcc -O0 -ftrapv, it SIGABRTs. Need unsigned arithmetic here!

    Nice catch! Reminds me of the checked integer arithmetic functions I wrote not too long ago (in C++). The division function can throw std::overflow_error on two's complement architectures. :-)

  • Jimbo (unregistered)

    So it's not a WTF - get over it...Ignore it...wait for another one - tomorrow. (Or better still, F-off somewhere else if TDWTF annoys you so much that uyou feel you have to complain that it's not what is used to be)

    FFS the one thing that Sh!ts me most on this site is the idiots that feel the need to post (often it's quite obvious they haven;t read ANY of the other posts) with "That's not a real WTF..." etc, etc, etc....

    And, of course, the obligatory "Why a child of four could understand that code". Granted. But once the 15th person starts posting that, it seems more of a "I'm smart, I get it too" rather than a genuine observation...

    I can't help (after reading most comments about that particular days article on TDWTF almost daily) that the IT industry is full of F-wits who all think they have to prove how smart they actually are (which to me implies that they aren't that smart at all and realise it - they are trying to prove they are smart to themselves as well as to the world {or what little of the world reads TDWTF comments, at least}).

    If you don't like the article IGNORE it...we all make mistakes (some more often than others), and perhaps Alex (oops, Jake) was half asleep when he skimmed over this one and put it up...Deal with it....

    [/rant]

    Quite appropriately, captcha = genitus which (no not really, before you look it up) means 'Smart Dick'

  • Goofy Modulus Math (unregistered)

    This code provoked a "WTF" reaction from me, but only because I'm not a C programmer. Anyone (like me) whose primary environment is weakly-typed languages where converting numbers to strings is a simple matter of sticking '""+' in front, might take a while to understand what was going on. I'm quite pleased that I managed to figure it out - but then I use goofy modulus math on a regular basis (for example to set different properties on alternating rows in a table ;) )

    For me it was a "WTF" - but not the kind of WTF that this site is about.

  • chrome (unregistered)

    You guys are hilarious. Someone makes a post saying 'it takes some time to understand this code' so of course you all set out to prove how smart you all are by showing how quickly you understood it.

    Why anyone would implement something like this (or congratulate the original coder on his cleverness and obviousness) and not use strfmon() (found with <30 seconds of googling) boggles the mind.

    My only conclusion is that the great majority of you have your head so far up your own arses that you wouldn't see a bad idea if it came up and segfaulted on you.

  • Sager (unregistered) in reply to chrome
    chrome:
    Why anyone would implement something like this (or congratulate the original coder on his cleverness and obviousness) and not use strfmon() (found with <30 seconds of googling) boggles the mind.

    Another whos's clearly read the comments before posting....

    My little microcontroller has great need for all those monetary functions...lets use that library....Oh bugger - now I haven't room for anything USEFUL...Oh well, it solved he problem at hand....

  • Sager (unregistered) in reply to Sager

    In fact, better still, given that someone will point out there's probably little use for formatted numbers on a microcontroller, lets try adding that library onto my mobile phone....

  • xianthax (unregistered)

    whats wrong with you guys? there has to be a WTF here!

    no calls to poorly implemented standard libraries? FAIL

    not linking in 50kB of code to perform a simple task? FAIL

    writing novel, simple AND fast code? FAIL

    in all seriousness, anyone who thinks his implementation is a WTF, you are the cause of ugly, clunky software, please raise your hand so i may make note and ensure i never hire or work with you.

    x

  • (cs) in reply to chrome
    chrome:
    Why anyone would implement something like this (or congratulate the original coder on his cleverness and obviousness) and not use strfmon() (found with <30 seconds of googling) boggles the mind.

    My only conclusion is that the great majority of you have your head so far up your own arses that you wouldn't see a bad idea if it came up and segfaulted on you.

    strfmon is not part of the C or C++ standards, and it doesn't exist in the implementation that I use. I guess I "have my head up my own arse" because I prefer code that actually compiles?

  • (cs)

    Here's my version:

    /* The separator character for your locale. You may change this to a
       reference to a global variable if you want dynamic locale. */
    #define SEP_CHAR ','
    #define FORMAT_BUFSIZE ((sizeof(long) * 4) + 4)
    typedef char format_buffer[FORMAT_BUFSIZE];
    
    static char *_format_num(unsigned long n, char* buffer, int is_signed)
    {
        /* C89 doesn't have a boolean type, so we treat
           the value '0' as false and '1' as true. */
        int neg = 0;
    
        /* A digit counter. We count from 3 down to 0 
           instead of the other way because it's 
           easier for the processor to compare with
           0 than with 3 -- in fact, most instructions
           do this automatically by setting the zero
           flag if the result is 0. */
        int d = 3;
    
        /* If we're treating it as signed, check if it's less than zero. */
        if (is_signed && ((long)n < 0))
        {
            /* See the comment for 'neg' above */
            neg = 1;
    
            /* 'n = -n' would work, but some compilers may get uppity
               about mixing signed and unsigned types. */
            n = (unsigned long)(-(long)n);
        }
        /* Move the pointer to the end of the buffer. Adding
           FORMAT_BUFSIZE puts us just past the end, so subtract two (one
           for the terminating null). */
        buffer += FORMAT_BUFSIZE - 2;
    
        /* Make sure the string ends with a null. */
        *buffer = '\0';
    
        /* Using a do { ... } while loop allows us to deal with the edge
           case of n == 0 because it forces the loop to execute at least
           once. */
        do
        {
            /* Check if we have processed three digits yet. */
            if (d == 0)
            {
                /* Reset the counter. */
                d = 3;
    
                /* Set the current location to SEP_CHAR, then decrement
                   the pointer. */
                *--buffer = SEP_CHAR;
            }
            /* n % 10 gives us the value of the least significant
               digit. Since in C, characters are just numbers, and in
               ASCII the numbers are sequential, we can just add the
               character '0' to the digit to get its text value. We then
               assign it to the current location and decrement the pointer
               as above. */
            *--buffer = '0' + (n % 10);
    
            /* Now, we divide by ten so that the next-least significant
               digit becomes the least significant digit for the next
               loop. */
            n /= 10;
    
            /* Decrement the digit counter.*/
            d--;
        }
        while (n != 0); /* If n is zero, there are no more digits to
                           process. */
    
        if (neg) *--buffer = '-'; /* If the value was negative, put a '-'
                                     at the beginning. */
    
        return buffer; /* Return the pointer to the beginning of the
                          number. */
    }
    
    #define format_signed(n, buffer) _format_num((unsigned long)(n), buffer, 1)
    #define format_unsigned(n, buffer) _format_num((n), buffer, 0)
    
    

    Improvements:

    • 64-bit clean
    • No global buffer
    • Moves magic numbers and characters to #defines
    • Handles both signed and unsigned numbers, with edge cases covered.
    • Enterprisily commented so that even a non-C programmer can understand.
    #include <stdio.h>
    #include <limits.h> /* for LONG_MIN and LONG_MAX*/
    
    int main(int argc, char** argv) {
        long l1 = 123456789;
        long l2 = LONG_MIN;
        long l3 = LONG_MAX;
        unsigned long l4 = ULONG_MAX;
        format_buffer b1, b2, b3, b4;
    
        printf("l1: %s  l2: %s  l3: %s  l4: %s\n",
               format_signed(l1, b1),
               format_signed(l2, b2),
               format_signed(l3, b3),
               format_unsigned(l4, b4));
        return 0;
    
    }
    
    
    jspenguin:~/myprogs$ gcc format_num.c -o format_num; ./format_num
    l1: 123,456,789  l2: -9,223,372,036,854,775,808  l3: 9,223,372,036,854,775,807  l4: 18,446,744,073,709,551,615
    
    
  • Planar (unregistered) in reply to Pascal Cuoq
    Oh, one more thing: the function breaks for MIN_LONG because the instruction n = -n; overflows in this one and only case.
    You can also test for MIN_LONG, and in that case add 1, call the original function, then increment the last digit. No need to bother with carry: you know it won't be 9 because MIN_LONG is a power of 2 :-)
  • (cs) in reply to JimM
    JimM:
    Programmer:
    ... understand a piece of code any college freshman with a programming 101 should be able to grasp...
    While I'm happy to rely on people with a better grasp of C than me that this is not a WTF, it really irks me that so many people think not understanding this code indicates a lack of intelligence...

    You make a good point, but I think a lot of the vehemence is triggered by the stupid/ignorant claiming that if they can't understand it, it must be bad. That is stupid. :) Of course there are some people that hang around just to remind us how much faster they understand everything than everyone else.

  • (cs)

    So not a wtf. Taken out of context, there are some minor wtfs that were already mentioned (buffer overflow for 64-bit long, thread-unsafety), but it's entirely possible that the surrounding code makes validates them. Locking may exist on a higher level, as well as checks for numeric range. The thousands separator format for printf comes from SUSv2, not the C standard, so it's very unlikely that Microsoft's implementation includes it. Filling the buffer from the right is standard practice too, since extracting the digits with modulus starts from the least significant digit.

    I've spent the last few days rewriting all of printf's formatting (with a few custom conversions) in C++, since I'm not happy with the way iostreams work in some aspects. My int_to_str function is very similar to the one in this article, although more feature-rich.

  • Ape Monkey (unregistered) in reply to helix
    helix:
    looks standard fare for an embedded firmware engineer.

    Plus it doesn't look unfamiliar for any compiler-writer, including me, who has implemented only a basic c-compiler in c (for kicks).

  • Anonymous I18N Pseudo-Expert (unregistered)

    given that nobody (afaik) properly supports japanese number formatting (group every four digits), let alone the seriously wacky indian formatting (grouped by twos, except for the lowest order digits, which are a group of three) this is a fine start on an i18n number formatter--just make d an argument to support japan, and add another argument separating first and loop initializations of d to support india.

  • (cs) in reply to Jimbo
    Jimbo:
    <snip>

    I can't help (after reading most comments about that particular days article on TDWTF almost daily) that the internet is full of F-wits who all think they have to prove how smart they actually are (which to me implies that they aren't that smart at all and realise it - they are trying to prove they are smart to themselves as well as to the world {or what little of the world reads TDWTF comments, at least}).

    <snip>

    There, FTFY ;^)

    p.s. jspenguin's implementation FTW!

Leave a comment on “nice_num, mean_programmer”

Log In or post as a guest

Replying to comment #231936:

« Return to Article