EDIT: I have now posted my own answer, as per some suggestions below. It's not fantastic, so if anyone has suggestions for improvement, please let me know.

Let me never again underestimate the power of meta. Between downvotes to the accepted answer and upvotes to the next-highest-rated one, the top two answers are now tied for point-value.

The voting system, and the answer-accepting system, do a pretty good job of ensuring that the best answer to a question is usually the first one.

But, rarely, the accepted and top-voted answer is incorrect; more frequently, it is fatally incomplete.

For example, in this answer, there is no indication that (for a console app) all of the answers print to stderr, and one of them can be removed at compile time. This is important information, especially given that OP appears to be looking for something analogous to std::cout. Yes, it could probably be guessed by the names of the function-calls, but that's hardly a good reason not to make it explicit.

I have discussed these issues in the comments of the answer, including asking for the answerer to edit the question to at least incorporate the necessary information, but the answerer stopped responding two weeks ago.

The answer has been accepted and has more than twice as many votes of the next-highest-voted answer. I take this as an indication that many people are probably searching for an easy way to print to the console, seeing that the accepted answer mostly-works, and upvoting, probably without even realizing how incomplete the information is. At least it's not dangerous....unless someone tries to print an important run-time message using qDebug() (unlikely given its name but certainly not impossible).

So what should I do in this case? One option would be to simply make the requested edits myself, adding information about each stream and incorporating the method for printing to stdout found in the next-highest-rated answer. I suspect that such a massive edit wouldn't get past the review queue, but I have enough rep that my edits no longer go through the queue. But since I suspect I would fail review if I were forced to undergo it, this seems like an extreme course of action--the "nuclear option," as I put it in the title.

That said, I don't like that googling "qt print to console" brings up that question as the first result, with a woefully incomplete top answer.

  • 2
    Consider also the option of "write a self answered one and get the high view one duped to it" which can though not as completely as you would like (the google result would still be incomplete). – user289086 Mar 9 '15 at 21:23
  • 5
    @MichaelT Wouldn't my question be closed as a duplicate, though, since it's newer? – Kyle Strand Mar 9 '15 at 21:27
  • 2
    @KyleStrand Not always. If the question and answer by you are higher quality than the older question, you've got a good chance of keeping yours open as the master and getting the other closed as the duplicate. At least, from what I've read on Meta. – Kendra Mar 9 '15 at 21:29
  • 2
    The question title is quite broad and it sounds like the OP is having an XY problem. I think the question should be cleaned up as well as the answer if you're worried about google search results. – user3920237 Mar 9 '15 at 21:36
  • 1
    @remyabel The question isn't fantastic, but it seems fine to me, which is why I asked about editing the answer. I don't think it's an XY problem; yes, I'm giving some context for why I want to make massive edits, but the point of my question is are massive edits that bypass the review queue ever acceptable? – Kyle Strand Mar 9 '15 at 21:44
  • @KyleStrand Often the number of answers in the older answer provide a better target for a new question (without an answer). But there is also the situation where a new question with an answer is a better resource than the old one. If you didn't have an answer in the question, then yes - it would be duped. But if you have a better and more complete answer it is quite possible to get the duplicate votes to go the other way (especially if you work with others to refine the answer and cast the dup votes). – user289086 Mar 9 '15 at 21:58
  • Note that since you have over 2000 rep, your edit wouldn't go into a review queue. You've earned the privilege of having your edits applied immediately. – skrrgwasme Mar 9 '15 at 22:56
  • 3
    @skrrgwasme Did you read the entire question? I mentioned that. – Kyle Strand Mar 9 '15 at 23:07
  • I did... Erm, well, I tried anyway. My brain skipped the next line somehow. My bad. – skrrgwasme Mar 9 '15 at 23:09
  • 1
    Why is a massive edit required? Could you just add a single line saying "note: none of these use stdout as cout does, but write to stderr" and then let the community decide whether that is good enough for their purposes? – samgak Mar 10 '15 at 1:17
  • 4
    I've had Great Success with this canonical answer debunking the accepted answer (without having ever dethroned it because the accepted answer happened to work for the OP, except under a faulty premise). – BoltClock Mar 10 '15 at 3:31
  • 1
    IMHO the answer is mostly fine. It could be edited to include the contents of the comment that outputwon't appear if QT_NO_DEBUG_OUTPUT is defined, but it shouldn't be "nuked". Kyle Strand appears to have made negative comments on many answers but not posted any answers of his own. My recommendation would be for Kyle to post an answer that he feels is correct and complete, and let the voting system do the work. (If it is a good answer then it'll pick up some momentum as people go there from this thread). – M.M Mar 10 '15 at 11:33
  • 2
    It looks like you deployed a tactical nuke by posting this question...that answer has gotten 15 downvotes since I checked yesterday. – ThisSuitIsBlackNot Mar 10 '15 at 14:19
  • 1
    19 downvotes now ;) That said ... the original question did not specifically ask for it to go to stdout (or stderr for that matter) they merely asked for how to send a message to the console ... they said they tried cout and failed to get anything to the console. I would suggest that the getting a message to the console is the important part rather than the specific stream. – Goz Mar 10 '15 at 15:09
  • 2
    @BoltClock It's good to see you have some success in "dislodging" accepted/upvoted answers, but it doesn't always work ... For example in this question the accepted answer is not just a link-only answer, it's probably also outdated (gem hasn't been updated in 7 years, maybe it still works?), the most upvoted one is outdated, and the "best" answer (mine) which works since 2011 is dangling at the bottom with 0 upvotes ... Something along these lines has been my general experience with this sort of thing... – Martin Tournoij Mar 10 '15 at 17:32

