Getting Unblocked
The internet is full of bugs! Everything you do as a web developer is a process of working towards a state of less broken.
Sometimes the error will be in your code; other times, it will be in the tests, descriptions, or challenges. Harness your problem-solving skills first to understand the error and second, to overcome it.
Tips
- Check your punctuation and spelling: Have you left out a closing bracket? A comma?
- Different browser: Does it work in another browser?
- Browser Console: Inspect the webpage using the browser console. What can you see?
- Comment Out: Comment out portions of the code until what is left is the portion with the problem. Once you have narrowed down the problem area, begin subtracting elements until the problem goes away. For example, if you've narrowed down the issue to a specific
<div>
and the CSS that styles it, begin by removing one line of CSS at a time. - Are others experiencing the problem? Google the exact phrase!
For example, after getting an error we couldn't resolve, we copied and pasted the exact wording of the error message and found that this issue was known and that others too were experiencing the problem.
As well as identifying if this is a common bug, this type of query on Google will likely render the correct code. This can be a great way to check your code, but ensure you are only Googling to solve your current small block - don't cheat yourself of the whole challenge!
It's worth checking in with yourself when you get blocked:
- Are you troubleshooting with intent or just stabbing in the dark?
- If you're stabbing in the dark, where are the gaps in your understanding? What questions can you ask (either to Google, your facilitator, or Discord) to resolve that ambiguity?
- How are you feeling throughout this process? Curious? Frustrated? Why?
Resources
- StackOverflow: Over 50 million developers sharing knowledge.
- Discord #foundations and #all-cohorts-help channels: Reach out on Dev Academy Discord channels. Share what it is your trying to achieve, the inputs (your code) and the exact error message.
- YouTube FreeCodeCamp: FreeCodeCamp publish live coding/code demonstration videos here: FreeCodeCamp channel
- YouTube FreeCodeCamp Users: FreeCodeCamp contributors also create code demos for challenges. Check out We Will Code for a demo of each challenge if you get stuck.