Falling in Love with Code: The Journey from Struggle to Passion

Here we go again, over half a year since the last post.. Whoops. Well I've been on parental leave so the blog has taken a bit of a backseat but it's time to get back on track with some new content.

Let me guess, you read the title and thought "Oh great, another one of those posts that tells me to just work harder and everything will be fine". Well, you're wrong. This post is about how to improve and love what you do, not just how to improve. There's a big difference. So lets get started.

It's no secret that I love code. I love writing it, reading about it, talking about it you name it. But that wasn't always the case. I remember around 15 years ago, before I even knew what a for loop was, when I got the brilliant idea that I wanted to create my own video game so I sat down and tried to learn Java.. and it lasted a couple of weeks before I uninstalled everything and gave up. I just didn't enjoy it. And there is a reason for that.. I was uncomfortable with struggling and all I did was follow tutorial after tutorial.

My mindset had always been that everybody has a passion, you just got to find it, so I tried a bunch of things and like clockwork I gave up a couple of weeks later. That is until a year or two later that I took an intro to programming course, we were all beginners there so the few weeks I had spent learning Java, gave me a huge head start, I already knew what variables, loops, classes etc were so I was acing exercises and projects everybody else was struggling with.

And wouldn't you believe it, suddenly I was loving programming. Duane doing a cool dance

Turns out humans love doing things they think they are good at. Passion is not something that randomly happens, it's something that is built by overcoming the initial struggles and becoming really good at something. I can highly recommend the book So Good They Can't Ignore You by Cal Newport if you wanna dive a bit deeper into how skills lead to passion, it's a great read.

So how do you fall in love with code? Well, you gotta get good at it. And how would you do that? Well here are some of my tips that I've learned over the years.

Avoid tutorial hell and build stuff

I know, I know, tutorials are great. They are a great way to get started and learn the basics but they are also a great way to get stuck in a loop of never-ending tutorials. So what is the best way to get out of tutorial hell? Code code code. You gotta build stuff. It doesn't matter if it's a todo app, or the next big social media platform, just build something. Learn by doing, by just coding until you get stuck, then google the problem and fix it and repeat. You will learn so much more by building stuff than by following tutorials and try to be consistent, code every day, try to make atleast one commit to your github every day even if it's just a small change (Easier said than done, I know).

Eventually you will get into a habit and every time you turn on your computer you will feel like coding. A great way to code on days you don't feel like coding is to turn off your phone, turn off anything that you at that moment can find more interesting than coding and just be bored until coding is the most interesting thing you can do.

Don't forget about your mental health though, if life is crushing you, it's okay to just take a break and play some video games or watch a movie. Small steps.

Get comfortable being uncomfortable

This is a big one. You gotta get comfortable with being uncomfortable. What does that mean? It means that you gotta get comfortable with not knowing the answer to a problem, with not knowing how to solve a bug, with not knowing how to implement a feature. You gotta get comfortable with struggling and the only way to do that is to struggle. You gotta get stuck, you gotta google the problem, you gotta learn that even the unknown is solvable, and the more you do it, the more comfortable you will get with it, and the more comfortable you get with it, the more you will enjoy it. It's a beautiful cycle.

Eventually you will get so comfortable with being uncomfortable that you will be confident in your ability to solve any problem that comes your way. Need to build a complicated app in a language you never heard of? No problem because you know that you can learn it and build it. You know that you can solve any problem that comes your way and that is a beautiful feeling that will make you love what you do and boost your confidence tenfold. Remeber that you can't master coding, you can just become a better student.

Don't over think it

Something I remember struggling with earlier in my career was the constant stress that whatever I was building wasn't 100% following standards and best practices.

"Oh I wonder if my file structure is corretly set up, I should spend X amount of hours researching how other people do."

"Oh no maybe there is a better way to write this function, I should spend X amout of hours refactoring it."

Coding is improved by writing line upon line of code not reading about concepts and wondering what every one else will think about your code.

"Is my file structure or my functions optimal?" - Propably not, but as long as it's not causing you any problems it's fine. But what happens when you keep coding and notice that they are causing you problems? Well congratulations, you just leveled up and realized a better way of writing code. Bad coding practices are realized the more code you write, not the more you read about them. Now I'm not saying you should't read anything, reading is also a great source of knowledge, but it's not close to writing code. For example you propably sholdn't write the same function 10 times in 10 different places but if you do, as soon you have to make a change in that function and realize you will have to change 10 different places you will (hopefully) come to the conclusion that you should have written it in a better way so you refactor and learn from it.

Goku leveling up

Conclusion

I hope these tips will help you to find passion in coding and I can guarantee you that if you follow these tips you will become a better coder and you will learn to love what you do which will make you 10x better. It might take a couple of weeks, months or even years but if you keep at it you will get there. Remember that it's a marathon not a sprint and that you can't master coding, you can just become a better student.

Have a great rest of your day!