profile

Learn Data Science from Data School 📊

Tuesday Tip #22: How to get coding help from a human 🙋‍♂️

Published 8 months ago • 2 min read

Hi Reader,

After a long summer break, Tuesday Tips is back! 🎉

If you’re new around here, you can find all of my past Data Science tips at tuesday.tips. (Yes, that’s a real URL!)

Next week, I’m going to start including a “link of the week” at the top of each issue. But for today, let’s just get right to the tip!

By the way, did you travel anywhere this summer? I spent some wonderful time in Iceland! 🧊🌋🥾


👉 Tip #22: How to get coding help online

If you have a coding question in 2023, you have two main options for getting help:

  • Ask ChatGPT
  • Ask a human (via email, discussion forum, Stack Overflow, etc.)

Either way, you have a much better chance of getting a helpful answer if you know how to write a great question!

My guiding principle when writing a coding question is to tell the reader everything they need to know and nothing else. This makes it easier for the reader to be helpful, and (at least in the case of humans) increases the likelihood that you will get an answer!


My 5-step process for writing a great question

(1) Write a brief introduction: Give a quick summary of what you’re trying to accomplish and the problem you’re having.

(2) Provide a self-contained code example: Write code that can be copied, pasted, and run by the reader so that they can try it out on their own machine.

(3) Detail the expected results: Explain your expected output to the reader so that they can validate whether they have actually solved your problem.

(4) Add any important notes: Tell the reader anything they need to know about the problem that wouldn’t be obvious from the code example. This helps to steer readers away from solutions that may appear to work but don’t actually solve your problem.

(5) Write a title that summarizes the question: Whether you’re emailing a discussion group or posting on Stack Overflow, you’ll have a better chance of the right person reading your question if you write a concise and accurate title. (I suggest doing this last rather than first!)

Finally, here are some things you can optionally include:

  • An error message, if your question is about how to fix a specific error.
  • A diagram, if you think that might help to clarify your question.
  • Which software versions you are using, if you think that might be relevant.
  • Code you tried that didn’t work, if you think that might help to clarify your goal.

Want to see how I applied this process to an actual coding question? Check out my in-depth post:

🔗 How to write a great Stack Overflow question.


If you enjoyed this week’s tip, please forward it to a friend! Takes only a few seconds, and it really helps me out! 🙌

See you next Tuesday!

- Kevin

P.S. Never have I felt so close to another soul…

Did someone awesome forward you this email? Sign up here to receive Data Science tips every week!

Learn Data Science from Data School 📊

Kevin Markham

Join 25,000+ aspiring Data Scientists and receive Python & Data Science tips every Tuesday!

Read more from Learn Data Science from Data School 📊

Hi Reader, Last week, I recorded the FINAL 28 LESSONS 🎉 for my upcoming course, Master Machine Learning with scikit-learn. That's why you didn't hear from me last week! 😅 I edited one of those 28 videos and posted it on YouTube. That video is today's tip, which I'll tell you about below! 👉 Tip #45: How to read the scikit-learn documentation In order to become truly proficient with scikit-learn, you need to be able to read the documentation. In this video lesson, I’ll walk you through the five...

4 days ago • 1 min read

Hi Reader, happy Tuesday! My recent tips have been rather lengthy, so I'm going to mix it up with some shorter tips (like today's). Let me know what you think! 💬 🔗 Link of the week A stealth attack came close to compromising the world's computers (The Economist) If you haven't heard about the recent "xz Utils backdoor", it's an absolutely fascinating/terrifying story! In short, a hacker (or team of hackers) spent years gaining the trust of an open-source project by making helpful...

18 days ago • 1 min read

Hi Reader, Today's tip is drawn directly from my upcoming course, Master Machine Learning with scikit-learn. You can read the tip below or watch it as a video! If you're interested in receiving more free lessons from the course (which won't be included in Tuesday Tips), you can join the waitlist by clicking here: Yes, I want more free lessons! 👉 Tip #43: Should you discretize continuous features for Machine Learning? Let's say that you're working on a supervised Machine Learning problem, and...

25 days ago • 2 min read
Share this post