• (cs) in reply to populus
    populus:
    U R A tool (and can't spell moron).

    I've never understood what people who think others shouldn't be posting are actually doing reading the comments. If you understand everything perfectly, and aren't wanting to contribute any pearls of wisdom other than to attack anyone who does. Oh, maybe you don't have a life...

    nevermind!

    U R A tool (and can't understand irony or memes, even when I made it quite obvious).

    I've never understood people who write comments without reading previous comments. I know you didn't because otherwise you'd have noticed that I have contributed numerous pearls of wisdom on this thread.

    qwq38gh;ae:
    The Enterpriser:
    You add a lot to the thread. Get a brain moran.
    Pot: Kettle....

    I wonder if I'm about to reach a "I know you are, but what am I"....

    Pot: Baked Potato....

    Unlike the previous guy, you understand irony so well that you can't help but post only that. Thanks for contributing.

    QJo:
    I can quite understand why your attitude appears to have caused anger amongst some of the respondents. As for me, if you had spoken to me like that in a meeting, for example, you would be clearing your desk and returning your door pass as I type.

    If I had spoken to you like that at a meeting, it would probably be because I'd already fired you. I do like to keep a clear desk though so you might be right on that.

    eVil:
    You are clearly the moron here. For one thing, you've managed to spell it incorrectly 4 times at least, and twice after it was already pointed out that you were doing it wrong.

    The fact that you now know that you are incorrect, but are choosing to continue to spell it wrong demonstrates exactly what kind of loser you are - one who, instead of graciously conceding a point will argue ad absurdam.

    Just wow.

  • (cs) in reply to The Enterpriser
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

  • eVil (unregistered) in reply to The Enterpriser
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    This is what's sad. We've got trolls trolling trolls. Do you honestly think that they hadn't heard the joke? Please help the effort to decrease comment pollution

  • Hortical (unregistered) in reply to The Enterpriser
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    Yeah, "it takes two to tango". Or so I've heard.

    But I see a bit of a contradiction here: it's not worthwhile to help people understand the WTF, but it is worthwhile to trollolol?

    Unless your comments related to the former were only intended as part of trollololing, in which case you don't offer anything that we need should bother paying attention to.

  • Mel (unregistered) in reply to eVil

    I guess the problem is that this isn't primarily a place to help others, its a place to point and laugh.

    don't get me wrong though, I would love to see these threads contain more knowledgeable, helpful people than trolls.

  • (cs) in reply to eVil
    eVil:
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    This is what's sad. We've got trolls trolling trolls. Do you honestly think that they hadn't heard the joke? Please help the effort to decrease comment pollution

    I have no doubt that they hadn't.

    We're all adding to this. Some knowingly.

  • QJo (unregistered) in reply to The Enterpriser
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    Sounds to me more like someone put their proverbial foot in their metaphorical mouth and is now trying to brazen it out when they know they've made a donkey of themselves. Sorry, but in my office it matters not how zippy you are with whatever languages you happen to know, if you're rude to a client and you lose a contract you don't get a second warning.

  • Bert Glanstron (unregistered) in reply to eVil
    eVil:
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    This is what's sad. We've got trolls trolling trolls. Do you honestly think that they hadn't heard the joke? Please help the effort to decrease comment pollution

    Dear "The Enterpriser", "C-Octothorpe" and "eVil"

    In case you can’t tell, this is a grown-up place. The fact that you insist on using your ridiculous handles clearly shows that you’re too young and too stupid to be using FIDONet.

    Go away and grow up.

    Sincerely, Bert Glanstron

  • boog (unregistered) in reply to Bert Glanstron
    Bert Glanstron:
    eVil:
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    This is what's sad. We've got trolls trolling trolls. Do you honestly think that they hadn't heard the joke? Please help the effort to decrease comment pollution

    Dear "The Enterpriser", "C-Octothorpe" and "eVil"

    In case you can’t tell, this is a grown-up place. The fact that you insist on using your ridiculous handles clearly shows that you’re too young and too stupid to be using FIDONet.

    Go away and grow up.

    Sincerely, Bert Glanstron

    Who cares?

  • frits (unregistered) in reply to boog
    boog:
    Bert Glanstron:
    eVil:
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    This is what's sad. We've got trolls trolling trolls. Do you honestly think that they hadn't heard the joke? Please help the effort to decrease comment pollution

    Dear "The Enterpriser", "C-Octothorpe" and "eVil"

    In case you can’t tell, this is a grown-up place. The fact that you insist on using your ridiculous handles clearly shows that you’re too young and too stupid to be using FIDONet.

    Go away and grow up.

    Sincerely, Bert Glanstron

    Who cares?

    Who hasn't cared about something like this?

  • Anonymous Cow-Herd (unregistered) in reply to Robajob

    {troll-mode off}

    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.

    {troll-mode on}

    Also, cocks.

  • zunesis (unregistered) in reply to frits
    frits:
    boog:
    Bert Glanstron:
    eVil:
    The Enterpriser:
    C-Octothorpe:
    The Enterpriser:
    <snip a bunch of angry vitriol>
    Dude, just relax... People of all backgrounds come here to comment and learn. Don't be the "haha, you loser! You don't have 22 years of experience with every programming language?!" guy. When someone doesn't know something but they're trying, don't punish them because it kills it for everybody and makes you come off as an asshole with a superiority complex (or little man syndrome, I don't know how tall you are).

    Also, just drop that meme shit. Not everybody has heard of all the memes you have, and frankly, this site suffers from meme overload anyway...

    I think you've missed something rather vital here...

    It is a large number of other people getting all jumpy and overly excited.. I'm just having a fun time trollololing along here.

    We do have meme overload though, but it fit in well with my troll theme and way too many people bought into it.

    This is what's sad. We've got trolls trolling trolls. Do you honestly think that they hadn't heard the joke? Please help the effort to decrease comment pollution

    Dear "The Enterpriser", "C-Octothorpe" and "eVil"

    In case you can’t tell, this is a grown-up place. The fact that you insist on using your ridiculous handles clearly shows that you’re too young and too stupid to be using FIDONet.

    Go away and grow up.

    Sincerely, Bert Glanstron

    Who cares?

    Who hasn't cared about something like this?

    Who hasn't banged a whore like this?

  • Moran (unregistered)

    Even I know how to spell moron...

  • (cs) in reply to QJo
    QJo:
    Sounds to me more like someone put their proverbial foot in their metaphorical mouth and is now trying to brazen it out when they know they've made a donkey of themselves. Sorry, but in my office it matters not how zippy you are with whatever languages you happen to know, if you're rude to a client and you lose a contract you don't get a second warning.

    over what? because I think that we should be discussing more advanced things than "what is a C# property?".

    I'm not in your office and never will be. I couldn't care in the slightest what rules you have or how you treat your customers. Why do you think I would care about that?

    I will be rude on here and I will enjoy it. If that means I miss out on a hypothetical contract, then hypothetically that makes me sad, back in reality I still think you are a moran.

  • Anonymous Cow-Herd (unregistered) in reply to Debbie Sweghart, Sr. Account Manager
    Debbie Sweghart:
    To the poster referring to himself as various forms of "Zunesis":

    "Zunesis" is a trademarked name of The Zunesis Company (http://www.zunesis.com).

    We find your statements here beyond deplorable. We are especially offended that you would use our name to post your horrifying depravity.

    If you do not stop making use of our registered trademarks, we will pursue legal action.

    Debbie Sweghart Sr. Account Manager

    Featured comment material right there, I think.

  • anonymouser (unregistered) in reply to hoodaticus
    hoodaticus:
    The Enterpriser:
    hoodaticus:
    I'll contemplate these words while my software runs one of the largest supply chains in North America.

    Good. Let us know when you are done, then maybe you can spend 5 minutes reading http://www.dotnetperls.com/return. It teaches about the 'return' statement.

    I would, but I'm too busy working on my n-tier, event-driven multithreaded DAL and IQueryProvider implementation. Does that article discuss the return value of the assignment operator, or have all these big words confused you?

    If a contractor told me "setting foundation forms is one of the many trivial things I can't be bothered with. I've built multi-level, single and multi-family, centrally heated and cooled, dwellings wired for 200 Amp service with low-vlotage to every room from modern and exotic materials for international clients" I'd tell him to get the fuck out.

    God, I hope your big supply chain never touches the retail operation I own.

    BTW, "n-tier, event-driven multithreaded DAL and IQueryProvider implementation" sounds like résumé fluff. The kind of thing you put down because the req said you "need experience with n-tier applications, DAL, IQueryProvider and event driven programming in C++. Basic undertansding of C++ not rquired." And, you dont' have to worry about providing any details because, of course, you have an NDA with your former employer.

  • QJo (unregistered) in reply to The Enterpriser
    The Enterpriser:
    QJo:
    Sounds to me more like someone put their proverbial foot in their metaphorical mouth and is now trying to brazen it out when they know they've made a donkey of themselves. Sorry, but in my office it matters not how zippy you are with whatever languages you happen to know, if you're rude to a client and you lose a contract you don't get a second warning.

    over what? because I think that we should be discussing more advanced things than "what is a C# property?".

    I'm not in your office and never will be. I couldn't care in the slightest what rules you have or how you treat your customers. Why do you think I would care about that?

    I will be rude on here and I will enjoy it. If that means I miss out on a hypothetical contract, then hypothetically that makes me sad, back in reality I still think you are a moran.

    The only moran I know of is Mike Moran who was keyboard player in the first lineup of the Ian Gillan Band and performed a duet with Lynsey de Paul in the Eurovision Song Contest in the mid-70's. Unfortunately my (musical) keyboard skills are not sufficient to compete with him.

    Now run off home and maybe mummy will let you have a nice lollipop before tea.

  • Matthew (unregistered) in reply to EvanED
    EvanED:
    someone:
    The Enterpriser:
    Matthew:
    someguy:
    In order to prempt any more unnecessary arguing about what this code does:

    Thank you for posting this. It's pretty much the only comment worth reading. It's proof of what the function does, even though everyone is still arguing about it.

    <goes on to misunderstand the code anyway>

    The fact that you or anyone else thinks that we need coded example to explain what a property is in C# shows that you probably don't understand this very well yourself.

    I don't appreciate this. My decision to post the code was inspired by other people demonstrating their lack of understanding and I didn't want the discussion to run any longer over something so simple - they often do and, this time even, still did, showing that it could be helpful.

    For the record, I stand by someone on this. The fact that Matthew singled out his post, said how awesome it was, and still got it wrong pretty much justifies thinking that "we need coded example to explain what a property is" in my mind. At least if you read "we" as "the forum" and not any particular person.

    Ah, I see my mistake here. I had originally assumed it would just return a 5, but then when I saw someguy's post I misunderstood his example and for some reason it just made more sense to me that it would work the way I described. I shouldn't have posted without confirming this.

    Sorry for adding to the confusion.

  • (cs) in reply to anonymouser
    anonymouser:
    hoodaticus:
    The Enterpriser:
    hoodaticus:
    I'll contemplate these words while my software runs one of the largest supply chains in North America.

    Good. Let us know when you are done, then maybe you can spend 5 minutes reading http://www.dotnetperls.com/return. It teaches about the 'return' statement.

    I would, but I'm too busy working on my n-tier, event-driven multithreaded DAL and IQueryProvider implementation. Does that article discuss the return value of the assignment operator, or have all these big words confused you?

    If a contractor told me "setting foundation forms is one of the many trivial things I can't be bothered with. I've built multi-level, single and multi-family, centrally heated and cooled, dwellings wired for 200 Amp service with low-vlotage to every room from modern and exotic materials for international clients" I'd tell him to get the fuck out.

    God, I hope your big supply chain never touches the retail operation I own.

    BTW, "n-tier, event-driven multithreaded DAL and IQueryProvider implementation" sounds like résumé fluff. The kind of thing you put down because the req said you "need experience with n-tier applications, DAL, IQueryProvider and event driven programming in C++. Basic undertansding of C++ not rquired." And, you dont' have to worry about providing any details because, of course, you have an NDA with your former employer.

    Thanks for letting us know that being specific is a bad thing, and for adding absolutely nothing (other than your own self aggrandizing) to this forum.

    Retail chain you own? Ya rly...

  • (cs) in reply to Some damn Yank
    Some damn Yank:
    Lowmack:
    Anonymous Cow-Herd:
    XIU:
    The code will set the field to 5 AND return 5
    Surely it sets the field to 5 and returns true?
    You're right, and don't call me Shirley.
    OK, first off he didn't call you "Shirley", he called Anonymous Cow-Herd "Shirley", and for all you know that's her name.

    Second, the more I look at this the more I realize this code isn't devious, it's evil.

    "What's the maximum number of retrys?" "True." "No, I need a number; what's the maximum number of retrys?" "True." "Your answer doesn't make any sense." "True." "OK, let's set maxRetry to 23. Now, what's the value of maxRetry?" "True."

    Why would it return "true"? I think it will return the value of maxRetry, which has been assigned to 5. Its an int property not a bool anyway. Or are you just trolling/bullshitting/joking etc.?

  • Anonymous Cow-Herd (unregistered) in reply to method1
    method1:
    Some damn Yank:
    Lowmack:
    Anonymous Cow-Herd:
    XIU:
    The code will set the field to 5 AND return 5
    Surely it sets the field to 5 and returns true?
    You're right, and don't call me Shirley.
    OK, first off he didn't call you "Shirley", he called Anonymous Cow-Herd "Shirley", and for all you know that's her name.

    Second, the more I look at this the more I realize this code isn't devious, it's evil.

    "What's the maximum number of retrys?" "True." "No, I need a number; what's the maximum number of retrys?" "True." "Your answer doesn't make any sense." "True." "OK, let's set maxRetry to 23. Now, what's the value of maxRetry?" "True."

    Why would it return "true"? I think it will return the value of maxRetry, which has been assigned to 5. Its an int property not a bool anyway. Or are you just trolling/bullshitting/joking etc.?

    It would return true if the assignment were evaluated as a bool, and as the assignment were successful it would return true which the return would then return in turn. But it doesn't because it's not.

  • (cs) in reply to Anonymous Cow-Herd
    Anonymous Cow-Herd:
    ...it would return true which the return would then return in turn.
    Try and say *that* ten times really fast...
  • (cs) in reply to Anonymous Cow-Herd
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

  • (cs) in reply to The Enterpriser
    The Enterpriser:
    Some damn Yank:
    The Enterpriser:
    This is actually very useful for when you want to make use of the set value from within the method whilst limiting out of scope use to '5'.

    I have seen very effective use of this pattern in the security industry. The strength of this lies in the way that the get is also secretly a setter too.

    So, let me get this straight. maxRetry is 1 internally, and someone outside can set it to whatever they want, but if they ask they're always told it's 5? What's the point of that? I guess what I'm missing here is what really happens (sorry, I'm a tester not a coder). Is maxRetry always 1, or do you really let it be set to something else? And if so, why do you lie and say it's 5?

    It isn't a lie. It is set to 5 each time it is read. This prevents outside use from having visibility of internal use.

    e.g. if I want to use this from within the method I could set via the property and then retrieve through the private member:

     
    //increase performance through larger maximum number of retries
    lock(this) { //make it thread safe
    MaxRetry = 20;
    performAction(yhbt,maxRetry); //whatever it is
    }
    

    This way no outside code is going to ever interfere with your retries, and they cannot abuse the property to steal importante cpu cycles

    This gives me an idea for a DailyWTF spinoff: trollcoding.com. Unfortunately, your submission needs more work. There's no mention of magnets, and no ironic exclamation point fails.

  • OhNoes (unregistered) in reply to Hooah

    This is a common thing to do if you hate logic and your fellow devs.

  • Some damn Yank (unregistered) in reply to method1
    method1:
    Some damn Yank:
    Lowmack:
    Anonymous Cow-Herd:
    XIU:
    The code will set the field to 5 AND return 5
    Surely it sets the field to 5 and returns true?
    You're right, and don't call me Shirley.
    OK, first off he didn't call you "Shirley", he called Anonymous Cow-Herd "Shirley", and for all you know that's her name.

    Second, the more I look at this the more I realize this code isn't devious, it's evil.

    "What's the maximum number of retrys?" "True." "No, I need a number; what's the maximum number of retrys?" "True." "Your answer doesn't make any sense." "True." "OK, let's set maxRetry to 23. Now, what's the value of maxRetry?" "True."

    Why would it return "true"? I think it will return the value of maxRetry, which has been assigned to 5. Its an int property not a bool anyway. Or are you just trolling/bullshitting/joking etc.?
    I said it returns "True" because Anonymous Cow-Herd said it does. Then I ran with that. It doesn't return "5" because you think it does, it returns whatever its value is and then it gets set to 5, as several others have pointed out. Oh, if only the code did what we think it does - then all we'd need do is think what we want it to do and it would do it on its own! Here's another clue for you all: I don't troll, I sometimes bullshit, and I often joke. I rarely etc.

  • Matthew (unregistered) in reply to Some damn Yank
    Some damn Yank:
    I said it returns "True" because Anonymous Cow-Herd said it does. Then I ran with that. It doesn't return "5" because you think it does, it returns whatever its value is and then it gets set to 5, as several others have pointed out. Oh, if only the code did what we think it does - then all we'd need do is think what we want it to do and it would do it on its own! Here's another clue for you all: I don't troll, I sometimes bullshit, and I often joke. I rarely etc.
    Have you actually tested this? You seem to be making the same mistake I did.
  • (cs) in reply to Some damn Yank
    Some damn Yank:
    method1:
    Some damn Yank:
    Lowmack:
    Anonymous Cow-Herd:
    XIU:
    The code will set the field to 5 AND return 5
    Surely it sets the field to 5 and returns true?
    You're right, and don't call me Shirley.
    OK, first off he didn't call you "Shirley", he called Anonymous Cow-Herd "Shirley", and for all you know that's her name.

    Second, the more I look at this the more I realize this code isn't devious, it's evil.

    "What's the maximum number of retrys?" "True." "No, I need a number; what's the maximum number of retrys?" "True." "Your answer doesn't make any sense." "True." "OK, let's set maxRetry to 23. Now, what's the value of maxRetry?" "True."

    Why would it return "true"? I think it will return the value of maxRetry, which has been assigned to 5. Its an int property not a bool anyway. Or are you just trolling/bullshitting/joking etc.?
    I said it returns "True" because Anonymous Cow-Herd said it does. Then I ran with that. It doesn't return "5" because you think it does, it returns whatever its value is and then it gets set to 5, as several others have pointed out. Oh, if only the code did what we think it does - then all we'd need do is think what we want it to do and it would do it on its own! Here's another clue for you all: I don't troll, I sometimes bullshit, and I often joke. I rarely etc.

    I suggest you read up on order of precedence

    the '+' and '=' operators are evaluated right to left.

    Hence:

    return maxRetry = 5;

    is evaluated like so..

    1. maxRetry = 5
    2. return maxRetry (which is now 5)
  • (cs) in reply to The Enterpriser
    The Enterpriser:
    Order of precedence

    the '+' and '=' operators are evaluated right to left.

    Hence:

    return maxRetry = 5;

    is evaluated like so..

    1. maxRetry = 5
    2. return maxRetry (which is now 5)
    This.
  • trtrwtf (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    anonymouser:
    God, I hope your big supply chain never touches the retail operation I own.
    Retail chain you own? Ya rly...

    To be fair, he did say "operation". Might mean the eBay store he runs out of his basement, or the stall he maintains at the local farmer's market, or any sort of thing.

    This does seem to be getting into a cock-waving competition, though. Put 'em away, boys. If what you say is correct and useful, I don't care where you get your paycheck.

  • (cs) in reply to The Enterpriser
    The Enterpriser:
    Some damn Yank:
    method1:
    Some damn Yank:
    Lowmack:
    Anonymous Cow-Herd:
    XIU:
    The code will set the field to 5 AND return 5
    Surely it sets the field to 5 and returns true?
    You're right, and don't call me Shirley.
    OK, first off he didn't call you "Shirley", he called Anonymous Cow-Herd "Shirley", and for all you know that's her name.

    Second, the more I look at this the more I realize this code isn't devious, it's evil.

    "What's the maximum number of retrys?" "True." "No, I need a number; what's the maximum number of retrys?" "True." "Your answer doesn't make any sense." "True." "OK, let's set maxRetry to 23. Now, what's the value of maxRetry?" "True."

    Why would it return "true"? I think it will return the value of maxRetry, which has been assigned to 5. Its an int property not a bool anyway. Or are you just trolling/bullshitting/joking etc.?
    I said it returns "True" because Anonymous Cow-Herd said it does. Then I ran with that. It doesn't return "5" because you think it does, it returns whatever its value is and then it gets set to 5, as several others have pointed out. Oh, if only the code did what we think it does - then all we'd need do is think what we want it to do and it would do it on its own! Here's another clue for you all: I don't troll, I sometimes bullshit, and I often joke. I rarely etc.

    I suggest you read up on order of precedence

    the '+' and '=' operators are evaluated right to left.

    Hence:

    return maxRetry = 5;

    is evaluated like so..

    1. maxRetry = 5
    2. return maxRetry (which is now 5)
    This is easy to prove false.
    class c1
    {
        public int p1
        {
            get {return 4;}
            set { }
        }
    }
    
    private void button1_Click(object sender, EventArgs e)
    {
      c1 t = new c1();
      MessageBox.Show(callme(t).ToString());
    }
    
    private int callme(c1 t)
    {
        return t.p1 = 7;
    }
    

    If you were right, it would display "4", because p1 can never have any value other than 4. However, it displays "7".

  • (cs) in reply to The Enterpriser

    They are not following the best practice: why would they make the assignment silently fail? I would recommend throwing FileNotFound if the property is assigned with value not equal to 5.

  • (cs) in reply to Codism

    7/28/2011 just appeared (four comments already) so you can all hustle over there instead of beating this horse six ways from Sunday.

  • (cs) in reply to Jaime
    Jaime:
    The Enterpriser:

    I suggest you read up on order of precedence

    the '+' and '=' operators are evaluated right to left.

    Hence:

    return maxRetry = 5;

    is evaluated like so..

    1. maxRetry = 5
    2. return maxRetry (which is now 5)
    This is easy to prove false.
    class c1
    {
        public int p1
        {
            get {return 4;}
            set { }
        }
    }
    
    private void button1_Click(object sender, EventArgs e)
    {
      c1 t = new c1();
      MessageBox.Show(callme(t).ToString());
    }
    
    private int callme(c1 t)
    {
        return t.p1 = 7;
    }
    

    If you were right, it would display "4", because p1 can never have any value other than 4. However, it displays "7".

    Actually this is exactly as you would expect. I suggest that you also read that site.

    The '( )' operator (also known as a function call) is evaluated left to right.

  • anonymouser (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    anonymouser:
    hoodaticus:
    The Enterpriser:
    hoodaticus:
    I'll contemplate these words while my software runs one of the largest supply chains in North America.

    Good. Let us know when you are done, then maybe you can spend 5 minutes reading http://www.dotnetperls.com/return. It teaches about the 'return' statement.

    I would, but I'm too busy working on my n-tier, event-driven multithreaded DAL and IQueryProvider implementation. Does that article discuss the return value of the assignment operator, or have all these big words confused you?

    If a contractor told me "setting foundation forms is one of the many trivial things I can't be bothered with. I've built multi-level, single and multi-family, centrally heated and cooled, dwellings wired for 200 Amp service with low-vlotage to every room from modern and exotic materials for international clients" I'd tell him to get the fuck out.

    God, I hope your big supply chain never touches the retail operation I own.

    BTW, "n-tier, event-driven multithreaded DAL and IQueryProvider implementation" sounds like résumé fluff. The kind of thing you put down because the req said you "need experience with n-tier applications, DAL, IQueryProvider and event driven programming in C++. Basic undertansding of C++ not rquired." And, you dont' have to worry about providing any details because, of course, you have an NDA with your former employer.

    Thanks for letting us know that being specific is a bad thing, and for adding absolutely nothing (other than your own self aggrandizing) to this forum.

    Retail chain you own? Ya rly...

    Chain? Who said chain. I know lots of people who own businesses. You probably do, too. Shit, for awhile it was the thing to do:

    1. Work as software engineer for a few years and cash out
    2. Open business you enjoy
    3. ???
    4. Profit

    But hey, thanks for providing your own example of a useless comment. You have truly humbled me. I'll try harder to evaluate my comments against what I will call the "C-Octothorpe Standard" before posting. Thank you for your patience and guidance whilst I continue to learn.

  • (cs) in reply to anonymouser
    anonymouser:
    hoodaticus:
    The Enterpriser:
    hoodaticus:
    I'll contemplate these words while my software runs one of the largest supply chains in North America.

    Good. Let us know when you are done, then maybe you can spend 5 minutes reading http://www.dotnetperls.com/return. It teaches about the 'return' statement.

    I would, but I'm too busy working on my n-tier, event-driven multithreaded DAL and IQueryProvider implementation. Does that article discuss the return value of the assignment operator, or have all these big words confused you?
    God, I hope your big supply chain never touches the retail operation I own.

    I was wondering why the hot dog stand clerk in the promenade was giving me nasty looks. Is that you, Enterpriser?
  • No one in particular (unregistered) in reply to D-Coder
    D-Coder:
    7/28/2011 just appeared (four comments already) so you can all hustle over there instead of beating this horse six ways from Sunday.

    I only know of five ways to beat off a horse. What am I missing?

  • (cs) in reply to Some damn Yank

    What the balls is going on in this thread. Did someone put something in the water?

    Some damn Yank:
    I said it returns "True" because Anonymous Cow-Herd said it does. Then I ran with that. It doesn't return "5" because you think it does, it returns whatever its value is and then it gets set to 5, as several others have pointed out.
    I hope to God you're trolling.
    The Enterpriser:
    Hence:
    return maxRetry = 5;

    is evaluated like so..

    1. maxRetry = 5
    2. return maxRetry (which is now 5)
    Jamie's reply to you (which you later dismissed) is correct. It's not quite right to say that step 2 is "return maxRetry". Instead, it returns the value that was assigned to maxRetry.

    It does not reread maxRetry when determining what maxRetry = 5 finally evaluates to. This is what Jamie's code example demonstrates, and also what I wrote about in this post. (Jamie's example is better.)

    Your statement is true only when you know that maxRetry has the value that you just assigned, which is not always the case.

  • anonymouser (unregistered) in reply to hoodaticus
    hoodaticus:
    anonymouser:
    hoodaticus:
    The Enterpriser:
    hoodaticus:
    I'll contemplate these words while my software runs one of the largest supply chains in North America.

    Good. Let us know when you are done, then maybe you can spend 5 minutes reading http://www.dotnetperls.com/return. It teaches about the 'return' statement.

    I would, but I'm too busy working on my n-tier, event-driven multithreaded DAL and IQueryProvider implementation. Does that article discuss the return value of the assignment operator, or have all these big words confused you?
    God, I hope your big supply chain never touches the retail operation I own.

    I was wondering why the hot dog stand clerk in the promenade was giving me nasty looks. Is that you, Enterpriser?

    Heh, heh. Good one. I'm not Enterpriser, but you must have the right stand and seen me and my clerk (yes, I have an employee, a part timer) glaring at you. Me because my invoices say things like:

    Item                Quantity
    ----------------------------
    Buns, Hotdog, 8pk       true

    And, my clerk glares because he has to reconcile the inventory every time we get a shipment. Of course, in order to be consistent, he just puts things like:

    Item                 On-Hand
    ----------------------------
    Buns, Hotdog, 8pk       true

    Sincerely, The Hotdog KING OF THE NOTHWEST

    section of the lower food court.

  • (cs) in reply to boog
    boog:
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

    It's not C++ you stupid cunty little retard, it's C#. Now FOCUS.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    boog:
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

    It's not C++ you stupid cunty little retard, it's C#. Now FOCUS.

    Can you tell me exactly how assignment operator behavior differs between C# and C++? C#'s is modelled after C++'s, and the assignment syntax and behavior is identical.

  • not a Matt Westwood fan, so IDK why (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Matt Westwood:
    boog:
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

    It's not C++ you stupid cunty little retard, it's C#. Now FOCUS.

    Can you tell me exactly how assignment operator behavior differs between C# and C++? C#'s is modelled after C++'s, and the assignment syntax and behavior is identical.

    Though not directly a behavior of the assignment operator itself

    if (c = 5) {
       // statements
    }

    will not cimpile in C#. It will compile in C++ and will alwasy evaluate to true.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Matt Westwood:
    boog:
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

    It's not C++ you stupid cunty little retard, it's C#. Now FOCUS.

    Can you tell me exactly how assignment operator behavior differs between C# and C++? C#'s is modelled after C++'s, and the assignment syntax and behavior is identical.

    That's not the point. C++ has two addition characters in its name, and C# has a character that is often confused with the sharp sign in conventional musical notation. This is important. Wars have been fought over less.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    C-Octothorpe:
    Matt Westwood:
    boog:
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

    It's not C++ you stupid cunty little retard, it's C#. Now FOCUS.

    Can you tell me exactly how assignment operator behavior differs between C# and C++? C#'s is modelled after C++'s, and the assignment syntax and behavior is identical.

    That's not the point. C++ has two addition characters in its name, and C# has a character that is often confused with the sharp sign in conventional musical notation. This is important. Wars have been fought over less.

    Good point.

  • (cs) in reply to EvanED
    EvanED:
    Jamie's reply to you (which you later dismissed) is correct. It's not quite right to say that step 2 is "return maxRetry". Instead, it returns the value that was assigned to maxRetry. ....

    I just read your post from earlier. That is very interesting - something I wasn't aware of.

    thanks.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    boog:
    Anonymous Cow-Herd:
    I thought assignment returned true unless the assignment failed - hence the problems with errors like if (x=5). I guess I was wrong, at least for C#.
    Uh, no, it's been a little while since I've used C++, much less the below construct, but I'm fairly certain that assignment returns the value to which the left side was set. That's why you can do crazy shit like this:
    x = y = 42;
    which will set both x and y to 42.

    if(x=5) passes because C++ treats 5 as true. Try if(x=0) and see what you get.

    Addendum (2011-07-28 12:50): Not just C++, this applies to C as well. Java too. It seems to be pretty common.

    In fact, I'm not sure of any languages that return on assignments in the way you described. There may be some, but I can't recall any at this time.

    It's not C++ you stupid cunty little retard, it's C#. Now FOCUS.

    A number of posts from this guy and others explicitly refer to C++ behaving the same misunderstood way. Furthermore, he admitted he was wrong at least for C#. Actually, he's wrong about C++ as well, and that's what my comment was directed at; maybe I should have made that more clear.

    Still, why the disrespect, my douchey little dipshit?

  • (cs) in reply to not a Matt Westwood fan, so IDK why
    not a Matt Westwood fan:
    Though not directly a behavior of the assignment operator itself
    if (c = 5) {
       // statements
    }

    will not cimpile in C#. It will compile in C++ and will alwasy evaluate to true.

    Indeed it will. And to clarify,
    if(c = 0) { /* crap */ }
    will also compile in C++, but will never evaluate to true.

  • (cs) in reply to trtrwtf
    trtrwtf:
    C-Octothorpe:
    anonymouser:
    God, I hope your big supply chain never touches the retail operation I own.
    Retail chain you own? Ya rly...

    To be fair, he did say "operation". Might mean the eBay store he runs out of his basement, or the stall he maintains at the local farmer's market, or any sort of thing.

    This does seem to be getting into a cock-waving competition, though. Put 'em away, boys. If what you say is correct and useful, I don't care where you get your paycheck.

    Yes, it was pretty gay, but the insinuation that I don't know what return does pissed me off like a liberal with a debt ceiling.

  • (cs) in reply to @Deprecated
    @Deprecated:
    Cheese:
    @Deprecated:
    Hooah:
    This is a common thing to do on an embedded machine with no filesystem.

    Clearly this is C#, which you would be hard pressed to find on that class of device.

    Although there are faster alternatives, the .NET Micro Framework is used on quite a few machines with no file system. http://en.wikipedia.org/wiki/.NET_Micro_Framework

    Initial hardware released in 2010... so that's like 1 device out of 5.3 skillion other devices.

    So I stand by my original statement, which was: Hooah's post is lame.

    Are you new here? Or do I not understand why you think the post is lame?

Leave a comment on “Representative Property: MaxRetry”

Log In or post as a guest

Replying to comment #:

« Return to Article