Skip to content

Commit 0d7913c

Browse files
committed
how to ask and answer
1 parent 2aa5847 commit 0d7913c

File tree

2 files changed

+207
-0
lines changed

2 files changed

+207
-0
lines changed

how-to-answer-a-question.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# How to answer questions
2+
3+
Thank you for wanting to answer questions! This is how we grow as a community :)
4+
5+
1. Make sure the question follows the "how-to-ask-a-good-question" guide
6+
2. Make sure your answer unblocks the user
7+
3. Remember, this is living documentation!
8+
4. Format your answers, like in the `how-to-ask-a-question` guide.
9+
10+
11+
# 1. Make sure the question follows the "how-to-ask-a-good-question" guide
12+
13+
If the question is poorly formatted and you know how to reformat it reformat it and ask them next time to format their code.
14+
15+
If the question is posted in the wrong place (like a theoretical question posted on stackoverflow) kindly let them know that it's in the wrong place.
16+
17+
If the question has already been asked and answered, answer with a link to the question that has already been asked and answered and ask if that solves the problem.
18+
19+
If the problem has a poor title, doesn't make sense to others, etc, feel free to edit the question to what does if you can understand it. If not, you can answer saying "I don't quite understand what you're asking, could you reformat your question following the "how to ask a question" guide?
20+
21+
If they used screenshots, feel free to ask them to copy-paste the code.
22+
23+
Or, feel free to ignore it. This is a community run forum and no one is "entitled to" answers! Be nice, be respectful, and have fun. But if you do know how to help someone, a little "could you please refactor your question" can go a long way!
24+
25+
### Don't feel obliged to help right away if they are not asking well-formatted questions. Make them ask a well-formatted question first before you answer!
26+
27+
But don't be a jerk about it. If they just need a little formatting touch up, just touch up their question for them.
28+
29+
# 2. Make sure your answer unblocks them
30+
31+
Often times, people will ask questions where the answer might be X, but they are trying to do Y. Try to anticipate what people are trying to do. Answer the question at face value, and then maybe give more information on where to go next.
32+
33+
Often, giving a summary of your answer at the top with copy pasteable code, and then a "more information" is a best practice.
34+
35+
# 3. Remember this is living documentation!
36+
37+
Treat it as such. Go back and update answers if you find them!
38+
39+
# 4. Format your answers, like in the `how-to-ask-a-question` guide.
40+
41+
See that guide for more information.

