• cfmartin2000 (unregistered) in reply to Sad Bug Killer
    Sad Bug Killer:
    May be, just may be, this "programmer"'s first language was Lua (we are talking about game companies here after all) and he didn't grasp the concept of static vs instance methods in C++.

    To clarify - Lua doesn't have classes per se, instead there are "tables" - associative containers - that can contain functions as values. There's also some syntactic sugar to implicitly pass the containing table to a "member" function, thus emulating methods with this pointer, but there's no difference between a function declared with explicit this parameter and a function declared with the syntactic sugar/implicit this parameter. Which seems to be related to the WTF at hand. Also, the implicit "this" parameter is called "self".

    Well clarified!

    Captcha = conventio (the comings and goings at a nunnery)

  • (cs) in reply to Skizz
    Skizz:
    I once worked with a goth called Andy at a games company. What are the chances of that!

    Apparently 100%.

  • (cs) in reply to Harleqin
    Harleqin:
    One of the nice things about language is it generally carries redundant information. The point of the redundancy is to help with the context, when people make a mistake.

    Yes, but it is still a mistake. Correcting all the small mistakes in what I read doesn't take up much "brain processing" per mistake, but it adds up, and slows the reading process, making it less pleasant to read what you are writing.

    So, "my sister's brother" gets parsed without problem. "my sisters brother" throws an exception, because "sisters" is the plural, and a noun after that makes no sense. The stack gets unwound to before "sisters", "sisters" is replaced by "sister's" to comply with having another noun ("brother") afterwards, finally reading is resumed. Yes, this is fast. No, it is still not pleasant.

    It is like this WTF example. It may work somehow, but it is not correct.

    I didn't say the sentence was incorrect. Yeah, I like to read posts that have no typos, no grammar inconsistencies, and no other mistakes. Sure they are easier to read. But claiming that in a short sentence, "sister's brother" adds more clarity than "sisters brothers" just tells me that you are a moron and can't figure anything out. There is nothing else in the sentence to muddy the water, so it is pretty clear that he was talking about the brother of the sister. I would say that most people didn't even notice the mistake, and the majority of the people who did notice the mistake, knew exactly what was meant, but notice the missing apostrophe.

    It is wrong, but in this specific example, adding an apostrophe doesn't make it any clearer.

  • ABr (unregistered) in reply to Harleqin

    As such there could not have been a better explanation for try..catch..finally..

    Why not :- ... ... boolean preference = false; // get it from user int ageLimit; // get it from user Sister[] BroInLawSistersOrMyWives = null; try { if (preference) { BroInLawSistersOrMyWives = NearFutureBrotherInLaw.getSisters(ageLimit); } else { BroInLawSistersOrMyWives = NearFutureBrotherInLaw.getSisters(); } } catch(Throwable t) { Logger.log(t, "Hard luck! be happy no liabilities as such :o)", Logger.CRITICAL); }

    boolean success = false;

    try { for (int index = 0; index < BroInLawSistersOrMyWives.length; index++) { success = Wedding.executePlan(BroInLawSistersOrMyWives[index]); if (success && index != BroInLawSistersOrMyWives.length) { Logger.log("Ah worst / best nightmare! more to come :o)", Logger.INFO); } } } catch (Throwable t) { Logger.log(t, "Hard luck! be happy no liabilities as such; God has bestowed another chance :o)", Logger.CRITICAL); } finally { if (success) { // at least once Divorce.ConsultAttorney(); } } ... ...

  • Dan (unregistered) in reply to Mr. Twisted
    Mr. Twisted:
    How about, "My wife's brother, who used to work at Walmart, and is now 20 years old by the way, was only 12, when, eight years ago, I married the woman, who was formerly single, but is now my wife."

    Syntax error: When did "My wife's brother" quit?

  • (cs)

    this thread made me shed tears of laughter! wow.

  • DagW (unregistered) in reply to Doc Monster
    Doc Monster:
    Even worse is Sammy Hagar singing

    Only time will tell If our love Will stand the Test of Time

    (--Van Halen, Why Can't This Be Love?)

    Sammy needs to read the dictionary page for "tautology".

    Umm. That's not a tautology. Saying "time will tell if our love will stand the test of time" would be a tautology. However adding "Only" at the begining implies that there exists no other way to tell if their love will stand the test of time. That doesn't have to be true thus the statement isn't a tautology.

  • PC Paul (unregistered) in reply to chrismcb
    chrismcb:
    But claiming that in a short sentence, "sister's brother" adds more clarity than "sisters brothers" just tells me that you are a moron and can't figure anything out. There is nothing else in the sentence to muddy the water, so it is pretty clear that he was talking about the brother of the sister.<snip>

    It is wrong, but in this specific example, adding an apostrophe doesn't make it any clearer.

    You're right. In a short sentence, miscapitalization is more likely to lead to misunderstandings.

    "I helped my uncle Jack off a donkey"

    "I helped my uncle jack off a donkey"

    See?

  • (cs) in reply to Code Dependent
    Code Dependent:
    Quango:
    "The Reverend Blue Jeans" was a bit of a strange lyric to have... :)
    How about that Creedence tune, "There's a Bathroom on the Right"?
    I'm actually seriously thinking of having that as the official house Muzak. As you get to the top of the stairs, the room on the right is what used to be my ex's study...
  • Cbuttius (unregistered)

    There's a lot of points I can make about that code although I can't see API.h nor know if he's in control of it, but the biggest criticisms I have of the entire thing are:

    1. Use of callbacks instead of an abstract base class. (May be forced upon him if API.h is not his own but even then use a proxy method).

    2. Too many statics when possibly one singleton class is what he is looking for.

    Also noticeable is that there are no consts anywhere plus the horrible K&R bracing which makes he code less readable.

Leave a comment on “self->Static Anti-Pattern”

Log In or post as a guest

Replying to comment #240155:

« Return to Article