• Domin Abbus (unregistered)

    Keep hacking away Laurie. When we retire, our legacy will be to leave the code a bit saner than it was before. Luckily, we are allowed to make these micro-refactorings because no one else understands, or even bothers about what we're doing.

  • (nodebb)

    I can't tell what Domin Abbus wrote as they're awaiting moderation. But since he's zeroht and met the if in those loops that means I'm 1st = frist. Or is that lst?

  • (nodebb)

    Hey WTFGuy, how do you post comments with that funky gray background? Is that a new feature? :)

  • (nodebb) in reply to Mr. TA

    Put a link in your comment, get the fun box!

  • (nodebb)

    Comment held for moderation.

    http://example.com

    Addendum 2023-10-16 07:43: Didn't work

  • Scragar (unregistered)

    A nicer approach for anyone looking for how to do this correctly.

        document.querySelectorAll('css selectors for the elements here').forEach(
             (e) => e.checked = false;
        );
    
  • Confucius (unregistered)

    @colejohnson66

    you need to be unregistered.

    Comment held for moderation

    www.contoso.com

  • Confucius (unregistered)

    hmm, is it just language it's policeing?

    what the fuck.

  • Pabz (unregistered)

    This is the official algorithm:

    comment_held_for_moderation = rand() % 2;

  • Pabz (unregistered)

    For what it's worth, my comment above is being held for moderation!

  • (nodebb)

    I switched from unregistered to registered yesterday. Same username. Now everything I post is awaiting moderation. Maybe as a newbie somebody needs to decide I'm safe then all my oh-so-wise comments will be revealed to all.

    On a website that a) wants comments and b) has daily articles, so few people read the back catalog more than a day, the pace of moderator approval needs to be a lot quicker than it usually is around here. If someone's posts are hidden for 6 or 12 hours when the realistic half-life of views of those posts is more like 4 hours, lotta folks aren't going to bother.

    Addendum 2023-10-16 08:45: Wow. And now this post isn't held, but the equally innocuous one I posted ~2 hours ago is?

    Color me confused. Unless the algorithm just hates posts shorter than two paragraphs.

  • Sauron (unregistered)

    Of course the automatic held-for-moderation logic is incomprehensible, the website is called TheDailyWTF for a reason ;-)

  • (author)

    I gotta be honest, I have no idea how the moderation system works. But the code is on Github, so it looks like there are two core rules: it goes into moderation if it contains links (as detected by a library that I haven't read the code of), or if the IP address does not currently have any approved comments. I suspect neither one of those is 100% accurate, based on how much ends up in moderation.

  • Pabz (unregistered)

    @Remy Yes, there must be more to it than that. At work we have a static IPv4 address and at home I have both a static IPv4 and a static /48 IPv6 subnet. You have definitely approved comments from both of those, even in the last few days, and they didn't contain links. Obviously at home the comment could come from anywhere in the IPv6 subnet though!

  • (nodebb) in reply to Remy Porter

    I gotta be honest, I have no idea how the moderation system works. But the code is on Github, so it looks like there are two core rules: it goes into moderation if it contains links (as detected by a library that I haven't read the code of), or if the IP address does not currently have any approved comments.

    Does the logic take into account, whether the poster is posting from a registered account?

  • (nodebb) in reply to Scragar

    A nicer approach for anyone looking for how to do this correctly.

    document.querySelectorAll('css selectors for the elements here').forEach( (e) => e.checked = false; );

    While that is fine and all, why not just good ol':

    document.getElementById("formid").reset();
    

    Or perhaps

    document.querySelector("css selector for formid").reset();
    

    ?

    That should work in any browser as it is still standard HTML.

    Though it does raise the question: Why do so few forms on modern websites include the dedicated Reset button (type='reset') which exists exactly for this purpose. Is it just not "cool" or is there some other reason it has become so rare outside of legacy sites?

  • (nodebb) in reply to WTFGuy

    The moderation algorithm works like this:

    bool moderate = Math.Random(0, 1) == 1;
    
  • (nodebb) in reply to WTFGuy

    Wow. And now this post isn't held, but the equally innocuous one I posted ~2 hours ago is?

    I think you meant to say "the equally innocuous one that some random from the internet posted under my name ~2 hours ago"...

  • (nodebb) in reply to gordonfish

    Probably because people almost never want to reset a form, and mostly only hit the button on accident.

  • (nodebb)

    they wanted to change the state of every box but the first

    My guess is that they wanted to check the first box and uncheck the rest, kind of like radio buttons.

    Sorry to interrupt all this "interesting discussion" of moderation.

  • (nodebb)

    If only there were some easy way to reset a form.

  • Officer Johnny Holzkopf (unregistered)

    Even though the JS code presented is quite terrible, the author - or the place it was copypastad from? - did use the comma operator (sequential evaluation, originating from C in that form, I think) in the for loop's initialization. Hard to think stupid peope do this, but well, stupid people do a lot of stupid things, and sometimes those stupid things even might look clever...

    http://www.example.com/reset.html

    (Held for moderation? Ick bin doch keyn Robotter!)

  • (nodebb)

    "latter phases were a crunch where ten developers were shoved onto the project at the last second"

    Oh yes, if it takes one programmer one hour to dig a one foot square hole one foot deep, how long does it take ten programmers?

  • LZ79LRU (unregistered) in reply to DJSpudplucker

    Still a hour. But you get ten holes.

  • (nodebb) in reply to Remy Porter

    Is there a link available so we can WTF the WTF mod code? :-)

  • NoLand (unregistered) in reply to gordonfish

    An even nicer approach:

    document.forms.myFormID.elements.forEach( … );
    

    (document.forms is actually one of the oldest DOM-like things ever incorporated in client-side JS.)

    Though it does raise the question: Why do so few forms on modern websites include the dedicated Reset button (type='reset') which exists exactly for this purpose. Is it just not "cool" or is there some other reason it has become so rare outside of legacy sites?

    This is worthy and legitimate question.

  • (nodebb) in reply to LZ79LRU

    Oh yes, if it takes one programmer one hour to dig a one foot square hole one foot deep, how long does it take ten programmers?

    Still a hour. But you get ten holes.

    Trouble is just that afterwards you have to spend another hour figuring out, which of the holes are even in the right position, another hour to fill in the wrong holes, and 25 more hours to increase the correct hole ten times in size, while 9 people interfere with well-meant input, or just out of fear of looking useless to the superiors, who thought that adding more people will make everything faster.

  • Nuitari (unregistered)

    Or input type = reset? As in use the built in browser feature...

  • Duke of New York (unregistered) in reply to gordonfish

    Reset inputs are not widely used in forms because people will click them by mistake, lose their input, and get annoyed. See the MDN page.

  • (nodebb) in reply to konnichimade

    Yes, the reset button is actively dangerous. This article from the Nielsen Norman Group explains it well: https://www.nngroup.com/articles/reset-and-cancel-buttons/

  • (nodebb) in reply to Duke of New York

    I'm really not that that was really a issue and not a case of a loud very minority of people being taken as common. Frankly, if people can tell the difference between "OK" and "Cancel" on a desktop dialog box then why would discerning between "Submit" and "Reset" be any different? There might be legitimate reasons for the lack of Reset buttons on modern sites, but not reading and being careless should not be one of them.

  • (nodebb) in reply to gordonfish

    It’s also an article from 23 years ago. What applied then, doesn’t necessarily apply now anymore.

  • LZ79LRU (unregistered) in reply to R3D3

    You are working off the assumption that there is a correct hole. The holes I was referring to were the ones you make under your own feet that you can not climb out of once dug.

    As in, procuring additional people for a problematic project without proper preparation or planning rarely achieves aught but leaving you just as stuck as you were before doing so, only with less time a plurality of more people to pay.

  • (nodebb) in reply to Gurth

    This is true. That's why doing your own usability testing on any project that has a UI is so important.

Leave a comment on “If You're First”

Log In or post as a guest

Replying to comment #:

« Return to Article