By Diane Douglas, Epicodus Instructor

As you learn how to code, you’ll spend your time grappling with the languages, libraries, and frameworks that make up a programmer’s tool belt. But far more important than any particular tool is learning how to be a problem solver. You need to learn how to teach yourself what you need to know. Companies don’t just want experience with a particular tool: they want to hire people who learn quickly and don’t shy away from figuring out a problem.

Learning how to learn is much more rewarding than learning any particular tool. You’ll get a feeling of “I can do anything!” and an amazing sense of self-confidence. It’s also much harder than learning any particular tool. You have to do your part, and you have to hold yourself accountable. If you get a gym membership, but you only sit in the hot tub, don’t be surprised if you don’t lose weight.

As somebody who learned how to program relatively recently, I want to share with you some of the lessons I learned along the way, and make some suggestions for you. I’d suggest follow these guidelines even if they seem tedious at times, because that is how you are going to get the most out of your learning. If you decide early on that you are going to try your best and not be lazy, then you will master this material and you’ll be impressed by how much you can do.

1. Keep calm

As you learn to code, you will occasionally (or sometimes more than occasionally) face difficult, time-consuming problems. More than any specific techniques for avoiding these situations, here are some tips for how to handle them on your own.

  • Quietly understand that you WILL get it eventually. I promise. If there is a solution to the problem, then there’s no reason you can’t find it. It takes patience and a clear head, though. If you get angry, you might miss a solution that’s right under your nose.
  • Break down the problem into the simplest possible parts. Try to do them one at a time, such as in a console, so you can clearly understand what is and isn’t working.
  • If you don’t know what part of your code is causing the error, try deleting things until you narrow it down. You can always put your code back later. Don’t be afraid to tear your program apart to figure it out - it won’t be mad.
  • Experiment. If you can’t see the answer from staring at your code, try things to see how it reacts. For example, say that your program gives you an error whenever you type in a specific sentence. Instead of wondering what’s wrong with that sentence, try typing in one word and see if you get the same result. Then try one letter. Then try a number.

2. Don’t be afraid to dig

As you’re going through whatever books, videos, guides, or other lessons you’re using to learn, don’t tip-toe through the material. Know that you are strong, and you are doing this for you. If you encounter something that you don’t fully understand, or feel like you aren’t good at it, don’t try to avoid it. Practice it. Google it. Ask your teachers and friends about it. Read a book about it. Post on message boards about it. Work on it until it clicks. Otherwise it will continue to be “that thing I don’t like” and you will lack confidence. It feels great when you turn the things you instinctively avoid into strengths.

3. Keep a Mistake Journal

Mistakes are your friends, they are how you will learn. Even Alfred from Batman agrees.

Your Mistake Journal is going to be a set of files that you can refer back to later, one for every week of class. Every time you fix a mistake write it down. EVERY. TIME. The more the better. This is one of those places where it pays to not be lazy. Every time you figure out a mistake you made, write down what the problem was (including any error messages), what steps you took to fix it, and what eventually worked. This has a couple benefits:

  • You’ll stop making the same simple errors over and over. You might be tempted to say “Oh well, I just forgot a semicolon. It wasn’t an important error, I’m not going to bother writing it down.” But, by the third time you write down a note about semicolons, you’re brain is going to say “Hey, I keep doing this and I’m sick of writing it down. I am going to put in the effort to correct this pattern.” Then you will see less semicolon errors.
  • You’ll remember how to fix difficult, obscure bugs in the future. You will occasionally come up against difficult problems that aren’t fixed by semicolons. This is not said to worry you, it is part of life. These problems will seem inexplicable and the error messages will be mysterious and unhelpful, but you will fix them eventually. The temptation after you fix something really cryptic is to move on with your life and be grateful that it’s fixed. But then you will hate yourself when months or years later you come across the same error and have to do all that work over again. Wouldn’t it be great if you could just say to yourself, “Hey, I’ve seen this problem before! I’ll just look up what I did to fix it last time.” Now you’ve saved yourself more time for the fun parts of programming!

4. Practice typing

Learning to code is like learning a musical instrument. You could know all the music theory in the world, but if you never sit down and actually practice scales and songs, then you will never be as good as you want to be. So do these two things:

  • Type code examples without copying and pasting. When you’re working through a lesson, it can be tempting to copy and paste the example code. But if you actually type every word, then the information will sink in better and you will notice more patterns. Ideally, the only time you should copy and paste code is when you are at the point where you can honestly say “I’ve typed this a million times, I know exactly what it means and I don’t need to retype it.” You are the final judge on whether or not you’ve reached this point, but remember you are doing this for yourself! So hold yourself accountable - don’t just go sit in the hot tub. Try not to copy and paste when you say “hmmm, how did this line go again?”
  • Learn your keyboard shortcuts. This may seem trivial and tedious, but learning your way around your tools is important, so just do it. You never see a chef struggle to hold a knife. They have practiced chopping vegetables a lot so that they can do it fast and spend their time on other tasks. Instead of a knife, our tools as programmers are text editors or IDEs, browsers, and operating systems. Spend a few minutes a day learning keyboard shortcuts for each of these tools. Any time you find yourself using the mouse for the same task over and over, check the menus or search online for a keyboard shortcut. It will actually seem slower at first as you get used to them, but if you just try to get into the habit of using a new one every day or two, then before you know it you will look like a wizard when you type. Spending the time on this early on will pay off in a big way after only a couple weeks.

5. When you have to memorize something, get it over with

Programming does not involve very much memorization, but there are some things that if you memorize them will make your life a lot easier. I’d suggest keeping a regular old paper notebook with you as you code. When a concept suddenly snaps into focus, or when there is a list of exactly 5 things you need to remember every time you do a certain task, take a minute to write it down, with pen and paper, and it will stick in your brain.

So, the moral of the story is, eat your spinach. Take the time. Don’t give in to the temptation to cut corners, because you will only be selling your future self short. You are about to start the training montage that takes place at the beginning of every kung-fu movie. Without embracing your mistakes and trying your hardest, you won’t be able to be the champion.