Hacker News new | ask | show | jobs
by olavk 2983 days ago
Exactly...that is why you ask clarifying questions. And if you post a question on SO is a great idea to include contextual information which helps clarify what you are trying to achieve.

A bit of context like "I'm on an embedded platform, so I can't use heap allocation", or "the HTML is for an emai'l, so I cant use JavaScript" also goes a long way to avoid the annoying "why don't you just..." comments.

If you peruse SO you will notice quite a lot of questions simply does not make any literal sense because of misuse of terminology or just lack of understanding. Very often questions arise exactly because the person have a wrong mental model of how the system is supposed to work. Which means the question will reflect this misunderstanding in the way it is posed. Just answering the literal question is not helpful and in many cases simply not possible.

1 comments

>Just answering the literal question is not helpful and in many cases simply not possible.

If you can't answer it, or don't want to answer it, then don't answer it. But please don't be the annoying, condescending know-it-all who is always there to provide an unsolicited lecture.

A typical example is "I want to keep my JavaScript code secret. How do I disable the 'View source' menu item in browsers?" This is a very frequently asked question. What would be the most helpful answer, if you imagine you are a newbie asking in good faith?

1) No answer

2) A technical explanation of how the 'view source' menu item can be suppressed (e.g. iframe, overriding right-click events and so on) which may at least work in some browsers some of the time.

3) An explanation why it is simply not technically possible to hide code sent over the wire to the client, and a suggestion to move sensitive code to the server if this is possible.

Clearly (2) is closest to the technically correct answer to the question... but it is it really helpful? Option (3) do offer unsolicited advice, which could be construed as condescending since this is not what was actually asked. But I will also argue this is the most useful response in 99% of cases.

But there might be some specific cases where (2) is actually relevant. E.g I'm building some kiosk-style console to provide an interactive quiz, and I don't want users to cheat by using view source to see the answers. In this controlled environment, it might be possible to completely disable "view source". So providing both (2) and (3) is the optimal answer, and should get the green checkmark.

But I simply fail to understand how giving no answer could be better for anybody?

Parent said:

> If you can't answer it, or don't want to answer it

Here is how I would rank answers from best to worst:

1. Give the correct answer to the technical question asked, and some background about when to think twice about using it

2. Give the correct answer to the technical question asked

3. Why you should rethink the approach

4. No answer

5. "Don't do it"