• yimms (unregistered)

    Of course there's more than one copy of the file, you've gotta have source control or u could lose all your work...

  • (cs)

    just add a javascript that adds 2006, 07, 08, 09 and then resign before Jannuary.

  • Anonymous (unregistered)

    Nice developmestruction-alike environment...

  • (cs)

    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...

  • Bobbo (unregistered)
    Craig F.:
    I didn't want to (or couldn't) delve into the classic ASP code

    At my last company, one guy who worked on my team annoyingly cited this as an excuse time and time again. Okay, we were maintaining poorly written code, but the computer executes code in a linear manner so it can always be followed through.

    </rant>
  • Yarrr (unregistered) in reply to Bobbo
    Bobbo:
    Craig F.:
    I didn't want to (or couldn't) delve into the classic ASP code

    At my last company, one guy who worked on my team annoyingly cited this as an excuse time and time again. Okay, we were maintaining poorly written code, but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    "Didn't want to" is understandable, particularly when it's thousands of lines of vbscript weaving in and out of HTML.

  • (cs)
    the drop-down year went from 1920 to 2005
    That's fairly stupid right there, having 86 items in a drop-down menu, but I'm sure we've all seen much worse. My question is, who has seen an *incredibly* stupid drop-down? What did it load?
  • Bobbo (unregistered) in reply to Yarrr
    Yarrr:
    Bobbo:
    Craig F.:
    I didn't want to (or couldn't) delve into the classic ASP code

    At my last company, one guy who worked on my team annoyingly cited this as an excuse time and time again. Okay, we were maintaining poorly written code, but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    "Didn't want to" is understandable, particularly when it's thousands of lines of vbscript weaving in and out of HTML.

    Not when something has to be done and I'm getting my arse kicked for it.

    And yes, I did do my fair share.

  • dkf (unregistered) in reply to dpm
    dpm:
    My question is, who has seen an *incredibly* stupid drop-down? What did it load?
    I have, and it was "all US 5-symbol ZIP codes". I decided that I didn't want to book at that particular hotel.
  • durnurd (unregistered) in reply to dpm

    What did it drop down?

    Yes No

  • (cs)

    "It's a big system. It uses classic ASP and an Access database to dynamically generate the on-screen components. Great idea, poor implementation."

    It's not often we see sarcasm in the actual OP, is it?

  • OfCourse (unregistered) in reply to durnurd

    I believe you mean:

    Yes No FILE_NOT_FOUND

    Clearly, this is an appropriate use of a drop down.

  • Dave (unregistered) in reply to Bobbo
    Bobbo:
    Craig F.:
    I didn't want to (or couldn't) delve into the classic ASP code

    At my last company, one guy who worked on my team annoyingly cited this as an excuse time and time again. Okay, we were maintaining poorly written code, but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    He got out of having to deal with old, dead, useless code and concentrate on .net. It might be annoying for whoever's left holding the baby, but that's their problem. Classic ASP is a crock, whereas .net has the advantage of being a nice environment with many well paid positions using it.

  • woohoo (unregistered)

    Looking at issues like that, one gets the impression that the above statement should not read

    "Why do it wrong when the right way is just as easy?"

    but rather

    "Why do it right when the wrong way is just as easy?"

    (Which is in fact near to a sarcastic german saying: "Warum einfach, wenn es umständlich auch geht?" = "Why keep it simple when you can do it long-windedly?")

    ;o)

  • (cs) in reply to dpm
    dpm:
    the drop-down year went from 1920 to 2005
    That's fairly stupid right there, having 86 items in a drop-down menu,
    ...and counting, thanks to the OP's code change.
  • (cs)
    "I laughed and breathed a sigh of relief that it would be easy to fix, and even called a co-worker over to share in my mirth. (...)"
    That's where it went wrong. It's your own fault. Only smirk when you are 100% sure you solved the problem.
  • m (unregistered) in reply to dpm

    http://thedailywtf.com/Articles/I_0x27_ll_take_94,249_please.aspx

    hundred thousand items enough?

  • (cs) in reply to A Nonny Mouse
    A Nonny Mouse:
    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...
    He cares because making the change to the wrong file means it won't have an effect in the place where the error occurs, and of course having seven slightly different files is even worse (though I would be really surprised if they were not already slightly different). Making the change in all files would be aiding and abetting code duplication. And he balks at doing the Right Thing (i.e. removing six of the duplicates) because even if they are really identical, you still have to find and fix all the places where the removed versions are referred, and if you miss something you just broke the app rather badly.
  • Tim B (unregistered)

    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

  • (cs) in reply to Bobbo
    Bobbo:
    Craig F.:
    I didn't want to (or couldn't) delve into the classic ASP code

    At my last company, one guy who worked on my team annoyingly cited this as an excuse time and time again. Okay, we were maintaining poorly written code, but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    Sometimes rewriting the code is faster than trying to understand it. Sometimes it's faster to add a quick fix or modification to the ugly code, but in time it will only get worse and again the overall time spent on it will be more than if it was just rewritten.

    I rewrite ASP/VBScript scripts that I "maintain" for my own sanity.

    You sound like one of the types whose code gets rewritten. :P

  • cod3_complete (unregistered)

    Ah yes this is just clbuttic: "2. Figure out which of the seven different (identical) files in the codebase is the one that is actually being used:" I've seen this kind of copy-paste crap on numerous projects myself. I guess this would've counted for code reuse if not for the fact that the CODE DIDN'T FRIGGIN' WORK! Sigh

  • SketchySteve (unregistered) in reply to brazzy
    brazzy:
    A Nonny Mouse:
    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...
    He cares because making the change to the wrong file means it won't have an effect in the place where the error occurs, and of course having seven slightly different files is even worse (though I would be really surprised if they were not already slightly different). Making the change in all files would be aiding and abetting code duplication. And he balks at doing the Right Thing (i.e. removing six of the duplicates) because even if they are really identical, you still have to find and fix all the places where the removed versions are referred, and if you miss something you just broke the app rather badly.

    I don't think brazzy was been being ironic there...

    I LOATH classic ASP and will do anything to avoid working with legacy code. VB is bad enough when not interspersed with horrible HTML, cos its always legacy code you can bet yer bottom dollar there will be nested tables and all sorts of other fun...

  • Minimalist360 (unregistered) in reply to Bobbo
    Bobbo:
    ... but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    Have you worked with ASP/VBScript? sometimes I'm convinced that the VBScript/asp guys figured out quantum computing years ago, but never figured out the way to make it deterministic. We always used JScript in ASP to avoid these quantum problems.

  • Blaksheep (unregistered)

    Incredibly stupid drop downs and what do they load?

    I deal with them all day in our interal WebApp.

    Dropdown for 150+ clients? Check.

    Dropdown for for 150+ employees? Check.

    Two dropdowns on the same page listing clients physical locations, one numerically and one textually, clocking in at 10,000 options each? Check.

    Yes, I'm serious on that last one. If you save off the HTML only version of that page once it's load, it's 3.8MB.

    No, I didn't write it and yes I'm ashamed it exists, but when you're maintaing an 10 year old system that's never been overhauled, these things happen.

    I cry at night. A lot. :)

  • James (unregistered) in reply to Bobbo
    Bobbo:
    Craig F.:
    I didn't want to (or couldn't) delve into the classic ASP code

    At my last company, one guy who worked on my team annoyingly cited this as an excuse time and time again. Okay, we were maintaining poorly written code, but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    I think there's an implied "...if I wanted to remain sane" at the end of the sentence, in which case his formulation is correct.

  • (cs) in reply to SketchySteve
    SketchySteve:
    brazzy:
    A Nonny Mouse:
    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...
    He cares because making the change to the wrong file means it won't have an effect in the place where the error occurs, and of course having seven .... snip ....

    I don't think brazzy was been being ironic there...

    sigh :) one day the sarcasm detectors will be turned on. one day.

  • (cs) in reply to Tim B
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    So? Thanks to the myriad of ongoing legislation in this area, the company has to deal with pretty much every reasonable permutation and possibility. Perhaps "Combined" isn't a great word, but is "Hermaphrodite" any better?

    My day job is with an insurance company. This kind of thing is standard.

  • (cs) in reply to Minimalist360
    Minimalist360:
    Bobbo:
    ... but the computer executes code in a linear manner so it can always be followed through.

    </rant>

    Have you worked with ASP/VBScript? sometimes I'm convinced that the VBScript/asp guys figured out quantum computing years ago, but never figured out the way to make it deterministic. We always used JScript in ASP to avoid these quantum problems.

    I did quite a lot of work with ASP/VBScript, and JScript as well. ColdFusion guys understood it right away, but if the concept of server-side code scattered throughout client-side code was new to you, then it took a bit of ramp-up to get it ("linear" is exactly what it wasn't). I could scan a jumbled mess of an ASP page and know exactly what was going on. And then .Net came along, with the code-behind concept, and in a flash all my knowledge of ASP was swept into obsolescence. Hazards of the job.
  • Shinobu (unregistered) in reply to woohoo

    Ah yes :-) we've got some similar sayings in Dutch as well. When I look around me, I get the impression that our entire society is constructed around them.

  • (cs) in reply to andrewbadera
    andrewbadera:
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    So? Thanks to the myriad of ongoing legislation in this area, the company has to deal with pretty much every reasonable permutation and possibility. Perhaps "Combined" isn't a great word, but is "Hermaphrodite" any better?

    My day job is with an insurance company. This kind of thing is standard.

    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?

  • GF (unregistered) in reply to xtremezone
    Sometimes rewriting the code is faster than trying to understand it. Sometimes it's faster to add a quick fix or modification to the ugly code, but in time it will only get worse and again the overall time spent on it will be more than if it was just rewritten.
    But how can you rewrite code successfully without first fully understanding what it does and why?
  • (cs) in reply to cod3_complete
    cod3_complete:
    Ah yes this is just clbuttic: "2. Figure out which of the seven different (identical) files in the codebase is the one that is actually being used:" I've seen this kind of copy-paste crap on numerous projects myself. I guess this would've counted for code reuse if not for the fact that the CODE DIDN'T FRIGGIN' WORK! *Sigh*

    This is how you tell the difference between an app that was developed on the command line versus through a GUI. When it's developed on the command line, at least the seven identical files tend to be in the same directory, with slightly different names (index.html, index-2.html, index.old.html...). With the GUI people will randomly copy all sorts of directories.

    What's sad is that sometimes this sort of thinking seems to pervade into their coding, and they think that having their program copy files all around is somehow better or easier than actually parsing the data in them, but that's a WTF for another day.

  • (cs) in reply to dpm

    I managed to prevent a 1000+ item list from being implemented with a little white lie:

    User: instead of having to type the ID in, can we have a drop down list to select from?

    Me: Technically yes, but it would be over 1000 items long and you couldn't select more than 1 item. So that would mean you couldn't input more than 1 ID at once.

    User: oh, ok, nevemind then.

    I'm pretty sure the user knew how many IDs there are, so conveniently forgetting about the multi-select list saved me.

  • (cs) in reply to A Nonny Mouse
    A Nonny Mouse:
    SketchySteve:
    brazzy:
    A Nonny Mouse:
    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...
    He cares because making the change to the wrong file means it won't have an effect in the place where the error occurs, and of course having seven .... snip ....

    I don't think brazzy was been being ironic there...

    sigh :) one day the sarcasm detectors will be turned on. one day.

    It seems unlikely, it really does. But don't give up hope.

  • Scott S. McCoy (unregistered)

    God the daily wtf sucks now. How did it happen that such a great site turned so crappy? All these articles sound surreal and fictional. It used to be that the DailyWTF was a serious DailyWTF -- it was some portion of code; sometimes with a minor back story; submitted by users.

    Now it sounds like some writer is sitting around trying to come up with these stories...and to be honest; they're whack. So story is fundamentally flawed, and when a candidate acts so poorly those of us who actually do interview people every day well know, you just send them home.

    Why don't you turn this back into more of a community site? Go back to posting the fucked up code we all find in our respective organizations and complaining about it. It was a lot more fun.

  • (cs) in reply to GF
    GF:
    Sometimes rewriting the code is faster than trying to understand it. Sometimes it's faster to add a quick fix or modification to the ugly code, but in time it will only get worse and again the overall time spent on it will be more than if it was just rewritten.
    But how can you rewrite code successfully without first fully understanding what it does and why?

    You can know what the application is meant to do without understanding the code, so long as you have specifications to go on.

    Getting the spec from a knowledgeable BA and starting a fresh could be easier than trying to understand and modify the code in some circumstances.

  • (cs) in reply to FredSaw
    FredSaw:
    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?

    How about a "None" option in case your name was Bobbitt ?

  • Craig F (unregistered) in reply to Scott S. McCoy
    Scott S. McCoy:
    God the daily wtf sucks now. How did it happen that such a great site turned so crappy? All these articles sound surreal and fictional. It used to be that the DailyWTF was a serious DailyWTF -- it was some portion of code; sometimes with a minor back story; submitted by users.

    Now it sounds like some writer is sitting around trying to come up with these stories...and to be honest; they're whack. So story is fundamentally flawed, and when a candidate acts so poorly those of us who actually do interview people every day well know, you just send them home.

    Why don't you turn this back into more of a community site? Go back to posting the fucked up code we all find in our respective organizations and complaining about it. It was a lot more fun.

    I read this site every day. And I'll be honest - I've been tempted to write crap about this particular system several times before. But the Year(Date) thing just seemed so obvious that I couldn't keep it to myself anymore. In any event - not cooked up, I wasn't just sitting around looking for a something to submit :).

    The "can't" thing is because of how the system is put together. Because all of the UI components are generated from database rows, which means even adding a simple label is an effort that could take a couple hours. Now if the user wants more than a label...

    In good news, I found out just last Thursday that this system is being taken down for good. The users asked for some changes and we finally asked the (hundred) million dollar question:

    "What does this system do that an Excel spreadsheet can't?"

    They thought about it for a month and then decided the answer was "nothing".

    Thanks for laughing with me :)

  • (cs) in reply to FredSaw
    FredSaw:
    andrewbadera:
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    So? Thanks to the myriad of ongoing legislation in this area, the company has to deal with pretty much every reasonable permutation and possibility. Perhaps "Combined" isn't a great word, but is "Hermaphrodite" any better?

    My day job is with an insurance company. This kind of thing is standard.

    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?

    "Unknown" could mean that the person filling out the form (who might not be the subject of the question) doesn't know the gender of the person. Or the subject could be a business, not a person.

    "Other" could refer to someone whose 23rd chromosome is XXY (Klinefelter syndrome) rather than XX or XY. There are lots of possible answers. FTM and MTF Transsexual could also be listed.

    In most software applications, who cares what the gender of the person is (other than doctors)? What does it affect?

    Is the database asking for the gender the person was born with, the gender the person has transitioned to, or the gender the person feels is most natural? The biological or the emotional gender? And again, who cares?

    The question should generally not be asked.

    I say this as a male who was born a male and is happy to be a male!

  • some random lurking Grue (unregistered)

    On this subject, I have two things to say. Xyzzy and Plugh.

  • Ken B (unregistered) in reply to FredSaw
    FredSaw:
    andrewbadera:
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    So? Thanks to the myriad of ongoing legislation in this area, the company has to deal with pretty much every reasonable permutation and possibility. Perhaps "Combined" isn't a great word, but is "Hermaphrodite" any better?

    My day job is with an insurance company. This kind of thing is standard.

    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?
    What about trans-gender? Also, "other" implies "known, but none of the above", which is not the same as "unknown".

  • Jay (unregistered) in reply to A Nonny Mouse
    A Nonny Mouse:
    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...

    Q: What's worse than seven identical program files, and you have to figure out which one is actually used?

    A: Seven ALMOST-identical program files, all seven called from one place or another, and now you're told that you have to make a change. Try figuring out how to make the same change to seven almost-but-not-quite identical programs.

    Every time this happens to me -- and it's at least once a week -- I cry inside.

  • Paul (unregistered) in reply to dpm
    dpm:
    the drop-down year went from 1920 to 2005
    That's fairly stupid right there, having 86 items in a drop-down menu, but I'm sure we've all seen much worse. My question is, who has seen an *incredibly* stupid drop-down? What did it load?

    An inhouse CMS that read a 30,000 row table from the db and displayed all the unique integers IDs twice, in two separate drop-downs ... the page took several minutes to display and was updated on any change to any of the fields on the page, including selecting any of the items in the drop down ... not only that, the db was queried and the 30,000 rows retrieved anew on every refresh.

    Do I win anything?

  • Paul (unregistered) in reply to Jay
    Jay:
    A Nonny Mouse:
    if the files are identical, why does Craig care which one is used? a fine example of code re-use and he balks...

    Q: What's worse than seven identical program files, and you have to figure out which one is actually used?

    A: Seven ALMOST-identical program files, all seven called from one place or another, and now you're told that you have to make a change. Try figuring out how to make the same change to seven almost-but-not-quite identical programs.

    Every time this happens to me -- and it's at least once a week -- I cry inside.

    You using PHP then?

    Last time I worked with PHP, I had to maintain code like that. With multiple levels of includes (I once had to dig through SEVEN levels of includes to find the file I needed to change), identically named files and functions that did different things or worse, similar things, multiple instances of cut-and-paste, single letter variable names, HTML and PHP code intermingled.

  • Yep (unregistered) in reply to Tim B
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    This is missing: Yes No FILE_NOT_FOUND

  • sf (unregistered) in reply to FredSaw
    FredSaw:
    andrewbadera:
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    So? Thanks to the myriad of ongoing legislation in this area, the company has to deal with pretty much every reasonable permutation and possibility. Perhaps "Combined" isn't a great word, but is "Hermaphrodite" any better?

    My day job is with an insurance company. This kind of thing is standard.

    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?
    For that matter, if someone is "unisex" what choices are there other than either male or female? Unless that's equivalent to "unknown" but we're sure they're not a hermaprodite.

    I must know what kind of application this is. Please tell us.

  • (cs) in reply to sf
    sf:
    I must know what kind of application this is. Please tell us.
    Possibly a visa application for alien lifeforms.
  • clbuttic (unregistered) in reply to sf

    Gender as it relates to clothing / products in a store? This could also be a bitmask.

    Unknown - person entering doesn't know - reports can flag unknown items. Unisex - product is for both sexes, but not preferenced for either sex Combined - product comes in specific male and female versions (pink v. blue) Other - it's not unknown, but it's not unisex either. Think camping supplies like a tent.

    [Flags] 
    enum ProductGender
    {
      Unknown = 0,
      Male = 1,
      Female = 2,
      Combined = Male | Female,
      Other = 4
    }
    

    Sure, it's a tad convoluted, but just because you don't grok the reason, doesn't mean there it's a WTF, but it's possibly a stakeholder WTF.

  • (cs) in reply to pitchingchris
    pitchingchris:
    FredSaw:
    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?

    How about a "None" option in case your name was Bobbitt ?

    That would be "Neither", oh wait, "Neuter"

  • Manic Mailman (unregistered) in reply to FredSaw
    FredSaw:
    andrewbadera:
    Tim B:
    Here's one in our app:

    Gender

    Unknown Male Female Unisex Combined Other

    So? Thanks to the myriad of ongoing legislation in this area, the company has to deal with pretty much every reasonable permutation and possibility. Perhaps "Combined" isn't a great word, but is "Hermaphrodite" any better?

    My day job is with an insurance company. This kind of thing is standard.

    If hermaphrodite is covered by "combined" and there is also an "unknown" option, then what is indicated by "other"?

    goatse?

Leave a comment on “Seven Twisty Little Code Files, All Alike”

Log In or post as a guest

Replying to comment #:

« Return to Article