Monday, March 4, 2024

😡😡😡 Incorrect Stack Exchange Answers Make Me Angry 😡😡😡

Came across this incorrect yet highly upvoted answer today: https://unix.stackexchange.com/questions/121654/convenient-way-to-check-if-system-is-using-systemd-or-sysvinit-in-bash

The answer says:

Systemd and init have pid = 1

pidof /sbin/init && echo "sysvinit" || echo "other"

Check for systemd

pidof systemd && echo "systemd" || echo "other"

But that's fucking wrong. On modern Debian /sbin/init is a symlink to /lib/systemd/systemd.

So if you tried running the commands in the answer on a modern Debian system it will tell you that you're using sysvinit when in fact you're using systemd.

This is fucking infuriating and it makes me angry that I can't post another answer on that question to debunk the existing incorrect answer because that question is closed as Duplicate. This is one of the many things that enrage me about StackExchange.

Notice how there is a comment on that answer saying that it's wrong but that comment has only 38 upvotes whereas the answer has 56 upvotes. This is an intrinsic design flaw in Stack Exchange: old (outdated and incorrect) answers will tend to have more upvotes simply because they've been around for longer and thus had more time to collect upvotes than newer answers and especially comments (because who reads the comments?)

It's even worse because the answer is very popular, for example it's referenced by this answer here: https://askubuntu.com/a/1246465



No comments:

Post a Comment