• Anonymous Coward (unregistered)

    BWAHAHA. That reminds me of a comment I wrote.

    I encountered a pre-existing comment and the code right after it. The code did exactly the opposite of what the comment described. However, the code had been in production for a while and had received no complaints from the client.


    My comment?

    // XXX: Figure out which is correct, the above comment, or the code below.

  • WanFactory (unregistered)

    <i>Client: Hmmm... everytime? That's really a strong word.</i>

    Well, at least the client knows to be cautious about the word "every". Reminds me of a worse case....

    DevTeam: So how do we determine the access type on an order?

    Client: Look at the field called "access type" on the child item which says which "access" is being sold for that order.

    DevTeam: Does <b>every</b> order have a child item which says which "access" is being sold?

    Client: yes, <b>every</b> order has a child access line item

    DevTeam: Absolutely, positively, <b>every</b> order? So if one is missing it is a user error and we do not have to process it?

    Client: that's right, you should always have an access child item.

    <<3 months later>>

    Client: Hey, the system isnt processing some orders. Go fix it.

    <<2 days later>>

    DevTeam: There is no access child line item on the order, you said that would never happen.

    Client: Oh, but this is remote call forwarding, that has no access child line item.

    DevTeam: But you said that <b>every</b> order will have an access child line item, we wrote this down, now you are telling us it does not?

    Client: <b>Every</b> order DOES have an access child line item, just not the remote call forwarding ones.

    Inigo Montoya: You keep using that word, I dont think it means what you think it does...

  • Jeff S (unregistered)

    >>Inigo Montoya: You keep using that word, I dont think it means what you think it does...


    LOL . .. thanks, I enjoyed that one!!!!

  • skicow (unregistered)

    I'm wondering if both comments were by the same programmer? It would make sense if it was by two different programmers - the second programmer is trying to figure out WTF the first programmer was trying to do, but it's funnier if the comments were by the same programmer and he can't remember why he wrote the first comment....maybe he's got a split personality? If you are a programmer with multiple personalities I would think that verbose comments would be a good thing! :)

    OTOH I've been there:

    Me at 3am after programming for three days straight: "This is BRILLIANT! why didn't I think of this code before!!"

    Me the next day after getting some good sleep: "WTF was I smoking when I coded this?!?"

    WRT the spec, that's sweet. "Lets only tell the user that there's something wrong 90% of the time, the other 10%...Meh"

  • d (unregistered)

    Myabe the API changed, and the functionlaity was added as a result.

  • Jeremy C. Wright (unregistered)

    FYI, domains / DNS switches no longer take days. I registered a new domain and it was up and live (for all users) in less than 5 hours :)

  • Sjoerd Verweij (unregistered)


    Slightly paraphrased from a production stored proc I wrote:

    -- 11/02/2002 Handling changed per management
    -- 11/15/2002 Handling changed back (emps not trained yet)
    -- 02/03/2003 New handling active
    -- 03/04/2003 Back to old way -- needs to be reevaluated
    -- 06/04/2003 New handling active
    -- Okay, I'm going to stop documenting this.

    /*

    -- OLD WAY
    ...
    -- OLD WAY
    */

    -- NEW WAY
    ...
    -- NEW WAY

    Looking at the SourceSafe history, it changed 3 more times after the last comment...

  • Jonathan (unregistered)

    <Snip>
    Client: Hmmm... “everytime“? That's really a strong word. Could you program it, so it displays it in, hmmm... lets say 90% of cases?
    </Snip>

    Maybe he could use the code from the other day's DBMS_RANDOM post.

  • Robert Sharp (unregistered)

    Jeremey sez: "FYI, domains / DNS switches no longer take days. I registered a new domain and it was up and live (for all users) in less than 5 hours"

    The structure of DNS hasn't changed. In this case "all" is the potential offending catch-all word. When I registered a .info domain it took more like a week to be able to access it from computers 10 miles away. And brand new domains, you would think, should be fairly instant anyway, since there's no changes to be made, no one has a bad IP address cached for your domain. It's all just a matter of what part of their cycle a buncha servers are in as far as refreshing and replication goes.

    So really, there's no telling how long it'll take for reals. Could be lucky, or you could be waiting a week.

  • Daniel Bowen (unregistered)

    DNS is now faster for .com and .net (not .info apparently), with updates initiated about every five minutes. (Blatant blog plug; see link for relevant brief article)

  • josh (unregistered)

    I've had comments like that too. The second was added almost a year after the first, when I'd forgotten what I meant. It teaches you to explain stuff better in comments. :P

  • Curt Sampson (unregistered)

    "it took more like a week to be able to access it from computers 10 miles away."

    Ha ha! It's so fun to see a WTF in the comments.

  • ProffK (unregistered)

    Somebody mentioned smoking something. That's the pits. After a while you start needing Stick-Its to remember just why you're typing the line of code you are.

  • ProffK (unregistered)

    I often have fun writing really confusing comments. I work the homeloan application, so our application source code is littered with applications and properties. See why I can't help it?

  • Bart (unregistered)

    Hehe - comments can be funny :) Was browsing the code of a collegue once on my previous job, and stumbled upon an extremely complicated function, with as only comment:

    // Purpose: confuse the russians

    Wasn't really clear what it all did, but the application worked w/o any probz in production on more than one server-system serving 1000's, so no-one ever worried about it :)

  • Tim Cartwright (unregistered)

    FYI: if a week before a DNS change you set your TTL (time to live) on your zone
    to be very low, then when you do your DNS change, the remote DNS servers will
    not cache your old records for long at all, hence a quicker up time. I would not
    recommend leaving a low TTL on all the time, as that can heavily increase
    traffic on a DNS server for a public site that gets hit quite often.

  • foxyshadis (unregistered)

    See, the real reason everyone asks the noobs for the spec is because they want to know how insane it was. xD

  • Shalon Wood (unregistered)

    <SNIP>
    Me at 3am after programming for three days straight: "This is BRILLIANT! why didn't I think of this code before!!"

    Me the next day after getting some good sleep: "WTF was I smoking when I coded this?!?"
    </SNIP>

    OTOH, I've had the following experience after getting sleep:

    WTF? What the hell was I doing? This is ridiculous, it could never...hold on, wait. What's that...that doesn't make sense...no, yeah, it does, cause over there...and then...holy shit, how the hell did I ever come up with this?

  • init6 (unregistered)

    I've read code I wrote (several months) before and thought "Wow, whoever wrote this must be really bright. I'm not smart enough to have written that. Oh that's my name in the comment. Well I can just check the CVS log. Huh, no one has touched this file. How did I come up with this code?"

    Of course I never thought "boy I must be tired or too stressed right now" which was probably more accurate.

  • foxyshadis (unregistered)

    Don't forget the time when you finally get it working awesomely at 5 am, run it through the test suite, sign off on it and collapse, and then when you get up in the morning to hack some more nothing works, stuff spews everywhere, even your debugger itself seems to be taking a break from sanity. Rare, but terminally frustrating.

  • TheRider (unregistered)

    Better yet: you fix a serious bug at 5 am, run it through the test suite (you think), sign off on it and collapse
    -- and when you show up at the office the next noon, you are quickly told that all hell broke loose at 9am because your company was loosing business because your code is worse than ever before...

  • Axoria Ltd (unregistered)

    The remarks on DNS got more and more accurate, but the overriding fact is you just can't tell exactly what/when etc.

    As regards setting TTL low ... you'd have thought, wouldn't you? Last time I had a big migration to deal with (moving racks worth of shared hosting), I found that some DNS is wrongly cached by a few obscure ISPs. Go figure.

    But yes, it helps most of the time :)

    I've had good success in the past by setting up some TCP/IP redirects in special cases... desperate measures.

  • air max 90 (unregistered)

    Very nice presentation. Excellent new features.

Leave a comment on “The spec? Plus more comments!”

Log In or post as a guest

Replying to comment #:

« Return to Article