• (cs) in reply to trtrwtf
    trtrwtf:
    Coyne:
    hoodaticus:
    Coyne:
    My favorite is "destroyEverythingYouTouch". That pattern will be very useful in the future. I plan to create all of these:
    /*snip*/ int increment(int &x) { return x--; }
    I like this one, especially since it returns x, which allows you to read x's value, and then, after you read its returned value, it decrements it.

    Exactly: Neither the return nor the change to x counts as an increment. The name is a doubled lie.

    It's the opposite of an increment. It's an excrement.

    string excrement(string x) { return x = "Merde!"; }
  • Mike (unregistered) in reply to Anonymous
    Anonymous:
    C-Octothorpe:
    hoodaticus:
    That last sample is some really good VB.NET alright.

    Can you really do _ for line continuation in C#, and if you do, will boog strangle a penguin?

    boog will strangle the penguin no matter what. I think we all know that by now...

    And no, you can't do _ for line continuation because dusting off my flamewar hat C# is a REAL language which doesn't require hand-holding like this.

    zis comment is merde!

    Almost, but not quite - you don't need _ in C# because C# is a REAL language that has line terminators. Hence if you don't terminate the line, you can flow onto the next without requring an explicit continuation symbol. What kind of merde language doesn't have line terminators?

    Python.

    :)

  • Ryan Herbert (unregistered)

    The biggest WTF is that Skynet became self-aware at 2:14AM, not 2:13AM.

  • Gibbon1 (unregistered) in reply to Anonymous Coward
    Anonymous Coward:
    Dividing by `$null...
    is my personal favourite.
    13 {Write-Host $logTime "Playing rock-scissors-file_mot_found..."}
    

    Is my favorite.

  • Kalle (unregistered) in reply to Mike
    Mike:
    Anonymous:
    C-Octothorpe:
    hoodaticus:
    That last sample is some really good VB.NET alright.

    Can you really do _ for line continuation in C#, and if you do, will boog strangle a penguin?

    boog will strangle the penguin no matter what. I think we all know that by now...

    And no, you can't do _ for line continuation because dusting off my flamewar hat C# is a REAL language which doesn't require hand-holding like this.

    zis comment is merde!

    Almost, but not quite - you don't need _ in C# because C# is a REAL language that has line terminators. Hence if you don't terminate the line, you can flow onto the next without requring an explicit continuation symbol. What kind of merde language doesn't have line terminators?

    Python.

    :)

    and Haskell.

    :)

  • boog's sock puppet (unregistered) in reply to boog
    boog:
    So "merde!" means campfire? I don't get it.
    Your an idiot.
  • justsomedude (unregistered) in reply to boog's sock puppet
    boog's sock puppet:
    boog:
    So "merde!" means campfire? I don't get it.
    Your an idiot.

    *You're

  • Brent (unregistered)

    TRWTF is that the person who wrote "Important-Function()" probably thinks that fitting a square in a circle is what is meant by "squaring the circle".

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

  • C-Octothorpe (unregistered) in reply to Mason Wheeler
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    So you think that a language which forces you to be specific about which member, field, etc. you're talking about is a screw up, or are you just trolling?

    The logical conclusion to that argument is to ask why should you spell the function name in use as it is defined? Because what, the compiler/interpreter should just KNOW what you're talking about?

    void DoStuff() { // does stuff... }

    d0Stuuff("some string");

    Who wouldn't want to work in a language like that?

  • (cs) in reply to boog's sock puppet
    fake boog's sock puppet:
    boog:
    So "merde!" means campfire? I don't get it.
    Your an idiot.
    And you need a new act, my transparent troll.
  • eternicode (unregistered) in reply to justsomedude
    justsomedude:
    Article:
    Paul shared this creative snippet of VB.NET.
    Bool IsNumber (string str) 
    { 
      return str _
        .Replace ("0", "") _
        .Replace ("1", "") _
        .Replace ("2", "") _
        .Replace ("3", "") _
        .Replace ("4", "") _
        .Replace ("5", "") _
        .Replace ("6", "") _
        .Replace ("7", "") _
        .Replace ("8", "") _
        .Replace ("9", "") _
        .Length == 0;
    }
    

    IsNumber("2.0")

    ...

    Obviously floats and doubles don't count as numbers.

  • (cs) in reply to Coyne
    Coyne:
    hoodaticus:
    Coyne:
    My favorite is "destroyEverythingYouTouch". That pattern will be very useful in the future. I plan to create all of these:
    /*snip*/ int increment(int &x) { return x--; }
    I like this one, especially since it returns x, which allows you to read x's value, and then, after you read its returned value, it decrements it.

    Exactly: Neither the return nor the change to x counts as an increment. The name is a doubled lie.

    How about: return ++x----;

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    So you think that a language which forces you to be specific about which member, field, etc. you're talking about is a screw up, or are you just trolling?

    The logical conclusion to that argument is to ask why should you spell the function name in use as it is defined? Because what, the compiler/interpreter should just KNOW what you're talking about?

    void DoStuff() { // does stuff... }

    d0Stuuff("some string");

    Who wouldn't want to work in a language like that?

    The benefits of case sensitivity aren't apparent until you start using it.

    Addendum (2011-04-04 13:39):

    C-Octothorpe:
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    So you think that a language which forces you to be specific about which member, field, etc. you're talking about is a screw up, or are you just trolling?

    The logical conclusion to that argument is to ask why should you spell the function name in use as it is defined? Because what, the compiler/interpreter should just KNOW what you're talking about?

    void DoStuff() { // does stuff... }

    d0Stuuff("some string");

    Who wouldn't want to work in a language like that?

    The benefits of case sensitivity aren't apparent until you start using it.

    Here's an example:

    class blah
    {
    Item _item;
    blah(Item item) { _item = item; /* what would this do without case sensitivity?*/ }
    Item Item { get { return _item; } set { _item = value; } }
    }

    Without case sensitivity, you need to be an expert in the compiler to predict what it will do.

  • (cs) in reply to hoodaticus
    hoodaticus:
    Coyne:
    hoodaticus:
    Coyne:
    My favorite is "destroyEverythingYouTouch". That pattern will be very useful in the future. I plan to create all of these:
    /*snip*/ int increment(int &x) { return x--; }
    I like this one, especially since it returns x, which allows you to read x's value, and then, after you read its returned value, it decrements it.

    Exactly: Neither the return nor the change to x counts as an increment. The name is a doubled lie.

    How about: return ++x----;

    That's not right. The routine's name is "increment". Following the pattern we must therefore do anything but increment (and preferably exactly the opposite of that).

  • (cs) in reply to Coyne
    Coyne:
    hoodaticus:
    Coyne:
    hoodaticus:
    Coyne:
    My favorite is "destroyEverythingYouTouch". That pattern will be very useful in the future. I plan to create all of these:
    /*snip*/ int increment(int &x) { return x--; }
    I like this one, especially since it returns x, which allows you to read x's value, and then, after you read its returned value, it decrements it.

    Exactly: Neither the return nor the change to x counts as an increment. The name is a doubled lie.

    How about: return ++x----;

    That's not right. The routine's name is "increment". Following the pattern we must therefore do anything but increment (and preferably exactly the opposite of that).

    I was merely attempting to make it appear as if it incremented, but then decrement it back after the return.
  • (cs) in reply to Mason Wheeler
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?

  • Svick (unregistered)

    I like the fact that Important-Function() writes #5 ("Surfing porn sites on the internet...") 99.9% of the time.

  • C-Octothorpe (unregistered) in reply to hoodaticus
    hoodaticus:
    Here's an example:
    class blah 
    {
      Item _item;
      blah(Item item) { _item = item; /* what would this do without case sensitivity?*/ }
      Item Item { get { return _item; } set { _item = value; } }
    }

    Without case sensitivity, you need to be an expert in the compiler to predict what it will do.

    Without case sensitivity, this wouldn't be. The compiler wouldn't let you do that...

    The example you give is a perfectly cromulent C# example and would compile and run happily. For a junior dev looking at it, it may be a little confusing but at least it's concise. For me, code littered with "m_"s is about as readable as a page WRITTEN COMPLETELY IN BLOCK LETTERS. Case sensitivity is your friend: "item" to me is much more meaningful and clear than m_item, IMO.

  • caecus (unregistered) in reply to boog

    Both case sensitivity and case insensitivity can be abused, but who would rather use a library that treats differently cased identifiers differently, as in "Add() does X but add() does Y" (and I've seen such an abomination in production code shudder).

    Yes, there are conventions for how case is used in case-sensitive languages, but personally, I'd rather live with the situation where another dev screwing up case doesn't matter. Used well, either is perfectly fine. Used poorly, case-sensitivity can be a true wtf.

  • BBCode OKAy (unregistered) in reply to boog
    boog:
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.

  • C-Octothorpe (unregistered) in reply to BBCode OKAy
    BBCode OKAy:
    boog:
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.

    I wish I could agree with you: Case sensitive hater.

  • (cs) in reply to BBCode OKAy
    BBCode OKAy:
    boog:
    Mason Wheeler:
    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.
    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.
    Really? Damn. And here I was sincerely hoping for some genuine answers.
  • anonymous (unregistered)

    But what if inbool is EOF?

  • (cs)

    Is PowerShell .NET compatible?

  • boog's sock puppet (unregistered) in reply to boog
    boog:
    BBCode OKAy:
    boog:
    Mason Wheeler:
    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.
    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.
    Really? Damn. And here I was sincerely hoping for some genuine answers.
    Then your an idiot.
  • C-Octothorpe (unregistered) in reply to boog's sock puppet
    boog's sock puppet:
    boog:
    BBCode OKAy:
    boog:
    Mason Wheeler:
    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.
    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.
    Really? Damn. And here I was sincerely hoping for some genuine answers.
    Then your an idiot.

    Since when did this site degrade into The Daily Retarded Trolling Attempt?

  • JJ (unregistered)

    Unce.

    Tice.

    Fee tines a mady.

    (And pet peeve: giggling is "hee hee," not "he he.")

  • C-Octothorpe's sock puppet (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    boog's sock puppet:
    boog:
    BBCode OKAy:
    boog:
    Mason Wheeler:
    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.
    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.
    Really? Damn. And here I was sincerely hoping for some genuine answers.
    Then your an idiot.

    Since when did this site degrade into The Daily Retarded Trolling Attempt?

    About 2004, I think.

  • Ouch! (unregistered) in reply to Kalle
    Kalle:
    Mike:
    Anonymous:
    What kind of merde language doesn't have line terminators?
    Python. :)
    and Haskell. :)
    Haskell has line terminators (well, not exactly, but ';' isn't a line terminator but a statement [expression?] terminator in C - and probably C# - too, so what). Sometimes they are even used.
  • Todd Lewis (unregistered) in reply to Todd Lewis
    Todd Lewis:
    Did I just go blind, or did the flesh evaporate from the text leaving only the bones behind? TRWTF is the new font.

    Seriously guys, did nobody else notice a change in the site's font? It's so thin I can hardly make out the letters. Other web sites look as good/bad as they did last week, i.e. no changes. But the Daily WTF is a real What The Font today. What's up?

  • владимир (unregistered)

    Don't get on that guy's case. He was just protecting against FILE_NOT_FOUND.

  • Lou Thomas (unregistered) in reply to Todd Lewis
    Todd Lewis:
    Todd Lewis:
    Did I just go blind, or did the flesh evaporate from the text leaving only the bones behind? TRWTF is the new font.

    Seriously guys, did nobody else notice a change in the site's font? It's so thin I can hardly make out the letters. Other web sites look as good/bad as they did last week, i.e. no changes. But the Daily WTF is a real What The Font today. What's up?

    This is the funniest joke I've seen in the comments in a long time. Normally we only read stories about idiot users who can't figure out basic things with their web browsers.

  • C-Octothorpe (unregistered) in reply to Todd Lewis
    Todd Lewis:
    Todd Lewis:
    Did I just go blind, or did the flesh evaporate from the text leaving only the bones behind? TRWTF is the new font.

    Seriously guys, did nobody else notice a change in the site's font? It's so thin I can hardly make out the letters. Other web sites look as good/bad as they did last week, i.e. no changes. But the Daily WTF is a real What The Font today. What's up?

    It's the gub'ment messing with your lookin' box...

    In other words, no, I haven't noticed anything.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Since when did this site degrade into The Daily Retarded Trolling Attempt?
    Since I registered.
  • boog (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    boog's sock puppet:
    boog:
    BBCode OKAy:
    boog:
    Mason Wheeler:
    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.
    Exactly what is this productive something that "the rest of you" are trying to accomplish that is precluded by the inability to use lower- and upper-case letters interchangeably?
    HEs oBviOUsly TROlling. no ONE iS IDIotiC eNOUgh toTHINKThings liKE caSe and w h ite sPA ce IS not IMPortAnt.
    Really? Damn. And here I was sincerely hoping for some genuine answers.
    Then your an idiot.

    Since when did this site degrade into The Daily Retarded Trolling Attempt?

    I know I started when I saw one of boog's idiotic comments featured.

  • C-Octothorpe (unregistered) in reply to hoodaticus
    hoodaticus:
    C-Octothorpe:
    Since when did this site degrade into The Daily Retarded Trolling Attempt?
    Since I registered.

    Nice!

  • (cs) in reply to boog's sock puppet
    fake boog's sock puppet:
    boog:
    Really? Damn. And here I was sincerely hoping for some genuine answers.
    Then your an idiot. BWAAAK!!
    My, what an interesting parrot. Would you like a cracker?
  • (cs) in reply to boog
    boog (cheap imitation):
    C-Octothorpe:
    Since when did this site degrade into The Daily Retarded Trolling Attempt?
    I know I started when I saw one of boog's idiotic comments featured.
    In other words, somebody submitted some code he wrote to this site, and I posted a mean comment about it.
  • (cs) in reply to Todd Lewis
    Todd Lewis:
    Seriously guys, did nobody else notice a change in the site's font?
    Yes.
  • (cs) in reply to boog
    boog:
    Todd Lewis:
    Seriously guys, did nobody else notice a change in the site's font?
    Yes.
    Nice.
  • влÐÂà (unregistered) in reply to hoodaticus
    hoodaticus:
    boog:
    Todd Lewis:
    Seriously guys, did nobody else notice a change in the site's font?
    Yes.
    Nice.
    Nice!
  • boog (unregistered) in reply to boog
    boog:
    boog (cheap imitation):
    C-Octothorpe:
    Since when did this site degrade into The Daily Retarded Trolling Attempt?
    I know I started when I saw one of boog's idiotic comments featured.
    In other words, somebody submitted some code he wrote to this site, and I posted a mean comment about it.
    This and this. I'll let the internet jury decide whose guilty of the bigger idiocy: boog or Remy.
  • (cs) in reply to caecus
    caecus:
    Both case sensitivity and case insensitivity can be abused, but who would rather use a library that treats differently cased identifiers differently, as in "Add() does X but add() does Y" (and I've seen such an abomination in production code *shudder*).
    Having two functions with similar names perform different tasks is just bad design. Period. Are you suggesting that case sensitivity allows this mistake and case insensitivity does not?

    If idiot-developer can't create function "add()" because "Add()" is already used, what will stop him from creating function "add2()" instead?

  • (cs) in reply to boog
    boog (cheap imitation):
    boog:
    boog (cheap imitation):
    C-Octothorpe:
    Since when did this site degrade into The Daily Retarded Trolling Attempt?
    I know I started when I saw one of boog's idiotic comments featured.
    In other words, somebody submitted some code he wrote to this site, and I posted a mean comment about it.
    This and this. I'll let the internet jury decide whose guilty of the bigger idiocy: boog or Remy.
    How stalkeresque. You certainly like to keep track of my posting habits.

    Kind of disturbing really, but a little flattering.

  • m (unregistered) in reply to Anonymous
    Anonymous:
    Almost, but not quite - you don't need _ in C# because C# is a REAL language that has line terminators. Hence if you don't terminate the line, you can flow onto the next without requring an explicit continuation symbol. What kind of merde language doesn't have line terminators?

    If I don’t terminate a line, I usually stay on the line I’m already on.

  • Todd Lewis (unregistered) in reply to Lou Thomas
    Lou Thomas:
    Todd Lewis:
    Todd Lewis:
    Did I just go blind, or did the flesh evaporate from the text leaving only the bones behind? TRWTF is the new font.

    Seriously guys, did nobody else notice a change in the site's font? It's so thin I can hardly make out the letters. Other web sites look as good/bad as they did last week, i.e. no changes. But the Daily WTF is a real What The Font today. What's up?

    This is the funniest joke I've seen in the comments in a long time. Normally we only read stories about idiot users who can't figure out basic things with their web browsers.
    Oh I figured out what's up with the browser. Tahoma sucks. I meant what's up with the editors. I've only got so many pairs of glasses to try. Maybe when your eyes get to be as good as mine aren't (I used to read source code in 8pt; now that looks like blank paper) you'll appreciate how lousy thin fonts look. It's easy enough to work around, but having to is a WTF. Now get off my lawn.

  • Jimminfy (unregistered) in reply to hoodaticus
    hoodaticus:
    Vilx-:
    I wonder - I'm not a C++ expert, but the PrBoolFlag function - if the inbool was obtained via some memory-magic manipulations (like casting an int* to a bool*); and they used some weird compiler for an embedded software (which might be since it seems to have something to with printers); could it not be that it was possible for the value to actually be something that the compiler doesn't recognize as either true or false?
    That is compiler dependent.
    Is that not his point?
  • LoveKnuckle (unregistered) in reply to caecus
    caecus:
    Both case sensitivity and case insensitivity can be abused, but who would rather use a library that treats differently cased identifiers differently, as in "Add() does X but add() does Y" (and I've seen such an abomination in production code *shudder*).

    Yes, there are conventions for how case is used in case-sensitive languages, but personally, I'd rather live with the situation where another dev screwing up case doesn't matter. Used well, either is perfectly fine. Used poorly, case-sensitivity can be a true wtf.

    This is obviously a troll. A non-troll couldn't be this insensitive.

  • Malibu (unregistered) in reply to Mason Wheeler
    Mason Wheeler:
    C-Octothorpe:
    And you're right, things like line terminators and case-sensitivity make C# a much more sane language. I hate it when crap like 'all private fields should be prefixed with m_ because the "special" langauge does not do well with case sensitivity' leaks into coding standards.

    I, on the other hand, hate it when crap like case sensitivity leaks into languages and screws it up for the rest of us who are trying to accomplish something productive.

    cOUldN't AgREe mOre, WHO, nEEDS, case-SenSitIvities anyWAYs, it ServeS aS liTTLe puRPose In ProgRAMming As iN wrITTeN lAngUAgE. MaKiNG BOokS CasE SEnSItIVe stIFLeS tHE AuthOR's cREAtiVity, aND REDUcES hIS ProDUCTiVity.

Leave a comment on “Important-Function(), IsNumber(), and More()”

Log In or post as a guest

Replying to comment #:

« Return to Article