• Heh (unregistered)

    Wow...I have nothing at all to say...

  • (cs)

    This makes my brain cry.

  • (cs)

    I see a lot of questions, but no answers.

  • (cs)

    SELECT wtf FROM tdwtf WHERE tdwtf.fun > 0

  • (cs)

    Against my better judgment, I browsed the code last night to a random file and read about the life of a coder not yet born, who would resurrect Visual Basic and visit horrors on the world without equal in history or myth. I believed every line. I have resolved to destroy the thing before allowing it to become an instrument of WTF.

    (Props to anybody who gets the reference.)

  • RedFox (unregistered)

    Now this is a real WTF.

  • (cs)
    TFA:
    The code does absolutely nothing
    But the goggles, they do everything!
  • (cs) in reply to Melnorme
    Melnorme:
    Against my better judgment, I browsed the code last night to a random file and read about the life of a coder not yet born, who would resurrect Visual Basic and visit horrors on the world without equal in history or myth. I believed every line. I have resolved to destroy the thing before allowing it to become an instrument of WTF.

    (Props to anybody who gets the reference.)

    Without googling, I'd guess Lovecraft, but it could be Poe.
  • Jonathan Hamilton (unregistered) in reply to DaveK

    Nice try, but it's from a computer game called Myth II.

  • (cs) in reply to Jonathan Hamilton
    Jonathan Hamilton:
    Nice try, but it's from a computer game called Myth II.

    In other words, a swing and a myth?

  • Palad1 (unregistered)

    Ladies and gentlemen, we've found it:

    The Client-Side Stored Procedure!

    Niiiice!

  • Pontious (unregistered) in reply to kilroo

    Dat ith tho thad.

  • Flarn (unregistered)

    Hah! This is just part of Bethesda trying to plant references to the word "Scrolls" referring to their games all over the internet to assist them in their trademark lawsuit against Mojang. No one calls it Elder Scrolls. They call it Daggerfall, Morrowind, or Oblivion or whatever. Nice try, Bethesda.

    That, of course, is TRWTF :)

  • (cs)

    This is one reson for having defect preventon mtgs every week. If you have them, you will reduse eror in code.

  • (cs)

    deafult.aspx

    There's your problem... you're looking at the wrong file.

  • Jon (unregistered)

    I didn't get my money's worth.

  • (cs)

    "Elder Scrolls"? Entirely the wrong setting: It should have been "Lord of the Rings".

    C'mon, you know the phrase: "And one [summoner] to rule them all."

  • (cs)
    Could the definitions.loadQueryString(constName) method use reflection to find what the value of the constant is?
    Are you really suggesting that not using reflection is part of the WTF here? Isn't it hard enough to maintain already?
  • (cs) in reply to boog
    boog:
    Are you really suggesting that not using reflection is part of the WTF here? Isn't it hard enough to maintain already?
    Looks to me like a draw. Rematch! With more, badly trained programmers!
  • (cs) in reply to boog
    boog:
    Could the definitions.loadQueryString(constName) method use reflection to find what the value of the constant is?
    Are you really suggesting that not using reflection is part of the WTF here? Isn't it hard enough to maintain already?
    Wow, you're not NOT dead?! Good to see your on here again.

    Also, they clearly should have used enums where the SQL query was in the DescriptionAttribute for each enum... this post is bait

  • guess who (unregistered) in reply to Coyne
    Coyne:
    "Elder Scrolls"? Entirely the wrong setting: It should have been "Lord of the Rings".

    C'mon, you know the phrase: "And one [summoner] to rule them all."

    Or even better, Final Fantasy, where the summoner is a character that calls forth some abomination to wreak havoc among their enemies. Some even had the ability to give a confusion status to every enemy in range.

    It is an exact description of this code's nature and behavior.

  • doctor_of_common_sense (unregistered)

    Why is everybody jumping on the management? They did exactly what they are supposed to do: Get the value for money for everything they spend. And it was not a bad deal IMO. They got Client Side Stored Procedures! So what if the app didn't do what it was supposed to? It did something else way much more awesomely.

  • (cs)

    People like this need to be shot in the face with a hammer. I'm so sick of having to deal with slop like this at almost every job I've had in the five-or-so years I've been a software developer. It seems hardly anybody ever takes a step back and thinks "Hm... there has got to be a better/easier way of doing X, let me take the time to find out".

    Are we all that spineless to tell some uppity manager that Feature X will take an extra day or two in order to make sure that it won't collapse after a little while? Are managers that stupid to not understand the difference between short-term and long-term, and that long-term is what really matters for a business? That's freaking Business 101.

  • Steve The Pirate (unregistered)

    The real WTF is that the constants are all lowercase

  • (cs) in reply to Steve The Pirate
    Steve The Pirate:
    The real WTF is that the constants are all lowercase

    I would say maybe the "developer" was a Ruby/Python fan (more so Ruby where the convention is_to_use_underscores) except:

    1. Ruby constants start with an upper-case letter (and by convention use Java ALL_CAPS)
    2. No self-respecting Ruby/Python developer would write trash like that without committing seppuku afterwards.
  • (cs) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    People like this need to be shot in the face with a hammer. I'm so sick of having to deal with slop like this at almost every job I've had in the five-or-so years I've been a software developer. It seems hardly anybody ever takes a step back and thinks "Hm... there has got to be a better/easier way of doing X, let me take the time to find out".

    Are we all that spineless to tell some uppity manager that Feature X will take an extra day or two in order to make sure that it won't collapse after a little while? Are managers that stupid to not understand the difference between short-term and long-term, and that long-term is what really matters for a business? That's freaking Business 101.

    HA! You have got to be trolling... No, management doesn't give a shit about long-term. They're like kids with ADD, just the short term (i.e. bonus, title, recognition, etc.). Besides, in two years when the application comes apart, they'll just blame you, who due to the shitty work environment, have already left for greener pastures.

    Also, this is unfortunately the norm, at least from what I've seen at every new place I have worked (and currently work). The best thing to do is to not to try to be a hero. Just make sure all your new code is well written, and you should be alright... Unless you're maintaining it, then your basically fucked and we'll all pray for you.

  • (cs)

    I'm guessing their flagship web application crashed because the following query was executed:

    SELECT username FROM users WHERE username = '';drop table users;--'

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    HA! You have got to be trolling... No, management doesn't give a shit about long-term. They're like kids with ADD, just the short term (i.e. bonus, title, recognition, etc.). Besides, in two years when the application comes apart, they'll just blame you, who due to the shitty work environment, have already left for greener pastures.

    Also, this is unfortunately the norm, at least from what I've seen at every new place I have worked (and currently work). The best thing to do is to not to try to be a hero. Just make sure all your new code is well written, and you should be alright... Unless you're maintaining it, then your basically fucked and we'll all pray for you.

    Not trolling, just tired of morons that can't see the forest through the trees. I've met and worked for so many people that IMHO shouldn't be allowed to run businesses at all since they have no sense of direction, no long-term goals and no idea of the concepts of long-term vs. short-term. It's rather disheartening, honestly. I'm not even a business major and I understand these things, presumably better than people who actually OWN businesses.

  • blah (unregistered)

    Bobby Tables, anyone?

  • (cs) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    Not trolling, just tired of morons that can't see the forest through the trees. I've met and worked for so many people that IMHO shouldn't be allowed to run businesses at all since they have no sense of direction, no long-term goals and no idea of the concepts of long-term vs. short-term. It's rather disheartening, honestly. I'm not even a business major and I understand these things, presumably better than people who actually OWN businesses.

    Sigh. Managers don't understand, nor do they care to, the differences between "good code" and "bad code". They shouldn't have to; they just need to care about the bottom line. So if implementing some feature means that another feature should be fixed first, then just tell them the time it would take you to do so, without telling them the details. Do what you can within reason, and work toward your "perfect code" in pieces. Anything else is begging for an ulcer.

  • Jupiter (unregistered)

    internal static string loadQueryString(string constName) { string myQuery = ""; switch (constName) { case "check_user_exists": myQuery = check_user_exists; break; case "get_user_record": myQuery = get_user_record; break; case "get_user_count": myQuery = get_user_count; break; // and 200+ more default: myQuery = constName; break; } return myQuery; }

    FTFY

  • (cs) in reply to dohpaz42
    dohpaz42:
    Sigh. Managers don't understand, nor do they care to, the differences between "good code" and "bad code". They shouldn't have to; they just need to care about the bottom line. So if implementing some feature means that another feature should be fixed first, then just tell them the time it would take you to do so, without telling them the details. Do what you can within reason, and work toward your "perfect code" in pieces. Anything else is begging for an ulcer.

    That is what I do. What boggles the mind is how somebody can't understand things put in plain terms: Not "good code" and "bad code" but more like "If we take x longer, we can easily add features in the future and have better maintenance" and "If we crank it out immediately, new features are going to be very hard to add and the application is going to be very poor longterm." Again, I'm not a business major but that seems like a cut-and-dried approach, yet most managers will choose the second option instead of the first.

  • Ken B. (unregistered)

    loadQueryString() isn't enterprisey enough...

    Obviously, the queries shouldn't be stored as const strings, but rather should be obtained from an SQL database with something like:

    private const string metaQuery = "select query from query_table where query_name = '{0}'";
  • Ken B. (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    What boggles the mind is how somebody can't understand things put in plain terms: Not "good code" and "bad code" but more like "If we take x longer, we can easily add features in the future and have better maintenance" and "If we crank it out immediately, new features are going to be very hard to add and the application is going to be very poor longterm." Again, I'm not a business major but that seems like a cut-and-dried approach, yet most managers will choose the second option instead of the first.
    The problem is the "plain-English-to-bean-counter" translation of the above is:

    "I can spend time and money now to save even more time and money in the future. Or... I can look like a hero by saving time and money now and let the next guy worry about the higher cost down the road."

  • (cs) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    dohpaz42:
    Sigh. Managers don't understand, nor do they care to, the differences between "good code" and "bad code". They shouldn't have to; they just need to care about the bottom line. So if implementing some feature means that another feature should be fixed first, then just tell them the time it would take you to do so, without telling them the details. Do what you can within reason, and work toward your "perfect code" in pieces. Anything else is begging for an ulcer.

    That is what I do. What boggles the mind is how somebody can't understand things put in plain terms: Not "good code" and "bad code" but more like "If we take x longer, we can easily add features in the future and have better maintenance" and "If we crank it out immediately, new features are going to be very hard to add and the application is going to be very poor longterm." Again, I'm not a business major but that seems like a cut-and-dried approach, yet most managers will choose the second option instead of the first.

    Let me try from a different angle: managers aren't people. Well, they are, just not very smart ones. They see things more like "how does this impact me", versus the normal "how does this impact the betterment of the organization while at the same time ease development costs, limit burnout and developer turnover".

    Having said that, there is a balance you want to maintain between over-engineering something that likely will never happen (or isn't worth the up-front development cost/time) vs. the "git 'er done" attitude which has the dendency to produce shit code.

  • (cs)

    I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.

  • n_slash_a (unregistered)

    I call shenanigans, there is a comment in the code

  • (cs) in reply to dkf
    dkf:
    boog:
    Are you really suggesting that not using reflection is part of the WTF here? Isn't it hard enough to maintain already?
    Looks to me like a draw.
    Indeed; the submitter's implied desire for an equally-unmaintainable approach is like saying "I wish this awful code was lousy".
    dkf:
    Rematch! With more, badly trained programmers!
    You give them too much credit. You'd be surprised what untrained programmers are capable of when left to their own devices.
  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    boog:
    Could the definitions.loadQueryString(constName) method use reflection to find what the value of the constant is?
    Are you really suggesting that not using reflection is part of the WTF here? Isn't it hard enough to maintain already?
    Wow, you're not NOT dead?!
    No, not not NOT dead.
    C-Octothorpe:
    Also, they clearly should have used enums where the SQL query was in the DescriptionAttribute for each enum... this post is bait
    I believe that solution would truly be a giant "fuck you" to any developers down the road that would have to maintain it. Well done! nom nom nom
  • (cs) in reply to boog
    boog:
    C-Octothorpe:
    Wow, you're not NOT dead?!
    No, not not NOT dead.
    That wasn't a mistake... The henchmen I sent obviously cut the breaklines of the wrong car. On a completely unrelated topic, could you send flowers to the family of the coworker who parks beside you? There's going to be an, um, accident later today...
    boog:
    C-Octothorpe:
    Also, they clearly should have used enums where the SQL query was in the DescriptionAttribute for each enum... this post is bait
    I believe that solution would truly be a giant "fuck you" to any developers down the road that would have to maintain it. Well done! nom nom nom
    No, it's enterprisey!
  • (cs) in reply to Nagesh
    Nagesh:
    I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.
    Not even doing it right, it seems.
  • NuclearRampage (unregistered) in reply to Nagesh

    Sounds like standard operating procedure of a typical terribad India code sweatshop.

    Nagesh:
    I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.
  • kilativ (unregistered)

    SQL Injection dream

  • (cs) in reply to Nagesh
    Nagesh:
    I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.
    I never cared for what they say.
  • (cs) in reply to frits
    frits:
    Nagesh:
    I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.
    I never cared for what they say.
    What about games they played?
  • (cs) in reply to boog
    boog:
    frits:
    Nagesh:
    I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.
    I never cared for what they say.
    What about games they played?
    I never cared for what they do.
  • (cs) in reply to guess who
    guess who:
    Coyne:
    "Elder Scrolls"? Entirely the wrong setting: It should have been "Lord of the Rings".

    C'mon, you know the phrase: "And one [summoner] to rule them all."

    Or even better, Final Fantasy, where the summoner is a character that calls forth some abomination to wreak havoc among their enemies. Some even had the ability to give a confusion status to every enemy in range.

    It is an exact description of this code's nature and behavior.

    Better still, the Summoner in Chaucer's Canterbury Tales who IIRC was a syphilitic pederast. And of course his buddy the Pardoner, who "I believe was a gelding or a mare". Perhaps it was they who programmed this - but then again, back in the 14th Century they would have used FORTRAN.

  • AndyC (unregistered) in reply to Jupiter
    Jupiter:
    internal static string loadQueryString(string constName) { string myQuery = ""; switch (constName) { case "check_user_exists": myQuery = check_user_exists; break; case "get_user_record": myQuery = get_user_record; break; case "get_user_count": myQuery = get_user_count; break; // and 200+ more default: myQuery = constName; break; } return myQuery; }

    FTFY

    Clearly a new meaning of FTFY, since all you've done is take stupid code and turned it into completely non-functional code.

  • (cs) in reply to AndyC
    AndyC:
    Jupiter:
    internal static string loadQueryString(string constName) { string myQuery = ""; switch (constName) { case "check_user_exists": myQuery = check_user_exists; break; case "get_user_record": myQuery = get_user_record; break; case "get_user_count": myQuery = get_user_count; break; // and 200+ more default: myQuery = constName; break; } return myQuery; }

    FTFY

    Clearly a new meaning of FTFY, since all you've done is take stupid code and turned it into completely non-functional code.

    Not necessarily... If they wanted free-form SQL pukes, then this would actually allow for that while supporting the existing "functionality".

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    Better still, the Summoner in Chaucer's Canterbury Tales who IIRC was a syphilitic pederast. And of course his buddy the Pardoner, who "I believe was a gelding or a mare". Perhaps it was they who programmed this - but then again, back in the 14th Century they would have used FORTRAN.
    Why not Perlingata?

Leave a comment on “Seeking The Summoner”

Log In or post as a guest

Replying to comment #361963:

« Return to Article