Skip to content
Hou - Engineer & Tech Educator

Learning to Code? Develop this trait...

career, learning to code, grit4 min read

Computer screen with code

Are you considering a career change to programming?

In my experience teaching code, there’s one trait that distinguishes successful learners and programmers from everyone else.

No, it’s not intelligence. I’m talking about grit.

Angela Duckworth, the psychology expert who popularized the term, defines grit as follows:

"Grit is passion and perseverance for very long-term goals. Grit is having stamina...Grit is sticking with your future, day in, day out, not just for the week, not just for the month, but for years, and working really hard to make that future a reality...Grit is living life like it's a marathon, not a sprint."

How grit applies to programming

Grit is relevant to programming in several ways:

Programming has its high and low moments

Many new coders experience an emotional rollercoaster. Early in my coding journey, I would often feel frustrated whenever I got stuck on a coding problem and elated when a solution came to me. I had contemplated giving up many times during the lows, but I chose to stay the course instead of changing directions.

Eventually, I accepted that learning to code, and becoming an exceptional programmer would require many hours of hard work over many, many years.

Programming is a long-term endeavor

Learning to code takes sustained commitment. It’s a lifelong (or career-long) journey.

At one point, I thought programming was a skill I would “master” in X number of years. But eventually, I learned that while my ability to translate thoughts into code and debug programs improved over time, I’d still have to keep learning new technologies to stay relevant in the industry. Therefore, it’s not really a skill I can “master”.

While you can expect some on-the-job training as an employed engineer, the learning process is typically self-directed and unstructured. Gritty programmers make learning a priority.

The job itself requires grit...

Production codebases can get confusing, messy, and frustrating to deal with. Chasing down bugs can take forever. Your first approach might fail. So might your second and third approaches. Being able to focus and persevere through difficult challenges is a core component of grit.

Not to mention it takes grit to survive stressful work situations (e.g., causing a production outage with your code), tight deadlines, and brutal code reviews.

Landing a programming job demands grit too. Technical interviews are hard to crack and require huge investments of time and effort to prepare for. The countless rejections that many programmers, including myself, have faced at one point or another in our careers call for a certain kind of mental toughness.

How to cultivate grit as a programmer

According to Duckworth, grit is a trait that can be intentionally cultivated via passion, hope, practice, and purpose. Here’s what it means for a new programmer:

Passion

It’s easier to grow your grit in an area that you’re passionate about, or at least have some interest in.

Is programming something you’d enjoy and want to keep doing long-term? There are many ways to find out. You can invest some time right now to peruse free tutorials on the internet and YouTube videos that can introduce you to programming.

I used Codecademy to decide if coding was something I’d enjoy. Although I occasionally got frustrated when my code didn’t work, I still found coding to be fun and enjoyable overall. I could see myself making a career out of it. The rest is history.

Hope

Hope relates to whether we believe it’s possible to reach our goals. Do you believe you’re capable of learning new skills throughout your life? Do you think you can still train your brain to learn something difficult, like coding, from scratch?

It’s the difference between having a growth mindset - which is the confidence that you can remold your brain through experience and effort (“I can’t write code yet but I know my programming skills will get better with regular practice”) - versus having a fixed mindset - which is the belief that people cannot change who they are innately (“I don’t have an inborn talent for coding”).

As a programming instructor, I’ve had the privilege to work with many diverse, adult learners. Regardless of their backgrounds or life stages, I believe many of them were able to successfully land jobs as developers in part because they believed they were capable of lifelong learning and that optimism carried them through the lows.

Carol Dweck’s TED talk explains the growth mindset.

Practice

However, hope without action is futile. Believing we can do something is just half the battle. We need to deliberately put in the time and effort to hone our skills.

Incremental, consistent effort is key to establishing a new habit. Set aside time every day to write some code.

And if you get just 1% better every day as a coder, then you’ll become 3700% or 37x better a year from now!

As we practice our coding skills, we often make mistakes. Over the years, one thing I’ve learned about my industry is that nobody knows everything. Even experienced engineers make mistakes. Mistakes help you get better, so don’t be afraid to make them. Seek out mentors who can provide feedback on your code; be open to criticism. Grit grows when you face and learn from your mistakes.

A few years ago, I challenged myself to teach code because I had always been uncomfortable with being in the spotlight and public speaking. What better way to overcome these fears than to continually be exposed to the possibility of making mistakes and saying incorrect things in front of a large group of adults? Every lesson was an opportunity to improve my public speaking skills.

Purpose

What’s your purpose for learning programming? Whether it’s to land a better-paying job so you can better support your family or maybe you’re looking for an intellectually satisfying career (which was my reason for switching careers), it’s easier to act when you know what your larger purpose is. Purpose sustains long-term motivation.

That’s all for now. Feel free to reach out if you have any thoughts about any of the above.

Want more content like this? Subscribe to get the latest updates in your inbox

Share your feedback

What did you like or didn't like about this post? Let me know what worked well and what can be improved. Your feedback is much appreciated!