A Collection Of Comments

« Return to Article
  • Alex Papadimoulis 2006-01-27 14:32
    I just have to comment on the last one ... <I>No no! That's a Bad Perl! You Don't comment out "use strict." You'll make a mess all over the code. Bad Perl!</I>
  • Manni 2006-01-27 14:37
    Yes, Windows NT is a butt-head OS.&nbsp;I suppose the code name for Mac OS X was "Beavis"?
  • jvancil 2006-01-27 14:41
    The only good OS is one that has been dynamically generated by a dynamic OS Generating tool...
  • Chris I 2006-01-27 14:43
    It might seem daunting at first, but take note that
    "GetProfileCustomerEntityReceiverInformationReceiverAndProgrammingInformationListAccessCardInformationProgrammingListProductDetails"
    instances could be referenced using much more manageable instance
    names, such as "gpcerirapilaciplpdOne"
  • OneFactor 2006-01-27 14:47
    <P>
    Original:
    </P>
    <P>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<BR>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<BR>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<BR>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<BR>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<BR>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<BR>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </P>
    <P>A few questions,</P>
    <P>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<BR>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<BR>Why express time in metres when time and the speed of light can be measured more precisely than distances?<BR>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</P>
  • OneFactor 2006-01-27 14:47
    <P>
    Original:
    </P>
    <P>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<BR>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<BR>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<BR>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<BR>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<BR>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<BR>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </P>
    <P>A few questions,</P>
    <P>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<BR>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<BR>Why express time in metres when time and the speed of light can be measured more precisely than distances?<BR>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</P>
  • OneFactor 2006-01-27 14:48
    sorry for the double post, my finger slipped and i double clicked
  • somedude 2006-01-27 14:49
    OneFactor:
    <p>
    Original:
    </p>
    <p>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<br>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<br>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<br>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<br>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<br>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<br>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </p>
    <p>A few questions,</p>
    <p>How can GMT and UTC have any meaningful values before the creation
    of the earth since they both depend on the variable rate of rotation of
    the earth?<br>Isn't the time of the creation of the universe undecided
    between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of
    the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<br>Why express time in metres when time and the speed of light can be measured more precisely than distances?<br>To
    transform between frames, can't you just apply a Lorentz transformation
    - I thought the&nbsp;(Feynman?) Path Integral was for bringing in
    quantum mechanical effects.</p>
    <br>
    <br>
    wo wo.... slow down egghead<br>
  • Cranky 2006-01-27 14:56
    OneFactor:
    sorry for the double post, my finger slipped and i double clicked
    <br><br>Um... triple, including the apology...<br>
  • WTF Batman 2006-01-27 14:58
    Alex Papadimoulis:
    <blockquote>
    <p></p><pre>#use strict; #good perl</pre></blockquote>
    <br><br>The hallmark of the exasperated OTP* coder finally giving up his struggle to understand perl semantics, opting instead for mediocrity, insanity, and a slow descent into hell. <br><br>*OTP = Other Than PERL<br>
  • OneFactor 2006-01-27 15:01
    Anonymous:
    OneFactor:

    <P>
    Original:
    </P>
    <P>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<BR>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<BR>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<BR>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<BR>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<BR>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<BR>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </P>
    <P>A few questions,</P>
    <P>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<BR>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<BR>Why express time in metres when time and the speed of light can be measured more precisely than distances?<BR>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</P>
    <P>
    <BR><BR>wo wo.... slow down egghead<BR>
    </P>
    <P>Point well taken, if I had slowed down I would have realized that the path integral on the Minkowski really did make sense&nbsp;in order&nbsp;to account for a frame of reference that had non-constant velocity. I really should think more before posting.</P>
  • Randolpho 2006-01-27 15:03
    OneFactor:

    <P>
    Original:
    </P>
    <P>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<BR>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<BR>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<BR>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<BR>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<BR>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<BR>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </P>
    <P>A few questions,</P>
    <P>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<BR>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<BR>Why express time in metres when time and the speed of light can be measured more precisely than distances?<BR>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</P>
    <P>
    </P>
    <P>I think you and the author should get together and chat about it sometime, but I fear that if you do it'll set off a matter/anti-matter chain reaction that will destroy the entire universe. </P>
  • Cirdan 2006-01-27 15:05
    Anonymous:
    OneFactor:
    sorry for the double post, my finger slipped and i double clicked
    <br>Um... triple, including the apology...<br>
    <br>
    I don't think posting _different_ messages usually counts as double posting. Then again, what do I know?<br>
  • Cirdan 2006-01-27 15:07
    Anonymous:
    OneFactor:
    sorry for the double post, my finger slipped and i double clicked
    <br>Um... triple, including the apology...<br>
    <br>
    Ach, how silly. That doesn't really count as a third copy of the post, does it?<br>
  • jsumners 2006-01-27 15:10
    kungFuDeathGrip();<br><br>I love it! And it is evidently used quite a bit -- http://www.koders.com/?s=kungfudeathgrip&amp;_%3Abtn=Search&amp;_%3Ala=*&amp;_%3Ali=*<br>
  • Xargon 2006-01-27 15:12
    OneFactor:
    <p>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    </p><p>You are correct about Cephied uncertainty and a variable Hubble constant due to an accelerated expansion.&nbsp; However, the age of the Universe estimated at 13.7+/-0.2 billion years is based on the WMAP analysis of the power spectrum of the cosmic microwave background.&nbsp; <br></p>
  • WTF Batman 2006-01-27 15:14
    jsumners:
    kungFuDeathGrip();<br><br>I love it! And it is evidently used quite a bit -- http://www.koders.com/?s=kungfudeathgrip&amp;_%3Abtn=Search&amp;_%3Ala=*&amp;_%3Ali=*<br>
    <br><br>Indeed. Considerably more than kungFuSuicideGrip() -- <br><br>http://www.koders.com/?s=kungfusuicidegrip&amp;_%3Abtn=Search&amp;_%3Ala=*&amp;_%3Ali=*<br>
  • The BitShifter 2006-01-27 15:16
    Alex Papadimoulis:
    <br>
    <br>
    --SNIP--<br>
    <p><b>Jeremy Lew</b> found this little comment in some C++ source file.
    Judging from the comment, the developer at least had an inkling of his
    questionable sanity ... </p><blockquote>
    <p></p><pre>void sysDraw::close()<br>{<br> // Is this necessary????<br> // probably not but what the hell.<br> // better safe than sorry<br> if (!this) return; <br> <br> // ... snip ...<br>}</pre></blockquote>--SNIP--<br>
    <br>
    <br>
    I have to comment on this one, depending on what other hackery he was
    engaged in, this may have been a valid concern.  I've developed
    C++ applications for small systems that used pointers to C++ member
    functions as call-backs and it is conceivable that<br>
    the actual call site might get bad/null data.  Granted, the whole system was fugly, but that is a different story.<br>
    <br>
    --The BitShifter, certified language abuse specialist.<br>
  • Sean 2006-01-27 15:17
    <pre>surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize<br><br>Just <span style="font-weight: bold;">reading</span> this gives me carpal tunnel.<br></pre>
  • WTF Batman 2006-01-27 15:18
    Xargon:
    OneFactor:
    <p>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    </p><p>You are correct about Cephied uncertainty and a variable Hubble constant due to an accelerated expansion.&nbsp; However, the age of the Universe estimated at 13.7+/-0.2 billion years is based on the WMAP analysis of the power spectrum of the cosmic microwave background.&nbsp; <br></p>
    <br><br>Question for you, since you'd seem to know:&nbsp; What happens when you put silverware in the cosmic microwave? Just curious.<br>
  • Xargon 2006-01-27 15:23
    WTF Batman:
    Xargon:
    OneFactor:
    <p>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    </p><p>You are correct about Cephied uncertainty and a variable Hubble constant due to an accelerated expansion.&nbsp; However, the age of the Universe estimated at 13.7+/-0.2 billion years is based on the WMAP analysis of the power spectrum of the cosmic microwave background.&nbsp; <br></p>
    <br><br>Question for you, since you'd seem to know:&nbsp; What happens when you put silverware in the cosmic microwave? Just curious.<br>
    <br>The glass rotating plate breaks and God's kitchen starts on fire.&nbsp; In anger, God throws the resulting debris out the window.&nbsp; But that only happened once, at the K-T boundary.&nbsp; The dinosaurs weren't too happy about it, but then again what do they know?<br>
  • rbriem 2006-01-27 15:25
    Anonymous:
    OneFactor:

    <P>
    Original:
    </P>
    <P>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<BR>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<BR>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<BR>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<BR>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<BR>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<BR>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </P>
    <P>A few questions,</P>
    <P>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<BR>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<BR>Why express time in metres when time and the speed of light can be measured more precisely than distances?<BR>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</P>
    <P>
    </P>
    <P>I think you and the author should get together and chat about it sometime, but I fear that if you do it'll set off a matter/anti-matter chain reaction that will destroy the entire universe. </P>
    <P>
    </P>
    <P>If a matter/anti-matter chain reaction destryed the entire universe and there was no one left to witness it, would it still be cool?</P>
    <P>Let's try it and see ...</P>
  • Gene Wirchenko 2006-01-27 15:28
    Alex Papadimoulis:
    It's time once again to give all those cool-but-too-small-to-make-a-full-post submissions a home ...
    <br><br>And like a new puppy, they make messes on the rug.<br><br>
    ...comments budget...
    <br><br>A very apt turn of phrase.&nbsp; From a quick Google, it looks as if it may be an original.<br><p>
    And I suppose I'll wrap it up with this comment that <b>Adam Lazur</b> found at the top of just about every single in-house-developed Perl script. Note that the "#" is the comment character ...
    </p><blockquote>
    <p></p><pre>#use strict; #good perl</pre></blockquote>
    <br><br>Get that puppy out of here!<br><br>Sincerely,<br><br>Gene Wirchenko<br><br>
  • Gene Wirchenko 2006-01-27 15:30
    WTF Batman:
    Alex Papadimoulis:
    <blockquote>
    <p></p><pre>#use strict; #good perl</pre></blockquote>
    <br><br>The hallmark of the exasperated OTP* coder finally giving up his struggle to understand perl semantics, opting instead for mediocrity, insanity, and a slow descent into hell. <br><br>*OTP = Other Than PERL
    <br><br>Are Perl and the Necronomicon isomorphic?<br><br>Sincerely,<br><br>Gene Wirchenko<br><br>
  • Maurits 2006-01-27 15:31
    For all-too-many Perl "programmers", #use strict; is the Perl equivalent of PleaseCompile.<br>
  • marvin_rabbit 2006-01-27 15:31
    Alex Papadimoulis:
    <blockquote><pre>synchronized (surelyReachableObjectsWhichHaveToBeMarkedAsSuch) {
    waitRecommended =
    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize
    == surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.size();

    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize =
    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.size();

    while (!surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.isEmpty())
    {
    surelyReachableObjectsWhichHaveToBeMarkedAsSuch.push(
    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.getFirst() );
    }
    }</pre></blockquote>
    <br><br>Well that just proves that good code CAN be self documenting!<br>
  • DarthDevilous 2006-01-27 15:31
    jsumners:
    kungFuDeathGrip();<br><br>I love it! And it is evidently used quite a bit -- http://www.koders.com/?s=kungfudeathgrip&_%3Abtn=Search&_%3Ala=*&_%3Ali=*<br>
    <br><br>After reading the occasional comment in the results of the search, am I right in thinking the kungFuDeathGrip is a instance of a smart pointer created to keep the ref count above nil?<br>
  • WTF Batman 2006-01-27 15:35
    Gene Wirchenko:
    <br><br>Are Perl and the Necronomicon isomorphic?<br><br>
    <br><br>They can be. It depends heavily on whether you 'use strict;'.<br>
  • Stu 2006-01-27 15:36
    OneFactor:
    <p>
    Original:
    </p>
    <p>    //return greenwich mean time as expressed in nanoseconds since the<br>    //creation of the universe.  time is expressed in meters, so<br>    //divide by the speed of light to obtain seconds.  assumes the<br>    //speed of light in a vacuum is constant.  the file specified by<br>    //Filename is assumed to be in your reference frame, otherwise you<br>    //must transform the result by the path integral of the minkowski<br>    //metric tensor in order to obtain the correct result.
    </p>
    <p>A few questions,</p>
    <p>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<br>Isn't the time of the creation of the universe undecided between 9 and 20 billion years because of the imprecision of the Cepheid yardstick and therefore the Hubble "constant"? <br>Why express time in metres when time and the speed of light can be measured more precisely than distances?<br>To transform between frames, can't you just apply a Lorentz transformation - I thought the (Feynman?) Path Integral was for bringing in quantum mechanical effects.</p>
    <br><br>I think that's what happens when a programmer is told the function needs more commenting.<br><br>It probaby orginally said something like:<br><span style="font-family: Courier New;">//Return the current value of Time.</span><br>
  • mrprogguy 2006-01-27 15:43
    <P>But why would you need a wrapper to return the value of an (I assume) intrinsic?&nbsp; Wouldn't</P><PRE>SQLWord sqlWT = Time;</PRE>
    <P>have worked just as well?</P>
  • W.B. McNamara 2006-01-27 15:45
    Funny -- after seeing <a href="http://www.cenqua.com/commentator">the Commentator</a> for the first time yesterday, I put together a post on some of the <a href="http://seamonkeyrodeo.blogspot.com/2006/01/comments-on-comments.html">best comments that I've come across</a> in various chunks of code.<br><br>My all-time favorite?  A little one-liner dumped into a couple thousand lines of byzantine code.  I like to picture the expression on the coder's face as they finally figured out what it was all actually supposed to do:<br><br><font face="courier, courier new">;;; oh sh!t, it tries to write to oracle, too...</font><br>
  • geewj 2006-01-27 15:46
    Cirdan:
    Anonymous:
    OneFactor:
    sorry for the double post, my finger slipped and i
    double clicked
    <br>Um... triple, including the apology...<br>
    <br>
    I don't think posting _different_ messages usually counts as double posting. Then again, what do I know?<br>
    <br><br>
    Cirdan:
    Anonymous:
    OneFactor:
    sorry for the double post, my finger slipped and i double clicked
    <br>Um... triple, including the apology...<br>
    <br>
    Ach, how silly. That doesn't really count as a third copy of the post, does it?<br>
    <br><br>Testing your double post with different messages theory?<br>
  • Opposable Thumbs 2006-01-27 15:47
    <P>KungFuDeathGrip is the semi-official name for CTRL-ALT-DELETE equivalent on SGI systems. I think it was CTRL-ALT-F7-BACKSPACE. Try this out and you can get a good idea of where the name came from. </P>
  • R.Flowers 2006-01-27 16:02
    <P>
    WTF Batman:
    <BR><BR>Question for you, since you'd seem to know:&nbsp; What happens when you put silverware in the cosmic microwave? Just curious.<BR>
    </P>
    <P>You end up with the Fantastic Fork<FONT size=1>(TM)</FONT>.</P>
  • Rank Amateur 2006-01-27 16:06
    Anonymous:

    <P>KungFuDeathGrip is the semi-official name for CTRL-ALT-DELETE equivalent on SGI systems. I think it was CTRL-ALT-F7-BACKSPACE. Try this out and you can get a good idea of where the name came from. </P>
    <P>
    </P>
    <P>With one hand?</P>
  • Rank Amateur 2006-01-27 16:18
    Alex Papadimoulis:

    <P>synchronized (surelyReachableObjectsWhichHaveToBeMarkedAsSuch) {<BR>&nbsp; waitRecommended = <BR>&nbsp;&nbsp;&nbsp; surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; == surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.size();<BR><BR>&nbsp;&nbsp;&nbsp; surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize = <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.size();<BR><BR>&nbsp;&nbsp;&nbsp; while (!surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.isEmpty()) <BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; surelyReachableObjectsWhichHaveToBeMarkedAsSuch.push(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.getFirst() );<BR>&nbsp;&nbsp;&nbsp; }<BR>}
    <P>
    </P>
    <P>If everyone used names like these, spotting bugs would be so much easier. For example, it's clear the sixth line needs to be:</P>
    <P>surelyReachableObjectsWhichWouldHaveBeenProcessedButWereLockContented.size();</P>
    <P>Unsincerely,</P>
    <P>--Rank</P>
  • Gene Wirchenko 2006-01-27 16:37
    Alex Papadimoulis:
    <blockquote>
    <p></p><pre>synchronized (surelyReachableObjectsWhichHaveToBeMarkedAsSuch) {
    waitRecommended =
    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize
    == surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.size();

    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContentedSize =
    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.size();

    while (!surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.isEmpty())
    {
    surelyReachableObjectsWhichHaveToBeMarkedAsSuch.push(
    surelyReachableObjectsWhichShouldHaveBeenProcessedButWereLockContented.getFirst() );
    }
    }</pre></blockquote>
    <br><br>"...LockContented..."?<br><br>"contention" is not from "content" but "contend".<br><br>Carnation Condensed Milk: From Contended Cows.<br><br>Sincerely,<br><br>Gene Wirchenko<br><br>
  • hash 2006-01-27 16:43
    Can I just say that ending every post with<br><br>Sincerely,<br><br>Gene Wirchenko <br><br><br>is not only annoying as hell, but redundant. Your username is Gene Wirchenko, you don't need to reinforce the fact that it was you who posted the message. Maybe i'm the only one that cringes everytime I read<br><br><br>
    Sincerely,<br>
    <br>
    Gene Wirchenko <br><br>but oh well.<br><br>Sincerely,<br><br>hash.<br>
  • OneFactor 2006-01-27 16:50
    Xargon:
    OneFactor:

    <P>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    </P>
    <P>You are correct about Cephied uncertainty and a variable Hubble constant due to an accelerated expansion.&nbsp; However, the age of the Universe estimated at 13.7+/-0.2 billion years is based on the WMAP analysis of the power spectrum of the cosmic microwave background.&nbsp;
    </P>
    <P>Aren't some stars dated at 16 billion years old though? I'm rather fond&nbsp;using the planck temperature divided by the cosmic background temperature, squaring it and saying thats the age of the universe in planck time. Though&nbsp;all theoretical calculations have a factor of 2pi as the margin for error.Which is bigger than the Cepheid uncertainty.</P>
  • Omnifarious 2006-01-27 16:52
    OneFactor:
    <p>
    Original:
    </p>
    <p>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<br>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<br>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<br>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<br>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<br>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<br>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </p>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?</p>

    <p>It's a joke. How do you know when the Universe was created? Maybe it was created a second ago. :-)</p>
    OneFactor:

    <p>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<br>Why express time in metres when time and the speed of light can be measured more precisely than distances?<br>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</p>

    <p>Yeah, that stuff is just a mistake. Someone trying to be clever and doing it by saying a lot of nonsense that seems like it makes sense until you actually know something about the topic.</p>
  • foxyshadis 2006-01-27 16:54
    Anonymous:
    OneFactor:
    <p>
    Original:
    </p>
    <p>&nbsp;&nbsp;&nbsp; //return greenwich mean time as expressed in nanoseconds since the<br>&nbsp;&nbsp;&nbsp; //creation of the universe.&nbsp; time is expressed in meters, so<br>&nbsp;&nbsp;&nbsp; //divide by the speed of light to obtain seconds.&nbsp; assumes the<br>&nbsp;&nbsp;&nbsp; //speed of light in a vacuum is constant.&nbsp; the file specified by<br>&nbsp;&nbsp;&nbsp; //Filename is assumed to be in your reference frame, otherwise you<br>&nbsp;&nbsp;&nbsp; //must transform the result by the path integral of the minkowski<br>&nbsp;&nbsp;&nbsp; //metric tensor in order to obtain the correct result.
    </p>
    <p>A few questions,</p>
    <p>How can GMT and UTC have any meaningful values before the creation of the earth since they both depend on the variable rate of rotation of the earth?<br>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<br>Why express time in metres when time and the speed of light can be measured more precisely than distances?<br>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.</p>
    <br><br>I think that's what happens when a programmer is told the function needs more commenting.<br><br>It probaby orginally said something like:<br><span style="font-family: Courier New;">//Return the current value of Time.</span><br>
    <br>No, this what happens when you put a bored physicist grad student in charge of coding and/or debugging your simulations.<br>
  • jvancil 2006-01-27 16:55
    <P>
    hash:
    Can I just say that ending every post with<BR><BR>Sincerely,<BR><BR>Gene Wirchenko <BR><BR><BR>is not only annoying as hell, but redundant. Your username is Gene Wirchenko, you don't need to reinforce the fact that it was you who posted the message. Maybe i'm the only one that cringes everytime I read<BR><BR><BR>Sincerely,<BR><BR>Gene Wirchenko <BR><BR>but oh well.<BR><BR>Sincerely,<BR><BR>hash.<BR>
    </P>
    <P>I think he might be using an automated Signature Generator...</P>
  • Omnifarious 2006-01-27 17:00
    Gene Wirchenko:
    Are Perl and the Necronomicon isomorphic?

    <p>I believe that you have discovered a hidden truth. It would explain a great deal.</p>
  • cconroy 2006-01-27 17:15
    <span style="font-family: verdana;"><font size="2">Without kungFuDeathGrip(), unthinkableMayhem ensues.<br>
    <br>
    </font></span>
  • headhigh 2006-01-27 17:17
    Depends on what your other hand is doing.<br>
  • TheDauthi 2006-01-27 17:19
    Alex Papadimoulis:
    <blockquote>
    <p></p><pre>#use strict; #good perl</pre></blockquote>
    <br><br>Well, at least it was good some time in the past.&nbsp; I write and deal with a lot of perl.&nbsp; You can tell a lot about the quality of the code, though, by whether or not the code will pass use strict and -w.&nbsp; If I open a script for maintenance and find that warnings and strict are not on, I don't bother reading the code: I go ask someone what this script was supposed to do instead.&nbsp; It's generally faster to re-invent the wheel than to try to round someone else's.<br><br>Perl's a great language, but there are a lot of perl 'programmers' who leave unreadable messes.<br><br><br>
  • uni penguin 2006-01-27 17:48
    Anonymous:
    <br>After reading the occasional comment in the results of the search, am I right in thinking the kungFuDeathGrip is a instance of a smart pointer created to keep the ref count above nil?<br>
    <br><br>Precisely.<br><br>My favorite error message of all time is still:<br><br>kernel panic:<br>mcs_unlock: lock not currently owned<br>the zombie walks, the sequel<br>
  • Xargon 2006-01-27 17:53
    OneFactor:
    Xargon:
    OneFactor:

    <p>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    </p>
    <p>You are correct about Cephied uncertainty and a variable Hubble constant due to an accelerated expansion.&nbsp; However, the age of the Universe estimated at 13.7+/-0.2 billion years is based on the WMAP analysis of the power spectrum of the cosmic microwave background.&nbsp;
    </p>
    <p>Aren't some stars dated at 16 billion years old though? I'm rather fond&nbsp;using the planck temperature divided by the cosmic background temperature, squaring it and saying thats the age of the universe in planck time. Though&nbsp;all theoretical calculations have a factor of 2pi as the margin for error.Which is bigger than the Cepheid uncertainty.
    </p><p>That was a problem when comparing globular cluster ages to 1/H0, and probably still when WMAP results were first results.&nbsp; However, the uncertainty in the age of stars in globular clusters (which contain the oldest stars in galaxies) is dependent on the accuracy of the distance to the star.&nbsp; Distance measurements have since been improved (IIRC, the inital Hipparcos had some serious accuracy issues) and observed star ages now fall within the age of the Universe.<br></p><br>
  • Gene Wirchenko 2006-01-27 18:10
    Anonymous:
    My favorite error message of all time is still:<br><br>kernel panic:<br>mcs_unlock: lock not currently owned<br>the zombie walks, the sequel
    <br><br>I still like:<br>*** INVALID COMPILED FORMAT ***<br>YOUR PROGRAM HAS MOST LIKELY CLOBBERED ITSELF.<br>followed by legnthy details (since it was a batch job).&nbsp; (I wrote into an area of memory that I was not supposed to.)<br><br>Sincerely,<br><br>Gene Wirchenko<br><br>
  • Beaker 2006-01-27 18:32
    OneFactor:
    Isn't the time of the creation of the universe undecided between 9 and 20 billion years because of the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    <br><br>No, no, no... everyone knows that in accordance with today's religious nutjobbery, the universe was created by God Almighty in 4004 BC.<br>
  • John Hensley 2006-01-27 19:09
    Not the first time I've seen someone mystified by Perl's spaceship
    operator. And as far as I know every single Perl distribution comes
    with complete and clear documentation.<br>

    <br>As someone who started with perl long before it had strict, I gotta
    agree with the last one. If I wanted to write clean and polished code I
    wouldn't be using perl in the first place.<br>
    <br>
  • chrismcb 2006-01-27 20:37
    Anonymous:
    Alex Papadimoulis:
    <BR><BR>--SNIP--<BR>
    <P><B>Jeremy Lew</B> found this little comment in some C++ source file. Judging from the comment, the developer at least had an inkling of his questionable sanity ... </P>
    <BLOCKQUOTE>
    <P></P><PRE>void sysDraw::close()<BR>{<BR> // Is this necessary????<BR> // probably not but what the hell.<BR> // better safe than sorry<BR> if (!this) return; <BR> <BR> // ... snip ...<BR>}</PRE></BLOCKQUOTE>
    <P>--SNIP--<BR>
    <BR><BR>I have to comment on this one, depending on what other hackery he was engaged in, this may have been a valid concern.&nbsp; I've developed C++ applications for small systems that used pointers to C++ member functions as call-backs and it is conceivable that<BR>the actual call site might get bad/null data.&nbsp; Granted, the whole system was fugly, but that is a different story.<BR><BR>--The BitShifter, certified language abuse specialist.<BR>
    </P>
    <P>&nbsp;</P>
    <P>Its pretty easy for it to happen, but it is kind of lame to write code to protect against it.</P>
    <P>sysDraw *psd = NULL;</P>
    <P>psd-&gt;close();</P>
    <P>This will call sysDraw::close() function and this will be NULL. You should be tracking down why you are calling the function with a null pointer. Adding a if this equals null is just a bandaid on the problem.</P>
  • AnonymousAsWell 2006-01-27 21:51
    <P>WTF Batman&nbsp;fails because first,&nbsp;his name is WTF Batman, so it's impossible to take&nbsp;him seriously, and secondly,&nbsp;he used the signature feature, Gene actually SIGNS his post each time.</P>
    <P>Also, this makes you the troll, since your only purpose was to provoke a response from me or someone like me.</P>
    <P>Try harder!</P>
  • josh 2006-01-28 04:15
    Anonymous:
    Alex Papadimoulis:
    <blockquote><pre>void sysDraw::close()<br>{<br> // Is this necessary????<br> // probably not but what the hell.<br> // better safe than sorry<br> if (!this) return; <br> <br> // ... snip ...<br>}</pre></blockquote>
    <br>
    <br>
    I have to comment on this one, depending on what other hackery he was
    engaged in, this may have been a valid concern.  I've developed
    C++ applications for small systems that used pointers to C++ member
    functions as call-backs and it is conceivable that<br>
    the actual call site might get bad/null data.  Granted, the whole system was fugly, but that is a different story.<br>
    <br><br>Yes...  In theory it's too late to test for that, because in order to get to that return you have already technically dereferenced a null pointer and invoked undefined behavior.  In practice, the behavior that you'll actually get (assuming it's not something like a virtual function) is that the call will succeed with a null this pointer.<br><br>A better solution than just returning would be to crash hard so it's easier to find the bad call so you can add the null check there or whatever.  Then again, if you're about to ship the code somewhere undebugable, I suppose this is a sensible panic action for a "close" function.<br>
  • josh 2006-01-28 04:19
    Anonymous:
    Yes...&nbsp; In theory it's too late to test for that, because in order to get to that return you have already technically dereferenced a null pointer and invoked undefined behavior.&nbsp; In practice, the behavior that you'll actually get (assuming it's not something like a virtual function) is that the call will succeed with a null this pointer.
    <br><br>Oh yeah, not necessarily a null this pointer.&nbsp; If inheritance is involved, you may end up with a pointer that has been adjusted so that it won't compare equal to null.&nbsp; Basically, checking for null inside the function is fragile.<br>
  • wind 2006-01-28 04:41
    Alex Papadimoulis:

    <p>Ok, I realize I'm deviating from
    comments a bit, so before I go back, here's a function that Steve found
    while developing a plugin for a 3D Studio Max ... </p>
    <blockquote>
    <pre>MaybeAutoDelete();</pre></blockquote>
    <br>

    <br>

    I don't know what MaybeAutoDelete() do, but in the open source <a href="http://gallery.menalto.com">Gallery 2</a> there's a function begin with "maybe" which do the following:<br>
    <pre> /**<br> * Compact the access list map, if we deem that it's a good time to do so.<br> *<br> * @return object GalleryStatus a status code<br> */<br> function maybeCompactAccessLists() {<br> /* We use a high tech genetic algorithm to make our decision */<br> if (rand(1, 100) <= 50) {<br> $ret = GalleryCoreApi::compactAccessLists();<br> if ($ret->isError()) {<br> return $ret->wrap(__FILE__, __LINE__);<br> }<br> }<br> return GalleryStatus::success();<br> }<br><br></pre>
  • wind 2006-01-28 04:46
    Anonymous:
    <br>
    <pre> /**<br> * Compact the access list map, if we deem that it's a good time to do so.<br> *<br> * @return object GalleryStatus a status code<br> */<br> function maybeCompactAccessLists() {<br> /* We use a high tech genetic algorithm to make our decision */<br> if (rand(1, 100) &lt;= 50) {<br> $ret = GalleryCoreApi::compactAccessLists();<br> if ($ret-&gt;isError()) {<br> return $ret-&gt;wrap(__FILE__, __LINE__);<br> }<br> }<br> return GalleryStatus::success();<br> }<br></pre>
  • oasckascks 2006-01-28 05:06
    <DIV>This is why I don't put comments in my programs.</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>I was once responsible for converting a C++ desktop program into a web based app (don't ask).</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>Anyhoo, just about every damned comment in the program was incorrect.&nbsp; I had to ignore every comment I ran across.&nbsp; The original programmers had made so many changes to the program but had never bothered to update the comments.</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>I see this everywhere.&nbsp; Open source programs are notorious for this (as we've seen).</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>I figure there's only one way to ensure a new programmer understands what's going on in an app:&nbsp; go over the whole damned program line by line.</DIV>
    <DIV>&nbsp;</DIV>
  • hash 2006-01-28 05:59
    I don't care&nbsp; whether his sig was generated by a modified toaster, it's still f'ing annoying<br>
  • CornedBee 2006-01-28 08:47
    The Koders search also turned up this nice bit from the Moz source:<br><br><pre class="snippet"> // ATEV: I don't understand what this does<br> // stabilize the component manager, etc.<br> nsCOMPtr&lt;nsIComponentManager&gt; <b>kungFuDeathGrip</b>= mCompMgr;<br> if (mModules) delete mModules;<br> <b>kungFuDeathGrip</b>= 0;</pre><br>
  • Mr Reuben Red 2006-01-28 12:11
    Alex Papadimoulis:
    <blockquote><pre> // Is this necessary????<br> // probably not but what the hell.<br> // better safe than sorry<br>
    <br></pre>
    <p>Now I'm scared. This morning I wrote:<br>
    </p>
    <pre># Is this necessary?<br># probably not but what the hell<br># Better safe than sory<br>$script = 0 unless ($script);<br><br></pre>
    <p>Is there anything scarier than seeing something which looks like your own code on the daily WTF?<br>
    </p>
    <p>(In my case, it was code written out of the office when I didn't have a live database to check how it deals with empty strings)<br>
    </p>
    </blockquote>
  • Corwinoid 2006-01-28 13:51
    <P>
    josh:
    <BR><BR>Yes...&nbsp; In theory it's too late to test for that, because in order to get to that return you have already technically dereferenced a null pointer and invoked undefined behavior.&nbsp; In practice, the behavior that you'll actually get (assuming it's not something like a virtual function) is that the call will succeed with a null this pointer.<BR><BR>A better solution than just returning would be to crash hard so it's easier to find the bad call so you can add the null check there or whatever.&nbsp; Then again, if you're about to ship the code somewhere undebugable, I suppose this is a sensible panic action for a "close" function.<BR>
    </P>
    <P>That's not necessarily true, depending on when the code was written.&nbsp; VC 5 has a buggy code generator that would strip the this pointer in some cases, during optimization; especially during callbacks.&nbsp; After spending a few days trying to hunt down this particular bug, I wrote a pretty nifty exception catch that would flag the debugger locally, and blow up all over the place if it errored.</P>
    <P>The key code boiled down to if (!this) __asm int 3; at the beginning of a particular message handler.&nbsp; (Ok, it doesn't seem that nifty when I strip it down, admittedly... but that was effectively what got built into the function)</P>
    <P>The result?&nbsp; With identical builds I never got the interrupt locally.&nbsp; I shipped with a note to the company I developed it for that there was a "Known bug, and if it errored to give me a call with debugging information."&nbsp; This was built, primarily, for a software development shop, so I figured "You know, this guy's going to know when it crashed and dumps to record the dump, start up his debugger, give me a call and ask WTF?"</P>
    <P>6 years later I've not been able to duplicate it again with that tool; the client never called, and over lunch with some of the guys at the company I developed it for, they said the solution fixed a runtime error in what they believed was also a compiler bug -- I checked that code, and it looked fine to me also.</P>
    <P>It makes perfect sense that this code is reasonable if originally written on buggy implementations.&nbsp; VC5 was notorious for this and other numerous&nbsp;optimization errors, generally some slight code change (such as if (!this)) would be enough to straighten things out again.</P>
  • Stephen R. Huntingon 2006-01-28 16:42
    hash:
    Can I just say that ending every post with<br><br>Sincerely,<br><br>Gene Wirchenko <br><br><br>is not only annoying as hell, but redundant. Your username is Gene Wirchenko, you don't need to reinforce the fact that it was you who posted the message. Maybe i'm the only one that cringes everytime I read<br><br><br>
    Sincerely,<br>
    <br>
    Gene Wirchenko <br><br>but oh well.<br><br>Sincerely,<br><br>hash.<br>
    <br><br>i agree, i cringe as well<br>
  • Your Mother 2006-01-28 17:45
    Yup! THAT's why I  use Gentoo. ;)<br>
  • Sotek 2006-01-28 20:16
    Anonymous:
    Alex Papadimoulis:
    <br>
    <br>
    --SNIP--<br>
    <p><b>Jeremy Lew</b> found this little comment in some C++ source file.
    Judging from the comment, the developer at least had an inkling of his
    questionable sanity ... </p><blockquote>
    <p></p><pre>void sysDraw::close()<br>{<br> // Is this necessary????<br> // probably not but what the hell.<br> // better safe than sorry<br> if (!this) return; <br> <br> // ... snip ...<br>}</pre></blockquote>--SNIP--<br>
    <br>
    <br>
    I have to comment on this one, depending on what other hackery he was
    engaged in, this may have been a valid concern.  I've developed
    C++ applications for small systems that used pointers to C++ member
    functions as call-backs and it is conceivable that<br>
    the actual call site might get bad/null data.  Granted, the whole system was fugly, but that is a different story.<br>
    <br>
    --The BitShifter, certified language abuse specialist.<br>
    <br>
    <br>
    Another possiblity is that the function might get called while the
    object is in the destructor - in that case, things tend to go splat
    really badly.<br>
  • ChiefCrazyTalk 2006-01-28 21:32
    The Real WTF is (TM)......

    That he is using multiple instances of the single line comment // instead of putting all comments within a block of

    /*
    ...
    ....
    */

  • masklinn 2006-01-29 11:25
    Anonymous:
    The Real WTF is (TM)......

    That he is using multiple instances of the single line comment // instead of putting all comments within a block of

    /*
    ...
    ....
    */

    Not that much, some people don't like block comments (they're annoying for formatting purposes for example), and modern editors can comment/uncomment whole blocks with line-comments with a single keystroke.
  • Mikademus 2006-01-29 12:15
    Anonymous:
    The Real WTF is (TM)......

    That he is using multiple instances of the single line comment // instead of putting all comments within a block of

    /*
    ...
    ....
    */
    <br>You use line-comments within blocks you might want to comment out with /* ... */ later. Also, you might want to write several lines of comments behind the code, and then you can't use //.<br><br><br>Super-Galactically Mega Co-Starring,<br><br>MIKADEMUS<br>
  • sao 2006-01-29 20:01
    hash:
    Can I just say that ending every post with<br><br>Sincerely,<br><br>Gene Wirchenko <br><br><br>is not only annoying as hell, but redundant. Your username is Gene Wirchenko, you don't need to reinforce the fact that it was you who posted the message. Maybe i'm the only one that cringes everytime I read<br><br><br>
    Sincerely,<br>
    <br>
    Gene Wirchenko <br><br>but oh well.<br><br>Sincerely,<br><br>hash.<br>
    <br><br>you know what i think is reduntant. some dickhead constantly going on at someone for doing this.<br><br>personally, i prefer Gene's input. He adds comments that actually refer to the topic.<br>They are generally intelligent responses.<br><br>If his preference is to write that, whos to stop him? you?<br><br>Gene, i say keep it up. If it makes him cringe, do it multiple times in one post -<br>we might end up getting him riggling on the floor in some sort of a semi-epileptic fit.<br>
  • Chop Sticks 2006-01-29 20:21
    I&nbsp; you could do it with one hand, you could play Chopin<br>
    <br>
    <br>
  • Chop Sticks 2006-01-29 20:33
    Rank Amateur:
    Anonymous:

    <p>KungFuDeathGrip is the semi-official name for CTRL-ALT-DELETE
    equivalent on SGI systems. I think it was CTRL-ALT-F7-BACKSPACE. Try
    this out and you can get a good idea of where the name came from. </p>
    <p>
    </p>
    <p>With one hand?</p>
    <br>
    <br>
    Try that again. . .&nbsp;&nbsp; <br>
    <br>
    If you could do it with one hand, you could play Chopin<br>
  • Rich 2006-01-30 01:48
    hash:
    Can I just say that ending every post with<br><br>Sincerely,<br><br>Gene Wirchenko <br><br><br>is not only annoying as hell, but redundant. Your username is Gene Wirchenko, you don't need to reinforce the fact that it was you who posted the message. Maybe i'm the only one that cringes everytime I read<br><br><br>
    Sincerely,<br>
    <br>
    Gene Wirchenko <br><br>but oh well.<br><br>Sincerely,<br><br>hash.<br>
    <br><br>It's not just you.&nbsp; It makes me want to sign my posts:<br><br>Seruptitiously,<br><br>Rich<br>
  • pat 2006-01-30 03:38
    I thought OTP was One Time Perl, which commenting out 'use strict;' is the surest way to achieve.<br>
  • Ulvhamne 2006-01-30 03:52
    Anonymous:
    Rank Amateur:
    Anonymous:

    <P>KungFuDeathGrip is the semi-official name for CTRL-ALT-DELETE equivalent on SGI systems. I think it was CTRL-ALT-F7-BACKSPACE. Try this out and you can get a good idea of where the name came from. </P>
    <P>
    </P>
    <P>With one hand?</P>
    <P>
    <BR><BR>Try that again. . .&nbsp;&nbsp; <BR><BR>If you could do it with one hand, you could play Chopin<BR>
    </P>
    <P>&nbsp;</P>
    <P>I can. But it feels&nbsp;<EM>really</EM> unnatural. ;)</P>
  • mikeyd 2006-01-30 05:12
    "Its pretty easy for it to happen, but it is kind of lame to write code to protect against it.
    sysDraw *psd = NULL;
    psd->close();
    This will call sysDraw::close() function and this will be NULL. You should be tracking down why you are calling the function with a null pointer. Adding a if this equals null is just a bandaid on the problem."
    I've done something like that. Was passing a member function to a C library as a callback (to get messages from it, nothing critical) but I set this up in the constructor, so it was possible to get a callback occuring before the constructor finished (said library being multithreaded). It was horrible code though.
  • Scott C 2006-01-30 05:54
    <span id="_ctl0_PostForm_Reply"><pre>re: GetGlobalTime( const TCHAR* Filename )<br><br>umm, based on the "nature" of this function, shouldn't it have<br>been called GetUniversalTime(...)?<br><br>Scott<br></pre></span>
  • codermeta 2006-01-30 07:42
    hahahah no comments!!<br>
  • Arancaytar 2006-01-30 08:40
    Anonymous:
    Funny -- after seeing <a href="http://www.cenqua.com/commentator">the Commentator</a> for the first time yesterday, I put together a post on some of the <a href="http://seamonkeyrodeo.blogspot.com/2006/01/comments-on-comments.html">best comments that I've come across</a> in various chunks of code.<br><br>My
    all-time favorite?&nbsp; A little one-liner dumped into a couple
    thousand lines of byzantine code.&nbsp; I like to picture the
    expression on the coder's face as they finally figured out what it was
    all actually supposed to do:<br><br><font face="courier, courier new">;;; oh sh!t, it tries to write to oracle, too...</font><br>
    <br>
    <br>
    Aw, and I almost thought this "Commentator" was actually available.<br>
    <br>
    Seems like I'll have to emulate the verbosity=10,relevance=0,selfimportance=10 myself.<br>
    <br>
    <pre>/* Oh, by the well, did I tell you about that one<br>
    &nbsp;* time<br>
    </pre>
  • turbothy 2006-01-30 10:12
    hash:
    Can I just say that ending every post with<br><br>Sincerely,<br><br>Gene Wirchenko <br><br><br>is not only annoying as hell, but redundant.
    <br>
    <br>
    I love it.<br>
  • GalacticCowboy 2006-01-30 10:19
    <P>
    Anonymous:
    ...the universe was created by God Almighty in 4004 BC.
    </P>
    <P>Monday, October 14th, if I recall correctly.&nbsp; At around 8:45AM, GMT.</P>
  • masklinn 2006-01-30 10:24
    GalacticCowboy:
    <p>
    Anonymous:
    ...the universe was created by God Almighty in 4004 BC.
    </p>
    <p>Monday, October 14th, if I recall correctly.&nbsp; At around 8:45AM, GMT.</p>

    <p>T'was Sunday the 21th of October actually, but around 8:45AM indeed, for God liked to get work done early in the morning while he was feeling fresh.</p>
  • OneFactor 2006-01-30 12:04
    <P>
    Anonymous:
    OneFactor:
    Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?
    <BR><BR>No, no, no... everyone knows that in accordance with today's religious nutjobbery, the universe was created by God Almighty in 4004 BC.<BR>
    </P>
    <P>FYI, the 4004 BC thing is religious nutjobbery from about one hundred years ago. Today's religious nutjobs are saying that bloodclotting is unlikely to evolve without intelligent help because it is irreducibly complex. The scaffolding counterargument&nbsp;claims otherwise. As far as I know, there is no longer a debate about the overall empirical dating and it has shifted into the realm of "the dice are loaded", "are not", "are too", "are not", "are too", "dee two".</P>
  • Amodin 2006-01-30 12:29

    <P>Isn't the time of the creation of the universe undecided between 9 and 20 billion years&nbsp;because of&nbsp;the imprecision of the Cepheid yardstick and therefore the Hubble "constant"?&nbsp;<BR>Why express time in metres when time and the speed of light can be measured more precisely than distances?<BR>To transform between frames, can't you just apply a Lorentz transformation - I thought the&nbsp;(Feynman?) Path Integral was for bringing in quantum mechanical effects.
    </P>
    <P>&nbsp;</P>
    <P>All of you are forgetting one thing.&nbsp; <STRONG>Your Flux Capacitor</STRONG>.</P>
  • Bustaz Kool 2006-01-30 13:02
    <P>
    Anonymous:
    <BR>No, no, no... everyone knows that in accordance with today's religious nutjobbery, the universe was created by God Almighty in 4004 BC.<BR>
    </P>
    <P>I believe that it was on&nbsp;a Monday.&nbsp; Six days later, he rested.</P>
  • Anonymous 2006-01-30 13:25
    Anonymous:
    $script = 0 unless ($script);
    <br><br>Try<br><br>$script ||= 0;<br><br>in the future.<br>
  • WWWWolf 2006-01-30 14:20
    Someone explained the kung fu death grip thing a while ago in Slashdot. Apparently, it's part of the garbage collection mechanism in event handlers - some operations mess with the reference counts, and if you want to make sure something isn't deallocated while you aren't looking and you need to keep the object around, you apply the kung fu death grip on the thing.<br><br>And that's all I know about Mozilla source code. =)<br><br>And, bleh, #use strict; is just asking for trouble. Definitely saying "Please don't whine about my sloppiness." It is every Perl coder's duty to Read the fine Camel Book if you get some mysterious errors from your newbieish, messy code. The book is <span style="font-style: italic;">very</span> informative indeed. use strict; is the first step towards making the code good.<br><br><span style="text-decoration: underline;"><span style="font-style: italic;"><span style="text-decoration: underline;"><span style="font-style: italic;"></span></span></span></span><span style="font-style: italic;"><span style="font-style: italic;"></span></span><span style="text-decoration: underline;"><span style="font-style: italic;"><span style="text-decoration: underline;"></span></span></span>
  • hank miller 2006-01-30 15:58
    masklinn:
    GalacticCowboy:
    <p>
    Anonymous:
    ...the universe was created by God Almighty in 4004 BC.
    </p>
    <p>Monday, October 14th, if I recall correctly.  At around 8:45AM, GMT.</p>

    <p>T'was Sunday the 21th of October actually, but around 8:45AM indeed, for God liked to get work done early in the morning while he was feeling fresh.</p>


    Assuming we are referring to the Jewish/christian/Muslim God. (which are essentially the same, though none will admit the others know anything about him)

    The universe was created on a Sunday (the sabbath is Saturday, not Sunday!), and God started in the Evening. (What time zone is not specified, though usually Jerusalem time is assumed. Some would guess Garden of Eden time but they don't know where that is. Might be other theories as well)

    Reference (KJV):
    Genesis 1:5: And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
    Genesis 2:2: And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
  • President Leechman 2006-01-30 17:54
    <div style="margin-left: 40px;"><div style="margin-left: 40px;"><span id="_ctl0_PostForm_Reply">Are Perl and the Necronomicon isomorphic?</span><br></div><span id="_ctl0_PostForm_Reply"><br>They can be. It depends heavily on whether you 'use strict;'.<br><br></span></div><span id="_ctl0_PostForm_Reply"></span><br><span id="_ctl0_PostForm_Reply"></span><span id="_ctl0_PostForm_Reply"></span>Is the alternative 'use eldritch;', 'use cyclopean;' or 'use rugose;'?<br><span id="_ctl0_PostForm_Reply"></span>
  • President Leechman 2006-01-30 18:08
    Anonymous:
    Anonymous:
    $script = 0 unless ($script);
    <br><br>Try<br><br>$script ||= 0;<br><br>in the future.<br>
    People like you are what turned me into a super-villain.<br><br>I don't even write shit like that in "C" any more.<br><br><span style="font-family: Courier New;">for(p=buffer,q=p;*q&&*(p+=(*q++!=TOK_END))!=TOK_END;prepare(&p,&q))</span><br style="font-family: Courier New;"><span style="font-family: Courier New;">    continue;</span><br><br>
  • masklinn 2006-01-30 18:13
    OneFactor:
    <p>FYI, the 4004 BC thing is religious nutjobbery from about one hundred years ago. Today's religious nutjobs are saying that bloodclotting is unlikely to evolve without intelligent help because it is irreducibly complex. The scaffolding counterargument&nbsp;claims otherwise. As far as I know, there is no longer a debate about the overall empirical dating and it has shifted into the realm of "the dice are loaded", "are not", "are too", "are not", "are too", "dee two".</p>

    hank miller:
    Assuming we are referring to the Jewish/christian/Muslim God. (which are essentially the same, though none will admit the others know anything about him)

    The universe was created on a Sunday (the sabbath is Saturday, not Sunday!), and God started in the Evening. (What time zone is not specified, though usually Jerusalem time is assumed. Some would guess Garden of Eden time but they don't know where that is. Might be other theories as well)

    Reference (KJV):
    Genesis 1:5: And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
    Genesis 2:2: And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.

    <p>Some people here are seriously lacking in the Pratchett/Gaiman department...</p>
  • OneFactor 2006-01-30 18:59
    masklinn:
    OneFactor:

    <P>FYI, the 4004 BC thing is religious nutjobbery from about one hundred years ago. Today's religious nutjobs are saying that bloodclotting is unlikely to evolve without intelligent help because it is irreducibly complex. The scaffolding counterargument&nbsp;claims otherwise. As far as I know, there is no longer a debate about the overall empirical dating and it has shifted into the realm of "the dice are loaded", "are not", "are too", "are not", "are too", "dee two".</P>
    hank miller:
    Assuming we are referring to the Jewish/christian/Muslim God. (which are essentially the same, though none will admit the others know anything about him) The universe was created on a Sunday (the sabbath is Saturday, not Sunday!), and God started in the Evening. (What time zone is not specified, though usually Jerusalem time is assumed. Some would guess Garden of Eden time but they don't know where that is. Might be other theories as well) Reference (KJV): Genesis 1:5: And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day. Genesis 2:2: And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.

    <P>Some people here are seriously lacking in the Pratchett/Gaiman department...</P>
    <P>
    </P>
    <P>I have read and own every Pratchett up to and including Night Watch. Who is Gaiman?</P>
  • what 2006-01-30 20:30
    OneFactor:
    <p>I have read and own every Pratchett up to and including Night Watch. Who is Gaiman?</p>
    <br><br>You've never heard of Good Omens?<br>
  • sao 2006-01-30 21:00
    hank miller:
    masklinn:
    GalacticCowboy:
    <p>
    Anonymous:
    ...the universe was created by God Almighty in 4004 BC.
    </p>
    <p>Monday, October 14th, if I recall correctly.&nbsp; At around 8:45AM, GMT.</p>

    <p>T'was Sunday the 21th of October actually, but around 8:45AM indeed, for God liked to get work done early in the morning while he was feeling fresh.</p>


    Assuming we are referring to the Jewish/christian/Muslim God. (which are essentially the same, though none will admit the others know anything about him)

    The universe was created on a Sunday (the sabbath is Saturday, not Sunday!), and God started in the Evening. (What time zone is not specified, though usually Jerusalem time is assumed. Some would guess Garden of Eden time but they don't know where that is. Might be other theories as well)

    Reference (KJV):
    Genesis 1:5: And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
    Genesis 2:2: And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
    <br><br>Unto God, a Thousand Years is as a Day, a Day is as a Thousand Years.<br>So whos to say that things werent more laid back back then? The Earth took its time spinning about, as did everything else.<br><br>On the jewish/christian/muslim thing. Are Christians executing Muslims in the name of this 'common' god.<br>(I also understand this is not done by all muslims. i have nothing against them. dont misread my thoughts.)<br><br>But no more religious talk from me. You dont want to go down that path. Lets keep it Coding related people.<br><br><br><br>Regards,<br>Sao.<br><br>Regards,<br>Sao.<br><br>Regards,<br>Sao.<br><br><br><br>(Convulse all you signed-post-alergic people out there, Convulse!!!)<br>
  • devdas 2006-01-31 04:21
    Neil Gaiman, author of the Sandman series. He collaborated with Pratchett on the book 'Good Omens'.<br>
    <br>
    http://www.amazon.com/exec/obidos/search-handle-url/ref=br_ss_hs/104-2808118-5695143?platform=gurupa&amp;url=index%3Dstripbooks%3Arelevance-above&amp;field-keywords=neil+gaiman&amp;Go.x=0&amp;Go.y=0&amp;Go=Go<br>
    &nbsp;should help.<br>
  • masklinn 2006-01-31 08:29
    OneFactor:
    <p>I have read and own every Pratchett up to and including Night Watch.</p>

    <p>You obviously haven't since the quotes and reflections on the creation of the earth in 4004 come from <a href="http://en.wikipedia.org/wiki/Good_Omens" title="Wikipedia article on Good Omens">Good Omens</a>, written in 1990 in collaboration between <a href="http://en.wikipedia.org/wiki/Terry_Pratchett">Terry Pratchett</a> and <a href="http://en.wikipedia.org/wiki/Neil_Gaiman">Neil Gaiman</a>
    OneFactor:
    <p>Who is Gaiman?</p>

    <p>An english author of science fiction books and comics, very well known in the US for his Sandman serie (well known enough that he's credited before Pratchett in the US edition of Good Omens, while Pratchett is usually credited first e.g. the UK and french editions), he's the author of the recent American Gods (2001) and Anansi Boys (2005), and -- even though I doubt you care the least about it -- a friend of singer Tori Amos.</p>
  • OneFactor 2006-01-31 12:55
    Anonymous:
    OneFactor:

    <P>I have read and own every Pratchett up to and including Night Watch. Who is Gaiman?</P>
    <P>
    <BR><BR>You've never heard of Good Omens?<BR>
    </P>
    <P>Oops. I meant to say every discworld up to NightWatch.<EM>&nbsp;</EM>I haven't read any Pratchett apart from discworld.</P>
  • Tim 2006-01-31 13:25
    You don't want to lose the pointer, so you use the ku-fu death grip on it. It makes perfect sense.<br>
  • Moobar 2006-01-31 20:06
    This thread has some of the geekiest replies I've ever read!&nbsp; You guys know who you are...<br>
  • Roelf_ 2006-02-01 02:22
    <P>
    sao:
    quoted bla</P>
    <P><BR>On the jewish/christian/muslim thing. <STRONG>Are Christians executing Muslims in the name of this 'common' god</STRONG>.<BR>(I also understand this is not done by all muslims. i have nothing against them. dont misread my thoughts.)<BR><BR>bla
    </P>
    <P>they did a few centuries ago</P>
  • masklinn 2006-02-01 07:07
    OneFactor:
    Anonymous:
    OneFactor:

    <p>I have read and own every Pratchett up to and including Night Watch. Who is Gaiman?</p>
    <p>
    <br><br>You've never heard of Good Omens?<br>
    </p>
    <p>Oops. I meant to say every discworld up to NightWatch.<em>&nbsp;</em>I haven't read any Pratchett apart from discworld.</p>

    <p>Then I'd really recommend reading Good Omens, it's good.</p>
    <p>And the Tiffany Aching arc (The Wee Free Men and A Hat Full Of Sky, with at least 2 other upcoming books. It's like Harry Potter, but good.). Going Postal is also very good (and much funnier than Night Watch, which is kind of apart from the whole Discworld collection), and extremely geeks-oriented.</p>
  • Delfi 2006-02-02 12:52
    Alex Papadimoulis:
    <blockquote><pre>SQWORD GetGlobalTime( const TCHAR* Filename )<br> {<br> //return greenwich mean time as expressed in nanoseconds since the<br> //creation of the universe. time is expressed in meters, so<br> //divide by the speed of light to obtain seconds. assumes the<br> //speed of light in a vacuum is constant. the file specified by<br> //Filename is assumed to be in your reference frame, otherwise you<br> //must transform the result by the path integral of the minkowski<br> //metric tensor in order to obtain the correct result.<br><br> return Time;<br> }</pre></blockquote>
    <br>
    <br>
    this code comes from the unreal tournament source code. <br>
    &nbsp;<br>
  • tmmyk 2006-02-03 13:26
    Delfi:
    <br>
    this code comes from the unreal tournament source code. <br>
    &nbsp;<br>
    <br>
    <br>
    <img src="http://www.spatch.net/tmyk.jpg">
  • Alvie 2006-02-08 06:45
    Alex Papadimoulis:
    <blockquote>Now I'm scared. This morning I wrote:<br>


    <pre># Is this necessary?<br># probably not but what the hell<br># Better safe than sory<br>$script = 0 unless ($script);<br><br></pre></blockquote>
    <br>
    <br>
    This can be perfectly valid. <br>
    <br>
    Would be perfectly valid if:<br>
    <br>
    &nbsp;&nbsp;&nbsp; $script = 0 unless (defined($script));<br>
    <br>
    or<br>
    <br>
    &nbsp;&nbsp;&nbsp; $script||=0; #(to some extent)<br>
    <br>
    <br>
    <br>
    <br>
  • imbrius 2008-09-05 12:34
    Wait, Self-Documenting or self-deprecating?
  • Nobin 2009-08-11 23:36

    void sysDraw::close()
    {
    // Is this necessary????
    // probably not but what the hell.
    // better safe than sorry
    if (!this) return;

    // ... snip ...
    }



    you can actually executed that return by:


    sysDraw* h = NULL:
    h->close()


    that will actually compile and run....
  • women puma shoes 2010-04-30 04:04
    Hello! I have read a lot on this topic, but you definitely give it a good vibe. This is a great post. Will be back to read more! Please come visit my site:http://www.salepumashoes.com/ welcome your coming when you got time!Thank you!
  • oksupra.com 2010-06-19 03:07
    Supra shoes are so popular all over the world. Whatever you take on Supra being in the Supra Skytop Shoes market. Now Supra Strapped Shoes also very popular attention. It is nice that they actually took the time to make Supra Skate Shoes that work well. Supra shoes is a brand that has been inspired, designed and marketed by passionate individuals. We have brought to you the fullest selection of Supra footwear at cheapest price. Overload Skateshop carries a wide range of Supra Shoes to fit your 9-stair kickflips.


  • James Sweet 2010-08-09 14:35
    Regarding the "if(!this)"... yes, it can happen in C++. If the function is not virtual, it will just be called, even if the object is a null pointer.

    Probably would be better to figure it out another way, but... If the developer has inherited a messy/buggy system, where sometimes close() gets called on a null pointer, that is a perfectly reasonable solution.
  • TheCPUWizard 2011-03-09 16:05


    AAAAGH!

    You dont need any of that fancy stuff...

    T *p = NULL;
    p->func();

    This WILL properly call the member function [it will only be "broken" if func is virtual), so checking (this!=null) is actually valid