On Coder’s Block

In the past few years, there’s been a massive surge in the number of online education resources. In particular, we’ve seen a mass movement to teach people how to code in forms that range from the most casual (code.org, codecademy, etc.) to striving to be more formal (Coursera, Udacity, Udemy, GA, HackBright, etc.). With celebrities, politicians, and a range of other successful people behind this movement, for a while, it felt like you couldn’t escape the completely suffocating and overwhelming push for people to try these out. From what I saw, many people tried these programs out, engaging with incredible enthusiasm and energy, hoping to learn the “superpower” of coding. And consequently, many people quit these programs.

I’ve thought a lot about this issue, particularly in regards to online education and why it’s so hard to get people to engage. Although it’s evident that it is hard for people to engage with something where they have very little skin in the game (who hasn’t signed up for a Coursera class when they’re feeling inspired only to never go past the first lecture?), I believe that there is a secondary problem that has been entirely overlooked. Namely, programming is hard.

I call this coder’s block — it’s the programmer’s equivalent of writer’s block and it’s a real challenge that you have to work through.

Perhaps the most difficult but normal feeling that aspiring programmers stumble into while learning how to code is feeling completely stuck on how to proceed in solving a problem. I call this coder’s block — it’s the programmer’s equivalent of writer’s block and it’s a real challenge that you have to work through. The difference between writer’s block and coder’s block is people assume that coder’s block means they’re just not cut out to code (read: having a fixed mindset about coding ability). This is further damaged by Silicon Valley’s myth of what an elite engineer looks like that is even perpetuated by the HBO show. When it’s continuously reinforced that only young, male, prodigious folks are cut out to be elite engineers, we subconsciously come to believe that. Ironically, these sites that often aim to break this myth by giving anyone an opportunity to learn to program, actually make it worse by creating more failures.

Just like writer’s block isn’t an issue that’s unique to new writers, coder’s block isn’t unique to new programmers.

The reality is, new software developers are just facing a new challenge that takes time and effort to work through, and just like writer’s block isn’t an issue that’s unique to new writers (See: George R.R. Martin), coder’s block isn’t unique to new programmers. The only difference is that as you proceed, you gain more confidence that you will figure them out and you refine your methods to help you figure them out faster (read: you learn how to copy and paste from StackOverflow).

Throughout my time at Stanford, I saw how coder’s block can discourage even the highest potential students from learning. When busy Stanford students ran into something that felt like an insurmountable obstacle, it was natural to try to take the easy way out. I can’t tell you how many students asked me to do their CS homework, “just to get it done for” them at any cost — literally in some cases financially and in others for eternal gratitude. These are smart, capable, morally sound people who freaked out in the moment and resorted to desperation. This phenomenon is certainly what was behind the cheating scandal that shook the CS department. If Stanford students, the supposed best and brightest young minds in the world, are quitting and cutting corners because of the difficulty and time required to learn programming, why would we expect others to persist (aside: I can admit this logic has holes since Stanford students aren’t used to overcoming academic adversity, but humor me)?

Coding is Hard

I often tell people learning to code is so hard because it’s like learning math in another language. Obviously, this isn’t exactly right, but it is a metaphor for the task at hand. Being able to code comfortably and effectively requires mastery of both the language/syntax and the algorithmic thinking. I’ve seen people struggle with both ends. I still remember a friend of mine who built a beautiful recursive solution to his first coding assignment ever but just couldn’t express it syntactically. On the flip side, I’ve had friends who approach programming by learning to memorize syntax and knowing exactly what statements do, but can never figure out the algorithms to achieve their goals. Both syntactical understanding and algorithmic thinking skills take practice and some people are better equipped to develop one of them faster than the other. This lag often causes frustration and regardless of what is lacking, can often cause people to claim that they, “don’t have what it takes to code.”

Learning to code is so hard because it’s like learning math in another language.

To me, the problem here is fundamentally about expectations. Whether it’s Stanford students or random people off the street, the message passed forward by these sites, such as codecademy and code.org, is effectively, “get rich quick” for coding. It’s like those fitness ads that claim “just 20 minutes a day 3 times a week and you’ll look like Dwayne ‘The Rock’ Johnson.” Beyond the fact that almost nothing worthwhile is ever that easy, these sites don’t have proper engagement because people are expecting to be able to casually learn how to code when in most cases it requires a great deal of effort and dedication. Even coding bootcamps are meant to appear approachable so they can attract more candidates. While we certainly want programming to become more accessible, these programs have often turned into an exercise in hand holding. At a certain point, the promise these sites are making is fundamentally flawed and is in fact hurting their long-term success rates.

What people need to understand when they engage with these sites is that in many cases there is a hump. From everything I’ve seen, it is clear to me that when it comes to learning how to code, there is a certain point where people stop struggling with either the abstract concepts or the syntax and they just can think in code. When my sister took her first Computer Science course, she hated it and spent countless hours complaining to me about how programming was impossible, that she sucked at it, and swore she’d never engage again. 3 years later, she became a professional software engineer. This was solely a result of her persistence.

Part of being an effective software engineer means learning how to take on these challenges.

The reality is though, there are always more humps: learning new languages, paradigms, subjects, and packages. These come at different points for different people, but part of being an effective software engineer means learning how to take on these challenges. These services that are presumably trying to train effective and capable developers need to be more clear about the effort and expectations of being a proficient programmer so that those people who are choosing to embark on the journey can approach it with the correct mindset.

How to Approach It

  1. Be process oriented (and trust the process) — That means dedicating real time and effort and being realistic about your expectations. Rely on resources outside of just one site: tutors, websites, friends. As with all things in life, focusing on process allows you to take a longer term view than getting sucked into instant gratification.

  2. Be persistent — Understand that you will get stuck and it will be hard. Coding ability is not predetermined and the challenge of having to solve new problems that you don’t understand at first doesn’t go away with programming experience. Even as someone who has been coding for practically my entire life, I sometimes get stuck for hours or days on one simple problem, whether it be figuring out how to use a new package, debugging something in my code, or just figuring out how to implement a specific algorithm. Go ask one of my college roommates about how I used to scream at my computer while programming.

Coding ability is not predetermined and the challenge of having to solve new problems that you don’t understand at first doesn’t go away with programming experience.

In light of this, I think anyone building a program for coding education needs to be mindful of teaching process orientation and persistence. Fundamentally, if you want to learn how to code, you need to recognize it’s going to be an endeavor and one that you have to dedicate real time and effort to. As with all things in life, it takes time to learn and get over those humps. Everybody wants to hear there’s an easy way out — it’s human nature — but there’s not. The paradox of this is that of course real satisfaction and value come from accomplishing things that require more effort — if coding was something everyone could learn overnight, we’d probably have automated it (we still might soon). Learning to code is incredibly worthwhile, but the only way to do it is with a real commitment and the right mindset.

Thanks to my Mom, Neeru Khosla, for assistance in editing this.

This was originally posted on Medium and reposted here for archival.

Previous
Previous

Using AI to Scale the World’s Best Healthcare to Every Human Being