Stack Overflowの質問チェックリストから「嫌がられない質問の仕方」を学ぶ

開発者としてデビューする人も多い春。前にStack Overflowの回答者のモチベーションを支える技術について触れたが、その両輪として、質問のクオリティも重要だ。Stack Overflowを運営するJoel Spolskyも紹介していたSTACK OVERFLOW QUESTION CHECKLISTを読んでみる。

- Have you done some research before asking the question?
- Have you explained what you’ve already tried to solve your problem?
- Have you specified which language and platform you’re using, including version number where relevant?

質問の前に自分で調べたか、すでに調べたことを説明しているか。言語やプラットフォームのバージョンは書いたか。質問の前に、短くても完全なプログラムを書いたか。

日本のサイトでも、このあたりの情報がないから答えないという神経質な回答者を多く見かけるが、せっかく回答してたのに環境差分などがあったりしたら、それこそ時間の無駄だから質問者の側が気をつけるべきだろう。

- If your question includes code, have you written it as a short but complete program?
- If your question includes code, have you checked that it’s correctly formatted?
- If your code doesn’t compile, have you included the exact compiler error?
- If your question doesn’t include code, are you sure it shouldn’t?
- If your program throws an exception, have you included the exception, with both the message and the stack trace?
- If your program produces different results to what you expected, have you stated what you expected, why you expected it, and the actual results?

そのプログラムは正しくフォーマットされてるかチェックしたか、コンパイルが通らないならコンパイラエラーを書いたか。質問にコードが含まれてない場合、コードを含まずにすべき質問なのか。例外を投げているなら、メッセージとスタックトレースは含んだか。期待していたものと異なる答えなら、何を期待し、何が得られたかを書いたか。

初学者にとっては目が届かないかもしれないが、回答者にとって必要な情報はコンパイルエラーや例外メッセージに含まれているというわけだ。

- Have you checked that your question looks reasonable in terms of formatting?
- Have you checked the spelling and grammar to the best of your ability?
- Have you read the whole question to yourself carefully, to make sure it makes sense and contains enough information for someone coming to it without any of the context that you already know?

技術的なことだけでなく、質問する言葉も雑であってはいけない。

エンジニアが知らないことを聞ける「心理的安全性」も重要だが、その心理的安全性を維持する上でも、上手に質問をするための作法は明確にしておきたい。



この記事が気に入ったらサポートをしてみませんか?