• Broken Universe (unregistered)

    From today on, 4 will not be <= 4. Thank you for your assistance in facilitating this change.

    Captcha: iusto - iusto know that 4 <= 4.

  • RuBen (unregistered)

    A picture says more then a thousand French words... or in this case, one: Merde!

  • Todd Lewis (unregistered)

    Did I just go blind, or did the flesh evaporate from the text leaving only the bones behind? TRWTF is the new font.

  • (cs)

    The "John Connor" snippet PROVES that far into the future, Ruby on Rails will be a dominant language/framework.

    There is no COBOL in the future!

  • Frenchie (unregistered)
    Alex Papadimoulis:
    I never bothered to look it up, since it was pretty obvious it was some explicitive
    Methinks Paul spent too much time with foreign coders, his language skills are all mixed up...

    BTW, did someone ever wonder why that library is called libcaca? Scatological humour at its finest :-)

  • (cs)

    Ah the empty string is a number ... I knew that!

  • Caffeine (unregistered) in reply to ParkinT
    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;
    }
    

    Well... I can't argue with that. That is extremely creative VB.NET. So creative you would almost think it was a different language!

  • Mike D. (unregistered)

    It used to be enough just to destroy John Connor. Now we have to take his stories away, too.

  • (cs) in reply to Caffeine
    Caffeine:
    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;
    }
    

    Well... I can't argue with that. That is extremely creative VB.NET. So creative you would almost think it was a different language!

    Bool-Merde.NET?

  • (cs)

    I'm saving the steaming pile ascii art for the Communicator

  • Anonymous (unregistered)

    Didn't you do French in highschool? I knew "merde" and I also know "foutre le camp", but these are literally the only French words I remember (clearly it was a very useful class).

  • (cs)

    The purpose of this function is true WTF. I have figured it all out.

  • (cs)

    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?

  • Anonymous Coward (unregistered)
    Dividing by `$null...
    is my personal favourite.
  • (cs) in reply to Anonymous
    Anonymous:
    Didn't you do French in highschool? I knew "merde" and I also know "foutre le camp", but these are literally the only French words I remember (clearly it was a very useful class).

    oh non mon ami! I took Spanish. Of course, the Spanish equivalent is mierda, so I assumed it was the same.

  • (cs)

    Clearly he wanted to create skynet and terminator and hid it inside of a program. Waiting to be awaken someday

  • (cs)

    I can not see the link to youtube site. Unavaible in my country due to publisher limit

  • (cs)

    The important function, could lay dormant in an application for years before someone thought to look at the logs, then realise like all logs, they are useless when the debug code and the release code do not use the same stack traces.

  • C-Octothorpe (unregistered) in reply to hoodaticus
    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!

  • (cs)

    So "merde!" means campfire? I don't get it.

  • Anonymous (unregistered) in reply to C-Octothorpe
    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?

  • (cs) in reply to Nagesh
    Nagesh:
    The purpose of this function is true WTF. I have figured it all out.
    Which function?
  • Girltron (unregistered)

    Ladytron++;

    Never thought I'd see a reference to that in code. Plus 10 internets to the first person who finds Goldfrapp in code.

  • (cs) 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?
    I would never use it anyway, but the code sample made me wonder.

  • (cs) in reply to frits
    frits:
    Caffeine:
    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;
    }
    

    Well... I can't argue with that. That is extremely creative VB.NET. So creative you would almost think it was a different language!

    Bool-Merde.NET?

    Whatever language it is, IsNumber("") returns true and IsNumber("1.5") does not... so I'll vote for Bool-Merde.NET on this ome.
  • C-Octothorpe (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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

  • Vilx- (unregistered)

    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?

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Thank God for dynamics.

  • Ken (unregistered)
    Debug.Assert(value <= Int32.MaxValue);

    This protects you when "The INT is TOO DAMN HIGH!"

  • Anonymous (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

  • (cs) in reply to Anonymous
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

    Bah! True Scots- uh... coders like to know the real function signature they are calling. Anyway, what's so hard about using a few dozen Missing.Value parameters? I mean you only have to write a method once, right?

  • (cs) in reply to Vilx-
    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.
  • (cs)

    My favorite is "destroyEverythingYouTouch". That pattern will be very useful in the future. I plan to create all of these:

     void PersistObject(obj) { destroy obj; }
    
     void PreventFailure() { int x = 1/0; }
    
     int increment(int &x) { return x--; }
    
     double discountSale(double amt) { amt * 2.72; }
    
  • (cs) in reply to Anonymous
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!
    Ahh, no more ... Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing);

  • C-Octothorpe (unregistered) in reply to Anonymous
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

    I've got mixed feelings about optional/default parameters. I guess I'm a purist (or a change resistant donkey, either-or), but I much prefer method overloading. To me, it just looks cleaner and it's more explicit.

    But I think I'm arguing against myself because really and truly, it was brought in for interop, not for us lazy devs who don't want to write 5 overloads...

  • Anonymous (unregistered) in reply to frits
    frits:
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

    Bah! True Scots- uh... coders like to know the real function signature they are calling. Anyway, what's so hard about using a few dozen Missing.Value parameters? I mean you only have to write a method once, right?

    Actually, I hate VB.NET so much that I would still use C# for interop - and just bite the bullet and supply those dozens of Type.Missing params. It may suck but it's still a lot better than using VB.NET!
  • (cs) in reply to Coyne
    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.
  • C-Octothorpe (unregistered) in reply to hoodaticus
    hoodaticus:
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!
    Ahh, no more ... Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing,Type.Missing, Type.Missing);

    It's kind of beautiful, don't you think? It's kind of like a huge array of wind-mills...

  • C-Octothorpe (unregistered) in reply to Anonymous
    Anonymous:
    frits:
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

    Bah! True Scots- uh... coders like to know the real function signature they are calling. Anyway, what's so hard about using a few dozen Missing.Value parameters? I mean you only have to write a method once, right?

    Actually, I hate VB.NET so much that I would still use C# for interop - and just bite the bullet and supply those dozens of Type.Missing params. It may suck but it's still a lot better than using VB.NET!

    Wow, now there's a guy who REALLY hates VB.NET. Hats off to you sir for successfully cutting off your nose to spite your face... :)

  • Anonymous (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

    I've got mixed feelings about optional/default parameters. I guess I'm a purist (or a change resistant donkey, either-or), but I much prefer method overloading. To me, it just looks cleaner and it's more explicit.

    But I think I'm arguing against myself because really and truly, it was brought in for interop, not for us lazy devs who don't want to write 5 overloads...

    I completely agree, I will still be writing overloaded methods in favour of methods accepting optional parameters, but it's going to be a god-send for interop.

  • Anonymous (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Anonymous:
    frits:
    Anonymous:
    C-Octothorpe:
    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?

    Thanks for extending my thought. My comment was a futile and transparent attempt at a flamewar...

    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.

    IMO, the only thing VB.NET was good for was interop, but now thanks to DLR via .NET 4.0, we don't need it anymore.

    Yep, I agree with that. And don't forget optional parameters in 4.0 - finally we can write sane interop code in C#!

    Bah! True Scots- uh... coders like to know the real function signature they are calling. Anyway, what's so hard about using a few dozen Missing.Value parameters? I mean you only have to write a method once, right?

    Actually, I hate VB.NET so much that I would still use C# for interop - and just bite the bullet and supply those dozens of Type.Missing params. It may suck but it's still a lot better than using VB.NET!

    Wow, now there's a guy who REALLY hates VB.NET. Hats off to you sir for successfully cutting off your nose to spite your face... :)

    It takes a lot of effort to hate VB.NET this much!!

  • (cs) in reply to Anonymous
    Anonymous:
    Didn't you do French in highschool? I knew "merde" and I also know "foutre le camp", but these are literally the only French words I remember (clearly it was a very useful class).
    I live in northern France, and a more common "bad word" around here is "putain". The literal sense is "whore", but it gets used for just about anything, including as a general assertion of frustration.

    For emphasis, "putain de merde" works as well...

  • Meep (unregistered) in reply to Ken
    Ken:
    Debug.Assert(value <= Int32.MaxValue);

    This protects you when "The INT is TOO DAMN HIGH!"

    Funny.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    I've got mixed feelings about optional/default parameters. I guess I'm a purist (or a change resistant donkey, either-or), but I much prefer method overloading. To me, it just looks cleaner and it's more explicit.

    But I think I'm arguing against myself because really and truly, it was brought in for interop, not for us lazy devs who don't want to write 5 overloads...

    I LOVE optional parameters in C#. Just use them for things that are truly optional but that do not alter the behavior of the method. For instance, if you have a SaveAs method that needs different parameters depending on the serialization format, then you do an overload (you hear that, MS Office team?!). If you have an AddPhoneNumber method, however, it could probably use an optional (nullable?) parameter for extension instead of forcing it to be specified.

  • justsomedude (unregistered) in reply to Caffeine
    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")

    ...

  • (cs) in reply to Steve The Cynic
    Steve The Cynic:
    Anonymous:
    Didn't you do French in highschool? I knew "merde" and I also know "foutre le camp", but these are literally the only French words I remember (clearly it was a very useful class).
    I live in northern France, and a more common "bad word" around here is "putain". The literal sense is "whore", but it gets used for just about anything, including as a general assertion of frustration.

    For emphasis, "putain de merde" works as well...

    Shitwhore would make a great band name.

  • (cs) in reply to hoodaticus
    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.

  • (cs)

    I would have commented earlier but I was [rolls D20 while disregarding part of the range] thinking about Jessica in Berlin... Yes, that's what I was doing.

  • trtrwtf (unregistered) 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.

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

  • Krenn (unregistered)

    No "reticulating splines"? For shame...

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

Log In or post as a guest

Replying to comment #:

« Return to Article