29

If your question contains broken code… If your question contains something like: ... runs ...but it gives the wrong answer... ...I tried ... but sometimes... ...works great when I do ..., but when I do ... ...it works fine, but I also need it to do ... ...it fails a test case... (**unless that test case is a performance test) then your code does not work ...


27

If your question is not real code… Unlike other Stack Exchange sites, which encourage general reference questions and offer broadly applicable answers, Code Review aims to offer customized advice specific to your code. To make that work, we need to see real code. If your question was asking for a review of pseudocode, then we need you to post an ...


22

If your question contains someone else's code… For moral, practical, and legal reasons, we are only able to review code that you wrote or code that you maintain. Code Review is not the place to ask about someone else's code. We also expect you to understand how your code works. If you are seeking an explanation of how your code works, then we will treat ...


22

If your question does not include the code to be reviewed… Please embed the code to be reviewed directly in the question, for multiple reasons, including quality and licensing. You may optionally also link to a third-party site where your programming project is hosted, but the question must contain enough code to stand on its own. There is a length limit ...


20

If your question is asking for advice about code not yet written… If you have not yet written your program, or if you are wondering how to add functionality to your code, then Code Review is unfortunately not the place to ask for help. We would be glad to have you ask another Code Review question later, after you complete your program. Now you might be ...


17

The cited reason for the closure is not that it was someone else's code, but that the code looked hypothetical. Normally, function names like foo, bar, or functionA are indicators that the code is hypothetical. Also, comments like // Do something are stub code. Questions containing such vague code are generally unreviewable, since there is too much left ...


15

Yea that close-reason is a bit difficult. It's two, maybe three different reasons packed into one. "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the ...


14

The person who wrote that comment was likely trying to be nice rather than saying something he truly believed if he thought it through. The reason issues aren't resolved here isn't fear of stepping on SO's toes. The reason is that the site is for reviewing code, and it's very hard to review non-functioning code. Regardless of overlap or toe stepping, ...


12

However, I'm not even asking about the code, but the design/approach, and the only reason I included the code is just to show the design approach I am asking about. That by itself makes this question off-topic. This site is specifically about the code, not solely about the design and/or architecture or anything like that. You also mention in the question ...


12

Other than extremely minor edits, I think the answer has to be NO. If I've got the capitalization wrong on a case sensitive variable/function/method/class name in one out of the 20 times I used it in the pasted source code, or if I missed a singular semicolon or parenthesis or closing brace in several, several lines of source code, this is a very minor edit ...


12

When the question was posted, your question was probably perfectly on-topic. However, as sites grow and evolve, their scope and requirements for on-topic questions change. In this case, it is primarily the placemark-holder // do something that trigged the closing of the question. It is more explained in the meta question Why is hypothetical example code ...


11

Actually, it was cross-posted to Stack Overflow, and it has an accepted answer there. You're correct that it belonged there, but there was no need to migrate it since the OP had already posted there. I'll add a comment to the post to make it clear. EDIT: Based on the discussion above, I've deleted our copy of the question. We have no answers or useful ...


11

I think that when this happens, it stops being code the OP "owns or maintains", so we shouldn't allow this.


11

# It's considered fine. else: # It's considered a problem. else: # Other code which checks for other possible errors... else: # Other code which checks for other possible errors... That bit alone makes me go "you've cropped the code for us". That's not what Code Review is for. Put the full code in the question, highlight ...


11

I concur, and agree with its reopening. If you don't have anything to say about the code, you don't have to review it. If you don't like the question, you are free to downvote according to your conscience. If you feel strongly enough about it, you might even vote to close it as "Unclear what you are asking". Personally, I think it's somewhere between "...


10

First of all, don't take this the hard way. Really. Being put on hold is really not the end of the world, and it's easy to get out of. Look, none of the different ways of writings you provided are valid Python code, for example: pairs = {'{': '}', '[': ']', '(': ')'} if stackTop in pairs: if c in pairs.values(): if pairs[stackTop] == c: ... ...


