• IN-HOUSE-CHAMP (unregistered)

    Fixing code can have a side-effect on your job.

  • Herr Otto Flick (unregistered)

    TRWTF is fixing it so perfectly the first time. If you spot something like this, only fix it half way. That way, you've always got some performance to pull out the bag.

  • F (unregistered)

    "...the entire function could be replaced by “return strtotime('monday this week')..."

    Not prior to PHP5.3.0. On dimanche the given function returns the preceding Monday, whereas in PHP5.2.0 and earlier 'monday this week' means tomorrow.

    See the "changelog" section of http://www.php.net/manual/en/function.strtotime.php

  • Nyctef (unregistered) in reply to F
    F:
    "...the entire function could be replaced by “return strtotime('monday this week')..."

    Not prior to PHP5.3.0. On dimanche the given function returns the preceding Monday, whereas in PHP5.2.0 and earlier 'monday this week' means tomorrow.

    See the "changelog" section of http://www.php.net/manual/en/function.strtotime.php

    And here I was thinking PHP had actually done something cool for once. It should also really depend on the locale (or have an option to do so) to specify if a week starts on Sunday or Monday

    CAPTCA: facilisis: the vague feeling that there must be an easier way to do something. Oddly appropriate :)

  • Franky (unregistered) in reply to Nyctef
    F:
    "...the entire function could be replaced by “return strtotime('monday this week')..."

    Not prior to PHP5.3.0. On dimanche the given function returns the preceding Monday, whereas in PHP5.2.0 and earlier 'monday this week' means tomorrow.

    See the "changelog" section of http://www.php.net/manual/en/function.strtotime.php

    well, it would still be trivial to replace in native code considering that you always can get the DoW somehow (and be it with date.toString formatting and string parsing afterwards).

  • faoileag (unregistered)

    I absolutely love the way the argument $date of a static function is sanitized before being inserted as a string into a SQL statement template, which is then executed without further ado ;-)

    Then again, I don't know PHP - maybe the SySQLStmt constructor has some Bobby Tables sniffer incorporated.

  • QJo (unregistered)

    TRWTF: "When he questioned the users, they just shrugged it off as ‘how the application worked’."

  • Lis (unregistered) in reply to QJo
    QJo:
    TRWTF: "When he questioned the users, they just shrugged it off as ‘how the application worked’."
    Yep, and T other RWTF is web developers who, in general, don't understand shit about how to write proper software. One's crappy expectations feeds the other.
  • Pedro (unregistered)

    Sigh, not good deed goes unpunished.

  • Anonymous Paranoiac (unregistered) in reply to Lis
    Lis:
    QJo:
    TRWTF: "When he questioned the users, they just shrugged it off as ‘how the application worked’."
    Yep, and T other RWTF is web developers who, in general, don't understand shit about how to write proper software. One's crappy expectations feeds the other.

    I can't tell you how many times I've had to deal with both sides of this at work. Among the LegacyWare I've inherited at work is a collection of internal web apps for employee use. There's plenty of crappy design, which I try to fix as I come across it. Almost without exception users have a completely inverted sense of what behavior needs reported as a bug and what doesn't. "The network is down! I better submit a bug report!" (lest you think they're submitting the right thing for the wrong reason, we get many alerts if anything actually goes down) "I entered incorrect data and got a validation error message! I better submit a bug report!" "Some random employee mentioned something vague to me about something somewhere being 'wrong'! I better submit a bug report!" (to which I'll get endless follow-up requests "Is it fixed yet?").

    To actually learn about real issues (provided they don't completely break functionality) with the applications, you pretty much have to accidentally catch them in the act of encountering the issue and point it out to them. They almost always give the same reaction Sergio got - "What? It's always been that way."

    Users also have an inverted sense of what processes should be automated. Give them a rote procedure for something that could easily be automated and they'll follow it for decades without thinking regardless of how many man hours they waste on it. Given them something that requires fuzzy decision making and they'll immediately ask for an automation.

  • ZoomST (unregistered)

    Aaand here is yet another "Don't know how to do it -- let's ask the database server!". For a complete nonsense experience, it lack the substitution of

    $weekday--;
    for another SQL statement.

  • (cs) in reply to Pedro
    Pedro:
    Sigh, not good deed goes unpunished.

    Completely and irrevocably agree with above statement.

  • Excelsior (unregistered)

    TRWTF is being French and using both French and English in the same function name. (yes, I am French, but I prefer saying it before any american does).

  • (cs) in reply to Franky

    "return strtotime('monday this week')"

    But the application is written in french so this would not work. Programs must be written in english ... according to joel spolsky

  • wtf? (unregistered)

    I'm bilingual, and yet I don't speak French.

  • Shelkyn (unregistered)

    A Frenchman concerned with efficiency and productivity, now I know this is fiction.

  • faoileag (unregistered) in reply to Shelkyn
    Shelkyn:
    A Frenchman concerned with efficiency and productivity, now I know this is fiction.
    "After the requisite facepalm, Sergio corrected the code"

    Only the original culprit seems to be from France (or from Canada, Belgium, Switzerland (Romandie) or some African countries), Sergio definitely sounds Italian to me.

    Ok, now that I think of it...

  • (cs)
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    DEAR INTERNET, THIS IS NOT THE DEFINITION OF INSANITY. Also, no publicly available source attributes this to Albert Einstein. Please stop.

  • faoileag (unregistered) in reply to faoileag
    faoileag:
    Only the original culprit seems to be from France
    Thinking about it again, that's an invalid conclusion.

    They have some weird rules regarding their language in France, so it might as well be a house rule of the dev shop to use French for comments and function names, leaving ample room for the developer to be Elbonian.

  • faoileag (unregistered) in reply to savar
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    Also, no publicly available source attributes this to Albert Einstein. Please stop.

    http://www.brainyquote.com/quotes/quotes/a/alberteins133991.html is not a publicly available source?

  • DonaldK (unregistered)

    Thank you for this article... and yeah, if you give users enough rope they eventually hang you with it... so I guess I also need to learn to not "say too much" or not to be "too honest"... as soon you admit that something went wrong or that there might be a risk that the system will behave erratically under certain conditions, then that gets put on the project issues list and the developers (I, on my main project) get nailed for it every now and again... the risk probably never manifests, but to the users that's not the point.

    Imagine a software development job without production systems or users... now THERE'S an ideo (captcha)...

  • faoileag (unregistered) in reply to Anonymous Paranoiac
    Anonymous Paranoiac:
    Given them something that requires fuzzy decision making and they'll immediately ask for an automation.
    "SELECT rand() FROM general;"
  • (cs) in reply to faoileag
    faoileag:
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    Also, no publicly available source attributes this to Albert Einstein. Please stop.

    http://www.brainyquote.com/quotes/quotes/a/alberteins133991.html is not a publicly available source?

    Thanks for the pedantry. Here's a corrected version for your review:

    Also, no publicly available primary source attributes this to Albert Einstein.

    In place of "primary", you could also substitute "authoritative", "reliable", or "not cheap shitty fucking brainyquote" without loss of generality.

  • emaNrouY-Here (unregistered) in reply to Anonymous Paranoiac
    Anonymous Paranoiac:
    Users also have an inverted sense of what processes should be automated. Give them a rote procedure for something that could easily be automated and they'll follow it for decades without thinking regardless of how many man hours they waste on it. Given them something that requires fuzzy decision making and they'll immediately ask for an automation.

    I can do the same thing over and over again without thinking. Who wants to think at their job? Let the computer do that.

  • (cs) in reply to Anonymous Paranoiac
    Anonymous Paranoiac:
    I can't tell you how many times I've had to deal with both sides of this at work. Among the LegacyWare I've inherited at work is a collection of internal web apps for employee use. There's plenty of crappy design, which I try to fix as I come across it. Almost without exception users have a completely inverted sense of what behavior needs reported as a bug and what doesn't. "The network is down! I better submit a bug report!" (lest you think they're submitting the right thing for the wrong reason, we get many alerts if anything actually goes down) "I entered incorrect data and got a validation error message! I better submit a bug report!" "Some random employee mentioned something vague to me about something somewhere being 'wrong'! I better submit a bug report!" (to which I'll get endless follow-up requests "Is it fixed yet?").

    To actually learn about real issues (provided they don't completely break functionality) with the applications, you pretty much have to accidentally catch them in the act of encountering the issue and point it out to them. They almost always give the same reaction Sergio got - "What? It's always been that way."

    Users also have an inverted sense of what processes should be automated. Give them a rote procedure for something that could easily be automated and they'll follow it for decades without thinking regardless of how many man hours they waste on it. Given them something that requires fuzzy decision making and they'll immediately ask for an automation.

    +∞

    This is the most apt post I've ever read on TDWTF.

  • (cs) in reply to Helix
    Helix:
    "return strtotime('monday this week')"

    But the application is written in french so this would not work. Programs must be written in english ... according to joel spolsky

    Joel's opinions aren't necessarily worth giving much time to, but in this he curiously agrees with the development policy at my company. All comments and variables are to be in English.

    What makes it curious? The company is French.

  • Mark S. (unregistered) in reply to Steve The Cynic

    You'll appreciate the requirement for English comments and variables when you move to another company that outsources development to Brazil (for tax breaks) and the code comes back with Portuguese variables and comments. My manager almost fell over laughing when I opened the code and pointed it out to him.

  • Valued Service (unregistered) in reply to Anonymous Paranoiac
    Anonymous Paranoiac:
    Give them a rote procedure for something that could easily be automated and they'll follow it for decades without thinking regardless of how many man hours they waste on it. Given them something that requires fuzzy decision making and they'll immediately ask for an automation.

    I think that goes under, "Lazy people do more work."

    It's too much capital to build and maintain a database, let's save effort and manually copy data from spread-sheet to spread-sheet.

    Determining how to represent data for my meetings is too much work. Let's have a system that can determine whether to represent data YtD or MtM based on the data with this conflicting set of criteria.

  • Valued Service (unregistered) in reply to Mark S.
    Mark S.:
    You'll appreciate the requirement for English comments and variables when you move to another company that outsources development to Brazil (for tax breaks) and the code comes back with Portuguese variables and comments. My manager almost fell over laughing when I opened the code and pointed it out to him.

    This always confused me.

    public static abstract class Enquirescio

    If you get that far in English, WTF is that class name?

  • Valued Service (unregistered) in reply to savar
    savar:
    faoileag:
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    Also, no publicly available source attributes this to Albert Einstein. Please stop.

    http://www.brainyquote.com/quotes/quotes/a/alberteins133991.html is not a publicly available source?

    Thanks for the pedantry. Here's a corrected version for your review:

    Also, no publicly available primary source attributes this to Albert Einstein.

    In place of "primary", you could also substitute "authoritative", "reliable", or "not cheap shitty fucking brainyquote" without loss of generality.

    Curiously Bubba Gump Shrimp Co. is not owned by Bubba Gump.

    Guess we need a primary source to rename it Landry Shrimp Co.

    Next time I discover something worth naming it, I'm going to use someone else's name just to piss you off.

  • Valued Service (unregistered) in reply to savar
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    DEAR INTERNET, THIS IS NOT THE DEFINITION OF INSANITY. Also, no publicly available source attributes this to Albert Einstein. Please stop.

    Besides, Quantum physics just f***ed that over.

  • Valued Service (unregistered) in reply to Shelkyn
    Shelkyn:
    A Frenchman concerned with efficiency and productivity, now I know this is fiction.

    Careful now, if a French PC gets too productive, the French Mac Union will strike.

  • (cs) in reply to savar
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    DEAR INTERNET, THIS IS NOT THE DEFINITION OF INSANITY. Also, no publicly available source attributes this to Albert Einstein. Please stop.

    Insanity is expecting people to change their beliefs about what famous person said what cliche'd comment.

  • (cs) in reply to faoileag
    faoileag:
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    Also, no publicly available source attributes this to Albert Einstein. Please stop.

    http://www.brainyquote.com/quotes/quotes/a/alberteins133991.html is not a publicly available source?

    "The problem with Quotes on the Internet is that most of them are made up" - Abraham Lincoln

  • harley (unregistered) in reply to savar

    Dude. you have some serious anger issues. So what if the quote comes from a glorified self-help book (Basic Text of Narcotics Anonymous) in 1982. You might have mentioned that instead of just raging against some poor soul offering the best of their knowledge. You sir, are an Internet Fuckwad.

  • Chris (unregistered)

    This is why programmers should never ever be exposed to users directly.

    The programmer sees a problem, fixes it and moves on. If s/he has the audacity to communicate that to the outside world then that world thinks it's okay to respond back. Repeatedly. About things like whether it's okay to turn the computer on with their toe.

    Users should be pleasantly surprised by things like this. That way the programmer can continue solving important issues and not be bothered by whether the invoices actually total correctly.

  • Zoidy (unregistered)

    I worked construction once in high school, and the guy I was working with said "There are two ways to do things, the right way and the french way, we are going to do it the right way". I guess this also applies to coding as well.

  • Ryan (unregistered)
    However, because no good deed goes unpunished, Sergio now frequently gets emails from the users, asking whether a particular behavior should be considered ‘normal’. So while the users are able to do their job faster, for Sergio not so much.

    I don't know about you, but I prefer getting bugs for issues than them going unreported (and creating a general sense of dislike for the product)

  • Enzo (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    Helix:
    "return strtotime('monday this week')"

    But the application is written in french so this would not work. Programs must be written in english ... according to joel spolsky

    Joel's opinions aren't necessarily worth giving much time to, but in this he curiously agrees with the development policy at my company. All comments and variables are to be in English.

    What makes it curious? The company is French.

    It helps when it's time to outsource to India.

    After all, who the hell knows French? That's right: a few inconsequential people like the French and debutantes avoiding learning something worthwhile. In other words: no one.

  • Joe (unregistered) in reply to Ryan

    Hell yes. I'm a little shocked that you're the first to say this. To me, the story reads "users silently dispairing; heroic programmer breaks through dispair with persistence and giving a crap; users no longer dispair." Sounds great to me! Lots of comments imply that the users should have been kept quiet by depriving them of the hope that the problems they see can be fixed. That's an awful approach on both a professional and a human level. I'm sure some people are joking, but I have seen behaviour like this in the wild and it drives me nuts.

  • Spewin Coffee (unregistered)

    "At least it worked based on the lack of bug reports from the users (which we all know is the gold standard of ‘working’)."

    This happens to me all the time. I'll get someone who asks, "Is it possible to do such-and-such? We've been experiencing this problem for eight months." I'll say "yes", they'll walk away, and I'll wonder why it took them eight months to approach me. Regardless, five minutes later, I'll have found, verified, and fixed the problem. They'll be ecstatic and hail me as their hero or something. The process repeats. However, because of my turnaround times, I've got about half of the company trained to report issues as soon as they encounter them. The other half continue reporting issues once every 6 to 8 months.

  • ef[08-98gf (unregistered) in reply to Ryan
    Ryan:
    I don't know about you, but I prefer getting bugs for issues than them going unreported (and creating a general sense of dislike for the product)
    Where I work, we're not supposed to act on email from users. We have a ticket system and someone who sifts through the tickets, closes the bogus reports and assigns the real bugs to developers.
  • samovar (unregistered) in reply to harley
    harley:
    Dude. you have some serious anger issues. So what if the quote comes from a glorified self-help book (Basic Text of Narcotics Anonymous) in 1982. You might have mentioned that instead of just raging against some poor soul offering the best of their knowledge. You sir, are an Internet Fuckwad.

    +∞

    This is the most apt post I've ever read on TDWTF.

  • (cs) in reply to faoileag
    faoileag:
    Shelkyn:
    A Frenchman concerned with efficiency and productivity, now I know this is fiction.
    "After the requisite facepalm, Sergio corrected the code"

    Only the original culprit seems to be from France (or from Canada, Belgium, Switzerland (Romandie) or some African countries), Sergio definitely sounds Italian to me.

    Ok, now that I think of it...

    He's Belgian:

    [image]

    (And no, this isn't spam, Akismet.)

  • jger (unregistered)

    Doing your work good or even exceptionally good never means praise (or more money, reputation,...) but more work on your desk only. I guess that's why there is so much mediocricy around us...

  • jger (unregistered) in reply to jger

    -c +t rolleyes

  • THE INTERNET (unregistered) in reply to savar
    savar:
    The WTFing Article:
    Sort of the opposite of Einstein’s version of insanity

    DEAR INTERNET, THIS IS NOT THE DEFINITION OF INSANITY. Also, no publicly available source attributes this to Albert Einstein. Please stop.

    Dear Whiny Person - We don't care, and it doesn't matter anyway.

    The Internet

  • (cs) in reply to wtf?
    wtf?:
    I'm bilingual, and yet I don't speak French.

    I can speak 3 languages and understand 4. Not making ocunt of English yet.

  • (cs) in reply to ef[08-98gf
    ef[08-98gf:
    Ryan:
    I don't know about you, but I prefer getting bugs for issues than them going unreported (and creating a general sense of dislike for the product)
    Where I work, we're not supposed to act on email from users. We have a ticket system and someone who sifts through the tickets, closes the bogus reports and assigns the real bugs to developers.

    Yeah, that's what level 1 tech support is for. Filter out requests like "I forgot my password."

  • (cs)

    Uh, no. We don't all live this pattern.

    Whenever I start to feel like something sucks at work, I just come here and am reminded that my job is full of bliss.

Leave a comment on “Computers Need Weekends Too”

Log In or post as a guest

Replying to comment #:

« Return to Article