On your quest to become a Pythonista, there will be many hurdles. As your guides on this learning journey, we should stress that we too are still learning but can at least share a few best practices we have picked up along the way.
As you may have already experienced, things will go wrong. Whether it's with your programming environment and tools or the actual code that you're writing, you should embrace the fact that you will encounter technical snags and bugs will crop up in your work.
In fact, bugs will typically show up long before any working solution. Embracing this fact can help reduce frustration and stress when your code does not work the first, second, or third time. More importantly, accepting bugs and technical headaches as a natural part of the coding process helps frame this as a process of growth, one in which it is normal and highly encouraged for you to seek help as you wrestle with code issues and other problems.
Having reached this zen-like state of equanimity and openness to help, it's important to apply some best practices when you actually reach out for assitance from your classmates, friends or instructors.
Below are a few guidelines that will help you get help.
It's tempting to slog away at a problem for hours on end (and often deep into the night). We urge you not to do this. If you've made an honest effort (i.e. put in at least 15 minutes) to solve a particular issue but remain stuck, please don't continue suffering for hours on end by yourself. Reach out for help. Often, the mere act of describing your problem to someone else -- or even a rubber duck -- will magically reveal the solution.
Below are some best practices on how to ask technical questions in a way that clearly communicates the problem and provides enough context for someone else to dive into the situation with you.
When asking for help with your code, saying 'my code is not working' is an unclear problem. Framing the issue as such makes it tricky to address the problem effectively. Use the GOOD Questions model so that all parties have clarity on what they are tackling.
- G: Give context to your issue - clearly describe the problem.
- O: Outline the steps you've taken to solve it.
- O: Offer your best guess about what the bug is. This will help you think through the problem. It will also make the process easier for the person assisting you.
- D: Demo what is happening. Keep track of the error messages you've gotten, plus the code implemented to create the error, as well as any steps you may have taken to fix it.
To learn more about asking GOOD questions, check out Real Python.
Serdar and Cheryl are both on slack - reach out to us. But, you may not get a response right away. Keep working on fixing your issue. In many cases, you may find that you've already worked it out by speaking through it with a friend.
But, if you still need help, you can try these resources:
-
Chat GPT and similar generative AI can be of great assistance when debugging a problem. But don't resort to this option too quickly. A great deal can be gained from reading traditional resources (e.g. blogposts, Stack Overflow) as well as asking questions of humans, which helps develop your skill in framing and communicating technical questions.
-
News Nerdery this Slack Workspace will connect you to other working journalists who either can give you insight on your code or direct you to resources that can help you. Before accessing the slack, you need to request an invite to the slack, then you'll have access to channels such as
#python
and#helpme
. -
r/learnpython this subreddit can be great for crowd-sourcing solutions to your coding issues. Some programmers prefer to use StackOverflow, but python subreddits are a bit friendlier for new coders. StackOverflow can have coding solutions that are difficult to understand for new programmers, and thus can leave you confused about how to adjust the code to fit your unique problem.
-
Python Tutor this website can be a great place to find live help if you are stuck on a particular bug. Beware: Like you, there will be several other new coders that need help. Thus, this website tends to have long wait periods - not ideal for being on deadline.
-
Python Discord Chat this Discord Chat can be awesome for getting help from new and experienced programmers alike. People will definitely want to help, but they are hesitant to do so if it seems like you have not taken any steps to fix the bugs yourself. Do your due diligence before asking for help on this chat, or any of the other resources.
- SentDex this Youtube Channel has a good python beginner series where basic concepts are explained. More importantly, he has several projects that you can follow along - showing you what is possible once you get the fundamentals down.
The resources listed above can be helpful, but they can hinder your learning if you jump to them before struggling with the problem yourself. At the end of the day, nothing will help you learn faster than fighting with bugs and thinking through how you would fix them first. Just don't forget about the 15-minute rule.