• twitter (unregistered)

    frist. hope the 12$ was worth it Alex!

    CAPTCHA: nulla. if(obj == nulla) { return ""a;}

  • anon (unregistered) in reply to twitter
    twitter:
    frist. hope the 12$ was worth it Alex!

    CAPTCHA: nulla. if(obj == nulla) { return ""a;}

    You're not only first, you commented 11 hours before the article was posted! #ninja

  • (cs)
    writtenComment() {
        return true;
    }
    
  • The Mr. T Experience (unregistered)

    TRWTF is listing "French" and "Gay" separately.

  • (cs)

    In the 8th one the camel case is wrong. It should be:

    public override void ManagerElations()

  • Gay (unregistered) in reply to The Mr. T Experience

    TRWTF is listing my name and your name separately.

  • (cs)

    First time I see use of generic in code

    Is this production redy code?

  • Alex (unregistered)

    You know, I think the last one is used in the DB/IDE we use at work: one of the syntax error message reads "You are missing a '', a '', an expression or a '*'"

    Glad to hear the original coder of that statement found a job elsewhere

  • Fishertroll (unregistered)

    // 10/31/00 - removing voter registration duplicate verification // ** this could be part of the reason that we // ** have been represented so poorly lately

  • (cs)
    private var languageLabels:ArrayCollection = new ArrayCollection(
    					"English",
    					"German",
    					"French",
    					"Zunesis"
    					);
    FTFY
  • (cs)
    The Article:
    /// /// Log the user off the system. The method returns true or false for success or failure /// public bool Logoff(string strUser) { return true; }

    At least the comment is correct.

  • Deus (unregistered)

    Hey! I speak Gay.

  • (cs)

    Looks like someone took their CS course explaining "magic numbers are bad" literally instead of in spirit.

    I can see it being very important to change everything that says it uses X number of parameters to actually use Y.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    writtenComment() {
        return THIS.IS.HOW.TO.WRITE.A.comment();
    }
    
  • airdrik (unregistered)

    Obviously, the problem is with the abbreviated names in the hierarchy. They would be so much more readable if they were just spelled out:

    String yyyyMMdd = "yyyyMMdd"
    // get account information
    m_bankID = ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.BANKACCOUNTFROM.BANKID;
    m_accountID = ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.BANKACCOUNTFROM.ACCOUNTID;
    m_accountType = ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.BANKACCOUNTFROM.ACCOUNTTYPE.ToString(); // this is an enum; convert to string
    
    // get start and end dates of statement
    m_startDate = DateTime.ParseExact(ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.BANKTRANSACTIONSLIST.DATESTART, yyyyMMdd, System.Globalization.CultureInfo.InvariantCulture);
    m_endDate = DateTime.ParseExact(ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.BANKTRANSACTIONSLIST.DATEEND, yyyyMMdd, System.Globalization.CultureInfo.InvariantCulture);
    
    // get closing balance and date this refers to
    m_closingBalance = moneyInPenceFromString(ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.LEDGERBALANCE.BALANCEAMOUNT);
    m_closingBalanceDate = DateTime.ParseExact(ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.LEDGERBALANCE.DATEASOF, yyyyMMdd, System.Globalization.CultureInfo.InvariantCulture);
    
    m_transactions = new System.Collections.Generic.List<OfxTransaction>();
    foreach (SimpleOfx.OFXBANKMESSAGESERVICE1STATEMENTTRANSACTIONSRESULTSETSTATEMENTRESULTSETBANKTRANSACTIONSLISTSTATEMENTTRANSACTION transactionStatementNode in ofx.BANKMESSAGESERVICE1.STATEMENTTRANSACTIONSRESULTSET.STATEMENTRESULTSET.BANKTRANSACTIONSLIST.STATEMENTTRANSACTION)
    {
    	m_transactions.add(new OfxTransaction(
    		moneyInPenceFromString(transactionStatementNode.TRANSACTIONAMOUNT),
    		DateTime.ParseExact(transactionStatementNode.DATEPOSTED, yyyyMMdd, System.Globalization.CultureInfo.InvariantCulture),
    		transactionStatementNode.NAME,
    		transactionStatementNode.TRANSACTIONTYPE.ToString(),
    		transactionStatementNode.MEMO)
    	);
    }
    

    There, so much more readable!

  • AerieC (unregistered)
    SimpleOfx.OFXBANKMSGSRSV1STMTTRNRSSTMTRSBANKTRANLISTSTMTTRN

    It seems to me that SimpleOfx is anything but simple, but I'll take a stab at this one:

    OFX Bank message server 1 statement turn rss teenage mutant ninja turtle real super bank transaction list status teenage mutant ninja turtle transmission.

    Do I win?

    (Captcha: opto. This property makes my opto nerve hurt.)

  • airdrik (unregistered) in reply to AerieC
    AerieC:
    SimpleOfx.OFXBANKMSGSRSV1STMTTRNRSSTMTRSBANKTRANLISTSTMTTRN

    It seems to me that SimpleOfx is anything but simple, but I'll take a stab at this one:

    OFX Bank message seriously version 1 statement turn rss teenage mutant turtle real super bank transaction list status teenage mutant turtle transmission.

    Do I win?

    (Captcha: opto. This property makes my opto nerve hurt.)

    ftfy
  • (cs)

    I've seen something similar to the last in a COBOL code section here:

    IF SOME-VAR = ZERO OR 
       SOME-VAR = ZEROES 
    

    Clearly someone who didn't understand that, in COBOL, ZERO and ZEROES are just different ways of saying the same thing.

  • Utterly Confused (unregistered)

    #define TASK_RATE_ONE_SECOND (TASK_RATE * 40)

    What would this mean, the number of TASK_RATE tasks in one second? If so, yeah, this is 200 for a TASK_RATE of 5 ms BUT it should be computed as 1000/TASK_RATE CONFUSED

  • Bronie (unregistered) in reply to twitter

    This is exactly reason why I don't like foreach - var tends to lose context.

    What it should look like:

    foreach (SimpleOfx.OFXBANKMSGSRSV1STMTTRNRSSTMTRSBANKTRANLISTSTMTTRN ofxbankmsgsrsv1stmttrnrsstmtrsbanktranliststmttrn in ofx.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKTRANLIST.STMTTRN)
    {
        m_transactions.Add(new OfxTransaction(
            moneyInPenceFromString(ofxbankmsgsrsv1stmttrnrsstmtrsbanktranliststmttrn.TRNAMT),
            DateTime.ParseExact(ofxbankmsgsrsv1stmttrnrsstmtrsbanktranliststmttrn.DTPOSTED, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture),
            ofxbankmsgsrsv1stmttrnrsstmtrsbanktranliststmttrn.NAME,
    
            ofxbankmsgsrsv1stmttrnrsstmtrsbanktranliststmttrn.TRNTYPE.ToString(),        ofxbankmsgsrsv1stmttrnrsstmtrsbanktranliststmttrn.MEMO)
     );
    }
  • (cs)

    That last one is eerily similar to the code-base I inherited about a year ago, except replace all the "safe" if blocks with try/catch blocks...

    public static int StringToInt32(string str)
    {
    try {
    return int.parse(str);
    }
    catch { return 0; }
    }
    Ahh, now that's a beaute! Or the single return variant:
    public static int StringToInt32(string str)
    {
    itn returnValue = "";

    try { returnValue = int.parse(str); } catch { }

    return returnValue; }

    Now if this "pattern" doesn't scream "I don't give a shit about the quality of my code", then I don't know what does...

  • (cs) in reply to boog
    boog:
    private var languageLabels:ArrayCollection = new ArrayCollection(
    					"English",
    					"German",
    					"French",
    					"Zunesis"
    					);
    FTFY
    Oh silly me. I thought that was a list of languages, not genders... My bad.
  • milleniumbug (unregistered)

    #define TASK_RATE (5) //Task rate in milliseconds

    WTF? Comments in define!

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    boog:
    private var languageLabels:ArrayCollection = new ArrayCollection(
    					"English",
    					"German",
    					"French",
    					"Zunesis"
    					);
    FTFY
    Oh silly me. I thought that was a list of languages, not genders... My bad.

    +1

    In order of presentation: "Male", "Neuter", "Female", "Indeterminate"?

  • (cs)

    The GetStringValue example is not a WTF, but just the result of thinking about the same cases (reference could be NULL) multiple times.

    I frequently get this when I code via automatic electroencephalography input and lose concentration for a while. Most cases are caught by the optimizer; but sometimes, garbage slips through. The optimizer removes it usually, but not always. I frequently get this when I code via automatic electroencephalography input and lose concentration for a while.

  • Bronie (unregistered) in reply to Matt Westwood
    Matt Westwood:

    +1

    In order of presentation: "Male", "Neuter", "Female", "Indeterminate"?

    "Both".

    Captcha: vulputate

  • Zune-Tran (unregistered) in reply to boog
    boog:
    private var tongueLabias:ArrayCollection = new ArrayCollection(
    					"English",
    					"German",
    					"French",
    					"Zunesis"
    					);
    FTFY
    ZFTY
  • (cs) in reply to Bronie
    Bronie:
    Matt Westwood:

    +1

    In order of presentation: "Male", "Neuter", "Female", "Indeterminate"?

    "Both".

    Captcha: vulputate

    You wish.

  • catdog (unregistered)

    The one from Ryan is not a WTF. The method may just return now, but could easily be a hook for something that needs to be done for the future. The try/catch is probably something they require as part of a process for all of their methods, and it's better to do it in advance than not do it, so later when someone makes the method do something, not only do they have to remember their task but they have to remember to add the try/catch when that's something they never have to do for an existing method. It's the same reason why coding standards saying to use curly braces on single line statements: because why make someone remember they have to do it later when you could just mitigate the risk and do it now.

  • (cs) in reply to catdog
    catdog:
    The one from Ryan is not a WTF. The method may just return now, but could easily be a hook for something that needs to be done for the future. The try/catch is probably something they require as part of a process for all of their methods, and it's better to do it in advance than not do it, so later when someone makes the method do something, not only do they have to remember their task but they have to remember to add the try/catch when that's something they never have to do for an existing method. It's the same reason why coding standards saying to use curly braces on single line statements: because why make someone remember they have to do it later when you could just mitigate the risk and do it now.

    Interesting how fashions change. There's lots of bollocks being talked about single line curly braces at the moment. I think it looks shit, by the way.

    Used to be that the Egyptian style, a.k.a the K&R style, was king. Now suddenly it's not.

  • geoffrey (unregistered)
    m_accountType = ofx.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKACCTFROM.ACCTTYPE.ToString()

    The Only WTF is that they didn't leave the application in COBOL in the first place, but tried to convert it to C.

    In COBOL you don't have to write out the full parentage of a nested field like that, or have to bother with the ToString(). You would just write:

    move ACCTTYPE to M-ACCOUNT-TYPE

  • (cs) in reply to milleniumbug
    milleniumbug:
    #define TASK_RATE (5) //Task rate in milliseconds

    WTF? Comments in define!

    Nothing wrong with comments in a #define.

    However, in the real world, "rates" are measured in Hz, not seconds. It should be TASK_INTERVAL or TASK_PERIOD or something like that.

    Well, assuming it really is in milliseconds, that is, and not work-units per unit of time.

  • iToad (unregistered) in reply to geoffrey
    geoffrey:
    m_accountType = ofx.BANKMSGSRSV1.STMTTRNRS.STMTRS.BANKACCTFROM.ACCTTYPE.ToString()

    The Only WTF is that they didn't leave the application in COBOL in the first place, but tried to convert it to C.

    In COBOL you don't have to write out the full parentage of a nested field like that, or have to bother with the ToString(). You would just write:

    move ACCTTYPE to M-ACCOUNT-TYPE

    So it has come to this... COBOL has become a better alternative than Java or C. That's just sad.

  • (cs) in reply to Steve The Cynic
    Steve The Cynic:
    milleniumbug:
    #define TASK_RATE (5) //Task rate in milliseconds

    WTF? Comments in define!

    Nothing wrong with comments in a #define.

    However, in the real world, "rates" are measured in Hz, not seconds. It should be TASK_INTERVAL or TASK_PERIOD or something like that.

    Well, assuming it really is in milliseconds, that is, and not work-units per unit of time.

    const int NUM_MILLISECONDS = 20;
    ...
    int wtf = TASK_RATE * NUM_MILLISECONDS;
    cout << wtf << endl;
    

    output: 5 ???

    Addendum (2011-10-31 12:03): EDIT: My misconception, sorry. Steve is absolutely correct. At least I can leave pretty code to harrass those who like monochromatic comments. :P

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    Interesting how fashions change. There's lots of bollocks being talked about single line curly braces at the moment. I think it looks shit, by the way.

    Used to be that the Egyptian style, a.k.a the K&R style, was king. Now suddenly it's not.

    Style is fashion - do what everyone on your project does, it'll be okay. K&R is popular in books because vertical line space is expensive in print. On the screen, vertical line space is free, and if it's an issue it's an alarm bell: time to refactor.

    I prefer the One True Brace Style (Allman style) because it lets me line up the braces by eye, and makes the blocks more obvious. But whatever, in this world there are certainly bigger things to get worked up about.
    Single-line braces are a belt-and-suspenders thing, at best. If you're doing everything else right, they don't make a lot of difference, and they busy up your code. If you're doing everything else wrong, they're not likely to make a lot of difference, and they busy up your code. So don't bother, I say, just do everything else right.

  • geoffrey (unregistered) in reply to trtrwtf
    trtrwtf:
    Matt Westwood:
    Interesting how fashions change. There's lots of bollocks being talked about single line curly braces at the moment. I think it looks shit, by the way.

    Used to be that the Egyptian style, a.k.a the K&R style, was king. Now suddenly it's not.

    Style is fashion - do what everyone on your project does, it'll be okay. K&R is popular in books because vertical line space is expensive in print. On the screen, vertical line space is free, and if it's an issue it's an alarm bell: time to refactor.

    I prefer the One True Brace Style (Allman style) because it lets me line up the braces by eye, and makes the blocks more obvious. But whatever, in this world there are certainly bigger things to get worked up about.
    Single-line braces are a belt-and-suspenders thing, at best. If you're doing everything else right, they don't make a lot of difference, and they busy up your code. If you're doing everything else wrong, they're not likely to make a lot of difference, and they busy up your code. So don't bother, I say, just do everything else right.

    Reminds me of a job I had 15 years ago. I was moved onto a long running project and found myself on the "team" of a real bunch of K&R apologists. Despite my best attempts to educate them as to the merits of single line quotes they forced me to use K&R. Joke was on them though, each day I would secretly convert pieces of the code from K&R to single brace (as well as making some other more aesthetic and functional changes/improvements). Then when they went home each night I would disable the source control notification system, force commit my changes (ie overwrite the repository - this was long before CVS even) and renable the system again.

    Slowly but surely the whole code base was improved (from the most obscure files upwards) and by the time they realized what had happened (weeks later) it was already too late to change it back.

  • G-Spot (unregistered)
    foreach(comment.THATMAYHAVESOMEINTERESTINGCONTENT in comments.FROMTHEDAILYWTFFRONTPAGE)
    {
        if(user.SOCKPUPPETNAME.equals("geoffrey")
        {
            igsnore();
        }
    
    }
  • (cs) in reply to geoffrey
    geoffrey:
    trtrwtf:
    Matt Westwood:
    Interesting how fashions change. There's lots of bollocks being talked about single line curly braces at the moment. I think it looks shit, by the way.

    Used to be that the Egyptian style, a.k.a the K&R style, was king. Now suddenly it's not.

    Style is fashion - do what everyone on your project does, it'll be okay. K&R is popular in books because vertical line space is expensive in print. On the screen, vertical line space is free, and if it's an issue it's an alarm bell: time to refactor.

    I prefer the One True Brace Style (Allman style) because it lets me line up the braces by eye, and makes the blocks more obvious. But whatever, in this world there are certainly bigger things to get worked up about.
    Single-line braces are a belt-and-suspenders thing, at best. If you're doing everything else right, they don't make a lot of difference, and they busy up your code. If you're doing everything else wrong, they're not likely to make a lot of difference, and they busy up your code. So don't bother, I say, just do everything else right.

    Reminds me of a job I had 15 years ago. I was moved onto a long running project and found myself on the "team" of a real bunch of K&R apologists. Despite my best attempts to educate them as to the merits of single line quotes they forced me to use K&R. Joke was on them though, each day I would secretly convert pieces of the code from K&R to single brace (as well as making some other more aesthetic and functional changes/improvements). Then when they went home each night I would disable the source control notification system, force commit my changes (ie overwrite the repository - this was long before CVS even) and renable the system again.

    Slowly but surely the whole code base was improved (from the most obscure files upwards) and by the time they realized what had happened (weeks later) it was already too late to change it back.

    What a shitty thing to do.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    geoffrey:
    trtrwtf:
    Matt Westwood:
    Interesting how fashions change. There's lots of bollocks being talked about single line curly braces at the moment. I think it looks shit, by the way.

    Used to be that the Egyptian style, a.k.a the K&R style, was king. Now suddenly it's not.

    Style is fashion - do what everyone on your project does, it'll be okay. K&R is popular in books because vertical line space is expensive in print. On the screen, vertical line space is free, and if it's an issue it's an alarm bell: time to refactor.

    I prefer the One True Brace Style (Allman style) because it lets me line up the braces by eye, and makes the blocks more obvious. But whatever, in this world there are certainly bigger things to get worked up about.
    Single-line braces are a belt-and-suspenders thing, at best. If you're doing everything else right, they don't make a lot of difference, and they busy up your code. If you're doing everything else wrong, they're not likely to make a lot of difference, and they busy up your code. So don't bother, I say, just do everything else right.

    Reminds me of a job I had 15 years ago. I was moved onto a long running project and found myself on the "team" of a real bunch of K&R apologists. Despite my best attempts to educate them as to the merits of single line quotes they forced me to use K&R. Joke was on them though, each day I would secretly convert pieces of the code from K&R to single brace (as well as making some other more aesthetic and functional changes/improvements). Then when they went home each night I would disable the source control notification system, force commit my changes (ie overwrite the repository - this was long before CVS even) and renable the system again.

    Slowly but surely the whole code base was improved (from the most obscure files upwards) and by the time they realized what had happened (weeks later) it was already too late to change it back.

    What a shitty thing to do.

    What, you mean responding to a troll?

  • Steve The Pirate (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    That last one is eerily similar to the code-base I inherited about a year ago, except replace all the "safe" if blocks with try/catch blocks...
    public static int StringToInt32(string str)
    {
       try {
          return int.parse(str);
       }
       catch { return 0; }
    }
    Ahh, now that's a beaute! Or the single return variant:
    public static int StringToInt32(string str)
    {
       int returnValue = "";
    

    try { returnValue = int.parse(str); } catch { }

    return returnValue; }

    Now if this "pattern" doesn't scream "I don't give a shit about the quality of my code", then I don't know what does...
    That is an interesting value to initialize your int to

  • (cs) in reply to The Mr. T Experience
    The Mr. T Experience:
    TRWTF is listing "French" and "Gay" separately.
    You are obviously unfamiliar with Alizée.
  • Tyler Durdin (unregistered)
     public static string GetStringValue(object obj)
        {
            if (obj == null)
            {
                return "";
            }
            if ((obj == null))
            {
                return "";
            }
            if (!(obj == null))
            {
                return obj.ToString();
            }
            else
            {
                return "";
            }
        }
    

    The first rule of GetStringValue is return "" for (obj == null). The second rule of GetStringValue is return "" for (obj == null)! The third rule of GetStringValue is if !(obj == null) - you HAVE to fight.

  • The Mr. T Experience (unregistered) in reply to Severity One
    Severity One:
    The Mr. T Experience:
    TRWTF is listing "French" and "Gay" separately.
    You are obviously unfamiliar with Alizée.
    Do you mean the singer? Why? because you think she's hot? I suppose you also think that Harry potter movies aren't gay because you have a crush on that little girl Emma what's-her-name?
  • (cs) in reply to Matt Westwood
    Matt Westwood:
    C-Octothorpe:
    boog:
    private var languageLabels:ArrayCollection = new ArrayCollection(
    					"English",
    					"German",
    					"French",
    					"Zunesis"
    					);
    FTFY
    Oh silly me. I thought that was a list of languages, not genders... My bad.
    +1

    In order of presentation: "Male", "Neuter", "Female", "Bored Teenager with nothing better to do."

    FTFY

  • (cs) in reply to Steve The Pirate
    Steve The Pirate:
    C-Octothorpe:
    That last one is eerily similar to the code-base I inherited about a year ago, except replace all the "safe" if blocks with try/catch blocks...
    public static int StringToInt32(string str)
    {
       try {
          return int.parse(str);
       }
       catch { return 0; }
    }
    Ahh, now that's a beaute! Or the single return variant:
    public static int StringToInt32(string str)
    {
       int returnValue = "";
    

    try { returnValue = int.parse(str); } catch { }

    return returnValue; }

    Now if this "pattern" doesn't scream "I don't give a shit about the quality of my code", then I don't know what does...
    That is an interesting value to initialize your int to
    I tried CTRL-SHIFT-B-ing the text editor, but it didn't report any build errors.

    I blame Obama, really...

  • Dave (unregistered)
            if (obj == null)
            {
                return "";
            }
            if ((obj == null))
            {
                return "";
            }
    Clearly this guy is one of those who thought "something isn't working; let me try this". For some reason the technology world (and maybe the rest of the world?) is full of "try this" people who never bother to figure out what's actually wrong. You'll find them on every helpless desk: Did you try rebooting?

    If you're a "try this" guy, I have only one thing to say to you: Did you try thinking?

  • (cs) in reply to trtrwtf
    trtrwtf:
    Matt Westwood:
    geoffrey:
    trtrwtf:
    Matt Westwood:
    Interesting how fashions change. There's lots of bollocks being talked about single line curly braces at the moment. I think it looks shit, by the way.

    Used to be that the Egyptian style, a.k.a the K&R style, was king. Now suddenly it's not.

    Style is fashion - do what everyone on your project does, it'll be okay. K&R is popular in books because vertical line space is expensive in print. On the screen, vertical line space is free, and if it's an issue it's an alarm bell: time to refactor.

    I prefer the One True Brace Style (Allman style) because it lets me line up the braces by eye, and makes the blocks more obvious. But whatever, in this world there are certainly bigger things to get worked up about.
    Single-line braces are a belt-and-suspenders thing, at best. If you're doing everything else right, they don't make a lot of difference, and they busy up your code. If you're doing everything else wrong, they're not likely to make a lot of difference, and they busy up your code. So don't bother, I say, just do everything else right.

    Reminds me of a job I had 15 years ago. I was moved onto a long running project and found myself on the "team" of a real bunch of K&R apologists. Despite my best attempts to educate them as to the merits of single line quotes they forced me to use K&R. Joke was on them though, each day I would secretly convert pieces of the code from K&R to single brace (as well as making some other more aesthetic and functional changes/improvements). Then when they went home each night I would disable the source control notification system, force commit my changes (ie overwrite the repository - this was long before CVS even) and renable the system again.

    Slowly but surely the whole code base was improved (from the most obscure files upwards) and by the time they realized what had happened (weeks later) it was already too late to change it back.

    What a shitty thing to do.

    What, you mean responding to a troll?

    Good call. It was a knee-jerk reaction. He's a jerk, I kneed him.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    trtrwtf:
    What, you mean responding to a troll?
    Good call. It was a knee-jerk reaction. He's a jerk, I kneed him.
    +1

    added to personal vocabulary

  • Jerry (unregistered)

    If those shagnasty long variable names didn't come from PeopleSoft, they must at least have been autogenerated by the same convert-mainframe-COBOL-directly-to-web-2.0 utility.

  • Bananas (unregistered) in reply to Utterly Confused
    Utterly Confused:
    >#define TASK_RATE_ONE_SECOND (TASK_RATE * 40)

    What would this mean, the number of TASK_RATE tasks in one second? If so, yeah, this is 200 for a TASK_RATE of 5 ms BUT it should be computed as 1000/TASK_RATE CONFUSED

    Whoever created this mess fell into the all-too-common trap of using the word "rate" when he clearly meant "interval" instead. If you increase the value of that thing he named "rate" you will decrease the actual rate at which things happen.

    Does that help?

Leave a comment on “Useless Functions, Extreme Naming, and More”

Log In or post as a guest

Replying to comment #:

« Return to Article