What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

I failed this audit, which is kind of ridiculous. I voted to close the question, because it:

  1. really belongs on Programmers or Code Review, not Stack Overflow;
  2. is broad;
  3. is multi-part;
  4. doesn't describe a specific problem encountered by the user with specific code.

Problematic parts of the question:

  • The title:

    What is pythonic way to do dt[,y:=myfun(x),by=list(a,b,c)] in R?

  • The first question, which asks for opinion-based code review:

    Although the logic is quite clear, I am not 100% happy with it. Is there any better approach?

  • A vague tool recommendation/evaluation request, reflecting minimal effort or knowledge:

    I am not very familiar with pandas. Does it help in such case?

  • And a "side question" which really belongs on Programmers or Code Review:

    Side question: is there a category that my problem belongs to? aggregation? partition? window? This pattern happens so frequently in data analysis, there must be an existing name for it.

The OP provided code in both R and Python, true, but doesn't have a problem with that code; he just wanted a review and analysis of it. This should be a straightforward close, for any number of reasons.

share|improve this question
    
Voting by its nature means that it is soliciting an opinion, so I guess it is crazy to assume that all well meaning, competent reviewers will always vote in the same way. I don't really sweat with reviews, as hopefully there is some kind of comparison to a normal distribution curve in effect when it comes to failures. –  StuartLC Jan 3 at 13:19
2  
Just because a question could work on another site doesn't automatically make it off-topic on the site it is on. Many sites, especially the programming and technology sites, have overlapping scopes, so questions could be on-topic in multiple places. –  psubsee2003 Jan 3 at 13:25
    
Not sure what all the down votes are for. Voting and voting to close are different things. This question was not even a close call. @psubsee2003: the point here isn't that the question could was on-topic for multiple sites; it's that the question was decidedly off-topic for SO. –  Ed Cottrell Jan 3 at 14:55
    
@EdCottrell I think the downvotes on this post and the upvotes on Bill's answer are saying that the community does not agree with that assessment –  psubsee2003 Jan 3 at 15:21
    
@psubsee2003 I agree that's what they mean, but I don't get it. Bill's answer doesn't really explain a reason to keep the question open; he just says it's a good question (and makes a couple of incorrect statements about the question). –  Ed Cottrell Jan 3 at 15:43
1  
@EdCottrell but again, we're back to how the voting is going. Your opinion is that it is a bad question. A number of users agree with your position. But more users agree that it is a good question. Forgetting about the audit, you are free to vote to close the post as you see fit, and if 4 other users agree with you, it will get closed. –  psubsee2003 Jan 3 at 15:46
    
@psubsee2003 I see your point, but the issue is whether it's a good audit question. Right now, if the voting is any indicator, the answer is no. –  Ed Cottrell Jan 3 at 15:49
1  
@EdCottrell then go vote to close the question or downvote it and it will never be used as an audit again. –  psubsee2003 Jan 3 at 15:51

3 Answers 3

up vote 5 down vote accepted

The purpose of the audits is to detect robo-reviewers, not to enforce group-think on voting behavior. Ideally, no one would fail an audit from a good-faith exercise in actual thought, even if the reviewer reaches an unconventional conclusion. After all, in live operations, we require multiple close votes for a reason, and we don't punish the minority.

However, as flogged to death and back again three times, the audit system is inescapably imperfect. The heuristics it uses to select candidates are guaranteed to produce this result from time to time.

The team's response, over and over, has been to reassure reviewers-in-good-faith that rare audit failures are nothing to worry about, and to decline all requests to soften the yelling language or offer an 'appeal' button.

share|improve this answer

I think this is a bad question to use for review, but I don't think it necessarily needs to be closed.

really belongs on Programmers or Code Review, not Stack Overflow;

There's no reason to move it if it's on-topic on Stack Overflow just because it might also be on-topic on another site. It also already got a good answer on Stack Overflow, so there's no need to move it now.

is broad;

No, it's ultra-specific. It gives a line of code in R, an attempted solution in Python, and asks how to do that better in Python.

is multi-part;

Ok, but is that a reason to close a question?

doesn't describe a specific problem encountered by the user with specific code.

I think it's pretty clear from context that the OP is looking for a one-line solution in Python like the one-liner in R. The author of the question isn't asking for a review of their Python code. I think it's there to show that they did make an effort, but fell short of the goal set by the R code.

share|improve this answer
    
You must have been looking at my screen, I was typing almost the same thing –  psubsee2003 Jan 3 at 13:22
2  
@psubsee2003 That's one of the new, top secret moderator tools that they just rolled out! ;) –  Bill the Lizard Jan 3 at 13:26
1  
Wow, you are going to get accused of a lot of plagiarism that way :-) –  psubsee2003 Jan 3 at 13:26
    
"I think it's pretty clear from context that the OP is looking for a one-line solution in Python like the one-liner in R." Actually, quite the opposite: OP was asking for the most Python-esque way to rewrite the R code. Regardless, it doesn't demonstrate a specific programming problem encountered by the user. Instead, it presented working code and asked for reviews/commentary/improvement. –  Ed Cottrell Jan 3 at 14:59
    
@EdCottrell "Suppose I have a data frame which have column x, a, b, c And I would like to aggregate over a, b, c to get a value y from a list of x via a function myfun, then duplicate the value for all rows within each window/partition." –  Bill the Lizard Jan 3 at 15:27
    
@BilltheLizard I saw that language, but that's not a problem or error OP's encountering. OP says he knows how to do it already; he just wants comments on his code or suggestions for a more Python-like way to do it. That puts it squarely on-topic for Programmers or Code Review, but off-topic for SO. –  Ed Cottrell Jan 3 at 15:45
2  
By the way, you really made my point here: "I think this is a bad question to use for review, but I don't think it necessarily needs to be closed." Apparently, there's at least some disagreement as to whether it should be closed (mostly downvotes for my question, but significant upvotes as well), so the question shouldn't have been used as an audit. –  Ed Cottrell Jan 3 at 15:48

From Which computer science / programming Stack Exchange do I post in?:

That's the most clear cut, on Code Review you share working code for peer review. If your code is not working, then you should ask on Stack Overflow. So it is the right place you if you have a question about best practices, security issues, performance improvements, refactoring a piece of working code, etc.

Since the code in this review question is working, either

  • the OP's close action is valid, or
  • this highly upvoted answer is incorrect
share|improve this answer
3  
The working code is an important part of the condition given here for posting on Code Review, but not the only part. That you're posting the code "for peer review" is also necessary. As Bill already explained, the OP here doesn't really want their existing code reviewed. In this case, it looks to me like the question would still make sense and be a good question even if the poster hadn't included their Python code at all, so clearly the question doesn't belong on CodeReview. –  Mark Amery Jan 3 at 14:27
    
The fact that the question is on-topic for CodeReview (even if true) doesn't necessarily imply that the question is off-topic for StackOverflow. –  D.W. Jan 4 at 5:10

You must log in to answer this question.

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