DEV Community

Cover image for How to Ask a Great Programming Question

How to Ask a Great Programming Question

sam0132nodier profile image Sam Nodier ・2 min read

When you start the programming journey, you face a lot of problems and bugs in your code that are hard to detect on your own especially if you are a beginner.

There comes asking a question in some of the great programming communities like StackOverflow, Reddit, Quora, and CodeProject to see if you can get help with your code. Here I am to give you 7 tips to base on if you want to ask a great question that will get great answers.

1. Explain what you're trying to do

People who are going to help you need to know what you are doing to get started helping you. It can help them to correct you if you are using the wrong method to create your project.

2. Talk about what you did to solve the issue

Anyone who will be willing to help you will see that you're actually putting in some work on your own.

3. Specify the programming language you are using

This is very helpful because you don't want to get the solution of your python problem in cobol. Sites like StackOverflow uses #tags to make your question searchable in searches.

Screenshot of StackOverflow tags

4. Specify when you get the error.

Do you get the error at the start of the running the program or when you perform some action like clicking on a button or inputting some data?

5. Copy and paste

Copy and paste the insensitive parts of the code and the error message that you think might help you to get your answer quickly if possible.

Screenshot of code sample

Screenshot of error

6. Include the versions

Try to include the version of the programming language, library, and/or framework you're using. Sometimes you are using an outdated version that doesn't support the features that you want to use or syntax differences between the older and newer version.

7. Did you change the code

If the error came after you made a change in your code, explain what you changed and why you changed it. You might need to revert changes or change a different section of your code.

8. βž• Plus tip

Now you need to follow the internet etiquette, use a good language, and demand for what worth the question you are asking. Remember you are asking for help.

Discussion (1)

Editor guide
sam0132nodier profile image
Sam Nodier Author

What other tips can you provide?