If your code doesn’t work that’s a good thing

I have been a Python teacher on Udemy since 2014, and I have received thousands of reviews from my students. I am happy to say that most of them are positive. The bad reviews are usually given by students who are frustrated whenever they run into a problem, aka a code error. If you also can’t stand coding errors, please keep reading because I will change your perspective on errors.

Here’s a typical review of a student who obviously gave up because he faced an error that hindered his learning path:

"Title: "A Halt in the Learning Journey"

Rating: ★★☆☆☆ (2/5)

Entering the world of Python programming, I was filled with a mix of excitement and apprehension. The course came highly recommended, and its layout seemed to promise a gentle yet thorough introduction to programming. Initial modules were indeed a breeze, reinforcing my belief that I had made the right choice. Lectures were clear, and the exercises seemed well-designed to reinforce learning.

However, my progress came to an abrupt standstill due to an error in one of the exercises. It wasn't just a typical mistake that could be corrected by going over the material again or paying closer attention to the syntax. This error was like a wall I couldn't climb over or go around. It felt like the course had left me stranded right when things were getting challenging.

This single, unresolved error became a significant roadblock in my learning path. It wasn't just about not being able to move past this point in the course; it was about losing the momentum and the enthusiasm I had at the beginning. Eventually, I gave up, not because I didn't want to learn Python anymore, but because the pathway provided by this course seemed impassable."

And here is a review from a student who enjoyed getting errors:

"Title: "Learning Through Troubleshooting"

Rating: ★★★★★ (5/5)

Embarking on this Python course, I was aware of the challenges ahead, knowing well that programming is as much about solving problems as it is about writing code. What I didn't anticipate was how much I would enjoy encountering and overcoming these hurdles.

Midway through the course, I ran into a particularly tough error. Instead of feeling discouraged, I found myself energized. The course had prepared us for moments like this, emphasizing the importance of debugging and problem-solving. I dove into the documentation, scoured forums for similar issues, and even reached out to fellow students for a brainstorming session.

The breakthrough came after a day of trial and error, and the sense of achievement was unparalleled. This error, which could have been a stumbling block, turned into a profound learning opportunity. It taught me not just about Python syntax but about the perseverance and analytical thinking that programming demands.

This course has not only equipped me with technical skills but also with a problem-solver's mindset. I'm grateful for each error I encountered, as they were the true catalysts for my learning. For anyone ready to embrace challenges head-on, this course is a treasure trove of learning opportunities.

The lesson to take here is that no matter how good you are in programming, you are going to get many errors. That’s just how it works.

In fact, if your code doesn’t work, that’s a good thing. Doesn’t make much sense, does it? Well, it does for two good reasons:

  1. Getting errors earlier now while you are learning is better than later when you’re working in a production environment. That said, even in industry level it’s estimated there are 15-50 errors per 1000 lines of delivered code (Reference: “Code Complete: A practical Handbook of Software Construction, Second Edition” book).
  2. Every code error you experience when you are learning enforces you coding skills because you understand how the undergrounds of programming work. You don’t want everything to go smoothly. Driving a bumpy road will make you a better driver.

So, don’t get intimidated by programming errors. Instead, just follow these two simple steps when you get an error:

1. Read the error carefully. Error messages are very well-designed. They will tell you the exact line of code that has the problem and what type of problem there is. That will help you understand the problem and eventually fix it.

2. If you don’t understand the error, just copy the error and paste it on Google and you will find Stack Overflow posts that will tell you exactly how to fix that error.

And remember, persistence is crucial to solving these errors no matter how impossible they may look, you can do it!

Chill those errors out!

Recommended Course

Python Mega Course: Learn Python in 60 Days, Build 20 Apps
Learn Python on Udemy completely in 60 days or less by building 20 real-world applications from web development to data science.