You should comment on the answer, noting the failings of the answer, downvote it, and post your own, better answer (or upvote an already-existing better answer). You certainly should not (massively) edit the answer.

If you're really worried about it, you could add a bounty to the question, then eventually award it to the better answer; it would also (hopefully) add some attention and votes from the active crowd who might be not paying attention anymore. You could also link to it from a meta question (hmm...) and/or post in chat (c++ at least has an active chat), see if others agree with you (and could then vote on it).

But no, you should not edit it. For one, you involved the author of the post, and (he/she) declined to change it based on your feedback. Even without that, editing it yourself wouldn't be right; ultimately those 75 votes were for that, regardless of what you believe. You don't get to decide that those 75 voters were all wrong and you're right, regardless of your opinion of who they are.

  • 4
    I have commented on the answer, as you note, and I have also downvoted. I am concerned that a new answer won't get seen. The bounty idea is a good one, though. – Kyle Strand Mar 9 '15 at 22:12
  • Also, my hypothesis about why there are so many upvotes isn't intended as an ad-hominem against the voters. I do, however, believe that their votes are misplaced. – Kyle Strand Mar 9 '15 at 22:13
  • 1
    I know, I was trying to basically say 'you should do what you have done'. :) – Joe Mar 9 '15 at 22:14
  • 2
    Well, glad I followed the system to the point of doubt, then, and then posted here before proceeding into dangerous territory! – Kyle Strand Mar 9 '15 at 22:14
  • @KyleStrand, the entire notion of editing someone else's communication (question or answer) is itself dangerous territory. It's the single most questionable "feature" of SO, it's often steeped in ego and hubris, and it's lead to no end of misgivings. I wish folks would consider that allowing poorly contrived questions and answers that are free from molestation is actually far better than running the risk of the editor getting something wrong. But that notion tends to fall on deaf ears around here. – user4229245 Mar 10 '15 at 13:28
  • In my own experience, if the question is sufficiently popular, the upvotes will remedy the situation over time. Here's one of my own examples: example. This doesn't always work, e.g. if the main answer has 400 upvotes already. Then all I can do is downvote the answer, upvote the comment that says it's wrong, and upvote the right answer. It's good enough. – Roman Starkov Mar 10 '15 at 14:45
  • 4
    This answer isn't worth a downvote IMHO, as it's correct but just missing a single "gotcha"-comment. This comment should (and by now, has) been edited in the question. It's not a "massive edit", this is exactly the sort of thing SO's editing system is designed to fix! – Martin Tournoij Mar 10 '15 at 16:25

