Is there a site like Daily WTF that explains why it's a WTF?



  • Hi I am new to The Daily WTF and also relatively new to programming.

    About 1/2 the time I understand the issue with a Daily WTF post (still have been reading as many as I can over the past month)

    Even though I'm not an experienced programmer that can 'get' the joke I figure it is good to learn mistakes to avoid, if I can.

    The webcomic Xkcd sometimes has esoteric jokes and so there is a companion site called "xkcdexplained". I don't think there is anything like that for The Daily WTF but if there was I would spend oodles of time there. where should I go if I want something like that?



  • We have comments. If you don't understand something, ask! Most people don't know every technology that gets discussed around here. An honest question usually gets a reasonable answer.

    Oh, and welcome!



  • thanks and hello!



  • @boomzilla said:

    An honest question usually gets a reasonable answer.

    And quite a few totally unreasonable ones, to be fair.



  • Jeffed to Meta considering this is a meta question, albeit about the mainsite -- if you feel like it belongs in General instead, move it or just flag this post with a PM-flag if you're not a TL3 :)


  • Discourse touched me in a no-no place

    @tarunik said:

    if you feel like it belongs in General instead

    Was thinking of creating a general/generic 'Help' category earlier (and sticking Coding Help in there) prompted largely by that HDD/Windows/moving laptop question...



  • Welcome! And as @boomzilla said, just ask!



  • Can anyone explain how one would "fix" the code example in this submission and why it's bad?


  • Discourse touched me in a no-no place

    @astralkitty2501 said:

    Can anyone explain how one would "fix" the code example in this submission and why it's bad?

    May be better asking in the topic for that one (presuming it hasn't already been addressed)...

    https://what.thedailywtf.com/t/patterned-after-success/50163


  • mod

    Why is it bad? What happens when you call the constructor?

    The classic singleton pattern is more like

    public class SingletonSmtpClient
        {
            private static SmtpClient _smtpClient;
    
            private SingletonSmtpClient(string host, string user, string password, bool ssl)
            {
               
            }
    
            public static SmtpClient getInstance()
            {
                   if (_smtpClient == null)
                {
                    _smtpClient = new SmtpClient();
                    _smtpClient.Credentials = new System.Net.NetworkCredential(user, password);
                    _smtpClient.EnableSsl = ssl;
                    _smtpClient.Host = host;
                }
                    return _smtpClient;
            }
        }
    


  • @boomzilla said:

    We have comments. If you don't understand something, ask! Most people don't know every technology that gets discussed around here. An honest question usually gets a reasonable answer.

    Oh, and welcomeif you voted for Obama I will hound you until the day I die!

    Come on, let's be honest.



  • I moved 2 posts to a new topic: General Help Category

    Better to talk about this stuff outside of this topic.



  • That's not exactly true. I'll stop once you're dead, too.



  • Could you kindly explain to this slow old tortoise where the block controlled by if (_smtpClient == null) in your example code gets its user, password, ssl and host values from?


  • mod

    Magic :smile:

    Nah, I obviously did a shit job editing, but you get the idea



  • Obviously, they're hardcoded in "constants.h".



  • @Kian said:

    Obviously, they're hardcoded in "constants.h".
    Hey, don't knock it. That's a reasonable choice for something running on an embedded device with no file system.

    You also get comments like this.



  • You all seem really nice. Sorry I don't understand where to post things yet!



  • @astralkitty2501 said:

    You all seem really nice.

    You'll learn.


  • mod

    @astralkitty2501 said:

    Sorry I don't understand where to post things yet!

    You'll learn that, too.



  • I used to read the Daily WTF for the same reasons you do when I was a junior developer. I hoped to learn about other people's mistakes, so I don't make them too. Instead, I learned that developers (including most of the ones here) are the real wtf and to switch to another field that takes advantage of my real skills.

    RUN!!



  • Half of my reason for accepting my current job was that, if it went as bad as some of the flags would have seemed to indicate, it would make a fun story for this site.

    Turns out I like it here. The stories here are still useful, though.


  • Winner of the 2016 Presidential Election

    All these people here have been lying to you! What actually has to happen is that you go into the comment section and complain very vocally that the author / submitter is an idiot / TRWTF. And continue to randomly explain why something can not be a :wtf:. That way all the other idiots/TRWTFs will come forth and explain to you very nicely why something is indeed stupid and if you are lucky more writers include that into their story!

    Also don't forget to make Hanzo references every once in a while!

    Filed Under: Though maybe I am lying to you as well!


  • Discourse touched me in a no-no place

    @Kuro said:

    What actually has to happen is that you go into the comment section and complain very vocally that the author / submitter is an idiot / TRWTF. And continue to randomly explain why something can not be a . That way all the other idiots/TRWTFs will come forth and explain to you very nicely why something is indeed stupid and if you are lucky more writers include that into their story!

    Sounds like the Linux troubleshooting approach. :trolleybus:


  • Winner of the 2016 Presidential Election

    The Linux trouble shooting approach according to that linux I had on this laptop for a day (see the other topic) is apparently to make me submit a report a bug in the kernel with the error message "ooops" or something... I mean, sure it has other information in it. But the actual message is ooops. I should probably take a screenshot next time I see it but I just couldn't believe it.

    Filed Under: Also, troubleshooting Linux is just using a lot of google and copy pasting. :trollface:



  • I hear they changed that oops message to SORRY!

    Reference for our new-here OP:
    https://what.thedailywtf.com/t/enlightened/8795?u=boomzilla


  • Discourse touched me in a no-no place

    @Kuro said:

    The Linux trouble shooting approach according to that linux I had on this laptop for a day (see the other topic) is apparently to make me submit a report a bug in the kernel with the error message "ooops" or something...

    You're Doing it Wrong™. The correct approach is to go on a Linux forum and claim that Linux sucks because whatever you're trying to do is impossible. For a faster response, add a claim that you've been doing sysadmin/programming for 20 years and cite that as further proof that Linux is impossible to use for mortals. :trollface:



  • The Good Ideas Thread is :arrows:


  • Winner of the 2016 Presidential Election

    @antiquarian said:

    For a faster response, add a claim that you've been doing sysadmin/programming for 20 years and cite that as further proof that Linux is impossible to use for mortals.

    Brown-nosing people you need help from has always been helpful! Unless you are on TDWTF article comments (see how I tried to rerail the topic here?) in which case the opposite approach is the best!

    Filed Under: Obviously that is because you guys are so awesome! :trollface:


  • Discourse touched me in a no-no place

    @Kuro said:

    @antiquarian said:
    For a faster response, add a claim that you've been doing sysadmin/programming for 20 years and cite that as further proof that Linux is impossible to use for mortals.

    Brown-nosing people you need help from has always been helpful! Unless you are on TDWTF article comments (see how I tried to rerail the topic here?) in which case the opposite approach is the best!

    Filed Under: Obviously that is because you guys are so awesome! :trollface:

    Actually, I meant more to imply that Linux is impossible to use, not that it's usable by gods. I made a small correction.


  • Discourse touched me in a no-no place

    @Kuro said:

    Also don't forget to make Hanzo references every once in a while!

    Yeah. Don't forget, just don't do it.


  • mod

    @FrostCat said:

    @Kuro said:
    Also don't forget to make Hanzo references every once in a while!

    Yeah. Don't forget, just don't do it.

    Did you lose your copy of The Book of Five Rings?



  • Here you get a "didn't get the joke" badge for your efforts. We are a little different.

    Seriously though, it's fine not to get every WTF. Hell, occasionally I don't get the WTF I'm writing an article on. Usually we try to do the explanation in the article if something is more esoteric.

    Other than that, it'll come to you.

    (and for the singleton - what happens if you call the constructor (which you can do, since it's public)? You get an uninitialized object, and the static field gets initialized - so the only way to use the object is to create an instance with new, then not use that instance)


  • Discourse touched me in a no-no place

    @Maciejasjmj said:

    (and for the singleton - what happens if you call the constructor (which you can do, since it's public)? You get an uninitialized object, and the static field gets initialized - so the only way to use the object is to create an instance with new, then not use that instance)

    Indeed, it's a perfect example of WTF as someone looked at a design pattern that's usually a Bad Idea in the first place (Singleton has a lot of people advising against it for all sorts of good reasons), didn't understand the pattern, applied it to somewhere inappropriate (does more than one server exist? Oh yes…) and in the process fucked up even that. It's wrong on wrong on wrong on wrong, and the net effect of all that probably makes the rest of the program it is in horribly wrong too. The only way to make it worse would be to make it fail to compile, but the computer can point that out for you.

    Classic. :smile:



  • @dkf said:

    The only way to make it worse would be to make it fail to compile,

    Oh, I beg to differ. A compilation error, even a build-breaking one, is relatively harmless, since you instantly know you're doing it wrong. A bad pattern, finding its way from one class to the other, throughout the whole codebase, then into the minds of new coders who learn "that's how we do stuff here"... Truly nasty stuff, I tell ya.


  • Discourse touched me in a no-no place

    @Maciejasjmj said:

    A compilation error, even a build-breaking one, is relatively harmless, since you instantly know you're doing it wrong.

    Having seen students programming trying to program, they most certainly don't instantly know that. I'm so glad I don't actually run labs or tutorials any more.


  • mod

    @dkf said:

    students

    Do we have a thread for student/intern quotes? One of my interns came to me this past week and said "Hey, just checking, 404's aren't real errors, right?"



  • Well, a 404 won't throw an exception in any reasonable HTTP library.


  • mod

    Fair :smile:

    He was trying to track down an error with the page loading, and he was pretty sure the 404 on the network tab wasn't it. I pointed out that's not because it's a 404 (a 404 from an api call would be a smoking gun, for example), but rather the fact that the resource that 404'd was some font file. So it actually made sense once he explained his train of thought. He's got good instincts, but almost no knowledge to back it up with :)



  • Getting a 404 generally means someone screwed up somewhere. Especially if it's 404 OK.


  • Discourse touched me in a no-no place

    @ben_lubar said:

    Getting a 404 generally means someone screwed up somewhere.

    Getting an error means that in general. (Except if you were unlucky with cosmic rays flipping a bit or something.) A 404 means that either you asked for the wrong thing or the server is fucked up in a way that makes it think it hasn't got what you asked for. So… it's a specific type of screwup.

    @ben_lubar said:

    Especially if it's 404 OK.

    That's either stupidity or smartass.



  • Well, take each post as a learning experience. I can't recall anything specific right now, but I learnt a lot of stuff by investigating something which was posted (usually in the SQL land I'm pretty lost) and when trying to troll someone


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.