how-to-ask-a-question.md

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
# How to ask a question
2+
3+
> Note: Before reading this, you might want to read my guide on [top 6 tips to solve any software engineering error](https://medium.com/better-programming/top-6-tips-to-solve-any-software-engineering-error-a794a162fcaf).
4+
5+
Also note, take this pledge: "I solemnly swear that after asking a question I will spend at least 5 minutes trying to answer someone else's question. I will consult the 'How to answer a question' page before I do so. "
6+
7+
The internet is our documentation, and we want to treat is as such. **Every** *specific* question we have *should* be able to be found by typing it into a web search bar.
8+
9+
Now, there are no "bad" questions, but there are poorly-formatted questions. A poorly formatted question has a low chance of being answered, poor chance of being discovered, and can "clutter up" forums and discussion boards. So let's make sure we strive for well-formatted questions!
10+
11+
# Full Examples at the bottom!
12+
13+
Here are the steps to ask a well-formatted question:
14+
15+
1. Search to see if the question has already been asked
16+
2. Know where to post your question
17+
3. Make a title that summarizes the problem
18+
4. Introduce the problem before writing any code
19+
5. Make sure you format code using backticks (```) and a language tag
20+
6. Make sure you copy paste your code instead of using screenshots
21+
7. Make sure your code is a minimal example
22+
23+
24+
# 1. Search to see if the question has already been asked
25+
26+
## Do not skip this step!
27+
28+
We should think of the internet as one giant document. If a question has already been asked and you can find it on the first page of your search engine, it's good! Don't ask the question again!
29+
30+
And if it's not on the first page of your search results, then **yes, you should 100% ask the question on a forum even if you know the answer.**
31+
32+
We want every tech question ever to be:
33+
34+
1. Indexed by search engines
35+
2. Easy to find
36+
3. Easy to reproduce
37+
38+
So that in 6 months when you forget the answer, you can just google it and it'll show up!
39+
40+
We don't want there to be multiple questions, because that can fragment where people look! We want to add answers, comments, etc all in one place
41+
42+
# 2. Know where to post your question
43+
44+
I categorize questions into one of three:
45+
46+
- Specific code based questions
47+
- Generic theoretical questions
48+
- "In the know", support, or emergency questions
49+
50+
## Specific code based questions
51+
52+
These are what we strive for. These are reproducible questions that help the world. You'll want to put these questions in places like:
53+
54+
- The "Q&A" discussions section of this course
55+
- stackoverflow
56+
- stack exchange ETH.
57+
58+
These are questions that typically can have a "right" or "many right answers". Generally, these are not very opinionated questions.
59+
60+
These are questions like "How to convert bytes32 to uint256".
61+
62+
## Generic Theoretical Questions
63+
64+
These are questions that likely do not have a canonical answer. These are questions like "which blockchain should I deploy to?" or "How could I make a game that involves many random characters?". They belong in places like:
65+
66+
- The "General" discussions section of this course
67+
- A generic forum like Reddit, Twitter
68+
- Discord (like some of the ones people have started here)
69+
70+
Ideally, you put these on an indexed forum like reddit and the general discussions section instead of discord so others can do a web search for the problems.
71+
72+
## "In the know", support, or emergency questions
73+
74+
These are very specific use cases and 99% of your questions will not be these kinds. These are questions like "we just got hacked, can you help us?", "Want to join my team", etc. They are questions that likely only apply to your situation and what you are doing. They belong in:
75+
76+
- Discord DMs
77+
- Email
78+
- etc
79+
80+
And should be used *very* sparingly.
81+
82+
# 3. Make a title that summarizes the problem
83+
84+
It should be minimal, searchable, indexable (by search engines).
85+
86+
## Examples:
87+
Bad:
88+
- I'm stuck, please help
89+
90+
Good:
91+
- Could Not Detect Network using WSL & Ganache
92+
93+
Bad:
94+
- hardhat error
95+
96+
Good:
97+
- TypeError: Cannot read property 'length' of undefined - when deploying contract
98+
99+
Bad:
100+
- hardhat error
101+
102+
Good:
103+
- TypeError: Cannot read property 'length' of undefined - when deploying contract
104+
105+
106+
4. Introduce the problem before writing any code
107+
108+
In the body of the question, say what you're trying to do, what you've done, and give a summary of your problem.
109+
110+
With this course in the discussions tab, you may also give a timestamp of where you're getting the issue (in fact, please give a timestamp with a link to the location in the video).
111+
112+
5. Make sure you format code using backticks (```) and a language tag
113+
114+
You'll want to format your question so it's as easy as possible to read! Especially with your code snippets.
115+
116+
Your code should show up like this:
117+
118+
```javascript
119+
// my code here
120+
```
121+
122+
In your question, you'll type it like this:
123+
124+
````
125+
```javascript
126+
// my code here
127+
```
128+
````
129+
130+
If it doesn't get formatted, you can edit your question (usually, you can click the three little dots at the top right of your question) to make it formatted nicely.
131+
132+
6. Make sure you copy paste your code instead of using screenshots
133+
134+
We want web crawlers to index every word you write, so even copy paste errors (and format them with 3 backticks!)
135+
136+
137+
7. Make sure your code is a minimal example
138+
139+
There are two types of code questions:
140+
141+
- Debug me
142+
- Specific questions
143+
144+
Don't be a "Debug Me"
145+
146+
## Example of a poorly formatted question (a debug me question):
147+
148+
Hi I'm confused my code isn't working here is all my code
149+
150+
```javascript
151+
// pretend I pasted like 300 lines of code here
152+
```
153+
154+
## Example of a much better question
155+
156+
I'm getting `error x` on line 42 of my code:
157+
158+
```javascript
159+
const some_var = "dog"
160+
// this is the line that is erroring
161+
```
162+
163+
[More information on reproducible code.](https://stackoverflow.com/help/minimal-reproducible-example)
164+
165+
166+

0 commit comments

Comments
 (0)