Overcoming obstacles when learning how to code
If you’re just starting out learning how to code you may have experienced the thrill of learning something new and exciting followed by the abrupt chasm of unknowns and the intense frustration that overwhelms you. We’ve all been there. Learning to code can be stressful and frustrating, especially when you spend an hour on a problem and not progressing or you stare at a problem and don’t know how to start on solving it. Learning the fundamentals like algorithms is challenging because it takes a few things to fall into place before you become comfortable with the process. There are some tools that will help you on your learning journey.
Break it up
When solving algorithms, it’s easy to get bogged down in the detail and the syntax. This leads you down rabbit holes that are difficult to get back out of, you might find yourself stuck on a problem long enough that you’ve forgotten the bigger picture.
To alleviate this, break up your large problem into smaller problems and write them down as a list of steps, you could even jot down some pseudocode. This makes a challenging problem, more approachable. You gain the added benefit of being able to see your progress too. Each sub-problem moves you one step closer to solving the problem as a whole.
Review the fundamentals
Even professional musicians and athletes review the fundamentals. Everything is built on top of the foundational knowledge and especially with programming, you are consistently forced to revisit the fundamentals and refine your craft.
Don’t see programming as a checkbox exercise. You need to go back and revise every now and then. Try going back to an algorithm problem you’ve already solved, how would you approach it differently now you know more?
You might get into the habit of thinking you need to code every hour of every day to get better. It’s an easy trap to fall into but it’s not very effective. When learning a new skill, repetition is important but your brain needs time to process what you’ve been learning.
If you’re stuck on a problem and can feel yourself going around in circles, take a break. Go do something different, take a walk, listen to some music. Do anything that gets you away from the problem. When you come back, you might see things from a different perspective or come up with the solution more easily because your mind has been doing some of the work subconsciously.
Ask for help
Programming is hard. Solving algorithms is hard until you know the formulae. Some learners feel like they can’t ask for help and end up struggling on a problem for hours. Help is available, make the most of it and don’t be afraid to ask.
Forums, group chats, tutors and peers are valuable assets when learning to code. Try something out and do your best but if you’re stuck for hours on a problem, it just leads to frustration and disillusionment. You should ask for help when you see yourself really stuck.
Learning to code is a marathon not a sprint. It’s about the journey and in order to be successful you have to pace yourself. Doing 6 hours of coding one day then nothing for the rest of the week isn’t as effective as doing 45 minutes a day everyday.
You have to build the muscle of programming and it requires a consistent amount of effort. This doesn’t mean you can’t take breaks, it’s just more effective to favour consistent small amounts of practice over a single burst of learning. You want to build momentum and then maintain it, it will get easier over time.
These are just a few tips that will help you with learning how to code, especially if you’re just starting out and focusing on learning algorithms. This is by no means an exhaustive list but these 5 simple tips will help you stay on track.