开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
今日推荐开源项目:《召唤 ar-cutpaste》
今日推荐英文原文:《The Smarter Way of Asking for Programming Help》

今日推荐开源项目:《召唤 ar-cutpaste》传送门:GitHub链接
推荐理由:科技不断发展之后就会越来越像魔法……这个项目可以干你以前从未想过的事情:拿起你的手机,对准一个你身边的玩意,用手机把它抓起来,扔到电脑上的 PS 里去。尽管单纯看起来似乎用处不大,但是如果继续发展下去,可能就会为我们带来从未想象过的新生活方式。
今日推荐英文原文:《The Smarter Way of Asking for Programming Help》作者:
原文链接:https://medium.com/better-programming/the-smarter-way-of-asking-for-programming-help-52cd140dc437
推荐理由:在提出问题之前当然需要完成一些你自己能完成的工作

The Smarter Way of Asking for Programming Help

As programmers, we all face bugs regularly in our programs. Nevertheless, we must find a way to solve those issues and make our programs run properly. Some people are so good at debugging — they can find bugs and solve issues on their own. But they, too, would have gotten to that level of expertise by having taken baby steps from the beginner level.

I personally like helping people solve their bugs. Lending others a helping hand is fun and emotionally rewarding. It also helps me revise or learn things that I’ve missed or forgotten.

Therefore, I’ve created this small guide to help beginners ask help from fellow programmers in a smarter way.

Before You Ask a Question

Before you ask for help, make sure you’ve done your part of the research as well. Some people are so lazy — they don’t even think of doing some googling on their end. They simply open up a forum, say Stack Overflow or a Facebook group, and post their question. It can even be simple questions, such as “how do I start programming?” or “how do I install an npm package?”

You can genuinely not understand how to do it, but you must make sure you put up an effort from your end — and then ask for help. Make sure you show the potential audience of your question that you’ve put an effort into finding a solution to your problem and yet failed.

These are some steps you can take before asking your question from others.
  • Search online — the first thing you should do is google
  • Read the documentation — make sure you read the official documentation and forums
  • Ask a skilled friend — if the above two options don’t work, you can ask a skilled friend of yours
If you haven’t been able to find a solution after these three steps, you can go ahead and ask your questions. When you ask your question, display the fact you’ve done these things first.

How to search online

One common thing I’ve noticed among my peers is they all do search on Google before asking a friend for help. But what surprises me the most is when a friend searches on Google to find a solution and succeeds in doing so.

How can two people search on the same platform, yet only one person was able to find a solution to the problem?

This is because of the way both of them phrased their questions.

Make sure you include only the necessary phrases or terms in your search query. Suppose you want to know how to add a local image to your HTML. You can either search “how to add images to my website” or “how to add a local image in HTML.” As you can see, the latter question is better phrased — as it’s more specific but provides enough detail.

Photo by Charles Deluvio on Unsplash

How to Ask a Question

Make sure you ask the right question at the right place

Be cautious about where you ask your question. You’re likely to be ignored or written off as a loser if you:
  • Post your question to a forum where it’s off topic
  • Post a very elementary question to a forum where advanced technical questions are expected — or vice versa
  • Crosspost to too many different newsgroups
  • Post a personal email to somebody who is neither an acquaintance of yours or personally responsible for solving your problem

Make sure you post clear screenshots/messages of the error

I’ve seen countless posts being mocked on Facebook groups because the question contained very unreadable images of the code or error.

You should always make sure your code is readable. This can be achieved by uploading screenshots of your error/code. You can even upload your code via GitHub gists or code editors like CodePen. This makes sure that people can clearly read and understand your code, without having to turn their heads to be able to see your captured image of the code.

Always make sure to include your error message as a text in your post. This will make it easier for people to do research on.

If you don’t know how to take a screenshot, you can find out more here.

Try websites like Stack Overflow

Stack Overflow is the largest, most trusted online community for developers to learn, share​ ​their programming ​knowledge, and build their careers.

Make sure you follow the Before You Ask a Question guidelines mentioned above to avoid being downvoted on your question. Being downvoted gives you a bad reputation on Stack Overflow. Posting code/error screenshots in StackOverflow is not recommended at all.Try to post your error as a text.

Write the question as clear as possible and straight to the point

One thing I’ve noticed on forums is people posting questions that make no sense at all. I do understand that they’re poor in English. If you have such issues, you can always ask a friend to proofread your questions for you. There is nothing to be ashamed of when asking for your friend’s help on this.

Also, make sure your question is straight to the point. Don’t beat around the bush and waste peoples time.
  • Mention the environment you run on
  • Describe the symptoms of your problem or bug carefully and clearly
  • If at all possible, provide a way to reproduce the problem in a controlled environment
  • Make sure you include the exact text of the error message — ideally, copy and paste it directly out of whatever log, console, or web page contained it
  • If you need help with a piece of code, always provide a code sample. It need not be the exact code, but it shouldn’t be semantically different from your actual code. For instance, hiding particularly sensitive values in your code is fine, but you shouldn’t change or paraphrase things like loop conditions.

What If You Don’t Get an Answer?

If you’ve followed all of the above steps, be patient until you receive feedback. Unless you’re paying someone for their time, you’re not entitled to their help. There are plenty of people willing to answer your questions out there, but they don’t tend to like being annoyed. Once you’ve stated your problem or question somewhere, give it some time. Generally, people who are willing to help will do so when they’re able.

If you don’t get an answer to your question, don’t take it personally. Sometimes the members of the asked group may simply not know the answer. No response isn’t the same as being ignored — though, admittedly, it’s hard to spot the difference from the outside.

If you’re still in need of solving your question, you can get paid help. There are also plenty of commercial companies you can contract for help, both large and small. Don’t be dismayed at the idea of having to pay for a bit of help! After all, if your car engine blows a head gasket, chances are you’d take it to a repair shop and pay to get it fixed. Even if the software didn’t cost you anything, you can’t expect that support to always come for free.
下载开源日报APP:https://openingsource.org/2579/
加入我们:https://openingsource.org/about/join/
关注我们:https://openingsource.org/about/love/