Sometimes there’s a crash or a bug that you don’t know how to handle and that’s perfectly normal.
Even programmers with thousands of coding hours spend time on the Internet for answers (me).
Now, before you ask a question, let’s go over a few things to make sure everything goes smoothly:
1. Google your issue first
Chances are highly likely that your issue or question has already been asked on StackOverflow or Reddit. The good thing is that Google is great at returning those results to you. Try searching for the error message (I’ll tell you how to get this farther below), class name, keyword or describe what you’re trying to do.
There’s also a chance you’ll find that another dev wrote a Medium or blog post about the exact same issue.
tldr: Do some Googling before creating a new topic. It’s an essential developer skill
2. Search the forum
Maybe someone has asked the exact same question before! If so, we’ll most likely respond to you by sending you to the existing post about the same issue.
3. Describe your problem
Ok, now that you’ve tried searching and turned up empty, it’s time to post!
Be descriptive and describe:
- What you’re trying to do
- What isn’t working as expected
- What you’ve already tried to fix the issue
- What’s the error message (if it’s a crash)
It’s really hard to help someone when they just post a screenshot or a piece of code without any context.
A little history goes a long way and we’ll be able to help you better if we understand what your logic was.
4. Post the error message
Every crash comes with an error message or a way to track what went wrong. If you are new to Xcode and don’t know where to look, review this article first: https://codewithchris.com/xcode-errors/#detailederror
5. How to format code in your post
Instead of just pasting your code as text, use one of the following two methods to make it easy to read:
Technique 1
Put your code into a code block by surrounding it with triple back-ticks.
For example:
Typing:
```
func myFunction() {
a = 4
}
```
Produces:
func myFunction() {
a = 4
}
Technique 2
Alternatively, you can paste your into a GitHub gist (https://gist.github.com/) and then include the link to your gist in your post.
6. Is your question related to material in a CodeWithChris paid course?
If so, please post it inside the “Course Students” category instead.
If you don’t have access to the “Course Students” section, please fill out this form to request it: https://cwc.to/courseforumaccess. We’ll verify that you’re a course member and then unlock it for you.
Once you have access to the “Course Students” section, post your question in the correct Course category and title your post with the format: “[Module x Lesson x] Your Question Here”
If you have any questions about how to ask for help, feel free to reply!
Happy Coding!