# Guide To Asking Questions About Code

Hi Friends 👋

In my early stage of learning, I had no one to ask questions.
<br>
I had to Google and rely on [Stack Overflow](https://stackoverflow.com/) to find answers.
<br>
As a newbie, I didn't know how to start asking questions and how I should ask my questions.
<br>
At that time, looking at how mean people react to newbies or accidentally repeated questions on Stack Overflow was one of my reasons not to ask questions.
<br> 
I was sure my questions would be foolish because they would be a super beginner. And what if someone asked these questions before but in a different format that I'm unaware of?
<br>
My survival thought was, "I better get frustrated than bullied." 😅

But then I find out that there are no stupid questions regardless you're a newbie or not.
<br>
So, *if you need help, ask for help*.

## Background

Our members at Virtual Coffee [gathered ideas](https://github.com/Virtual-Coffee/virtualcoffee.io/discussions/409) on how to ask questions.
<br>
And I recently helped put them into a [Guide To Asking Questions About Your Code](https://virtualcoffee.io/resources/virtual-coffee/coding-questions-guide) and got it up on our website.

It's very critical for developers to know how to ask good questions.
<br>
So, without further ado, here is a guide to asking coding questions.

## How To Ask Questions

### Before Asking The Question

- Go through your code line by line.
<br>
  You want to know what your code is doing so you can answer questions. Take some notes if necessary.
- Do some research before asking questions.
<br>
  You want to avoid asking questions you can figure out by Googling your problem. You can also improve your skill in finding solutions by Googling yourself.
- Check for some typos.
<br>
Sometimes an error arises from a single typo.
- Google the error that you encounter by copy-pasting the error message.
<br>
  Most of the time, you can find some answers from people who experienced the same error as yours.

### When Asking Questions

#### Getting started

- A simple "Can someone help me with {something}?" is enough to start a conversation.
- Be specific about what you're looking for.
<br>
  "Does anyone know why my MongoDB authentication failed?" is better than "My app is crashing."
- For a more general question or when trying to grasp a concept.
<br>
  "Does anyone have experience with {something}?" or "Can someone explain {something} to me like I'm five?" is a good starting point.

#### Asking questions

- Specified details as much as possible, such as:
  - What language, framework, or library version are you using when encountering the error?
  - What operating system (e.g., Windows, Mac, Linux) and version are you experiencing the problem on?
- Provide relevant code along with your question, if possible.
- Explain the command or steps that you run to reproduce the problem.
- Describe what you have tried to fix the problem.
<br>
  It's okay if you don't know where to start, but share whatever you have already tried/ruled out.
- Read through your question.
<br>
  You want to ensure that your question makes sense and you've included all information needed for others to help you.

## Final Words

Last but not least, remember to thank people and be kind. They spend their valuable time reading and helping you answer your questions.

---

### Thank You Notes

Special thanks to [David Alpert](https://github.com/davidalpert), [Jonathan Yeong](https://github.com/jonathanyeong), [Dan Ott](https://github.com/danieltott), [Abbey Perini](https://github.com/abbeyperini), [Mark Noonan](https://github.com/marktnoonan), [Travis Martin](https://github.com/LincolnFleet), and [Claire Martinez](https://github.com/Claire) for throwing ideas and making this guide possible! 💙

### Additional Resources
- [How to be great at asking coding questions](https://medium.com/@gordon_zhu/how-to-be-great-at-asking-questions-e37be04d0603)
- [Stack Overflow Question Checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/)
- [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask)

---

Thank you for reading!
<br>
Last, you can find me on [Twitter](https://twitter.com/@AdiatiAyu). Let's connect! 😊
