From Failure at Life to Coding Jedi in One Day

Recently I had one of the rare days where I was able to spend the entire day coding. Since I had such a big chunk of time, I decided to add a big hairy feature to the rails app I’m working on. And I failed.

via GIPHY

After spending the morning on that feature, around noon I tackled another big problem, a different feature that was also hard to implement. And after 3 hours or so of struggling with it, I was getting discouraged. My whole day was almost gone, with nothing to show for it. I began to worry. Maybe I’m not actually cut out for this line of work. Maybe I’m not good enough to get paid to do this. I’m too old to learn how to do this stuff. Before long, my entire life trajectory of the past 2 years began to feel like a waste.

This is actually not an unusual feeling for me. And I’ve been building rails apps now for more than a year. I can build things that do stuff. But I keep running into these walls.

Learning to code is really just about running into the wall, over and over again, until you figure out that there’s a way over it, or around it, or that you’re running the wrong direction entirely. And after you run into that wall enough times, eventually you’ll start to slow down, stop and think before you smack into it again.

When I first started, the wall was figuring out that I had to assign a variable so my for loop would know where to start counting. A year ago, it was trying to understand how rails views and controllers and models all worked together. Today, it was creating custom routes to pass in multiple parameters to a controller.

I kept on working today, trying different things, reading and rereading the documentation. I talked to a buddy on slack. And finally I got it working!

Right now I feel like a true Rails Jedi Ninja Badass. Truly. It’s hard to beat the feeling of working through a problem, and seeing the results in your web app.

But tomorrow, or next week, I’m going to hit another wall. In a perfect world, you’d learn to code and then you’d just code. But the truth is, you never stop learning and you never stop running into problems. You just gain enough confidence to know that you will be able to solve the problem, given enough time. And you gain experience that helps you know where to look for answers, and understanding that helps you narrow down your search for those answers.

If you’re just starting out to learn to code, you’ll hit the wall a lot sooner. As you gain experience, you’ll get better and better at more things, hit fewer walls, and get better at fixing bugs because you’ve seen them so many times. But there will still be wtf moments.

Erik Trautman, who created the Odin Project, published this excellent blog post about the process of learning to code. He’s right, and getting stuck in the desert of despair is one reason why the Odin Project is so great. But his upswing of awesome I think is missing some details. It’s not a straight curve. There’s lots of little downswings in there.

Leave a Reply

Your email address will not be published. Required fields are marked *