Questions
Tags: javascript, beginners, devjournal, theodinproject
Published: 2022-05-17 04:58:25

#**Introduction**
Invariably as you progress through your learning journey, you're going to get stuck on a piece of code. What do you do when you get stuck? There are so many resources available to us in today's world that we didn't have years ago. Before message boards existed and became popularized, you would either need a book, or you would need to know someone to solve a lot of problems you ran into whilst coding. [Stackoverflow](https://stackoverflow.com/) is a major resource for programmers to get help. It wasn't founded until 2008. Before that it was hit or miss on where to get help. Reddit was a popular choice before Stackoverflow and it wasn't created until 2005. 

Asking questions is a privilege that shouldn't be taken for granted. We now have the freedom to bridge the gap of our knowledge by tapping into the knowledge of others with ease. When do you ask questions though? Is it cheating to ask questions? I see questions like these come up a <u>LOT</u> in our discord community at [The Odin Project](https://www.theodinproject.com/) (TOP). I will answer these questions and more in this article. It is important to understand questions, and how/what/when/why to ask them. 
##**How/What/**
How to ask questions is perhaps the biggest hurdle we see in the dev community. The majority of beginning programmers come into the TOP Discord community and pretty much just ask for help with no context whatsoever for their issue. They either say "can someone help me?" or, they'll go so far as to provide a snippet of code with no context for the rest of the code that works to make their snippet functional. So, how should one go about asking a proper question?

I'll first provide for you my process then the TOP approved resource that should be followed when asking for help. My process is simply to ensure that I've included all the necessary information that someone would need in order to help me. I've never had someone ask for additional information thus far because I'm careful to assess my issue, explore possible solutions, and then seek help when absolutely necessary. 

What I do is simple:
1. After getting stuck, I work to ensure I'm truly stuck by trying various solutions I can come up with on my own and I document my efforts.
2. After realizing I'm truly in the stuck position, I then transfer my code to some code-sharing service like Codepen.io, jsfiddle, or my favorite repl.it. I then copy the link to the page and take that with me to step 3. 
3. I go to the information site where I will seek help, for me, it is TOP's Discord, for you it might be stackoverflow.com or some other message board. These steps work for all help! I then begin typing up a clear, concise request for help. That means I indicate in **bold** type something to the effect of **"The Issue: "** followed by what my stated problem is ie. "I'm trying to create a grid of `<div>`'s but for some reason I can only get one horizontal row of cells". 
4. Then I indicate **"What I've Tried: "** ie. "I have tried creating a `for loop` and a `while loop` but neither seem to work. I also tried to nest a loop inside a loop but that didn't work either. I don't know what else to try?"
5. I then include my code. I paste a link with my code-sharing site or I paste the code (for smaller snippets) inside the code tags for whatever medium you're asking for help on. Discord and Stackoverflow both have code tagging features built-in. With experience you will learn what code is necessary for what you are seeking help with but for now, it is best to include it all. It really isn't hard to ctrl-c/ctrl-v after some clicks and drags of the mouse to select code!

That's it! Once you have clearly stated your issue and given all pertinent information you can about your problem, the only thing to do is wait for someone willing to assist which generally doesn't take long.
##Why?
Why do you need to be this in-depth? There are several reasons, but the most important is because you want help. If you are seeking help, then you have to fulfill your end of the bargain to make helping you as easy as possible for the person on the other end of the line. It shows care for yourself and others. If you care enough to want a quality answer, then do your best to provide as much detail as possible and supply a quality request. 

Another reason is because you want the person who will potentially help you to be able to be fully prepared to assist you in as quick a time as possible. They are giving up their valuable time to help you, for FREE! The least you can do is arm them with the ammunition they need to fight for you!

This article by [Gordon Zhu](https://medium.com/@gordon_zhu/how-to-be-great-at-asking-questions-e37be04d0603) is a really solid resource that everyone should read in the dev world. It is TOP's go-to source of inspiration for beginner programmers on how to ask for help. I basically mimic this minus a few things I should probably adhere to more strictly. 
##When
Most people get stuck on when to ask for help. There are people that need their hands held and ask for help before even typing a single line of code, then there are those (like me) that wait too long to seek help out of desperation to solving the problem on their own. What we need is right directly between those two extremes. 

The right time to ask is after you've devoted enough time to the problem to have sufficiently come to the realization that you are not capable of moving past without some guidance. What does this look like in a practical example? You've been working on a piece of code to get a click event handler to fire for an hour. You have a solid understanding of the code involved but for some reason it just isn't working. You've tried several implementations of the code to try different things and nothing is working. You've researched multiple search terms to address your issue and nothing is working. It is now time to seek help. After following the above-mentioned method to seek help, someone helps you within a few minutes and they bring to your attention a trigger that gets you to think of a different solution to the issue. After trying it, it worked and you solved it on your own, with just a little guidance. That is what seeking help and implementing said help should look like. 

Notice I didn't say the helper provided the proper code to get the beginner going? That should never happen, and if it happens to you, try your best to ignore the direct help and ask to be guided to a solution. When you are just given the code, you are coding along with someone else vs. solving the problem on your own. You may as well copy a YouTube video that gets you to code along with them while they do all the problem solving for you. 

##Conclusion
Asking questions is a fairly tough concept to master. I never knew right off the bat that it was a process to ask questions in the developer world. It makes sense though. To get the help I want, I must invest properly to ensure the one helping me has all the information they need to provide quality support for my issue. Never forget that since they are donating their time, you should bend over backwards to make them want to help you, after all, you are the one that needs the help! Until next time...<u>be good!</u>

Photo by Pixabay: https://www.pexels.com/photo/questions-answers-signage-208494/