10

This specific question is directed toward 200_success, but I think the point you are raising is independent of that. Let's break down your question in to what I think are the relevant parts: Is there a concept of a super-mod in Code Review - do we have a 'hierarchy'? Is there a policy from the mods for closing/reopening things that the community is not ...


10

I think these questions (off-topic, old, highly viewed) ought to be tracked and closed. They date back from an age of darkness, when the site's scope wasn't as clear-cut as it is today. If they're valuable content with some upvoted answers, then perhaps we should put a historical lock on them. I have flagged the question you've mentioned as such. As a beta ...


10

Generally beta sites don't have close migration paths to anywhere but their meta. I've personally migrated a fair number of questions to both SO and Programmers, and as the site grows I anticipate more. I think that the number of migrations can be evaluated after launch and the path added if necessary (the team can clarify this further). However, moderators ...


10

From box below your question Questions containing broken code or asking for advice about code not yet written are off-topic Your question has Try changing top 0 to Bottom 0 for the .text:after and see the issue so at least partially it is about broken code. See https://codereview.stackexchange.com/help/dont-ask What types of questions should I ...


10

Thank you for revising the question — Rev 5 is much better as a Code Review question than the original. That said, I hesitate to reopen it, because I'm not 100% sure I understand what you are trying to accomplish with this code. Why are you calling the function as change_object_using_path_string("example_object", …) rather than ...


10

So, do you think my original post it theoretical? or maybe pseudo-code or hypothetical? do you think it is off topic? Yes, and unclear, since it was lacking a description. In my opinion, it has been sufficiently improved since closure. So I've initiated the reopening process by casting the first vote. Update: the question has been reopened.


10

I can see why the question has been closed. It clearly does not work as intended, the author states: So essentially I can encrypt a single word, but not a sentence. The program crashes on me if I try to input more than one word. How would I go about encrypting a sentence? If the code is intended to encrypt sentences, and it does not encrypt sentences,...


10

As I see it, being nice to new contributors means that we give them more friendly guidance on how to make their questions and answers acceptable for Code Review. It doesn't mean that we lower our quality standards or ignore our rules. I believe that the question is off-topic, as originally posted, because it asks for help to fix the code to accommodate ...


9

The fact of the matter is that this is the third off topic question posted by Leon. Without even try to help Leon to improve his question by posting some advices in the comments. This is simply not true. It's not like we didn't try to explain it in several comments. In fact, I tried my best to provide some helpful suggestions in one of these comments: ...


9

Determining why other people voted to close a post is not reliable, but, I would have also voted to close the post because it is clear that there is a lack of testing, or validation of the code. The issues are so "basic" that it's almost as if they have not run their code at all. For example, the test: elif y.upper() == True will never resolve the way you ...


9

No, this question should remain closed as "Not working as intended": "My code does not work some of the cases on hackerrank for some reason but I can't figure out why. It is not caused by timeout or compiler error. It gives a 'wrong answer' in the compiler but when I try to test my code with the same input on VSCode, it actually works." The ...


8

General remarks First of all, I appreciate the feedback. While good moderators can strengthen a site, bad ones (whether deliberate or unwitting) can be toxic. If any community member is unhappy with a moderator action, I'd much rather know about it. Second, moderators do make mistakes. Community members do too — sometimes five of them together. ...


8

It's perfectly ok to edit questions for these reasons, but there may be a time when it's not appropriate to edit a question at all, regardless of the reason. When we edit a question, we're actually making the container more attractive for reviewers to come and look at the content, so that the post gets the attention it deserves - regardless of its age: it's ...


8

I don't believe that the question is off-topic. However, the way that it was posted is problematic. The likely trigger for closure was the first sentence: I am parsing a large data file, and often my program will fail within the following lines of code. The way you phrased that sounds a lot like your code is broken: you say that your code occasionally "...


Only top voted, non community-wiki answers of a minimum length are eligible