Getting help

Learning to code takes practice. Everyone gets stuck sometimes, and that’s a normal part of the process.

When you get stuck on a coding problem, here are some strategies that can help:

  • Break it down: Divide the problem into smaller, manageable pieces. Try to solve one small part at a time rather than tackling everything at once.
  • Read the error messages carefully: Error messages often tell you exactly what’s wrong and where. Take time to understand what they’re saying.
  • Use print statements: Add print statements throughout your code to see what values your variables have at different points. This helps you understand what your code is actually doing.
  • Start simple: Begin with the simplest version of your solution, even if it’s not elegant. You can always improve it later.
  • Take breaks: Sometimes stepping away from the problem for a few minutes (or hours) can help you see it with fresh eyes.
  • Ask for help: Use office hours or discuss the problem conceptually with classmates. Explaining your approach to someone else often helps you find the issue.
  • Read documentation: Look up the functions and methods you’re using to make sure you understand how they work.
  • Try a different approach: If your current method isn’t working, consider whether there’s another way to solve the problem.

Remember, getting stuck is a normal part of learning to program. Each problem you solve makes you a better programmer.

If you are unsure about whether or not something constitutes appropriate collaboration, please confirm with an instructor.