- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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.
Admin
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?Admin
Hey WTFGuy, how do you post comments with that funky gray background? Is that a new feature? :)
Admin
Put a link in your comment, get the fun box!
Admin
Comment held for moderation.
http://example.com
Addendum 2023-10-16 07:43: Didn't work
Admin
A nicer approach for anyone looking for how to do this correctly.
Admin
@colejohnson66
you need to be unregistered.
Comment held for moderation
www.contoso.com
Admin
hmm, is it just language it's policeing?
what the fuck.
Admin
This is the official algorithm:
comment_held_for_moderation = rand() % 2;
Admin
For what it's worth, my comment above is being held for moderation!
Admin
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.
Admin
Of course the automatic held-for-moderation logic is incomprehensible, the website is called TheDailyWTF for a reason ;-)
Admin
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.
Admin
@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!
Admin
Does the logic take into account, whether the poster is posting from a registered account?
Admin
A nicer approach for anyone looking for how to do this correctly.
While that is fine and all, why not just good ol':
Or perhaps
?
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?
Admin
The moderation algorithm works like this:
Admin
I think you meant to say "the equally innocuous one that some random from the internet posted under my name ~2 hours ago"...
Admin
Probably because people almost never want to reset a form, and mostly only hit the button on accident.
Admin
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.
Admin
If only there were some easy way to reset a form.
Admin
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!)
Admin
"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?
Admin
Still a hour. But you get ten holes.
Admin
Is there a link available so we can WTF the WTF mod code? :-)
Admin
An even nicer approach:
(
document.forms
is actually one of the oldest DOM-like things ever incorporated in client-side JS.)This is worthy and legitimate question.
Admin
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.
Admin
Or input type = reset? As in use the built in browser feature...
Admin
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.
Admin
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/
Admin
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.
Admin
It’s also an article from 23 years ago. What applied then, doesn’t necessarily apply now anymore.
Admin
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.
Admin
This is true. That's why doing your own usability testing on any project that has a UI is so important.