The most effective technique for learning to code may surprise you

08/27/2016 02:02 pm ET

Over 5 million people have started learning to code on Codecademy but very few people get to the point where they can wield code as a tool to solve problems. Why not?

Learning anything new is hard and mentally strenuous - but your best growth happens when you encounter hard blocks in your understanding that you have to navigate through. Overcoming these blocks gives you the problem-solving skills and understanding to tackle new fresh problems. However it’s at those blocks that you’re most likely to give up.

EdX and MIT Opencourseware present tough challenges that are designed to teach you how to solve problems with code. However the flip side of this approach is that fewer than 7% of Mooc candidates completed their course according to Times Higher Education.

Therefore it’s tempting as a learner to rely on resources like coding tutorials that hold your hand through learning to code. These are useful for an initial introduction but do not create independent problem solvers who can actually use code to solve problems.

In teaching thousands of students in free classes and through the 12 week immersive program at Codesmith, we’ve seen the remarkable impact of pair-programming. This follows in the footsteps of numerous studies that identified the positive impact of pair-programming on Computer Science major graduation rates particularly among female students - most recently in work by Werner, Hanks and McDowell at UCSC.

Pair-programming allows you to tackle the most demanding problems but without them becoming overwhelming. Your partner is by your side holding you accountable and training you as a problem solver.

Suppose you’re part of a pair and you’re given a set of coding challenges. One partner starts of as driver and the other navigator. The navigator’s task is to interpret the challenge and propose a solution with as precise a description as possible - not the specific code itself, but with phrasing like “Let’s loop or iterate through this list and add 1 to each item in the list”. It’s then up to the driver to interpret this ‘pseudocode’, as it is known, and type out actual code.

How can you pair-program effectively?

  1. Focus on technical communication. Your partner should be able to implement your solution as you talk or diagram it out without you having to type at all

  2. Even if you think your partner is going down the wrong path, let it happen. Prepare to be surprised when they prove to have a working approach - perhaps one that differs from your initial instinct. Even if they are mistaken - now you have the opportunity to debug together

  3. Pair through existing code or solutions as well as new code. Here Coderbyte is particularly valuable. Take other people’s solutions to common coding challenges (available on Coderbyte) and talk through them line by line to have your partner implement them.

What if you don’t have a partner there with you?

Find the community of people who will help you as you experience this good kind of struggle. Search for meetups in your community - FreeCodeCamp meetups are especially excellent and take place all over the world. Online it’s still relatively hard to cultivate this community but there are opportunities to pair program online like JavaScript the Hard Parts on Thursdays - people pair program online from around the world.

If you are not able to pair with someone, get yourself a rubber duck or a plush toy and talk through your code to it. While there is no quick hack to growing as a programmer, there’s nothing more effective than pair-programming to take your coding and building to the next level.

This post was published on the now-closed HuffPost Contributor platform. Contributors control their own work and posted freely to our site. If you need to flag this entry as abusive, send us an email.
CONVERSATIONS