• Sander (unregistered)

    I think that last line used to read:

    return value + space;

    because in a lot of places in the code an extra space was needed, and the developer was guessing (based upon discussions?) that more spaces or no spaces at all would be needed in the future.

    Then later it was decided that no spaces were needed and then you'll end up with this...

  • (cs) in reply to Simon
    Simon:
    Steve The Cynic:
    Dudes! Any chance you could evict the advertising from the middle of the article? It's bad enough we have antisocial network buttons all over the place without having all that guff as well.
    I agree. I want this site FREE and Ad-FREE. YOu have no right whatsoever to make money.
    I only said not to put the ads in the middle of the article.
  • default_ex (unregistered) in reply to Simon
    Simon:
    Simon:
    Steve The Cynic:
    Dudes! Any chance you could evict the advertising from the middle of the article? It's bad enough we have antisocial network buttons all over the place without having all that guff as well.
    I agree. I want this site FREE and Ad-FREE. YOu have no right whatsoever to make money.
    Also, just in case you couldn't detect the sarcasm, at least they have clearly marked the advertisement as an advertisement - so you can ignore it if you wish!!

    Or you can rewrite that function: public string AddSpace(string value) { string space = " "; if (value.Contains("[Advertisement"]))//.Equals(space)) { return space; }

           return value;
       }
    
  • Code Master (unregistered)

    This would never pass a code review done by me - the string 'variable' should be a const.

  • just me (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    Simon:
    Steve The Cynic:
    Dudes! Any chance you could evict the advertising from the middle of the article? It's bad enough we have antisocial network buttons all over the place without having all that guff as well.
    I agree. I want this site FREE and Ad-FREE. YOu have no right whatsoever to make money.
    I only said not to put the ads in the middle of the article.

    Yes, well, they are at the end of the article. What exactly were you trying to say?

  • just me (unregistered) in reply to chubertdev
    chubertdev:
    I normally speak in Frenglish. :)
    I think I'm working with some of your relatives...
  • YourName (unregistered) in reply to Simon
    Simon:
    Simon:
    Steve The Cynic:
    Dudes! Any chance you could evict the advertising from the middle of the article? It's bad enough we have antisocial network buttons all over the place without having all that guff as well.
    I agree. I want this site FREE and Ad-FREE. YOu have no right whatsoever to make money.
    Also, just in case you couldn't detect the sarcasm, at least they have clearly marked the advertisement as an advertisement - so you can ignore it if you wish!!
    Yo dawg, we herd you like advertisements so we put an advertisement in your advertisement, so you can shop while you shop. ;-)
  • (cs) in reply to just me
    just me:
    chubertdev:
    I normally speak in Frenglish. :)
    I think I'm working with some of your relatives...

    most of them are in accounting, so I pity you.

  • Iminuru (unregistered)

    The WTF is that the uselessness is clickable!

  • 3 Piece Lawsuit (unregistered)

    Oh, sure. The one time I try and "store" something in an intern I get brought up on sexual harrassment charges, but ol' C++ can do it whenever it wants, huh?

  • 3 Piece Lawsuit (unregistered)

    Oh, sure. The one time I try and "store" something in an intern I get brought up on sexual harrassment charges, but ol' C# can do it whenever it wants, huh?

  • (cs)

    TRWTF is that this is an instance method.

  • z80 guy (unregistered) in reply to Dale
    Bzzzt. This is not a NOP. A NOP wouldn't throw a NullReferenceException if passed null.
    Maybe it does on your newfangled gazillion-bits processors. On ye olde Z80 however, it wouldn't return. Ever. Period. Still seems more appropriate that way, too.
  • Userguide (unregistered)

    Don't understand - it just gives a new fresh and previously unused space back! I did that a lot in past....

  • Ryan (unregistered)

    Not true. It doesn't do absolutely nothing. This function introduces the possibility of a null pointer exception if value is null. You would have to switch the comparison to space.Equals(value) for it to have absolutely no possible impact on anything.

Leave a comment on “Space: The Final NOP”

Log In or post as a guest

Replying to comment #:

« Return to Article