So what should I do in this case?

I am not going to try to give universal guidance, so generalize at your own risk.


Yes; do that. Knowing that these snippets output to stderr is useful and does not compromise the voting process. It adds to the answer without changing its meaning.

Ditto for the information that one of them is affected by the QT_NO_DEBUG_OUTPUT macro.

However, you need to perform this edit in a neutral manner. Let others judge whether use of stderr is desirable or not; don't project "this answer is crap" just because you personally prefer to use stdout.


Do NOT do this; it changes the meaning of the answer significantly and compromises the voting process. Perhaps users have explicitly avoided voting for the second-highest, because they are aware of drawbacks with creating temporary QTextStream objects, or seriously bad interaction between temporary QTextStream and a longer-lived stream open with the same file descriptor (i.e. stdout).

The most consideration you can give to an alternate approach is to say that (this next answer) shows that it is also possible to use stdout. Neutral. Don't say stdout should be used, and don't say the other answer is the best way to use stdout. That's not the claim that people voted for.

The answer is especially ripe for editing because the author neglected to include any explanation whatsoever. If he wished to control the wording of the explanation, he should have written it himself. Since he did not, any expert can add the explanation provided it remains fair to the original author and voters.

  • Would saying "you could also print to 'stdout', as 'cout' does; this is described in other answers " be neutral enough? – Kyle Strand Mar 10 '15 at 0:31
  • @Kyle: Yes, "You could" and "It is possible to" are equally valid and neutral. – Ben Voigt Mar 10 '15 at 0:33
  • As per the suggestion of others, I've added my own answer, but I don't know anything about the drawbacks of temporary QTextStream objects or the bad interaction between short-lived and longer-lived streams with the same descriptor. (After all, I came to this question as someone in Reto Koradi's first category--I just needed a quick answer for how to print to console, and I just happened to notice that the function-names in Goz's answer were...concerning, as was the lack of additional info.) Where would you suggest I read about this? – Kyle Strand Mar 10 '15 at 16:09
  • @Kyle: I've avoided voting for any of the answers, because I don't know if there is an interaction between a temporary QTextStream and another stream open on the same file. – Ben Voigt Mar 10 '15 at 17:15
  • Ah. Well, the inline function version in my answer should solve the issue anyway. – Kyle Strand Mar 19 '15 at 16:19
  • @Kyle: You realize that was all hypothetical on my part, not spoken from expertise. I'm just pointing out that experts could know that things go wrong, and therefore the voting might be entirely contrary to what you expect, because of problems in an answer that you or I don't know about. – Ben Voigt Mar 19 '15 at 16:23

If you can expand the answer without changing the original meaning, then I would go for edit.

In this specific case, the answer seems correct, but omits a piece of information. There is no "massive editing" required, you can just migrate some useful comments to the answer.

Be aware that:

  • The OP will get a notification, so he/she can review your edits;
  • no information is ever lost, your edits & the original post are both kept, and can be easily rolled back;
  • you can always add your own (expanded answer) later, should the edits be "refused" for whatever reason.

There's a reason SO allows easy editing by anyone, it's often what allows answer to make the upgrade from adequate to great.

You should not edit if:

  • The method was deprecated. You add a new answer, comment on the old one, and maybe edit to add a note if it's very out of date (lots of people use older versions).
  • You change the intent of the author; this answer uses Qt functions, if you changed it to standard C++ or libfoo, then that would be wrong.

I fully agree with the answers by @Joe and @Makoto, but wanted to elaborate a little more on why (at least IMHO) you should not do massive rewrites of answers.

The way I look at it, SO has somewhat of a split personality. Collaboration is generally encouraged, and to some degree it's good to improve other people's posts. But on the other hand, there's still a clear ownership of posts because they have the name of the author prominently placed at the bottom. Particularly if I use my real name, I feel like I have responsibility for the posts that carry my name.

