The Art Of Asking Good Questions

As developers, the more code we write the more bugs we have to tackle sometimes we may have just missed a simple semicolon(;) or maybe a typo.

Most of the times someone already has encountered that problem, and asked on stack overflow so we continue t…


This content originally appeared on DEV Community and was authored by Vaarun Sinha

As developers, the more code we write the more bugs we have to tackle sometimes we may have just missed a simple semicolon(;) or maybe a typo.

Most of the times someone already has encountered that problem, and asked on stack overflow so we continue the tradition and copy and paste the first code snippet we see on that stack overflow question into our code.

But there are sometimes where we encounter truly unique problems / weird errors where no stack overflow answer or google can help us.

So to solve this problem we ask other developers on public forums, mail groups, discord servers etc...

To make sure you get help quickly you should know how to ask a great question!

But before asking make sure that you have properly debugged the code, referred to other Similar stack overflow questions and have researched enough on the topic/problem that you have.

Here are DOs and DONTs of asking question:

DOs:

  • Have a good title that summarises the problem.
  • Keep the content short.
  • Create a live online environment on REPLIT or other similar online platforms.
  • Provide operating system, framework/language version and relevant code.
  • Copy and paste only the error value not the whole file system traceback.

DONTs:

Here is a sample question that uses the above principles.

Sample Question

Title: Weird behaviour while adding two inputs.(Python)
Tags: #python
Error: When I add 1 and 1 in this program it prints 11 rather than the expected result of 2.
Code:

num_1 = input("Enter number: ")
num_2 = input("Enter number: ")
print(num_1 + num_2)

Live Environment To Run The Code:
https://replit.com/@vaarunSinha/Asking-Questions-Example#main.py

Thank You For taking time to read this question. Please help me out.

Conclusion

The above question is really good, but here's the one and only problem with this question, that if I had researched enough I would have got the answer that actually I was adding strings.

I could not find a better example that's why 😅

I hope from now you will ask great questions as a developer!

Happy Debugging


This content originally appeared on DEV Community and was authored by Vaarun Sinha


Print Share Comment Cite Upload Translate Updates
APA

Vaarun Sinha | Sciencx (2022-02-03T14:17:50+00:00) The Art Of Asking Good Questions. Retrieved from https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/

MLA
" » The Art Of Asking Good Questions." Vaarun Sinha | Sciencx - Thursday February 3, 2022, https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/
HARVARD
Vaarun Sinha | Sciencx Thursday February 3, 2022 » The Art Of Asking Good Questions., viewed ,<https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/>
VANCOUVER
Vaarun Sinha | Sciencx - » The Art Of Asking Good Questions. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/
CHICAGO
" » The Art Of Asking Good Questions." Vaarun Sinha | Sciencx - Accessed . https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/
IEEE
" » The Art Of Asking Good Questions." Vaarun Sinha | Sciencx [Online]. Available: https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/. [Accessed: ]
rf:citation
» The Art Of Asking Good Questions | Vaarun Sinha | Sciencx | https://www.scien.cx/2022/02/03/the-art-of-asking-good-questions/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.