• abico (unregistered) in reply to zunesis
    zunesis:
    C-Octopussy:
    Whortical:
    zunesis:
    hoochiekiss:
    public void ReadMyLips()
    {
        ! new Phalluses()
    }

    But the existing ones are fine?

    As if you have no opinion on the matter!

    For me, the is a distinction to be made on whether the phallus is attached to an (apparent) male or female.

    But surprises are still more than welcome!

    You need to try: man | less too, by the sound of it. Don't want those sort of surprises...

  • foo (unregistered) in reply to gallier2
    gallier2:
    Sergey:
    do { } while(0) is a common idiom. The idea is that if you want to exit early on error, you just do a break and avoid a goto. And also if you want to put multiple statements in a macro.

    Yes, my colleague uses that construct, I hate him for that. It's completely retarded. If you conceptually need a goto (and an error exception is a good reason for a forward goto), do a goto. The break is a goto, it's not because it wears a mask, that it is not a goto. The worse about it, is that a break is for leaving a loop, but here you don't have a loop, so when you see do/break/while, you must considere 2 possibilities, is it or is it not a loop. My colleague even once used that thing, but made really a loop out of it by using a continue in one hidden case (reallocation of memory).

    And obviously never tested it. (Hint: continue does test the loop condition.)
  • reductio ad ridiculum (unregistered) in reply to HP PhaserJet
    HP PhaserJet:
    I wonder if this snippet of mine is going to piss anyone off:
    	public bool Read()
    	{
    		again:
    
    		if (!Reader.Read()) return false;
    
    		// Ignore whitespace and comments
    		if ((Reader.NodeType == XmlNodeType.Whitespace) ||
    			(Reader.NodeType == XmlNodeType.Comment))
    		{
    			goto again;
    		}
    
    		Reader.MoveToElement();
    		return true;
    	}

    It's got a goto and a conditional with a side-effect!

    Never had any problem debugging it, even when there were bugs. Never had any problem reading it.

    Yep, another way to skin the cat. Programming is fun.

    Regarding goto's, if used (sparingly), they should be short, tight & sweet. Easy to read, maybe better performance, little or no issue copying the code chunk to another program.

    rar

  • Nick (unregistered) in reply to Severity One
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    The Heisenberg uncertainty principle is that you can either know the position of an object or it's velocity, at a single point in time, never both.
  • commoveo (unregistered) in reply to Nick
    Nick:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    The Heisenberg uncertainty principle is that you can either know the position of an object or it's velocity, at a single point in time, never both.
    Is it that you can only know one at any point in time, or that you can only measure one at any point in time? An omnipotent being could (presumably) still know both at any given time....
  • (cs) in reply to HP PhaserJet
    HP PhaserJet:
    I wonder if this snippet of mine is going to piss anyone off:
    	public bool Read()
    	{
    		again:
    
    		if (!Reader.Read()) return false;
    
    		// Ignore whitespace and comments
    		if ((Reader.NodeType == XmlNodeType.Whitespace) ||
    			(Reader.NodeType == XmlNodeType.Comment))
    		{
    			goto again;
    		}
    
    		Reader.MoveToElement();
    		return true;
    	}

    It's got a goto and a conditional with a side-effect!

    Never had any problem debugging it, even when there were bugs. Never had any problem reading it.

    Pisses me off slightly, but not because of the early return or the side-effect conditional. Only because the goto is conceptually a loop, not a goto (although it could be either - "if it fails, try again" vs "keep trying until it succeeds")

    commoveo:
    Is it that you can only know one at any point in time, or that you can only measure one at any point in time? An omniscient being could (presumably) still know both at any given time....
    FTFY
  • Kill Bill #3 (unregistered) in reply to immibis
    immibis:

    <snip>...om nom nom...</snip>

    commoveo:
    Is it that you can only know one at any point in time, or that you can only measure one at any point in time? An omniscient being could (presumably) still know both at any given time....
    FTFY

    I like the idea of an omnipotent [that|which|whom]* elects not to be omniscient.

      • please flame. Like you won't already.
  • Jibble (unregistered) in reply to MasonicParrot
    MasonicParrot:
    Sounds like you should get your rage on with this guy:

    http://www.diag.com/news/DoWhileFalse.html

    Personally, I think it's a fine and useful idiom, no worse than an early return (cue the SESE brigade).

    So...basically his argument is that it's a trick to obfuscate a goto and/or that because you can write obscure macros that break if statements you should use this as all over your code?

    How about learning to putting curly brackets after *all "if"s so that the scope of what follows is clearly defined?

    If I could fix one thing about C that would be it (mandatory curly brackets for if/for/while/do/etc.)

  • Wizou (unregistered) in reply to dohpaz42
    dohpaz42:
    Early returns are TRWTF (and the devil). When debugging a function with N number of returns, you have to add N number of distinct breakpoints just to debug where a function call exits at; such a waste of time and resources.

    Actually, in Visual C++ Debug builds, you can set a single breakpoint on the last closing brace of the function. Even early returns will go through your breakpoint.

  • · (unregistered)

    I had no idea there were so many myths around the unfortunate "do{ }while(0)" construct. Its actual purpose is to make macros resemble function calls in one specific manner; as a single statement.

    If the macro were simply "{ ... }", that would form one compound statement, and a following semicolon would form a null statement. "do{}while()" happens to require the trailing semicolon.

    So the whole point of it is not to break code like:

    if (condition)
       functionlikemacro();
    else
       whatever();
    

    For any sane recent code, please use an inline function instead.

  • Anon (unregistered)

    I kinda don't like that when seeing a do{...} while(0); doesn't clearly communicate at the first line that it's not a loop, but a block of statements that might fail early. As a solution why not use

    switch (0) {
    ...your code here...
    }

    This is clearly from the very first line not an ordinary switch statement.

  • craig (unregistered) in reply to dohpaz42
    dohpaz42:
    Both functions do the same thing, but in the former you would have to add 3x as many debugging breakpoints just to know why the function returned false. But, in the latter, you only have to add one debug breakpoint.

    Incorrect, in the former you would have to add 3x as many debugging breakpoints to know that the function returned false.

    In order to know why it returned false you require as many breakpoints (or debug statements) in both.

  • (cs) in reply to a;we4gy
    a;we4gy:
    Occasional Reader:
    frits:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    Nah, you're thinking of that kid that plays piano. I think his name is Schroeder.
    <pedant> Is he any relation to Schroedinger? </pedant>
    Obviously noone ever jokes on this site.
    Or they never tried to put a cat in a box. It's no mean feat, mind, because the cat very well knows that 'box' means 'vet'.
  • foo (unregistered) in reply to Nick
    Nick:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    The Heisenberg uncertainty principle is that you can either know the position of an object or it's velocity, at a single point in time, never both.
    The TDWTF uncertainty principle is that you can either get the apparent meaning of a comment or its sarcasm, never both.
  • zunesis (unregistered) in reply to boog
    boog:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    C-octo is a tool boog has a handsome dick frits - still poking his nose in where it's not required Nagesh is an Indian pretending not to be a Westener pretending to be an Indian meep is peeping up again ted has anger management issues Captain Oblivious is oblivious to the fact that no-one finds him very funny java.lang.Chris - Java sucks dogs balls

    Some of these people are the same person, and the rest have puppets that regularly flood the forum. (I feel as though I may have missed someone obvious...)

    FTFY
    FTFY

  • zunesis (unregistered) in reply to abico
    assbigco:
    zunesis:
    As if you have no opinion on the matter!

    For me, the is a distinction to be made on whether the phallus is attached to an (apparent) male or female.

    But surprises are still more than welcome!

    You need to try: man | less too, by the sound of it. Don't want those sort of surprises...

    Hopefully man | more will have the opposite effect. wink

  • zunesis (unregistered) in reply to Severity One
    Severe Moan:
    Or they never tried to put themselves in a cat's box. It's not mean, mind, because the cat very well knows that her 'box' needs 'done'.
  • Prism (unregistered) in reply to Anon
    Anon:
    XXXXX:
    Furthermore, you still need three breakpoints. Just because it is false at the final return statement, you have no indication which of your 3 if/then tests hit.

    Just what I was thinking. Even with a single return, you're still going to have to back track to the assignments that would've been returns to figure out where the final value came from.

    FTFY:

    public class MyCake{
      bool exists;
      MyCake(){exists=true;}
      public MyCake HaveIt(){
        return new MyCake();
      }
      public void EatIt(){
        if(exists){
          exists=false;
        }
      }
    }
    

    Here are your choices:

    private static object decider(int i){
      const string ME=@"object<[{0}]> decider(int i<[{1}]>)|MyClass.Svcs.MyProj|C:\somepath\MyClass.cs|1353701500854277|-*?|";
      object oR="??";
      object[] oA=new []{oR, i};
      Stk.Em(ME+SvnRev+"|bbaQr5tljJ52fzha|", oA);// log entry
      // begin code
      object rv=defaultVal;//member
      if(i==0) {
        rv=false;
        // end code
        oR=rv.ToString();
        oA=new []{oR, i};
        Stk.Xm(ME+SvnRev+"|aF4wClyQ4rx4iEaB|", oA);// log exit
        return rv; //xm
      }
      if(i==1) {
        rv=true;
        // end code
        oR=rv.ToString();
        oA=new []{oR, i};
        Stk.Xm(ME+SvnRev+"|bpOqBq682gaQpV4o|", oA);;// log exit
        return rv; //xm
      }
      if(rv==-1) {
        rv=null;
        // end code
        oR=rv.ToString();
        oA=new []{oR, i};
        Stk.Xm(ME+SvnRev+"|dynm2WRFhyHQccck|", oA);;// log exit
        return rv; //xm
      }
      // end code
      oR=rv.ToString();
      oA=new []{oR, i};
      Stk.Xm(ME+SvnRev+"|P9euFYhBEUjgpbXo|", oA);//log exit
      return rv; //xm
    }
    private static object decider2(int i){
      const string ME=@"object<[{0}]> decider2(int i<[{1}]>)|MyClass.Svcs.MyProj|C:\somepath\MyClass.cs|1354701500854277|-*?|";
      object oR="??";
      object[] oA=new []{oR, i};
      Stk.Em(ME+SvnRev+"|ebaQr5tljJ52fzha|", oA);// log entry
      // begin code
      object rv=defaultVal;//member
      if(i==0) {
        rv=false;
        // log msg
        oR=rv.ToString();
        oA=new []{oR, i};
        Stk.Ms(ME+SvnRev+"|MAOHdZyUtnEyeyr4|", oA, "i==0", "Aquamarine");
        // log msg
      }
      if(i==1) {
        rv=true;
        // log msg
        oR=rv.ToString();
        oA=new []{oR, i};
        Stk.Ms(ME+SvnRev+"|nwSGvwZjrkF6mBg8|", oA, "i==1", "Aquamarine");
        // log msg
      }
      if(rv==-1) {
        rv=null;
        // log msg
        oR=rv.ToString();
        oA=new []{oR, i};
        Stk.Ms(ME+SvnRev+"|wh1SMPJTVKe4iv8F|", oA, "i==-1", "Aquamarine");
        // log msg
      }
      // end code
      oR=rv.ToString();
      oA=new []{oR, i};
      Stk.Xm(ME+SvnRev+"|e9euFYhBEUjgpbXo|", oA);//log exit
      return rv; //xm
    }
    
  • Prism (unregistered) in reply to ·
    ·:
    I had no idea there were so many myths around the unfortunate "do{ }while(0)" construct. Its actual purpose is to make macros resemble function calls in one specific manner; as a single statement.

    If the macro were simply "{ ... }", that would form one compound statement, and a following semicolon would form a null statement. "do{}while()" happens to require the trailing semicolon.

    So the whole point of it is not to break code like:

    if (condition)
       functionlikemacro();
    else
       whatever();
    

    For any sane recent code, please use an inline function instead.

    Why do you WANT macros to resemble function calls when they are NOT and can never be?

    Lipstick. Pig. Bad idea.

  • zunesis (unregistered) in reply to Prism
    Prism:
    Lipstick. Pig. Bad idea.

    I kinda like it when the pig has some lipstick on...

  • (cs) in reply to commoveo
    commoveo:
    Nick:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    The Heisenberg uncertainty principle is that you can either know the position of an object or it's velocity, at a single point in time, never both.
    Is it that you can only know one at any point in time, or that you can only measure one at any point in time? An omnipotent being could (presumably) still know both at any given time....
    The precision with which any observer can know both the velocity and position of a particle at any point in time is zero sum and less than infinite. You can focus on velocity, but then the particle becomes a blur. You can focus on position with complete precision (bringing it in focus), but then you won't be able to track it.

    It's a fundamental law of physics, not a limitation on our equipment. [... and now a homoerotic zunesis quip is pushed onto the stack]

  • (cs) in reply to Nick
    Nick:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    The Heisenberg uncertainty principle is that you can either know the position of an object or it's velocity, at a single point in time, never both.
    So which one do you know: the position of the joke or the velocity at which it's whooshing over your head?
  • (cs) in reply to abico
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?

  • gravis (unregistered) in reply to frits
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.

  • zunesis (unregistered) in reply to gravis
    penis:
    flits:
    assbigcow:
    Amateur Pornstar:
    It's a slow day at work...does anyone mind if I start a flamer catfight?
    By all means - or you can simply join one of the normal ones here. I'll get you started... those shoes don't match that top at all! ... frits - still poking his nose in where it's not desired ...
    I know this is a troll attempt. However, you've piqued my curiousity. What exactly is wrong with my love of the anus?
    See, he's not just nosey: he's also a bitch.
  • zunesis (unregistered) in reply to hoodaticus
    hoodaticus:
    It's a fundamental law of physics, not a limitation on our equipment. [... and now a homoerotic zunesis quip is pushed onto the stack]

    Excellent. Now you're beginning to think like me. Whenever you type something, it occurs to you - What Would Zunesis Say?

  • (cs) in reply to gravis
    gravis:
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.

    I never claimed to be bright, and I just admitted to being curious ("nosey" as you say). You're beign obtuse and not actually backing up your claims with evidence.

    Most of my comments are not replies or quotes, so how exactly am I being nosey? Pleeease elaborate for this dummy.

    Did I somehow interfere with some "brilliant" troll attempt of yours, and now your nose is out of joint?

  • (cs) in reply to frits
    frits:
    gravis:
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.

    I never claimed to be bright, and I just admitted to being curious ("nosey" as you say). You're beign obtuse and not actually backing up your claims with evidence.

    Most of my comments are not replies or quotes, so how exactly am I being nosey? Pleeease elaborate for this dummy.

    Did I somehow interfere with some "brilliant" troll attempt of yours, and now your nose is out of joint?

    Like every other spineless troll (aka one of zunesis' man bitches), he'll adandon this handle and forget it ever happened... That is, until he does it again tomorrow.
  • (cs) in reply to gravis
    gravis:
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.
    Over the years I've learned that frits is one of the most intelligent people here. Along with boog, C-Octo, iToad, blakeyrat, morbeus, trwtf, and many people I'm forgetting to mention.

    You're just a troll.

  • (cs) in reply to hoodaticus
    hoodaticus:
    gravis:
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.
    Over the years I've learned that frits is one of the most intelligent people here. Along with boog, C-Octo, iToad, blakeyrat, morbeus, trwtf, and many people I'm forgetting to mention.

    You're just a troll.

    I concur, except for that C-Octo douchebag...

    I think you forgot Hortical, though I'm not sure if he's a developer or a lit nerd...

  • zunesis (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Like every other spineless troll (aka one of zunesis' man bitches), he'll adandon this handle and forget it ever happened... That is, until he does it again tomorrow.

    Ha ha! I love it when they SCREAM for me!

  • dargor17 (unregistered) in reply to hoodaticus
    hoodaticus:
    commoveo:
    Nick:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    The Heisenberg uncertainty principle is that you can either know the position of an object or it's velocity, at a single point in time, never both.
    Is it that you can only know one at any point in time, or that you can only measure one at any point in time? An omnipotent being could (presumably) still know both at any given time....
    The precision with which any observer can know both the velocity and position of a particle at any point in time is zero sum and less than infinite. You can focus on velocity, but then the particle becomes a blur. You can focus on position with complete precision (bringing it in focus), but then you won't be able to track it.

    It's a fundamental law of physics, not a limitation on our equipment. [... and now a homoerotic zunesis quip is pushed onto the stack]

    Actually, it IS a limitation on our equipment, or rather, on our way of interacting with reality. Everything our eyes see, they see because there are photons coming from there into our eyes, and the same principle works when we "see" an electron or a nucleus or whatever with detectors. The problem is that a macroscopic object gets a negligible momentum transfer by interacting with a photon, while an electron gets a huge transfer, hence the uncertainty.

    Remember, physics principles are always derived from observation.

    I guess that an omniscent being could know position and velocity of an electron at the same time, but the thing is, science is about what humans can do, and we can't.

  • (cs) in reply to hoodaticus
    hoodaticus:
    gravis:
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.
    Over the years I've learned that frits is one of the most intelligent people here. Along with boog, C-Octo, iToad, blakeyrat, morbeus, trwtf, and many people I'm forgetting to mention.

    You're just a troll.

    Thanks. I'm happy you think I'm intelligent, but I don't consider myself to be that smart. I don't really care that much about intelligence. Experience, ambition, and luck are much more important factors in achieving success anyway.

    More importantly, I wish I knew what behavior this guy was referring to. That way I could keep doing it, and do it more, just to annoy him.

  • (cs) in reply to dargor17
    dargor17:
    Actually, it IS a limitation on our equipment, or rather, on our way of interacting with reality.
    Very nicely put. I merely meant that advances in technology will not remove this limit. Your statement that the principle is a limit "on our way of interacting with reality" is elegant. Nice.
  • (cs) in reply to Jerry
    Jerry:
    Severity One:
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    Well almost. The smaller you make the box, the faster the cat is probably going. But you can never be entirely sure.
    If you make the box sufficiently small, the cat will have enough energy to tunnel through the walls.
  • zunesis (unregistered) in reply to DaveK
    DaveK:
    If you make the box sufficiently small, the cat will have enough energy to tunnel through the walls.

    If you leave me and you in a box sufficiently small, I'll get the energy to tunnel your....

  • (cs) in reply to DaveK
    DaveK:
    Jerry:
    Severity One:
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    Well almost. The smaller you make the box, the faster the cat is probably going. But you can never be entirely sure.
    If you make the box sufficiently small, the cat will have enough energy to tunnel through the walls.

    ...with its quantum claws. snickity snick snick

  • (cs) in reply to frits
    frits:
    DaveK:
    Jerry:
    Severity One:
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    Well almost. The smaller you make the box, the faster the cat is probably going. But you can never be entirely sure.
    If you make the box sufficiently small, the cat will have enough energy to tunnel through the walls.

    ...with its quantum claws. snickity snick snick

    Cute!
  • trtrwtf (unregistered) in reply to dargor17
    dargor17:
    Actually, it IS a limitation on our equipment, or rather, on our way of interacting with reality. Everything our eyes see, they see because there are photons coming from there into our eyes, and the same principle works when we "see" an electron or a nucleus or whatever with detectors. The problem is that a macroscopic object gets a negligible momentum transfer by interacting with a photon, while an electron gets a huge transfer, hence the uncertainty.

    Remember, physics principles are always derived from observation.

    I guess that an omniscent being could know position and velocity of an electron at the same time, but the thing is, science is about what humans can do, and we can't.

    I an not by any means a physicist, and I'll say upfront that I don't have the math to understand how this works, but as it's been explained to me the limitation is more mathematical than experimental. That is, hoodaticus's explanation is closer to the truth, and the problem is not one of photons or any other particles bouncing off of things. The problem is that the total precision with which the actual values can be defined at any given time is limited.

    That is, it's impossible to determine the values, not because the tools and medium of the experiments affect the situation, but because the actual acquisition of the knowledge affects the situation. More precisely, knowing the velocity of a particle with a certain degree of precision is what makes its position indefinite - not the process of measuring it.

    This is difficult for me to accept, so I've asked a lot of smart people about it, and this is the consensus that I've extracted over the years. Still willing to hear more explanations, though, since as I say, I don't really understand it very well yet.

  • (cs) in reply to trtrwtf
    trtrwtf:
    dargor17:
    Actually, it IS a limitation on our equipment, or rather, on our way of interacting with reality. Everything our eyes see, they see because there are photons coming from there into our eyes, and the same principle works when we "see" an electron or a nucleus or whatever with detectors. The problem is that a macroscopic object gets a negligible momentum transfer by interacting with a photon, while an electron gets a huge transfer, hence the uncertainty.

    Remember, physics principles are always derived from observation.

    I guess that an omniscent being could know position and velocity of an electron at the same time, but the thing is, science is about what humans can do, and we can't.

    I an not by any means a physicist, and I'll say upfront that I don't have the math to understand how this works, but as it's been explained to me the limitation is more mathematical than experimental. That is, hoodaticus's explanation is closer to the truth, and the problem is not one of photons or any other particles bouncing off of things. The problem is that the total precision with which the actual values can be defined at any given time is limited.

    That is, it's impossible to determine the values, not because the tools and medium of the experiments affect the situation, but because the actual acquisition of the knowledge affects the situation. More precisely, knowing the velocity of a particle with a certain degree of precision is what makes its position indefinite - not the process of measuring it.

    This is difficult for me to accept, so I've asked a lot of smart people about it, and this is the consensus that I've extracted over the years. Still willing to hear more explanations, though, since as I say, I don't really understand it very well yet.

    Without quantum mechanics, electrons orbiting a nucleus would emit electromagnetic energy. This would cause the electrons to lose energy until they spiraled into the nucleus.

  • trtrwtf (unregistered) in reply to frits
    frits:
    Without quantum mechanics, electrons orbiting a nucleus would emit electromagnetic energy. This would cause the electrons to lose energy until they spiraled into the nucleus.

    That much I've come to grips with. Quantum mechanics is an accurate and productive way of describing the phenomena, I'm okay with that part. I just have trouble getting my head around some of the interactions with the mind - that's the part that makes my head go sideways. However, I'm convinced that it's my failure to understand that's the problem here, not a problem with the theory. There may be problems with the theory, but my inability to grasp it is not one of them.

  • reductio ad ridiculum (unregistered) in reply to foo
    foo:
    The TDWTF uncertainty principle is that you can either get the apparent meaning of a comment or its sarcasm, never both.
    +1
  • (cs) in reply to trtrwtf
    trtrwtf:
    frits:
    Without quantum mechanics, electrons orbiting a nucleus would emit electromagnetic energy. This would cause the electrons to lose energy until they spiraled into the nucleus.

    That much I've come to grips with. Quantum mechanics is an accurate and productive way of describing the phenomena, I'm okay with that part. I just have trouble getting my head around some of the interactions with the mind - that's the part that makes my head go sideways. However, I'm convinced that it's my failure to understand that's the problem here, not a problem with the theory. There may be problems with the theory, but my inability to grasp it is not one of them.

    You're not alone. I was just reading an interview with Roger Penrose who says that quantum mechanics is a provisional theory. He claims that it is most likely completely wrong and a yet unknown theory will eventually supplant it and also merge it with relativity. Einstein also never believed that quntum mechanics was "true" and he won a Nobel prize for a quantum mechanical theory.

  • reductio ad ridiculum (unregistered) in reply to zunesis

    To Amateur Troll:

    Well Done.

    Kudos.

  • (cs) in reply to frits
    frits:
    trtrwtf:
    frits:
    Without quantum mechanics, electrons orbiting a nucleus would emit electromagnetic energy. This would cause the electrons to lose energy until they spiraled into the nucleus.

    That much I've come to grips with. Quantum mechanics is an accurate and productive way of describing the phenomena, I'm okay with that part. I just have trouble getting my head around some of the interactions with the mind - that's the part that makes my head go sideways. However, I'm convinced that it's my failure to understand that's the problem here, not a problem with the theory. There may be problems with the theory, but my inability to grasp it is not one of them.

    You're not alone. I was just reading an interview with Roger Penrose who says that quantum mechanics is a provisional theory. He claims that it is most likely completely wrong and a yet unknown theory will eventually supplant it and also merge it with relativity. Einstein also never believed that quntum mechanics was "true" and he won a Nobel prize for a quantum mechanical theory.

    Read up on the Quantum Eraser and Diffraction Slit experiments. The observability of the position and vector of any particle determines its position and vector, and (as you can see in the Quantum Eraser) it doesn't even have the common decency to obey the general principle that effect follows cause.

    Addendum (2011-07-12 16:11): Make that "Delayed Choice" Quantum Eraser for the apparent retrotemporal effect.

  • letatio (unregistered) in reply to ·
    ·:
    I had no idea there were so many myths around the unfortunate "do{ }while(0)" construct. Its actual purpose is to make macros resemble function calls in one specific manner; as a single statement.

    If the macro were simply "{ ... }", that would form one compound statement, and a following semicolon would form a null statement. "do{}while()" happens to require the trailing semicolon.

    So the whole point of it is not to break code like:

    if (condition)
       functionlikemacro();
    else
       whatever();
    

    For any sane recent code, please use an inline function instead.

    and as some guy before you said, good use of curly braces can fix this:

    if(condition)
    {
         functionlikemacro();
    }
    else
    {
       whatever();
    }
    

    Someone will (no doubt) ask what about when others try to expand it?
    They may get a compile time error, and will hopefully know how to fix it. Exploiting constructs for non-intuitive behavior seems a touch misguided - especially when there is a reasonably simple way to avoid the issue. It requires a fraction more effort to put parenthesis around every code block in a conditional, but CS101 always insisted we get into the habbit of doing that anyway, right?

  • feugiat (unregistered) in reply to craig
    craig:
    dohpaz42:
    Both functions do the same thing, but in the former you would have to add 3x as many debugging breakpoints just to know why the function returned false. But, in the latter, you only have to add one debug breakpoint.

    Incorrect, in the former you would have to add 3x as many debugging breakpoints to know that the function returned false.

    In order to know why it returned false you require as many breakpoints (or debug statements) in both.

    Why don't you check the return value at the other end (ie the calling function)?

  • sagaciter (unregistered) in reply to Severity One
    Severity One:
    a;we4gy:
    Occasional Reader:
    frits:
    Severity One:
    A Nonny Mouse:
    it's heisenberg's principle error logging: you can record the datetime of the error, or the error detail, but never both. making your response to the question "what went wrong?" of "i'm not sure" even more correct
    Heisenberg is the one of the cat, right? That if a cat is in a closed box, you can't measure its velocity?
    Nah, you're thinking of that kid that plays piano. I think his name is Schroeder.
    <pedant> Is he any relation to Schroedinger? </pedant>
    Obviously noone ever jokes on this site.
    Or they never tried to put a cat in a box. It's no mean feat, mind, because the cat very well knows that 'box' means 'vet'.
    not quite the same thing, but similar

    Oh Akismet, why do you believe anything with a link is bad? It makes the posters here quite sad, A single link don't make it SPAM, We wouldn't try to post a scam.

  • sagaciter (unregistered) in reply to frits
    frits:
    gravis:
    frits:
    abico:
    Amateur Troll:
    It's a slow day at work...does anyone mind if I start a flame war?
    By all means - or you can simply join one of the normal ones here. I'll get you started...

    ... frits - still poking his nose in where it's not required ...

    I know this is a troll attempt. However, you've piqued my curiousity. What exactly do you mean?
    See, he's not just nosey: he's also a dim-wit.

    I never claimed to be bright, and I just admitted to being curious ("nosey" as you say). You're beign obtuse and not actually backing up your claims with evidence.

    Most of my comments are not replies or quotes, so how exactly am I being nosey? Pleeease elaborate for this dummy.

    Did I somehow interfere with some "brilliant" troll attempt of yours, and now your nose is out of joint?

    hahaha....I actually thought your (original) reply was a deliberate attempt to be nosey
  • Chevvy Chase (unregistered) in reply to dargor17
    dargor17:
    <snippity doo dah, snippity dey> but the thing is, science is about what humans can do
    Really?

Leave a comment on “The Legacy Handover”

Log In or post as a guest

Replying to comment #:

« Return to Article