The WTFs that turned out not to be WTFs


  • Banned

    My relationship with The Daily WTF has always been a little rocky, since it's more of a "point fingers and laugh because lulz" than "actually help fix the problem" site.

    As I said in my guest article.

    But what really gets me is the idea that some things which seem like WTFs.. on a long enough timeline, turn out not to actually be WTFs. Sometimes I think this industry is actually powered by doing the stupidest thing that could possibly work. Like.. for real. Not joking.

    So, here's my challenge: which WTFs do you think, in hindsight, are actually defensible?


  • Banned

    I'll go first.

    My vindication came when we were in a meeting trying to figure out how to make a Delphi- SQL 7.0 e-commerce system in Iowa talk to a JD Edwards AS/400 backend system in Massachusetts for real-time inventory data and sales tax figures. This guy listened to us discuss the complexities of making these two highly disparate systems talk to each other in a meaningful and efficient way. He wanted to contribute his expertise so he waited for the perfect time to jump in with his $.02.

    "Have you tried JavaScript?"

    That sentence instantly became part of our corporate folklore. His solution to everything was "Have you tried.JavaScript?" It was apparently the only buzzword he picked up before coming to work for us.

    Oh, how we laughed about this back in 2005. I thought it was hilarious too. What a moron this guy was! He doesn't know anything about programming!

    And now, guess what's being re-written in JavaScript? Pretty much everything. Node, V8, insanely fast and getting faster every second JS in browsers and mobile devices..

    So stop and consider for a minute. This "straight shooter for upper management" from 2005 .. if you teleported him 10 years into the future .. was actually.. right.

    (pssst.. Discourse is a JavaScript app, too. It doesn't serve HTML, it literally draws the entire page via JavaScript every time you click on something. Try viewing source.)



  • @codinghorror said:

    Oh, how we laughed about this back in 2005. I thought it was hilarious too. What a moron this guy was! He doesn't know anything about programming!

    And now, guess what's being re-written in JavaScript? Pretty much everything. Node, V8, insanely fast and getting faster every second JS in browsers and mobile devices..

    I must have missed JavaScript's built-in makedelphitalktoas400() that makes this not complex to make the systems talk to each other in a meaningful and efficient way.



  • @codinghorror said:

    pssst.. Discourse is a JavaScript app, too. It doesn't serve HTML, it literally draws the entire page via JavaScript every time you click on something. Try viewing source.

    Well some would argue that that doesn't really prove your point.
    Also, you really need to stop citing software you yourself have written as support for your arguments.



  • @dtech said:

    you really need to stop citing the software you yourself have written

    And the articles he wrote.


  • ♿ (Parody)

    @dhromed said:

    And the articles he wrote.

    I think that's a fine rhetorical technique. They're the ones he'll be most familiar with, after all.

    Still, I think the "Let's use javascript" is about as useful as, "Let's use XML." I don't see how that wasn't a WTF.

    But "Doing the stupidest thing that could possibly work" sounds like a reasonable description.



  • @boomzilla said:

    But "Doing the stupidest thing that could possibly work" sounds like a reasonable description.

    "Doing the stupidest thing that could possibly work" describes either the content or the subject of pretty much every discussion on this forum.


  • ♿ (Parody)

    One I remember is The Land Before DateTime Functions...

    Actually, the idea of a Calendar table makes a lot of sense. Here's the "standard" table I insert into quite a many databases I work with...

    CREATE TABLE [Calendar](
        [Date] DATETIME NOT NULL,
        [Weekday_Indicator] CHAR(1) NOT NULL,
        [Holiday_Indicator] CHAR(1) NOT NULL,
        [Year] SMALLINT NULL,
        [Quarter] TINYINT NULL,
        [Month_Number] TINYINT NULL,
        [Day_Of_Month_Number] TINYINT NULL,
        [Day_Of_Week_Number] TINYINT NULL,
        [Day_Of_Year_Number] SMALLINT NULL,
        [Month_Name] VARCHAR(9) NULL,
        [Day_Name] VARCHAR(9) NULL,
        [Week_Number] TINYINT NULL,
        CONSTRAINT [PK_Calendar] 
        PRIMARY KEY ([Date])
    )
    

    I'll also include a Numbers table as well...

    CREATE TABLE [Numbers] (
        [Number] INT NOT NULL,
        PRIMARY KEY ([Number])
    )
    

    Both might seem like WTFs on the surface, but they are pretty important in a lot of reporting queries.



  • @codinghorror said:

    (pssst.. Discourse is a JavaScript app, too. It doesn't serve HTML, it literally draws the entire page via JavaScript every time you click on something. Try viewing source.)

    The software we've all been incessantly complaining about for the past week runs on Javascript? That argument will sure convince people.

    Also the fact that it's the only language you can even write web apps in.



  • @apapadimoulis said:

    Actually, the idea of a Calendar table makes a lot of sense. Here's the "standard" table I insert into quite a many databases I work with...

    Isn’t there a better way to do this? I know next to nothing about databases, but that still does not seem to make a lot of sense…



  • @apapadimoulis said:

    Both might seem like WTFs on the surface, but they are pretty important in a lot of reporting queries.

    Holiday I can understand, but why would you want the other columns? Doesn't your database have datetime functions for the others which you can use to JOIN/SELECT/WHERE on?
    Functions don't run out, don't take up space and are probably faster (albeit that depends on the use-case). Quarter can be a user-defined function.

    And I really don't see a use for the numbers table.

    Can you provide example queries? Purely out of interest.


  • ♿ (Parody)

    The easiest scenario to illustrate is the "filling in the gaps" problem. Consider a table that stores user book ratings. How do you get a count of the different ratings (1-10) for a particular book?

    Most developers will do this...

    SELECT [Rating_Score]
           [Rating_Count] = COUNT(*)
      FROM [Ratings]
     WHERE [Book_Id] = @BookId
     GROUP BY [Rating_Score]
    

    If there were no "5" ratings, then there will be no row for (5,0). You could fill in the gap using some front-end code (which will probably be cumbersome and akward), or just do this:

    SELECT [Rating_Score]
           [Rating_Count] = COUNT([Rating_Score])
      FROM [Numbers] 
           LEFT  JOIN [Ratings]
                   ON [Rating_Score] = [Number]
     WHERE [Book_Id] = @BookId
       AND [Number] BETWEEN 1 AND 10
     GROUP BY [Rating_Score]
    

    Simple example, and as things get more complex this becomes quite a valuable table.

    @dtech said:

    Quarter can be a user-defined function.

    Yes, but then your index becomes somewhat pointless. Consider, Quarterly Sales for a given range:

    SELECT [Year_Number] = DATEPART(year,[Order_Date]), 
           [Quarter_Number] = DATEPART(quarter,[Order_Date]), 
           [Sales_Total] = SUM([Order_Amount])
      FROM [Orders]
     WHERE DATEPART(year,[Order_Date]) BETWEEN @FromYear AND @ToYear
     GROUP BY DATEPART(year,[Order_Date]),
              DATEPART(quarter,[Order_Date])
    

    Compare it to this, which has better index usage and also fills in the gaps:

    SELECT [Year_Number] = [Calendar].[Year]
           [Quarter_Number] = [Calendar].[Quarter]
           [Sales_Total] = SUM([Order_Amount])
      FROM [Calendar] 
           LEFT JOIN [Orders]
                  ON [Order_Date] BETWEEN [Date] AND [Date] + 1
     WHERE [Calendar].[Year] BETWEEN @FromYear AND @ToYear
     GROUP BY [Calendar].[Year], [Calendar].[Quarter]
    

    So... convenience and performance.


  • ♿ (Parody)

    @ben_lubar said:

    "Doing the stupidest thing that could possibly work" describes either the content or the subject of pretty much every discussion on this forum.

    No, a lot of stuff around here is too stupid (or awesome, depending) to work. Wait until you get out of school, you'll see.


  • BINNED

    @VinDuv: Think "snowflake"… and DW reporting.

    @dtech: A large number of those columns are not "regular" and/or allow you to enforce consistency between various platforms some of which use ISO numbering (isoweek, isoday) and some which don't. Examples of non-regularity are:
    company fiscal year switches from Apr-Mar w/ 13 reporting periods to Jan-Dec w/ 12... All the quarters will change. Some companies have non regular "months" ( all months are exactly 28 days except 1 which picks up all the "slack" days...), Christmas and Black Friday may be their own fiscal periods, the company may be seasonal and certain months are simply collapsed together in a "mega-month", and so on.

    I've seen some rather creative fiscal reporting periods, and a calendar table is quite useful. The same with a "numbers" table. I usually have it contain the numbers from 0→9 and use it to produce number sequences for pivot queries.


  • Considered Harmful

    A CTE could stand in for the numbers table here, or a table-valued function.


  • BINNED

    A CTE can certainly be used, but if you create a CTE for this more than once… enable "code reuse" by persisting that CTE as a real table or materialized view. It is also common in many situations to have authority for "CREATE TABLE", but "CREATE FUNCTION" may not be allowable. Now Postgresql has a generate_series() function, Oracle has "CONNECT BY", for built in SRFs -- but those are by their very nature nonportable so the table based version is preferable.



  • @codinghorror said:

    which WTFs do you think, in hindsight, are actually defensible?

    It's pretty clear that this is a last-ditch attempt at making us all project ourselves forward five years, to a hypothetical future where no cure has been found for the everything-is-a-phone brain worms, and imagine looking back and saying "well, you know, since everything does run on infinite scrolling now, I guess we were all just being a little reactionary back then".

    Guess what?

    Won't work. Infinite scrolling? DO. NOT. WANT.



  • Excellent point!



  • @apapadimoulis said:

    So... convenience and performance.

    I still see those things as something that should come built-in with an explicit interface. If the correct way to do something usual in a programming language is the weird way, the language is flawed IMO.

    Not that this is uncommon, though: for instance, starting a subprocess and reading its output from a C program on Unix derivatives is quite a common task, but the actual correct solution is much more complicated than it should be.



  • @codinghorror said:

    Have you tried JavaScript?
    That sentence instantly became part of our corporate folklore. His solution to everything was "Have you tried.JavaScript?" It was apparently the only buzzword he picked up before coming to work for us.

    I tried JavaScript, once. It made me want to rape and kill.



  • @da_Doctah said:

    I tried JavaScript, once. It made me want to rape and kill.

    I hear if you try more than 3 JavaScripts at the same time you can die from alcohol blood poisoning.


  • Considered Harmful

    @da_Doctah said:

    I tried JavaScript, once. It made me want to rape and kill.

    Javascript, SQL, and XSLT are all languages I initially loathed. In all three cases, I eventually found out the friction was coming from my stubbornly trying to force a paradigm I was familiar with into a place it didn't fit. Once you learn to code with instead of against the languages, you can see that each of them has their own elegance, each looks at the task totally differently and is uniquely suited to solving different classes of problem.


  • Banned

    I am with you on JS and SQL, but XSLT is a pretty bad idea in general, even after a few years of hindsight.


  • Considered Harmful

    @codinghorror said:

    I am with you on JS and SQL, but XSLT is a pretty bad idea in general, even after a few years of hindsight.

    1.0 was half-baked. 2.0 is great. It is not good on the client-side. It is unparalleled for the task it was designed for: transforming an XML document into another document.

    Seriously, it's the most powerful way to process an XML document (an admittedly niche task). I only used it for about a year, but I was able to address some extremely tricky scenarios, more quickly than I could with a less specialized language like C# (which I've been using continually since 2001).


  • ♿ (Parody)

    @error said:

    Once you learn to code with instead of against the languages, you can see that each of them has their own elegance, each looks at the task totally differently and is uniquely suited to solving different classes of problem.

    Fuck that. FORTRAN all the way down.



  • @ben_lubar said:

    I hear if you try more than 3 JavaScripts at the same time you can die from alcohol blood poisoning.

    That was a disgusting way to start my morning.

    Filed under: Note to self: NEVER follow any link posted by Ben.


  • Discourse touched me in a no-no place

    Pretend it is a squirrel picture instead.



  • Subtracting all the embellishments that we've come to expect from wtf, the core of this story is:

    • Experienced programmer mentors newb
    • Newb becomes prolific programmer, ends up more successful than previous mentor
    • Previous mentor becomes increasingly bitter, fantasizes about submitting resignation

    Choosing to make the antagonist female just allowed the readers here to reveal themselves for the misogynistic jerks they truly are.

    Jeff, I completely agree with you: tdwtf is a fundamentally bad concept, the community here is a terrible, dysfunctional old-boys club, and it is time for the site to die.



  • @Buddy said:

    Choosing to make the antagonist female just allowed the readers here to reveal themselves for the misogynistic jerks they truly are.

    Ask yourself this: Is a female antagonist more or less sexist than a male antagonist?

    The answer is that the question doesn't make any sense.


  • Considered Harmful

    @ben_lubar said:

    Ask yourself this: Is a female antagonist more or less sexist than a male antagonist?

    The answer is that the question doesn't make any sense.

    Misandry is socially acceptable, misogyny is not.


    Filed under: Misandry is not even in the Firefox spell checker.



  • @ben_lubar said:

    the question doesn't make any sense

    I didn't say that choosing a female antagonist was sexist

    @Buddy said:

    ...just allowed the readers here to reveal themselves for the misogynistic...

    but that YOU are

    @error said:

    Misandry


  • Banned

    @Buddy said:

    Jeff, I completely agree with you: tdwtf is a fundamentally bad concept, the community here is a terrible, dysfunctional old-boys club, and it is time for the site to die.

    Pretty sure I never said that. Pretty, pretty, pretty, pretty sure. Pretty sure.


  • ♿ (Parody)

    @Buddy said:

    Choosing to make the antagonist female just allowed the readers here to reveal themselves for the misogynistic jerks they truly are.

    Not sure if serious or not, but the "having a female character" is a common complaint (antagonist or protagonist). It's almost as common as the complaint that we don't feature any women in our stories.



  • @codinghorror said:

    I never said that.

    Oh, sorry. From the way people were acting, I just assumed...

    @apapadimoulis said:

    Not sure if serious or not, but the "having a female character" is a common complaint

    Seems like having female contributors would be a more important issue.



  • @Buddy said:

    Seems like having female contributors would be a more important issue.

    And female users.


  • ♿ (Parody)

    @ben_lubar said:

    Ask yourself this: Is a female antagonist more or less sexyist than a male antagonist?

    FTFY


  • BINNED

    @Buddy said:

    Choosing to make the antagonist female just allowed the readers here to reveal themselves for the misogynistic jerks they truly are.

    I'm sure this site has its share of misogynists, but you have to remember that the site is full of trolls, and feminists are very good troll bait. As for us being jerks, I don't think anyone here will dispute that point.

    Or are you one of those people who think that anyone who isn't a feminist is therefore a misogynist?


  • Considered Harmful

    @codinghorror said:

    Pretty sure I never said that. Pretty, pretty, pretty, pretty sure. Pretty sure.

    You are almost certain @codinghorror said that.



  • This is what Scott Hanman said:

    Small bug: I wanted the video to start at 17: 53. Looks like this course is not oneboxing that part.

    Scott Hanselman, "Virtual Machines, JavaScript and Assembler" - Fluent 2014 Keynote – [17:53..25:57] 25:57
    — O'Reilly



  • @Nagesh said:

    Small bug: I wanted the video to start at 17: 53. Looks like this course is not oneboxing that part.

    Yes, it's only picking up the 17, not the 53.
    <iframe width="480" height="270" src="//www.youtube.com/embed/UzyoT4DziQ4?feature=oembed&wmode=opaque&start=17" frameborder="0" allowfullscreen>

    The raw looks ok:
    Scott Hanselman, "Virtual Machines, JavaScript and Assembler" - Fluent 2014 Keynote – [17:53..25:57] 25:57
    — O'Reilly


  • :belt_onion:

    @oesor said:

    codinghorror said:

    Oh, how we laughed about this back in 2005. I thought it was hilarious too. What a moron this guy was! He doesn't know anything about programming!
    And now, guess what's being re-written in JavaScript? Pretty much everything. Node, V8, insanely fast and getting faster every second JS in browsers and mobile devices..

    I must have missed JavaScript's built-in makedelphitalktoas400() that makes this not complex to make the systems talk to each other in a meaningful and efficient way.

    @codinghorror's topic would be a pretty decent one... if he hadn't picked an article that is still very clearly a WTF to anyone who has ever used an AS400 system (and maybe Delphi too, but I've no experience there).


  • Banned

    Another oneboxing bug. Long, long story -- @eviltrout will fix tomorrow, we loves us some YouTube!



  • @apapadimoulis said:

    Not sure if serious or not, but the "having a female character" is a common complaint (antagonist or protagonist). It's almost as common as the complaint that we don't feature any women in our stories.

    Solve it all by making the characters androgynous.

    "Sam and Alex were at their desks when they each started receiving alert emails."



  • @Buddy said:

    Seems like having female contributors would be a more important issue

    For tl;dr: TDWTF isn't being sexist by not having female contributors. It isn't our fault that so few women work in computer related fields!

    I don't know about @apapadimoulis , but I personally couldn't care less about the gender of the contributors. Let's put this in perspective:

    IT fields are primarily male dominated. It's not that men are trying to keep the women out, that just happens to be the way it is. I remember in my college classes that there were rarely any women in my classes. My school didn't limit who could join the IT programs, so I can only figure it must have been because men tend to be interested in IT fields more often than women.

    Since I started working in IT about 15 years ago, out of the dozens of IT professionals I've worked with, only 1 has been female. And I hired her. And you know what else? She's is the only female candidate I have ever even received a resume for - and I've reviewed at least a hundred resumes in my time as a team lead. [Before you ask, I didn't hire her because she's a woman, I hired her because she was qualified for the position.]

    Then there's this report from the National Science Foundation, which shows that the women seeking a BS in Computer Sciences (from what I can find, this encompasses many computer related fields, the main focus here at TDWTF) actually dropped from about 30% of the total to less than 20% of the total between 1991 and 2010. So women are actually seeking degrees in computer related fields less frequently than 20 years ago!

    Since there are already few women in computer fields, and fewer women are pursuing such careers, how many women do you think are likely to visit, let alone contribute, to TDWTF? I'm sure if a woman were to contribute a story, and Alex and his team thought it was entertaining enough, it would get published.

    I honestly don't understand why so many people get stuck on the gender of the characters. I've seen stories here where the antagonist was female. I've seen stories where the protagonist was female. About the only thing I haven't seen is a story where every character was female. But then, based on the information I've already given, that would probably be unrealistic. In the end who cares? They're all just characters, so get over it.


  • Considered Harmful

    @abarker said:

    I honestly don't understand why so many people get stuck on the gender of the characters. I've seen stories here where the antagonist was female. I've seen stories where the protagonist was female. About the only thing I haven't seen is a story where every character was female. But then, based on the information I've already given, that would probably be unrealistic. In the end who cares? They're all just characters, so get over it.

    Honestly I care less about the gender and more that characters tend to be 1-dimensional. Oh, Bob is aggressively stupid and Pam mixes up all the terminology and Stewart is trying to sabotage his coworkers, luckily Joe was there to save the day! (Joe promptly gets fired or quits.)


    Filed under: I'm offended by bad writing.



  • @error said:

    more that characters tend to be 1-dimensional

    To be fair it is hard to make a multi dimensional character if your story is like 3 paragraphs long.



  • @locallunatic said:

    To be fair it is hard to make a multi dimensional character if your story is like 3 paragraphs long.

    True. From what I remember about creative writing from High School English, somewhere back in the Jurassic era, short short stories (a.k.a. flash fiction) are the most difficult form in which to write, because of the limited opportunity for character development, motivation, etc. Given that almost all TDWTF articles are of such short length, this is a good reason for the editors to focus on the WTF instead of the made-up characters and situations.


  • ♿ (Parody)

    @abarker said:

    She's is the only female candidate I have ever even received a resume for - and I've reviewed at least a hundred resumes in my time as a team lead

    "Not having any female applicants is no excuse for not hiring any women" --> I've actually heard that in serious, in-person discussions. The guy who said it wasn't trolling, just a hardcore geek feminist.

    @abarker said:

    I honestly don't understand why so many people get stuck on the gender of the characters.

    I've had a handful of conversations about it over the years, especially when I get called out a lot on how sexist Paula Bean is, or this character, or that character. It has something to do with perpetuating ditsy female tropes, or the bossy tropes, or the "one of the guys" tropes, or some other trope I've never heard of.

    My understanding of their POV is that the "inequality" in tech is inherently bad. It's also a reason why so few women are going into tech, and that we need be proactive about making it a more female non-cis-hetero-male-friendly industry?

    There may be some real issues, but I can't see what they are thru all the geek ultrafeminists "no boob or dick jokes" noise.



  • @apapadimoulis said:

    My understanding of their POV is that the "inequality" in tech is inherently bad.

    That's why all of their C++ programs contain this:

    inline bool operator==(void*, void*) { return true; }
    

  • Discourse touched me in a no-no place

    @apapadimoulis said:

    My understanding of their POV is that the "inequality" in tech is inherently bad.

    But without a wider pool of applicants, it's hard to fix. You can't hire those who don't want the job, and shouldn't hire those who can't do it. (Alas, that second part is ignored too often.) It's possible to stamp out much of the asshole-ishness, but fundamental inequalities — in this case, coupled to the general lack of women in STEM careers — are difficult to resolve. I'm guessing that there are cultural problems and education problems that initially restrict the pool hard, and most tech organisations aren't in a position to fix that sort of thing.


Log in to reply