The art of asking “coding” questions

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

It is not working!

“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! My name is Mosh Hamedani. I’m a software engineer with two decades of experience and I’ve taught over three million people how to code or how to become professional software engineers through my YouTube channel and online courses. It’s my mission to make software engineering accessible to everyone.

29 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:


  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,

    • 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:

        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 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 @

  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.


  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”:

  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:


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


  18. Guru Mallikharjuna Chinta says:

    HI Mosh,

    Recently I installed Angular 6 in my system. While I am executing new project code (ng new projectname), It throwing error “newTree.optimize is not a function”.

    I have cross checked all the prerequisites like Node & NPM, everything is above the required version.

    When I execute ng -v command, I got RXJS Error.

    Could you please help me, How to resolve this issue. I tried by uninstalling Node as well.

    Guru Chinta.

  19. It’s so true. There’s lots of programmers realying in someone else work, time and effort. That’s not nice.

  20. Abuzer Khan says:

    Very true mosh.unfortunately fresh developers doesn’t know how to search about the problems on google. I think one such small course should be made to teach them this as well :))

  21. Bibek Khatri says:

    I’m gonna get a rubber duck today😁

Leave a Reply

Connect with Me
  • Categories
  • Popular Posts