The purpose of this website is to provide answers to questions. I don't think a question being on- or off-topic should be a concern. Rather, we should be concerned that the best available answer is given.
If you can give that answer as a CS person, then the question has clearly reached a suitable audience, and the question-answer exchange was a success.
If you can give a partial answer, even if that partial answer is only, "This other StackExchange site would give you better answers than we here can provide," then the question-answer exchange was a success.
"We don't answer that kind of question here" is not an answer. Furthermore, it makes the site look exclusive and unwelcoming. It makes the poster look like kind of a jerk. I grimace every time I see it.
In response to D.W.'s comment, let's consider the question titled "Who serves the best pizza in San Jose?" with regard to the utility costs/benefits to StackExchange as a whole. Let:
c be the non-negative utility cost incurred by a user taking the time to Click on the question, read it, and formulate a response.
a be the utility benefit granted by a question being Answered.
d be the utility benefit granted by Discouraging future low-value questions, thus not wasting productive members' time
As a user contributing to StackExchange I have a number of strategies to employ:
s1 = 0. I take one look at that title and never even click it.
s2 = a-c. Well this is an easy question. Grande Pizzeria-Ristorante on 4th and San Carlos.
s3 = d-c. I take the time to reply, by saying that they should not be posting such a question.
s4 = a+d-c. I reply that while I believe Grande Pizzeria-Ristorante on 4th and San Carlos is best, pizza is not my expertise and they may be better served asking on http://pizza.stackexchange.com/
s3 is only viable if
d>c. But, the value of
d is dependent on this strategy actually causing productive StackExchange members to spend less of their time on low-value questions. If the vast majority of users employ
d's value is negligible, giving
s3 a negligible if not negative value. If even one user employs
s2, then the discouragement
d is zeroed (or at least made negligible), which again makes
s3 a negligible if not negative value.
In choosing between
d>a? Probably not. Future arrivals are almost certainly not going to search for the pizza question and decide against asking a beer question; we can expect
d to near-zero. Granted,
a is also very low in value because it is improbable anyone is going to reference cs.stackexchange.com for their own pizza questions, but at least someone's getting good pizza tonight.
s4 slightly raises our
c, but is nonetheless going to be better than either
s3. Is it better than
s1? That depends on how big
c is. For a pizza question, I can whip out an
s4 response in 20 seconds. For a computer engineering question, I could spend hours or even days trying to figure it out (an
s4 response), or I can give them my immediate thoughts and a link to the computer engineering StackExchange (also an
s4 response, but with a much lower
Nowhere in this does a response like "Sorry this is CS and that's not a CS question" look valuable. Especially when you consider that there is a hidden cost: it makes us look like not-nice people :(