16

This is the close vote queue entry. It is for this question. I voted to close for a custom reason:

I'm voting to close because this question sounds more like a request for code review, and the last part asks for alternative implementations in a way that doesn't give explicit guidelines for constructive discussion and instead leaves things open-ended.

The part(s) of the question I am referring to is:

After lots of time looking for solution i came up with using createListenerMiddleware. Could someone tell me if this is a good idea, and if not, is there any other way of doing it properly.

<their code>

I feel like simply asking if something is a good idea doesn't make for a good question. If I were asking the question I would have tried to describe some specific things that would qualify a good idea for me.

The question didn't explicitly ask for code review, but the combination of asking if their approach "is a good idea", and asking for proposed alternatives seems in my mind like it passes the Duck Test.

Asking for code review seems like it violates the guideline on having a specific programming-related question. There can be tons of ways a given piece of code can be improved, some obvious, and some involving tradeoffs. While I can see that kind of content being useful to people other than the original asker of the question, I have a feeling that proliferation of such questions would probably include lots of questions that are low quality, and that the useful information from answers would be hard to make discoverable on search engines. I did a bit of searching on whether code review questions are allowed on stackoverflow.com and found this MSE post saying no, and the "guide-to-code-review-for-stack-overflow-users". I think this question matches the requirement of "Finished, working code that does what it is meant to do + Ideally, an asker willing to receive feedback on any aspect of the code".

I tagged with for categorization purposes, but I'm really looking for feedback instead of trying to assert what I think is right or wrong. Can I please have feedback on my line of thought? Was my reasoning appropriate / in line with the rules and guidelines for Stack Overflow?

7
  • 9
    Regardless if it's off-topic or not, there were no downvotes nor close votes on the question, thus the system automatically chose it as "known-good" audit (based on unknown heuristic).
    – Andrew T.
    Commented Oct 20, 2022 at 4:26
  • 8
    Yep... doesn't look good to me either - it's too open-ended, without a specific problem to solve Commented Oct 20, 2022 at 4:26
  • 4
    I wouldn't use custom close reasons on programming questions because otherwise they will be closed as "not about programming". In this specific case I would say that "opinion-based" would be a more appropriate close reason since defining "a good idea" and "properly" can be opinion-based. If you want to explain your close vote in your own words you can always leave a comment separately (if I'm not mistaken doing so would even prevent you from failing audits since trying to leave a comment on an audit shows an error message saying "this is an audit"). Commented Oct 20, 2022 at 9:33
  • Also if you think a "known good" audit like this one is a bad audit, you can downvote/vote to close it from outside the queue, that will prevent it from being used as an audit again in the future. Commented Oct 20, 2022 at 9:33
  • "I feel like simply asking if something is a good idea doesn't make for a good question" - you'd be right, as that is an opinionated question. But you'd still be wrong to judge that based on a feeling, it needs to be judged based on the established rules.
    – Gimby
    Commented Oct 20, 2022 at 10:06
  • 100% agree with you that this question belongs on CodeReview.SE, I've VTC'd accordingly. Another day, another bad audit...
    – Ian Kemp
    Commented Oct 20, 2022 at 10:51
  • 7
    Yeah, the CV queue is one of the queues with worse audits, unfortunately. Not much to do about it now though, aside handling it correctly. OP isn't suspended, but it counts towards a future automated suspension, which I can't do anything about because tools for "uncounting" automated audit failures don't exist. Commented Oct 20, 2022 at 10:57

1 Answer 1

7

There are two ways to read that question:

  • how to do X: "using redux-toolkit ... save my state to local storage after each update of the store without using any third-parties libraries {redux-persist}" + code which OP is not necessary sure is working properly ("if not {good idea}, is there any other way of doing it properly").
  • review my code: "Could someone tell me if this is a good idea"

Since the question is posted on SO and subject of how-to for ReactJS is on-topic I think the question could be ok as "how-to" variation. Ideally the question needs some edits to clarify that code is an attempt rather than working solution.

Alternatively, it can be treated as pure code review (like current answer to that question does) and closed with some reason reflecting that it is unclear what OP is looking to solve on SO (unclear or opinion-based would be my choices). I would be hesitant to flag for migration to CR as it does not look like OP believes code covers all scenarios. I'd also would not vote to close as "need focus" since code they come up with to solve "save my state to local storage" is quite short (note that I don't have enough experience with ReactJS to know how broad that initial goal is).

You must log in to answer this question.

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