-33

There are a lot of Stack Overflow questions about compiled languages, especially about C and C++, that could be avoided when the OP would have enabled compiler warnings and read them.

Is it possible to ask the user if he/she enabled the compiler warnings when he/she uses C, C++ and maybe other compiled languages as well, before he/she asks the question?

10
  • And HTML validation for HTML. And linting for Python, PHP (is even built in (nothing to install in a command-line context)), and similar languages. Commented Jul 21, 2023 at 11:45
  • 18
    In my experience, even when the user is using a environment that gives them the errors, some seem incapable of reading them... Such users most certainly would click an "I agree" without reading it. If the question isn't helpful/useful just downvote it. If it's lacking errors that are needed, VTC it. If the user cares, they'll edit the question to actually provide the error; it's not the role of the ask question page to tell and explain to users how to enable compilation errors in any number of IDE environments. "We" expect the user to have some level of understanding of the tools they use.
    – Thom A
    Commented Jul 21, 2023 at 11:47
  • 6
    Reading something does not imply you understand it. It is the same with error messages, quite some posts we see on the site are people getting a scary looking error and asking others to make it go away. People treat them as enemies instead of their best friends. That is a maturity and experience process people have to go through. Asking people is not the issue. It is making them understand that is a steep hill to climb.
    – Gimby
    Commented Jul 21, 2023 at 12:06
  • Compiler warnings and errors can be confusing and/or incomprehensible. Enabling and checking these outputs is unlikely to curb a lot of such questions
    – machine_1
    Commented Jul 21, 2023 at 12:14
  • 1
    @machine_1 True, but then the question will be different. Instead of why does X not work it will be what does the compiler message Y mean? Which can make the question a lot better.
    – anon
    Commented Jul 21, 2023 at 12:17
  • 1
    But asking the user "Have you enabled the warnings" doesn't make them put those errors into the question, @12431234123412341234123 , or taking the time to read and understand them before they hit the submit button. Reading is "hard" it takes time and effort, and why would a user bother to do that when someone else can do it for them. 🙃 This is why even though the Ask Question explicitly states to post code as text not images and format it they still post images, and don't format code. They don't read.
    – Thom A
    Commented Jul 21, 2023 at 13:23
  • @ThomA Most people don't post images and format their code (i think some don't understand how to use indentation on stack overflow, but that is a different story). For me, asking a question is much harder than doing some checking myself.
    – anon
    Commented Jul 21, 2023 at 15:30
  • Asking good questions is hard. And if you do it right you usually find the answer in the process. Commented Jul 21, 2023 at 17:14
  • Some good reading closely related to this question: ietf.org/rfc/rfc3514.txt Commented Jul 21, 2023 at 17:15
  • @user4581301 The link is about an aprils fool about security. The proposal in the thread isn't about that this questions no longer exist but that they are reduced. Of course if someone wants to post such a question there is not much we can do about it without disabling all questions.
    – anon
    Commented Jul 21, 2023 at 17:23

2 Answers 2

33

Of course, asking the user to check a checkbox confirming that he'd enabled compiler warnings would be possible.

The problem is that users will check any checkbox required to be able to post a question.
I agree is basically the most common lie on the internet.

So yes, it's possible, but no, it wouldn't fix the problem.

1
  • "I agree is basically the most common lie on the internet" - no, since GDPR it's "We Value Your Privacy" (translation: we value money , please allow us to use all your details).
    – CodeCaster
    Commented Jul 23, 2023 at 12:18
4

There are a lot of Stack Overflow questions about compiled languages, especially about C and C++, that could be avoided when the OP would have enabled compiler warnings and read them.

Are there "a lot"? I made a simple experiment searched for all questions tagged "C++", then scanned through the newest 50 ones. I could only find single one where compiler warnings were missing (and the reason was not because the OP forgot to enable extra warnings, instead they simply did not insert them into the question).

So I question your premise - there is probably only a small percentage of those questions where extra compiler warnings would have helped to avoid the question. Does not look like a justification for asking users for each and every C or C++ question if they enabled all warnings.

You must log in to answer this question.