14

Why I ask:

I recently started answering questions after a long time of just editing posts to grow my reputation points.

What I want to know:

What I would like to know is if my answer meets quality standards and if not what I can do it improve them further, so future search queries bring up something that actually helps you.

Why I want to know it:

Because as far as I understand it's only of secondary importance that the question is answered and the answer accepted, since the primary goal is to eliminate the need for other users (registered or not) to answer or ask the question a second time because the existing question and answer are generalised enough to help with related problems.

The answer in question

6
  • Your answer is okay, but I feel sorry for the asker (and possibly many others) who follows a badly written tutorial...
    – Andrew T.
    Commented May 11, 2018 at 6:42
  • @AndrewT. "Okay" does not really cut it in my book. Any room for improvement on my question? Yea, a tutorial with static fields in methods is pretty nasty. OP stated it was his only means of learning. Poor guy.
    – blkpingu
    Commented May 11, 2018 at 6:45
  • Depends from which perspective you ask. From a moderation perspective: yes, this answer is valid. From a technical perspective, there are multiple issues with the question which makes it impossible to write a great answer.
    – jpp
    Commented May 11, 2018 at 8:16
  • I agree. The question in itself does not really have the overall potential to provide a lot of insight in terms of generalizability of the problem. It's basically just a compilation error due to invalid code.
    – blkpingu
    Commented May 11, 2018 at 8:39
  • 3
    Kudos to you for not only embarking on answering, but for seeking to improve and seeking constructive feedback. Just thought I'd give you a thumbs up for having exactly the right mindset, and good luck with your answering endeavors!
    – Ajean
    Commented May 11, 2018 at 18:49
  • The chat rooms can be great places to ask for feedback about answers. I don't know about the Java room, but we're certainly happy to do that in the Python room.
    – PM 2Ring
    Commented May 14, 2018 at 5:07

1 Answer 1

15

This might be a bit too critical of the asker, but the question:

  • has multiple issues (instead of just one)
  • ... one of which is a typographical error.
  • is probably a duplicate (of one or more of the posts I linked in a comment).
  • isn't an MCVE (Minimal, Complete, and Verifiable example) (it is neither minimal nor complete, even after an edit was made to improve it).
  • is a copy-paste of code from the internet - the asker doesn't really seem to understand what they're doing or why they're doing it (they added Static because that's what the code they copied did - the question would be more useful had they had a good reason for what they did, which they explained).
  • is not a good example of the problem they're asking about (static is unnecessary here).

Even one of the above would mean the question (and thus also its answers) will be of limited use to future visitors.

So I'd suggest not focusing too much on this specific answer and instead focus on answers to questions that seem like they'd be more useful to others.


However, here are a few things I might recommend changing in your answer:

  • Briefly explain what static means and why you'd use it, and include a link to a more detailed explanation.
  • Possibly include why one might want to declare a static variable in a method, especially as opposed to in a class. This could help address the fact that the question is a bad example of the problem.
  • Include a possible fix (or fixes). You already mentioned simply removing static, but this only works if static is already unnecessary - it wouldn't work if the asker actually wanted it to be static. You did include a link to some possible fixes, but it's better to also put those in the answer itself, at least briefly.
  • I wouldn't have included the output, or I would've created my own MCVE, that possibly shows how static differs from non-static. This also goes back to the fact that the question isn't an MCVE - the output you posted is largely unrelated to the change you made, so it doesn't really show that your change works (not just that it runs), since the code does other things as well.

The first 2 points aren't strictly necessary to answer the question, but those few extra details can make the answer more useful to more people, and be the difference between a decent/good answer and a great answer. But figuring out exactly what to include, how to include it and how much detail to go into is a skill that takes time to master.

4
  • Can you edit your answer to add a review oriented on your suggestions what you'd include in an answer? You make very good points and I' like to see if I've partially met them.
    – blkpingu
    Commented May 11, 2018 at 8:36
  • Excuse me, for not being specific enough. Let me clarify: You made 3 points of what you'd have answered (However, what I'd probably have done had I written the answer: Briefly explain...). Can you add a review to your answer which of these points my answer fulfils and which it doesn't? This way I can better tell where there is room for improvement and focus on that in my future answers.
    – blkpingu
    Commented May 11, 2018 at 10:16
  • 2
    @BlkPengu The points are already specific to your answer. Commented May 11, 2018 at 12:00
  • @BlkPengu This point: "the asker doesn't really seem to understand what they're doing or why they're doing it" is important. I'm very wary of answering such cargo-cult questions. Generally, such coders don't really want to understand the cause of the problem, they just want us to fix it for them. Of course, there's nothing wrong with using a chunk of code you found somewhere, as long as you make an effort to try to understand what it's doing. I tend to close such questions as "Too broad" unless I feel the OP is making a genuine effort.
    – PM 2Ring
    Commented May 14, 2018 at 5:00

You must log in to answer this question.

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