Need help?¶
This course has a 15 minute rule
Once you’ve spent 15 minutes attempting to troubleshoot a problem, you must ask for help!
Caveat: This does not apply to figuring out how to solve solo assignment problems.
Are you stuck?¶
We all get stuck sometimes. Here is the sequence of steps you might follow, although the exact things you do obviously will depend on the task:
Help functions and documentation.
Search Google/Stack Overflow. Stack Overflow in particular is where the programming community asks and answers questions.
Read the tips below, then ask your peers by posting an issue in the classmates team.
Post your problem as a question on Stack Overflow.
The TA’s email and/or office hours.
My office hours or email. I’ve listed myself last because, although I’m happy to help (I am!), I can’t actually debug code for 60+ students.
How to ask for help (in a way that gets the best answers)¶
This section applies (especially) to Stack Overflow, our discussion repo, and if you follow this, office hours will be more efficient too. Coders expect other programmers will try the obvious (documentation, and previous Stack Overflow threads) and then follow these tips so the community can answer effectively and efficiently.
Making your question effective is something of an art. To make your question effective, the idea is to make things as easy as possible for someone to answer.
Oh, goodie! 1
The act of writing an effective question and/or minimum working example (MWE) will often cause you to answer your own question!
So, here are the elements of a good question:
# 1: Introduce the problem with an informative title
Be specific with your title. It should be brief, but also informative so that when others are looking at the Issues page (and they have a similar error and/or solution), they can easily find it.
Bad title: “I need help!”
Good title: “Getting a ‘file not found error’ when importing scotus.csv”
# 2: Summarize the problem
Introduce the problem you are having. Include what task you are trying to perform, pertinent error messages, and any solutions you’ve already attempted. This helps us narrow down and troubleshoot your problem.
# 3: Include a reproducible example
Including a minimal, complete, and verifiable example of the code you are using greatly helps us resolve your problem. You don’t need to copy all the code from your program into the comment, but include enough code that we can run it successfully (on our computer) until the point at which the error occurs.
# 4: Post your solution
Once you have solved the problem (either by yourself or with the help of an instructor/classmate), post the solution. This let’s us know that you have fixed the issue AND if anyone else encounters a similar error, they can refer to your solution to fix their problem.
# 5: Acknowledgments for this section
A few more tricks to deal with getting stuck¶
Stop coding! Take a quick break and clear your head.
Get out a piece of paper and map out/outline how to solve the problem using plain words (pseudocode).
Add print statements everywhere (old school).
Use debugging tools.
Clear your head more substantively - go for a run, take a nap, get groceries. Returning to the code with a fresh eye will solve problems more often than you would believe.
Sleep! Coding tired is a sure way to make mistakes.
- 1
I hope you’re ready for a lot of cheesy writing and bad meme humor this semester.