If you massively edit my posts, there are two possible scenarios:

  • Hopefully, you will make the answer better. In this case, I would feel that the credit I get by having my name under the post is not deserved, because I did not really write it.
  • At least from my point of view, you make the answer worse. Needless to say, I will be very unhappy (and that's putting it mildly...) if somebody reduces the quality of an answer that carries my name.

So if you see posts with problems, do some or all of the following:

  1. Leave a comment. Posters who strive to provide quality content will gladly fix problems in their answers, or improve them if they find the suggestions helpful. And they will be thankful for constructive comments.
  2. If the content is really wrong or sufficiently bad, downvote.
  3. If you can write a better answer, write your own answer.

Yes, it can be frustrating to see incorrect or very incomplete answers accepted and highly upvoted. And it's indeed difficult for much later answers to catch up on votes, even if they are of higher quality. But beyond the options listed above, there's really not a whole lot you can do about it.

I have a simple explanation why incorrect answers get upvotes. You could categorize readers of answers into two categories:

  1. People who actually need an answer to the question.
  2. People looking for questions to answer, and reading existing answers to see if the questions is already sufficiently answered.

This is of course a substantial simplification, but it can still explain a few things. People in category 2 will mostly be able to tell if the answer is complete and correct, and can vote accordingly.

People in category 1 often don't know what the correct answer is. That's why they are looking for it in the first place. If they see something that looks well written, understandable, and plausible, they will frequently upvote. They often won't test the solution, so they won't know if it's correct.

This is even more tricky if the solution basically works, but the explanation is completely wrong. Or for answers that can't directly be verified because they explain a concept, and don't just provide a few lines of code. If they sound like they make sense, they will get upvotes from readers in category 1, no matter if they are correct or not.

  • 1
    maybe you could edit/add your answer to the ones of Joe and Makoto :D – Micka Mar 10 '15 at 13:12
  • Totally agree with the split personality aspect. To some extent, it also applies to Q&A as a way to ask/provide help v.s. building a knowledge repository, as well as "Ask questions, get answers, no distractions" v.s. the number of debates about everything that can be a little bit off-topic, what should be closed and so on... – Bruno Mar 10 '15 at 14:15

Let it be wrong now. Downvote and comment as required.

It may also be the case that it wasn't wrong when it was posted.

It is not your place to edit that answer into something "less" wrong unless it was a Community Wiki.

It would be better if you provided your own answer, addressing some of the failings in the more popular answer, with a more appropriate solution for this day and age.

Do not use that nuclear option. It is not meant for situations like this.

  • 4
    My concern is that (almost) no-one will see the new answer. Note the number of existing answers and the high scores on the top two, especially the accepted one. – Kyle Strand Mar 9 '15 at 21:54
  • Oh, I don't disagree. A question that old with that many votes on one particular question will undoubtedly have the votes and views on the new question biased. However, I stand by what I've said. You don't want edits to void the original intent of the poster, and it appears that modifying it to be more correct in modern terms would do that, so I would avoid an edit in that manner. – Makoto Mar 9 '15 at 21:56
  • 3
    I don't understand the "original intent" argument, though. In the general case, sure, you don't want people completely changing the meaning of what someone has said or misattributing opinion statements; in the particular case where I am only adding information (and not removing anything in the original answer), and the information I add is merely factual and correct, I don't see the harm. – Kyle Strand Mar 9 '15 at 22:02
  • To phrase it simply: that was their answer. It is as stated. I could see a valid edit being that they referred to a function several times, but had a typo or two of it in actual code, but that's not quite the case here. Heck, the actual answer is still active; you may want to comment on the post to point out inconsistencies before you blanket edit the question, even if it is only "adding" things. Give them a chance to make it right. – Makoto Mar 9 '15 at 22:05
  • As stated in my question, I've already done that; this was an ongoing conversation in the comments until I suggested edits, at which point the person who wrote the answer stopped responding. – Kyle Strand Mar 9 '15 at 22:10
  • That's fair. It could also be the case that they've since forgotten to revisit the conversation. In any event, I still don't feel like it's appropriate to edit that answer, since it's tantamount to putting words in their mouth. – Makoto Mar 9 '15 at 22:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .