3

I know about all of the about what's on-topic, but I wanted to ask this question about a specific question, to satisfy my wonder.


The question in question: Handling exceptions I don't know about.

It's a pretty Python-specific question, because Python is almost unusual among programming languages in its use of Exception Handling for control flow where most other languages use it as a last resort.

The question is asking, essentially:

What's the best / most Pythonic way to structure this exception-driven control flow?

Some example code is provided, and an (apparently) objective answer or two was supplied.

My confusion arises from the fact that this question, if augmented with a little more Real Implementation Code,1 would be perfectly on-topic on Code Review.

It seems to me that Programmers deals in the immaterialistic theories and misty, pure methodologies of programming, while CR deals in the application of the stated theories and methods against real code in real problems.

It also seems to me that these two intents are inherently at odds for content; something posted on one site must not be a good fit for the other.

The question in question is arguably more about the actual specific code than the methodologies and theories behind it, so:

TL;DR: Why's this question on-topic and accepted?


1: Good, on-topic CR questions have real, tangible, working code that can be reviewed in an objective manner, not just examples, which is the cause for the note.

  • 1
    Unfortunately I don't have time to write a proper answer with Meta.SE citations, but the main things to point out are 1) It is completely okay and actually common for sites to overlap in scope. 2) A question being on-topic at site X does not automatically make it off-topic on site Y or require a migration from Y to X. 3) A question being about a specific language does not make it off-topic here on PSE. Statistically, it does reduce the a priori probability of it being on-topic, but it's entirely possible to ask a software design question which revolves around a feature unique to one language. – Ixrec Mar 25 '16 at 1:05
6

There is no rule that a question cannot be on topic in two places.

That being said, the question you linked was not really asking for a review of existing code but rather a design decision about how to write future code -- code review requires working code to review.

Trivial examples are not really reviewable in a meaningful way.

  • So, you brought up a point that I was close to addressing in my question but which I deliberately avoided for brevity, mostly. I don't agree at all that a question about how try ... except structures should be written for specific cases is Too Localized for Code Review. I think this was pretty trivial, especially considering what the better implementation turned out to be (one line to my ~10), but it's still on-topic at CR, as "what's a better way to express this in Python?". – cat Mar 25 '16 at 1:12
  • Having said that, I definitely see your point. – cat Mar 25 '16 at 1:14
  • "There is no rule that a question cannot be on topic in two places." I'm not sure I understand this fully. On Area51, many site suggestions are shot down because they too closely overlap with an existing site -- without being all that close in the first place. As I noted in the question, topics like the handwavy "How should I organise my hypothetical interface thingys" are explicitly disallowed at CR but OT at Programmers, and "tell me about this code" is OT at CR but not Programmers. Is this one of very few places where the scopes intersect? – cat Mar 25 '16 at 1:17
  • @tac Area51 isn't necessarily a good comparison since that's about creating new sites, rather than explaining existing ones, but I'd assume they're eager to avoid the confusion and fragmentation that many of the programming-related SE sites suffer due to scope overlap. I don't think the current scope of Programmers.SE is something that ever would've made it out of the Area51 system (a SoftwareDesign.SE maybe, but Programmers.SE isn't quite as clear-cut as that). – Ixrec Mar 25 '16 at 7:47
  • 3
    @tac how much experience do you have with Code Review? I have some experience with CR and it really feels like this would not be a good question there and is a much better question here. I still suggest this is not a "review this code" but a "how should I design this code?" question - which fits better for P.SE than CR. – enderland Mar 25 '16 at 11:37

You must log in to answer this question.

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