I’m sure you can picture this scenario; You’ve just finished a coding lesson – a video tutorial, a blog post, or a class – and you’re ready to apply what you’ve learned to your project.
You type your block of code and get ready to test it… and it doesn’t work.
You try again. Nope.
Reiterate until you’re completely frustrated and scratching your head.
You go back to your learning material and compare what you’ve done to the sample code. It may be a different application, but it seems like it should do essentially the same thing.
But you keep getting stuck.
Believe me, this has happened to every single one of us. But never fear! You can overcome this!
The key to applying theory you’ve learned to a new scenario is this: Break it up into the smallest possible steps, and learn to solve each one individually (and I mean small steps – a maximum of 5-10 lines of code each). Chances are, the reason you keep getting stuck is that there is a tiny, key component that isn’t being executed correctly somewhere in your code.
It is time-consuming, but learning each step individually will create a much deeper understanding of the concept and will enable you to achieve mastery of the theory.
One of my first big issues with this was learning how to use APIs. It’s not a terribly difficult concept, but there are many small pieces that I needed to understand before I could use an API correctly in my project. So, I broke the process down into the smallest components I could and Googled them one by one. It took awhile, but by the time I was done, I was able to go back to my code, quickly find the issue, correct it, test it, and… success!
There can be aspects of coding that are frustrating, boring, and time-consuming… but the feeling you get when your code works makes it all worth it!
What are some of your coding challenges as you begin your tech journey? Share in the comments!