Comments

The art of asking “coding” questions

One question (or more accurately, comment) that I frequently get on my YouTube videos is:

… is not working!

Examples: “npm install is not working”, “interpolation is not working”, etc.

“It’s not working” is not helpful! It doesn’t tell me or others about the problem you’re facing.

What error do you get? Have you tried to Google the exact same error message? If not, did you know that if you do that, 90% of the time, you can find the answer to your question within minutes? In fact, 90% of the time, the first link on Google search result is a link to a page on StackOverflow, where someone else faced the exact same problem!

3 tips that make you a better developer

Tip 1: Learn the art of asking ‘programming’ questions. Be specific about why “it’s not working”!

Tip 2: Learn to find the answer to your question yourself. You cannot always reach out for help every time “it’s not working”. Successful programmers are independent. Linus Torvalds, the creator of Linux, even wrote his own editor and assembler! Now, you don’t need to do this to be independent, but a Google search takes only a few seconds and helps you become less dependent on other developers in your team.

Tip 3: Read about rubber duck debugging. It works!

If you enjoyed this article, please share it with others.

Hi! I’m Mosh Hamedani and I help ambitious developers take their coding skills to the next level. Over the last 3 years, I’ve taught over 200,000 students through my online courses and my YouTube channel has been watched over 5.7 million times! It’s my mission to make coding and software engineering accessible to everyone.

25 responses to “The art of asking “coding” questions”

  1. Vaibhav Agarwal says:

    I would like like to add that if possible then students should give a working ‘code fiddle’ of the code from websites like jsfiddle, codepen etc. This is possible if the questions asked are from HTML, Javascript, JQuery, Angular JS and other front end technologies. Now days there are also SQL Fiddles available.

  2. Thanks a lot Mosh. Nice post.

  3. We want a article about algorithms

    • o2deprived says:

      This is another thing that frosts me in comments sections…the completely unrelated, Santa Claus wish-list, gimme-gimme posts…

  4. Antonio says:

    Absolutely!.

  5. Sean Newell says:

    > Tip 1: Learn the art of asking ‘programming’ questions. Be specific about why “it’s not working”!

    What if I have coworkers, peers, or students who continually ask awful questions? Got any resources or tips on how to ask good questions? I don’t think it is as simple as being specific about why something is not working – actually the inverse could be great. Why _is_ something working?

  6. Jon says:

    Totally agree and love the rubber ducking 🙂

  7. Parashuram K says:

    Very true words Mosh, every one should take with thumbs up and need to become an independent developer.

  8. Negar says:

    rubber duck debugging, really cool.It changed my mood. 🙂

  9. Seow Woon says:

    Hi Mosh, Would you mind to share with us what’s the software modeling method that you used to use in designing or study a c# program?
    I found that reading the code can be very difficult job. If we could draw the software model out it could save a lot of energy in understanding the program.

  10. Sören says:

    Hi Mosh,
    I am still waiting for the discount mail. Nothing was received from my mail server (checked the mail log, to be sure it was not junked). I would really like to view your very good videos! What shall I do?
    Best regards,
    Sören

    • Mosh says:

      MailChimp been flaky lately! Can you try signing up with a different email? Let me know if it doesn’t work.

      • Sören says:

        Hi,
        it doesn’t. Nothing has reached my mail server. I’ve tried a free mail account to be sure it’s not caused by my own settings. Any idea?

  11. pouyan says:

    hi mosh how can i use this course with asp.net mvc?

    • Mosh says:

      You’ll learn the fundamentals of testing that would help you write tests for your ASP.NET MVC apps. But when it comes to ASP.NET MVC, you need to learn some additional tips which will be part of a separate course.

  12. Darren Evans says:

    If you’re a fan of Stack Overflow you may also find Jon Skeet’s tips on how to write the perfect question @

    https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/

  13. lbechdol says:

    I agree with all you’ve said in your post, Mosh–and want to add the advice is not only for developers, but normal computer users in the office as well! I provided direct computer/server support for over 35 years. I always encouraged users to think about the issue, see if they could make it repeat so they could tell me the steps they were doing, etc.

    In other words “Details please”. Even a picture of the error message is often-times helpful.

    LarryB

  14. Tom RIvers says:

    When it comes to helping people to ask better questions, the reference I have always shared is Eric Steven Raymond’s “How To Ask Questions The Smart Way”: http://www.catb.org/~esr/faqs/smart-questions.html

  15. Paul says:

    I would like to add a fourth tip: read the log file!

    Most junior developers, when facing a problem, start fiddling with the code based on assumptions of what went wrong. It can keep them busy for a long time before they finally reach out to a senior. My first question is always: “What’s in the log?”. Then they find the stack trace with the exact code line where the error occurred.

  16. Amir Najari says:

    Thank you for your awesome work Mosh.

  17. ganpat says:

    Hi,

    I am not getting difference between node and type script. why typescript installation is not required separately?

    Thanks

Leave a Reply