• Seminymous Coward (unregistered) in reply to Leo
    Leo:
    grizz:
    The Newton function probably is to avoid having a magic number in a calculation. Seems to me that's generally considered A Good Thing, not a WTF.

    You're the one that does

    #define ONE 1 #define TWO 2

    aren't you?

    Sometimes you really don't need it.

    Are you trolling or incapable of understanding why wanting all uses to match, to be easy to change uniformly, to contribute to readable code, and to perhaps eventually depend on localization or configuration is wise? Are you claiming a named constant is an automatic WTF?

    P.S. Wikipedia alone gives 9.80665, 9.797645, and 9.812865328 as reasonable choices if you don't want to account for latitude.

  • (cs) in reply to Helix
    Helix:
    DaveK:
    highphilosopher:
    Wow, you poke at Alex just a little bit, and your comments get deleted? That's really, well, sad. I do understand that everyone makes mistakes, but on a Blog that's dedicated to pointing out mistakes, that's just kind of well hypocritical. Everyone here has made a WTF including you Alex.

    -- Note from Alex: there were several comments pointing out typos/mistakes, but since the errors were fixed, the comments were no longer relavent; I did keep one, which was at the top and was a good balance of poking fun at me and explaining the original problem

    relevant

    Strangly by discussing about the spelling of relevant you have created a triple-meta comment.

    Equally strangely, by discussing about the discussing about the spelling of relevant, you have created a quadruple-meta comment, and this is presumably a quintuple-meta comment.

    I propose that we accept existence of the remaining meta levels up to and including the countable alephs by induction, rather than attempting to prove it exhaustively in this thread.

  • (cs) in reply to SR
    SR:
    DaveK:
    jrk:
    I tried to put some italic tags around a bit of text today, but somehow, it doubled my text

    I tried to put some italic tags around a bit of text today, but somehow, it doubled my text

    Perhaps you could explain how that works?

    That was referring to a copy and paste error that Alex has now fixed.

    No fair! Guess IHBT :)
    SR:
    Kudos on O'Rly, thuogh. It's ages since I've seen one.
    I was gonna write it out in letters, but then I thought, it's only 3kB more for a thumbnail, so why not?
  • Rob (unregistered)
    Transformer optimusPrime = new Transformer();
    I think there is more to that line then meets the eye.
  • (cs) in reply to DaveK
    DaveK:
    Helix:
    DaveK:
    highphilosopher:
    Wow, you poke at Alex just a little bit, and your comments get deleted? That's really, well, sad. I do understand that everyone makes mistakes, but on a Blog that's dedicated to pointing out mistakes, that's just kind of well hypocritical. Everyone here has made a WTF including you Alex.

    -- Note from Alex: there were several comments pointing out typos/mistakes, but since the errors were fixed, the comments were no longer relavent; I did keep one, which was at the top and was a good balance of poking fun at me and explaining the original problem

    relevant

    Strangly by discussing about the spelling of relevant you have created a triple-meta comment.

    Equally strangely, by discussing about the discussing about the spelling of relevant, you have created a quadruple-meta comment, and this is presumably a quintuple-meta comment.

    I propose that we accept existence of the remaining meta levels up to and including the countable alephs by induction, rather than attempting to prove it exhaustively in this thread.

    I believe you are being a meta-nazi (Godwin's law invoked).

  • John (unregistered)

    aparantly, speling is purty hard.

  • Jane (unregistered)

    The "exit for" is executing in the branch delay slot, obviously!

    (For those not in the know, in certain assembly languages, the line after any branch command gets executed. Some assemblers rearrange the code before compiling, or insert a NOOP after all branches)

  • (cs) in reply to Jane
    Jane:
    (For those not in the know, in certain assembly languages, the line after any branch command gets executed. Some assemblers rearrange the code before compiling, or insert a NOOP after all branches)
    Yeah, they're really the ultimate expression of hardware's "fuck-you-you-can-fix-it-in-the-software" attitude made silicon! :-P
  • Someone too lazy to login and at work (unregistered)

    I don't think that using a constant for something that actually is a constant is really a WTF. Even if you're never likely to alter the value of the constant, you do at least get to use a symbolic name instead of a value.

    I don't know if the way it's being done is a WTF though - I'm assuming that's how VB does returns?

  • Joe Bob Briggs (unregistered)
    Transformer michaelBay = new Transformer();
  • (cs)

    I'll see your Optimus Prime and raise you a Gregor Samsa

  • (cs)
    // trying to be thorough, what if return doesn't? 
    // catch all possible errors
    
    public bool Receive( string FilePath )
    {
        try
        {
            return true;
        }
        catch( Exception e )
        {
            try
            {     
               ExceptionManager.Publish( e, Priorities.High );
               return false;
            }
            catch ( Exception e )
            {
                return wtf; // just in case return does not work
            } 
        }
    }
    
  • Ouch! (unregistered) in reply to millimeep
    millimeep:
    I'll see your Optimus Prime and raise you a Gregor Samsa
    Thank you. At last a reference I get without googling. Heck, my kids are too old to understand Optimus Prime without googling. Now I feel old - no thanks for that.
  • ctw (unregistered)

    I wrote and am using a library called "Transformer". How did I resist that joke?

    Perhaps more accurately, how did I get beaten to it?

  • SR (unregistered) in reply to Ouch!
    Ouch!:
    Thank you. At last a reference I get without googling. Heck, my kids are too old to understand Optimus Prime without googling. Now I feel old - no thanks for that.

    There are Facebook nostalgia groups for old mobile phones. Now that makes me feel old!

    (And don't even get me started on retro 90s clubs!)

  • John Preston (unregistered)

    I'd put money that the BS function variable syntax of this:

    Public Function Newton() Newton = 9.81 End Function

    Is why this had to be there:

    Public Shared Function GetItemFromValue(ByVal ddlControl As DropDownList) As Integer Dim i As Integer If ddlControl.Items.Count > 0 Then For i = 0 To ddlControl.Items.Count - 1 If ddlControl.Items(i).Selected() Then Return i Exit For 'leaving this here cause we're in a rush End If Next End If End Function
    Return i
    probably used to be
    GetItemFromValue = i
    and since using the function as a variable wouldn't "return" and exit, they needed an exit to prevent later iterations of the loop. Then someone with a brain came along later and changed it to return, but forgot to take out the comment.
  • SkittlesAreYum (unregistered) in reply to grizz
    grizz:
    The Newton function probably is to avoid having a magic number in a calculation. Seems to me that's generally considered A Good Thing, not a WTF.

    This.

    It's generally good practice (not that I always follow it) of putting all numbers that signify something as constants, even if they can never change. It makes it most code much easier to read, instead of "9.81? Where did that come from again? Let me read the comments..."

  • shash (unregistered) in reply to Bosshog
    Bosshog:
    Transformer optimusPrime = new Transformer()
    WIN!

    Probably more to it than meets the eye...

  • onitake (unregistered) in reply to John Preston
    John Preston:
    Return i
    probably used to be
    GetItemFromValue = i
    and since using the function as a variable wouldn't "return" and exit, they needed an exit to prevent later iterations of the loop. Then someone with a brain came along later and changed it to return, but forgot to take out the comment.
    wait a minute. vb allows
    Return <Value>
    instead of
    <Function Returning A Value's Name> = <Value>
    now? doesn't that make vb even more obsolete as it already is?
  • Bim Job (unregistered)

    Well, the real WTF with the Newton procedure is that it should be a property, not a procedure.

    It's worthless otherwise, isn't it? Getting Newton's gravitational constant is all very well. But why should we need recompilation to set it?

    I'm also deeply depressed about the concept of a VB.Net "Consultant." But that's another story.

  • (cs) in reply to Joe Bob Briggs
    Joe Bob Briggs:
    Transformer michaelBay = new Transformer();

    michaelBay.direct(); // throws BadImplementationException

  • Centricity (unregistered)

    I have a sudden desire to redefine and to hot-pink Comic Sans, just to get people to stop using them.

  • HUH (unregistered)

    function POBox(eobj, eid) { return (true); }

    Holy crap! It's the dreaded parentheses around the return value. NOT CLEAN! NOT CLEAN!

    CAPTCHA: persto - African American magic words.. PERSTO CHANGO!.. you know... like how they say aks instead of ask and always use the personal form of the verb instead of its correct form?

  • SR (unregistered) in reply to Centricity
    Centricity:
    I have a sudden desire to redefine and to hot-pink Comic Sans, just to get people to stop using them.

    That's evil! I like you.

  • Matt Westwood (unregistered) in reply to frits
    frits:
    Matt Westwood:
    frits:
    'Fixed for naming and precision
    Public Function kgf()
        kgf = 9.80665
    End Function
    

    'Added to fix the code the jerkoff Senior 'Software Consultant broke.

    Public Function Newton() Newton= kgf End Function

    Amateur.

    Public Function Newton() Newton= kgf() End Function

    Hey man, this is VB. Parentheses optional.

    soz

  • Kauna (unregistered)

    optimusPrime = new Transformer()

    I guess there is more in this code than meets the eye. I guess it is a robot in disguise. Which I am not of course, but the site wants me to confirm I am not a robot.

  • David (unregistered)

    Robert obviously doesn't get the concept of precision ... I had the pleasure of following a developer who hard coded the conversion rate for metric Tonne to US ton. The customer had requested greater precision so I had to search thousands of lines of code for the number 2.2 and determine on a case by case basis if it was a met tonne conversion ... I replaced them with constant from a shared library. I guess Robert would have simply done a find and replace 2.2 with 2.2046.

    Captcha: Dolor ... we would have saved a lot by defining met tonne conversion rate in one place to first time around.

  • erat (unregistered) in reply to Kauna
    Kauna:
    optimusPrime = new Transformer()

    I guess there is more in this code than meets the eye. I guess it is a robot in disguise. Which I am not of course, but the site wants me to confirm I am not a robot.

    It is only a robot in disguise if:

    public class Transformer : Robot { ... }

  • See Sharper (unregistered) in reply to Matt Westwood
    Matt Westwood:
    frits:
    'Fixed for naming and precision
    Public Function kgf()
        kgf = 9.80665
    End Function
    

    'Added to fix the code the jerkoff Senior 'Software Consultant broke.

    Public Function Newton() Newton= kgf End Function

    Amateur.

    Public Function Newton() Newton= kgf() End Function

    Child.

    Public Function Newton() GoTo kgf

    Saves the memory consumed by the End Function.

  • Outtascope (unregistered) in reply to frits
    frits:
    DaveK:
    Helix:
    DaveK:
    highphilosopher:
    Wow, you poke at Alex just a little bit, and your comments get deleted? That's really, well, sad. I do understand that everyone makes mistakes, but on a Blog that's dedicated to pointing out mistakes, that's just kind of well hypocritical. Everyone here has made a WTF including you Alex.

    -- Note from Alex: there were several comments pointing out typos/mistakes, but since the errors were fixed, the comments were no longer relavent; I did keep one, which was at the top and was a good balance of poking fun at me and explaining the original problem

    relevant

    Strangly by discussing about the spelling of relevant you have created a triple-meta comment.

    Equally strangely, by discussing about the discussing about the spelling of relevant, you have created a quadruple-meta comment, and this is presumably a quintuple-meta comment.

    I propose that we accept existence of the remaining meta levels up to and including the countable alephs by induction, rather than attempting to prove it exhaustively in this thread.

    I believe you are being a meta-nazi (Godwin's law invoked).

    Given that the above thread attempts to address the issue of perceived censorship and the inhibition of commentary that strays from the desired thread of the governing power, that this could easily be considered germane to the concept of propaganda, and given that propaganda had a central role inside the Nazi regime, the invocation of Godwin's law is wholly inappropriate as the comparison is not one that is inherently hyperbolic in nature.

    Be that as it may, the invocation further fails on its face purely and simply because of the commonly accepted tradition that the issuer of the Nazi/Hitler reference is prohibited from simultaneously being the invoker of Godwin's Law (perhaps because allowing Hitler to somehow become the posthumous arbiter of peace could be considered a tad distasteful).

  • (cs) in reply to Outtascope
    Outtascope:
    frits:
    DaveK:
    Helix:
    DaveK:
    highphilosopher:
    Wow, you poke at Alex just a little bit, and your comments get deleted? That's really, well, sad. I do understand that everyone makes mistakes, but on a Blog that's dedicated to pointing out mistakes, that's just kind of well hypocritical. Everyone here has made a WTF including you Alex.

    -- Note from Alex: there were several comments pointing out typos/mistakes, but since the errors were fixed, the comments were no longer relavent; I did keep one, which was at the top and was a good balance of poking fun at me and explaining the original problem

    relevant

    Strangly by discussing about the spelling of relevant you have created a triple-meta comment.

    Equally strangely, by discussing about the discussing about the spelling of relevant, you have created a quadruple-meta comment, and this is presumably a quintuple-meta comment.

    I propose that we accept existence of the remaining meta levels up to and including the countable alephs by induction, rather than attempting to prove it exhaustively in this thread.

    I believe you are being a meta-nazi (Godwin's law invoked).

    Given that the above thread attempts to address the issue of perceived censorship and the inhibition of commentary that strays from the desired thread of the governing power, that this could easily be considered germane to the concept of propaganda, and given that propaganda had a central role inside the Nazi regime, the invocation of Godwin's law is wholly inappropriate as the comparison is not one that is inherently hyperbolic in nature.

    Be that as it may, the invocation further fails on its face purely and simply because of the commonly accepted tradition that the issuer of the Nazi/Hitler reference is prohibited from simultaneously being the invoker of Godwin's Law (perhaps because allowing Hitler to somehow become the posthumous arbiter of peace could be considered a tad distasteful).

    GodwinsLaw<GodwinsLaw>
    

    Who made you the Godwins Law police?
    BTW- Your first point is wrong, and your second point is a big "who care's".

  • (cs) in reply to DaveK
    DaveK:
    Jane:
    (For those not in the know, in certain assembly languages, the line after any branch command gets executed. Some assemblers rearrange the code before compiling, or insert a NOOP after all branches)
    Yeah, they're really the ultimate expression of hardware's "fuck-you-you-can-fix-it-in-the-software" attitude made silicon! :-P
    In simple terms, a branch can execute code that is not already on the fast internal cpu cache. During the time that memory is loaded, there is essentially time to execute another instruction without ANY cost in time. I would very much like to see your hardware solution for optimum execution speed that addresses this issue.
  • anon (unregistered) in reply to frits

    Are you quite finished?

  • sirlewk (unregistered) in reply to TheSpiesMustFlow
    TheSpiesMustFlow:
    jokes shouldn't go in production systems

    WTF?

  • Molière (unregistered) in reply to sirlewk
    sirlewk:
    TheSpiesMustFlow:
    jokes shouldn't go in production systems

    WTF?

    That's right. Unless, of course, the application is supposed to be funny. Otherwise, cut it out.

  • sirlewk (unregistered) in reply to frits

    He's not the Godwin's Law police, he's the Godwin Nazi. How this wasn't blatantly obvious to you is beyond me...

  • (cs) in reply to sirlewk

    lol. Once again proving the comments > the article.

  • ac (unregistered) in reply to Rick
    Rick:
    During the time that memory is loaded, there is essentially time to execute another instruction without ANY cost in time.
    Except that the branch delay often ends up being filled with a NOP, so there is a cost. In particular, once you have branch prediction that works (a "hardware solution for optimum execution speed "), like any modern CPU, the delay slot wastes a cycle you could usefully have spent executing real code.
  • pbean (unregistered)

    im in ur stylesheetz, changin ur tagz

  • (cs) in reply to Seminymous Coward
    Seminymous Coward:
    Leo:
    grizz:
    The Newton function probably is to avoid having a magic number in a calculation. Seems to me that's generally considered A Good Thing, not a WTF.

    You're the one that does

    #define ONE 1 #define TWO 2

    aren't you?

    Sometimes you really don't need it.

    Are you trolling or incapable of understanding why wanting all uses to match, to be easy to change uniformly, to contribute to readable code, and to perhaps eventually depend on localization or configuration is wise? Are you claiming a named constant is an automatic WTF?

    P.S. Wikipedia alone gives 9.80665, 9.797645, and 9.812865328 as reasonable choices if you don't want to account for latitude.

    I used to blindly believe everything Wikipedia said, until I found out they don't have an entry for Office Robbery Statistics. If Wikipedia won't dedicate an entry to that, it's useless.

  • Dan (unregistered) in reply to me_again
    me_again:
    Transformer optimusPrime = new Transformer();

    is this a wtf because it's cool?

    No, because Optimus Prime is not new. He was introduced in the very first episode of the original cartoon.

  • (cs) in reply to frits
    frits:
    'Fixed for naming and precision
    Public Function kgf()
        kgf = 9.80665
    End Function
    

    'Added to fix the code the jerkoff Senior 'Software Consultant broke.

    Public Function Newton() Newton= kgf End Function

    +1
  • Henning Makholm (unregistered) in reply to bob171123

    http://en.wikipedia.org/wiki/Office#Office_robbery_statistics

    Unfortunately the only statistics that section presents is about theft from offices, rather than robbery.

  • Bit Bull (Player Hater) (unregistered) in reply to See Sharper
    See Sharper:
    Matt Westwood:
    frits:
    'Fixed for naming and precision
    Public Function kgf()
        kgf = 9.80665
    End Function
    

    'Added to fix the code the jerkoff Senior 'Software Consultant broke.

    Public Function Newton() Newton= kgf End Function

    Amateur.

    Public Function Newton() Newton= kgf() End Function

    Child.

    Public Function Newton() GoTo kgf

    Saves the memory consumed by the End Function.

    Man you corny!

  • ThomasP (unregistered) in reply to java.lang.Chris;
    java.lang.Chris;:
    public interface Transformer { ... }
    

    public interface Car extends Transformer { ... }

    List<Transformer> transformers = new ArrayList<Transformer>(); transformers.add(new Transformer());

    List<Car> robotsInDisguise = (List<Car>) transformers;

    Shouldn't Transformer implement Car instead of Car extend Transformer?

  • sy (unregistered)

    the vb return method wasn't available until vb.net

    so more likely it was partially updated

    http://www.a1vbcode.com/vbtip-156.asp

  • Sandeek Uhnt (unregistered) in reply to Henning Makholm
    Henning Makholm:
    http://en.wikipedia.org/wiki/Office#Office_robbery_statistics

    Unfortunately the only statistics that section presents is about theft from offices, rather than robbery.

    Darn, well did you also know that Wikipedia doesn't have an article for "gullable"?

  • (cs) in reply to Helix
    Helix:
    DaveK:
    highphilosopher:
    Wow, you poke at Alex just a little bit, and your comments get deleted? That's really, well, sad. I do understand that everyone makes mistakes, but on a Blog that's dedicated to pointing out mistakes, that's just kind of well hypocritical. Everyone here has made a WTF including you Alex.

    -- Note from Alex: there were several comments pointing out typos/mistakes, but since the errors were fixed, the comments were no longer relavent; I did keep one, which was at the top and was a good balance of poking fun at me and explaining the original problem

    relevant

    Strangly by discussing about the spelling of relevant you have created a triple-meta comment.

    Quick! Strangly it before it can reproduce!

    AAAAUUUGGGH!!! TOO LATE!!!

    2nd attempt: lmao, Alex, Akismet thinks a link to a comment on YOUR site, in THIS thread is spam. wt-meta-meta-wtf-f?

  • (cs) in reply to Sandeek Uhnt
    Sandeek Uhnt:
    Henning Makholm:
    http://en.wikipedia.org/wiki/Office#Office_robbery_statistics

    Unfortunately the only statistics that section presents is about theft from offices, rather than robbery.

    Darn, well did you also know that Wikipedia doesn't have an article for "gullable"?
    What, as in "able to be transformed into a gull, sea- or otherwise?"

    I did not know that. Or, uh, care.

    In other news, did you know that they legitimately do not have an article for "gullible"?

    [image]
  • (cs) in reply to quisling

    This is not spam. No one is advertising anything except their boredom. Nice integration of strangly BTW.

Leave a comment on “In A Rush, Properly Handled, and More”

Log In or post as a guest

Replying to comment #:

« Return to Article