3
\$\begingroup\$

What's the best strategy to re-open Text based Game Python? As I wish to invite others to also review the existing working code.

My current understanding is the question is off-topic exclusively due to the presence of the following sentence. After requesting "guidance", and before saying "here is my code so far", OP describes an abandoned edit attempt that does not appear in the posted source:

I need to move the rooms dictionary inside the main game function but when I do I get errors no matter what I try.

OP was expressing a future direction they'd like the code to go in. Code Review is all about teaching so I offered some guidance on how to accomplish that.


My understanding is that many people could have edited the question before or after closing: myself, the OP (Pink Unicornbrat), and moderators.

I offer three proposals: 1. @PinkUnicornbrat, please delete that sentence. 2. Sometimes folks offer their first-ever review request and then do not subsequently interact with the site. After 24 hours I propose that I will delete that sentence. 3. I invite any moderator to please delete that sentence.

Posters mention doubts and "I wish..." all the time when offering code that they feel is not yet perfect. It's part of the process. I don't see how the current situation is different.

Thinking about next time.... I am a person having ordinary skill in the art of programming and I did not recognize the posted source code as broken code. Are we hoping that First Questions queue review would flag OP "doubts"? Maybe I should have interacted with OP in comments prior to reviewing, asking them to delete that sentence? (Which didn't impress me as a "bad" sentence at the time.) Maybe I should have edited the sentence first, and then reviewed the code? Open to suggestions.

\$\endgroup\$
3
  • \$\begingroup\$ I have moved the survey to chat. Feel free to ask me questions in chat. \$\endgroup\$
    – Peilonrayz Mod
    Feb 23 at 18:46
  • \$\begingroup\$ @Peilonrayz, I agree with your re-categorizations. // I offered an argument on the table, no one's buying it, that's cool. The Question is closed and will remain that way, I understand. \$\endgroup\$
    – J_H
    Feb 23 at 21:53
  • \$\begingroup\$ Thank you for bringing the argument to the table. If you have any questions around site scope in the future feel free to reach out. \$\endgroup\$
    – Peilonrayz Mod
    Feb 23 at 22:11

2 Answers 2

1
\$\begingroup\$

I agree with J_H. It would have been sufficient to have edited the question to remove the offending sentence.

As acknowledged, the code is working as is. If the asker had not included that sentence, they could certainly get a review. Such a review might even have solved their global variable problem, as that's a natural criticism of the code as written.

We should not be attempting to read posters' intent. We are not telepathic. We do not know. If a post can be fixed via editing, then we should edit it. Remember that while answers certainly help the original asker, they can also help others. Those others may have the "proper" intent, even if the asker doesn't.

the OP confirms a change of intent.

And how would posters do that? "I confirm that my intent now matches the question as written." That seems profoundly silly and infantilizing. We should treat posters as adults unless they establish otherwise. Explain the rules if necessary (and I'm sorry, but Sam's comment failed in that and should have been deleted), but there is no reason to require genuflection to the rules.

The only reason to have deleted this question would have been if the poster refused/reverted the edit. Posters can't vandalize their questions to be off-topic (and get away with it).

\$\endgroup\$
2
\$\begingroup\$

Why is the question off-topic

Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review.

Has two sub-reasons:

  1. Code Not Working As Intended, which is the modern term used instead of "broken code".(1)

    Basically if the OP says the code doesn't work, or if the code can't reasonably run, the question is off-topic.

  2. Code Not Implemented.

    Basically when the OP is asking us to write code.

We can confirm the close reason is made up by both by looking at the meta posts which created our current close reasons:

These three proposed reasons are largely based on the suggestions by Peilonrayz from the previous discussion.

200_success's answer to "How should we revisit our standard close reasons?" © CC BY-SA 3.0

I think we're mostly discussing how we should arrange the following reasons, from the close-reason meta thread:

Peilonrayz' answer to "How should we revise the standard off-topic reasons, if we can have up to five?" © CC BY-SA 3.0

We've confirmed the close reason has two separate reasons. We now need to determine which of the two the question is off-topic for.

I need to move the rooms dictionary inside the main game function but when I do I get errors no matter what I try.

Pink Unicornbrat's question "Text based Game Python" © CC BY-SA 4.0

The sentence shows clear intent the OP is asking us to write a specific piece of code, so falls under CNI.

The posted code has in no way "move[d] the rooms dictionary inside the main game", as the rooms dict is defined up at module-level scope. Several functions, including main(), successfully use it.

[spoiler alert!]

I enclose a transcript of the game successfully running to conclusion.

J_H's answer to "Text based Game Python" © CC BY-SA 4.0

The code works as intended, so is not off-topic for the CNWAI reason.


The question is off-topic for CNI.

The Meta Concerns

  • I am a person having ordinary skill in the art of programming and I did not recognize the posted source code as broken code.

    You are correct, the question isn't off-topic because the code is not working as intended.

    Unfortunately a miscommunication has occurred from the comments explaining the off-topic reason.

    Welcome to Code Review! Unfortunately this question is off-topic because this site is for reviewing working code. Please take the tour and read up at our help center. When the code works then feel free to edit the post to include it for a review.

    Sᴀᴍ Onᴇᴌᴀ♦'s comment at 2024-02-22 06:29:54Z © CC BY-SA 4.0

    The OP stated "I need to move the rooms dictionary inside the main game function but when I do I get errors no matter what I try" thus it "does not work in the way that [OP would] expect, or need. Also (paraphrasing) : Just because [the OP] do[es]n't know what the problem is, does not mean [they] don't know there is a problem

    Sᴀᴍ Onᴇᴌᴀ♦'s comment at 2024-02-22 08:25:09Z © CC BY-SA 4.0

    This is an unfortunate situation. It looks like the user who posted the question posted working code, but wants someone to provide new code (based on the 2nd sentence). That makes the question off-topic for CR. I even think it is off-topic for SO because the code with errors was not posted. You proved that the posted code works. If the 2nd sentence of the question were to be edited out, the question would be on-topic, but that would alter the intent of the question. That should really be left for the user who posted the question to decide.

    toolic's comment at 2024-02-22 12:10:50Z © CC BY-SA 4.0

  • My understanding is that many people could have edited the question before or after closing: myself, the OP (Pink Unicornbrat), and moderators.

    I offer three proposals:

    1. @PinkUnicornbrat, please delete that sentence.
    2. Sometimes folks offer their first-ever review request and then do not subsequently interact with the site. After 24 hours I propose that I will delete that sentence.
    3. I invite any moderator to please delete that sentence.

    The problem is intent not wording. No matter if any of 1, 2 or 3 happens the question is still off-topic due to the OP's intent. Lets say you edit the post right now, the question will be off-topic until the OP confirms a change of intent.

    As such 1 is poor because you are changing the wording, but not guiding the OP to clarify a change in intent.

    Take:

    Your question is currently off-topic because you are asking us to help you change the code in a specific way. If you are happy for us to not tell you how to change the code as you have asked please remove the following section from your question: "I need to move the rooms dictionary inside the main game function but when I do I get errors no matter what I try. Here is my code so far".

  • Posters mention doubts and "I wish..." all the time when offering code that they feel is not yet perfect. It's part of the process. I don't see how the current situation is different.

    Given the existing confusion around the close reason, I have reason to believe the statement may have a high propensity to be incorrect. As such, if you truly would like to discuss other situations you would have to provide examples.

    Note: J_H provided some examples and I responded in chat.

\$\endgroup\$

You must log in to answer this question.

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