9

Earlier today I answered a very simple question as follows:

Try:

 (corrected code here)

I appreciate it's not a particularly verbose or descriptive answer, but the original question contained a code snippet which only required a tiny amendment, which was entirely self explanatory.

However, one reviewer of my answer voted to delete:

This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post

Further justified with:

Saying "try" is making a guess. Not providing an answer.

Is this a valid reason for deleting my answer?

I don't think so. I think it's a pretty common use of language:

Q. How do I do x?

A. Try y

I've frequently framed answers (not guesses) with "Try..." Should I be avoiding this?

15
  • 5
    There is nothing wrong in saying "try this".
    – yivi
    Jul 5, 2019 at 11:53
  • 17
    You could at least have stated what you changed. I get annoyed by these kind of answers everytime I'm searching for something and have to compare original and answer word by word to spot the difference. But, imho, that's not a reason to delete the answer. We had a very similar discussion here a few days ago.
    – BDL
    Jul 5, 2019 at 11:53
  • 1
    @BDL It was a single line of code. The change was trivial and obvious.
    – Olly
    Jul 5, 2019 at 11:55
  • 1
    @Olly: I saw your answer. And (at least on my tablet), the relevant part was outside of the visible area. The problem with this specific question/answer is, that the relevant portion of the code is cluttered by the (completely irrelevant) Table.AddColumn stuff.
    – BDL
    Jul 5, 2019 at 11:57
  • 16
    I personally hate the code-only answers. At least if there is no explanation - if the posted elected to use comments in the code to show what is happening, then that seems OK. I hate "try <code>" even more. It seems like blind guessing - is the code supposed to work? Does it need adjustment to fit the problem stated? Is it just you hoping this would work but don't know or can't be bothered to verify? At the same time, according to SO rules, it's a good-faith attempt at answering, so...it's an answer. Not much I can do than just hate them. Jul 5, 2019 at 12:00
  • 5
    If its that trivial, vote to close as a typo, comment and move on Jul 5, 2019 at 12:01
  • 2
    This is the q&a. If the change is "trivial and obvious", maybe closing would be a better choice. In this case, actually pointing out the difference would be better than just posting the code without any comment. Or maybe closing as a dupe, seems like a very common scenario. That's not saying your answer is wrong or there is anything wrong in saying "try this". Only that the answer could be improved upon.
    – yivi
    Jul 5, 2019 at 12:02
  • 2
    Related, if not a duplicate: meta.stackoverflow.com/q/256359/6296561 Jul 5, 2019 at 12:20
  • 4
    eh, if you can't (or are too busy) explain why your answer fixes the problem... even just one sentence... it's gonna get a downvote from me. It could be the best code ever written, but if you're expecting the OP or people who aren't as good as you or I at programming to be able to read it and see what you changed and understand why that affected it... it's highly unlikely for that to actually be the case. Deletion? i'd rather leave the answer up so it can be fixed by anyone rather than just the op.
    – Kevin B
    Jul 5, 2019 at 15:24
  • @Olly can you explain why you think "try X" should be read as "(not guesses)"? Jul 5, 2019 at 17:09
  • @JonasWilms No - Don't vote to close something as a typographical error unless it is a typographical error. Trivial and typo are NOT the same thing. Trivial questions are not off-topic here.
    – TylerH
    Jul 5, 2019 at 18:41
  • @Olly What is trivial and obvious to you is clearly either not trivial or not obvious to the person asking the question, otherwise they wouldn't need to ask it. While this is clearly an attempt at answering, you do run the risk of continuing to get flagged for non-answers if you decide to continue posting stuff of that quality.
    – TylerH
    Jul 5, 2019 at 18:54
  • 1
    @tylerH I should've added vote to close as a typo or search the duplicate ... most trivial answers were already answered ... Jul 5, 2019 at 19:01
  • @JonasWilms That's still wrong--something having been asked on SO before is not the same as it being a typo. A typographical error is an error made in transcription that would not necessarily be made again if the same thing were written/typed a second time. If the question has been asked and answered before, vote to close as a duplicate, not as a typo. And if you think a Q is trivial or so simple it shouldn't be asked here, that's a reason to downvote, not closevote.
    – TylerH
    Jul 5, 2019 at 19:12
  • Here's my personal reason for strongly disliking "try this" answers: I have to maintain code that other people have written. There's a huge difference between code written (a) by someone who knows and understands what each line of code does and (b) by someone who tries different "magic incantations" copied from somewhere without understanding them and just stops editing when the code "works". I hate the latter code with a vengeance. I don't want developers to "try things" in production code. I want them understand and make an educated choice to use or not use a particular line of code.
    – Heinzi
    Mar 31, 2021 at 12:30

3 Answers 3

18

The problem is that "code only" answers for some strange reason pop up in the low quality review queue.

A code only answer is never a good answer - feel free to down vote them. "Try" in an answer certainly makes it sound like you are guessing, so that's not advised to write.

But as long as the answer is relevant, attempts to answer the question and isn't blatantly incorrect, it should not be deleted. This goes for the majority of code-only answers in that review queue.

Simply because the answer is exposed to delete review, you get spurious incorrect reviews. If one single reviewer made a bad review, that's not much of a reason to be concerned. If the consensus of all reviewers was delete, then you should bring it up on meta.

5
  • I've seen several code-only answers in review that went with a delete review consensus. Some had it before my review, others got it after. It's far too common unfortunately. Jul 5, 2019 at 12:22
  • @Zoe The question is why code-only answers should even be automatically placed in that queue in the first place.
    – Lundin
    Jul 5, 2019 at 12:24
  • 6
    I must say that if I see a code-only answer in LQP review that looks like, well, you know... I just hit skip and silently hope review will delete it even though that actually shouldn't happen.
    – Erik A
    Jul 5, 2019 at 12:47
  • relevant edit Jul 5, 2019 at 17:51
  • 4
    There's nothing strange about the reason -- while the LQP queue is intended for stuff that's delete-worthy, the problem is in the name: Low Quality. Code-only answers are usually low quality/low effort; the answerer didn't bother to explain what they changed or why that change works where OP's code doesn't. So it makes perfect sense that most people would harbor this misunderstanding of the queue. The queue should have been renamed to Non-answer Queue from the get-go. Until that happens you will always see this problem occurring.
    – TylerH
    Jul 5, 2019 at 18:51
15

There's nothing wrong with "Try", but the lack of explanations is certainly going to confuse people, including reviewers, future visitors and the OP.

It doesn't hurt to include a simple commentary:

Try to use Number.RoundUp instead of Number.Round because some reason:

This will save people a few seconds of eyeballing. Nobody likes to be treated like a human diff.

Now, the absense of a textual explanation, by itself, is not a good enough reason to delete an answer. If you are really, really confident that your answers are perfect and clear with just "Try" then you don't have to change them. From time to time, you'll have to fight with confused reviewers in the comments and then takes things to Meta, but that's your life to live, who am I to judge?

7

Use "use" and don't try "try".

If you don't see need to provide an explanation to the code and want to type something - "use" is much more assertive than "try". It is still just 3 letters so should be as easy to type.

If you just must use "try" - comments on the question is a good place to do so. Later you or anyone else can convert that into full fledged answer.

I personally dislike answers where "try" is the only description. In most cases I've seen code actually is definite the answer, but for some reason author of the answer wanted to make it look like not an answer... Does it mean they know something but don't want to disclose and code actually flawed in some way?

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