DonTheDeveloper Podcast

Lacking Motivation to Learn to Code?

Don Hansen Season 1 Episode 209

Are you struggling with motivation on your learning to code journey? It could be poor goal setting. It could be that trying to find a job is suppressing your curiosity and excitement for coding. It could very well be that software engineering isn't what you initially thought it was. But almost certainly, what I share in this has or is hurting your motivation more than you think.

---------------------------------------------------

💻 Learn Frontend (20% off): https://scrimba.com/the-frontend-developer-career-path-c0j?via=donthedeveloper
⚙️ Learn Backend (25% off): https://boot.dev/?promo=DONTHEDEVELOPER
🤖 Learn AI Engineering (20% off): https://scrimba.com/the-ai-engineer-path-c02v?via=donthedeveloper
🐱 Learn NestJS (free) - https://scrimba.com/nestjs-c0n7djgjma?via=donthedeveloper
🧠 Advanced Coding (40% off) - https://app.codecrafters.io/join?via=donthedeveloper

👥 1 on 1 Mentorship - https://calendly.com/donthedeveloper/coaching
👁️‍🗨️ Join Discord - https://discord.gg/TpQe2k8Ab3
🐦 Follow on X - https://x.com/thedonofcode
👾 Follow on Twitch - https://twitch.tv/donthedeveloper

Disclaimer: Some product links are affiliate links which means if you buy something I'll receive a small commission at no extra cost to you.

Don Hansen:

Yo. So are you feeling unmotivated when learning to code? Um, I created a video a while back. It was kind of uh pick yourself up by your bootstraps and do what you need to do regardless of how you feel, which is true. This is very true, and there needs to be grit in your learning to code journey. But for this video, I'm gonna dig a little bit deeper. And I am someone that has always had like a fire under my butt when I'm really interested in something. And my feelings don't get in the way when I truly want something. I don't let them. And it's easier, right? So I talk about, you know, having a vision. Um, you know, what kind of developer do you want to be? What kind of problems in tech do you want to solve? Where do you want to be in two to three years? Like, where do you want to be in five years? Like, visualize that and like really feel that. And that can help pull you kind of in the direction you want to go, but it also solidifies what you actually want to do, which also helps you figure out how to get there, right? Because there are a lot of different paths as a developer. Um, there are a lot, and everyone wants a templated path. It generally doesn't work out when you seek out a templated quick path. So vision helps, but also um dopamine is a big factor as well. I built up a lot of bad habits during the lockdowns, and it took a while to kind of get past that. I felt like I really wasn't myself for years, it was just a really weird time. I think most of you can empathize with that, um, but I built up bad habits. I ate crappy food, um, I stayed in way more often, um, and I drank alcohol more often, and I developed a lot of other stuff or a lot of other habits, and I screwed up my focus and I screwed up my motivation. There's so much that I did where I've felt like I've had to climb out of that hole over the past couple of years, and I've done a pretty damn good job of it. I am not even close to where I used to be in terms of just how grounded and motivated I was, but I am doing pretty good, right? And I have just done so much research into things like dopamine detoxes and improving your attention span and short-term and long-term memory, and I've looked into different supplements and I it really I've kind of circled back to just really what I'm doing naturally that is either screwing me up or improving me. And I've really honed in on this, and so I wrote some stuff down, but your lack of motivation to learn to code, um, there'd be different factors, but I know developers, I know how bad our caffeine habits can be, I know how bad our food habits can be. And so much of what you do with those bad habits greatly influences your learning to code journey, your motivation, and the likelihood that you're going to hit that finish line and break into the industry is just like putting a giant boulder and then another one and then another one and walking uphill. This journey can feel like that at times. And I'm saying that you could feel incredibly light by just focusing on your bad habits. So I talk about habits a lot, I'm gonna go into specifics. So um short-term content feeds. Get rid of TikTok. Stop with YouTube Shorts. Watch mine. But don't watch anyone else's. You can watch mine, don't watch anyone else's, okay? Um, but even if you feel like it's informative, even if you feel like it's educational, the shorts that perform well are usually the ones that will hurt your attention long term. But compulsive things like like one thing I do is like I'll check my email a lot. I don't get a lot of emails throughout the entire day, but I check my email a lot. Why? It's a distraction, it's context switching. I I will literally be in the middle of a test and be like, I should check my email. And it's almost become a habit at this point that doesn't need to be there. And I feel like there's just it's easy to build these loops in your day, and they're usually like you don't realize it, but you're kind of creating triggers that'll then make it more likely for you to check your email or pick up your phone, check your messages, and just get distracted. Um, so again, like really try to be careful about the content that you assume, especially when it comes to short-term content. But also, like put your phone aside, any distractions, try to eliminate them. I I'm speaking generically because I don't know what distractions you face, but a lot of us go into these loops that start from a trigger. Try to figure out what those triggers are. Like, what did you do right before you looked at this, right? Um and even long-form content. Uh, I I've meant toward a lot of developers who keep sharing with me how dedicated they are to trying to grow as a developer because they are just multitasking all day long, even when they have a break, even when they're doing laundry or driving home or anything like that. They have headphones and they're listening to developer podcasts and they have flashcards with them and they're trying to recite things as they're trying to do something else. Multitasking is just a it's such a horrible, horrible habit that has been pushed in corporate life to basically not give a shit about your long-term focus and just try to squeeze any bit of productivity out of you in the short term. It's not a long-term solution. It never has been. You can't focus on all of these things at once. What you're doing is you're task switching, you're going back and forth, back and forth, back and forth very, very quickly when you're multitasking. Um, that really destroys your focus, your ability to sit down and just focus on one single thing. I was a lifeguard a long time ago, and then I hired some lifeguards, and I was around lifeguards. I like I was around the water for a very long time, and there were lifeguards that could watch the water, and there were lifeguards that couldn't, or you wouldn't want to them, you wouldn't trust them to watch your kids, right? Um, first of all, you should be paying attention to your kids anyways, but parents don't do that. That's another story. Uh, but there were lifeguards that would like fall asleep in their seats that wouldn't just like what you have to do, like sometimes you'll have um you gotta have the entire area scammed within 10 seconds. Um, for different places, they might extend it to like 20 seconds, but that entire pool, every spot of it, scam within 20 seconds. You should know everything that's happening. Um, but there were lifeguards that just could not keep up with that at all. It's you want to know why? Because it's really boring. Um, it's really, really boring to just watch water, especially when you have like one or two people in the pool. I feel like that's the time where it's so easy to let stuff slip and people go under, and people think drowning is always noisy. No, drowning is very quiet sometimes, and you sometimes you just don't even know what's happening. It's hard to watch water for hours. And you'll still get breaks, but my point is that a lot of the lifeguards that were able to just focus on a very boring thing for a very long time generally did very well in their studies, right? Because when I was a lifeguard, I was younger, a lot of college people, and they when they could focus, that focus carries over into many other parts of their life. And when they would focus on that water, it actually trained them to be able to focus on something very boring for a very long time, which makes, you know, applying it to stuff that you actually do get excited about, that you know, it's trying to better your career, it's trying to study, it's it's trying to study for a test, it's trying to train for something. Um, you can that that focus of just like watching the water and having that focus improved, it starts carrying over into many other productive parts in your life. And it it can have this compounding effect. It's very powerful. And the lifeguards that couldn't pay attention were the ones that were just kind of like parting all the time, drinking on the weekends. Um, they didn't really do well in school. Now, I can't prove that this uh I can um I can assume a correlation, I can't prove a causation. I don't have that kind of data. This is just something I've noticed. But when you can focus on something really boring for a long time, you generally are gonna do very well with your goals in life as long as you set the goals that you need to be setting. By the way, if you are diving deep into Node and you've already built a few things with Express, it might be time to challenge yourself with a more scalable framework, NestJS. It's one of the most popular frameworks for Node, and I personally use it to build my projects. It's one of the reasons why I decided to build a course for it, to get people up to speed with the basics. You can find that course at Scrimba.com. Oh, it's also free. If you use my link in the description to sign up for Scrimba, and you decide to upgrade to the pro plan, which unlocks a ton of different courses, you actually get a discount. Again, I partner with them because they are actually really good at building up junior developers. Check it out. What do you have to lose? Now let's get back to the video. Here's a task. Here's something I want you to try. This is gonna be very difficult. You're gonna laugh at me. But what I want you to do, just completely alone. I want you to pull up a stool or you can sit on the ground, and I want you to face the wall. I want you to set a timer, but you are not allowed to look at that timer. I actually think that's gonna make it easier for you. But you set a timer for one hour. Put it aside, I dare you to try to stare at that wall for one hour. You are not allowed to look away. If you look away, you can take a break, but you gotta restart that from the beginning. One hour. You have no idea how difficult of a task that actually is. And if you try this, you're gonna see how much our attention has been completely, completely destroyed. Try it. It'll actually start improving your focus just a tiny bit. But try it. And I think it's gonna scare you. There's no reason you can't. There's no reason anyone can't just stare at a wall for an hour. But most people can't. I don't believe they can. So that's kind of just a test. But outside of focus, we have like a lot of man, our dopamine is really screwed up from a lot of things that are have gone into probably trillions of dollars. Like when it when it comes to our attention and marketing, there's trillions of dollars. Uh I'm just throwing out a random number. There's there's a lot of money that goes into figuring out how to manipulate your attention and how to keep you motivated and directed at things that will make other people money. Right? So, gambling is a big one. Gambling is a huge one that can really destroy your dopamine. Please try to limit that. Porn. Porn is a big one. Um we never should have normalized porn as much as we did. Like it is destroying so many parts of our society in general, especially when it comes to relationships and procreating, which we are meant to do, which is scary how little that is happening nowadays. But porn is very addictive. A lot of people have porn addictions and they don't even know it. Mostly men, but sometimes women. But men, if you're especially if you're a man, you need to check your porn addiction. It is screwing up besides just the relationship stuff, it is definitely screwing with your dopamine. Um, junk foods, um, ultra-processed stuff, very sweet, very salty stuff. A lot of people will attach it to helping them get over emotional stuff too. Um it really screws up your energy levels throughout the day. You can have pretty big crashes, and a lot of that motivation can just be about like what you're putting into your body, right? Ultra processed stuff, ultra sweet, ultra soft, uh salty stuff that kind of just makes you feel good in that moment, that makes you feel worse later on because you're feeling more of that crash. And the food itself, like it's doing different things to you. Uh, but a lot of the junk food, a lot of like the bad uh carbohydrates will cause crashes. It'll cause huge dips in energy, way more than you realize. Like when I started eating mostly meat, and I'll mix in, I think what would I my diet's probably closest to like a paleo diet, but I'll eat meat, fish, vegetables, and fruit, right? And I pretty much tossed out most carbs at this point. So I've increased, um, like when you kind of had this diet, I want to increase healthy fats, but I'm really getting rid of a lot of carbs and sugars. And I found that I have more energy that is to steady throughout the day. And when I go back to eating crappy carbs, it's so noticeable how screwed up my energy gets. And I love coding, and I feel like it can really just destroy my motivation with coding with just a bad diet alone. I'm going over more stuff. I'm not done, but just a bad diet alone can screw up my motivation to do something I enjoy. Uh man, this is gonna be a hard one. You need to cut back your caffeine. You really need to cut back your caffeine. I am not saying go cold turkey, but is it it's so easy to get dependent on caffeine just to feel like you have enough energy. Because eventually, right, you you start getting used to it and you're gonna increase your levels, and then you just need enough to feel okay. It's just a trap. And so many developers snowball into a really shitty habit of this. You shouldn't have to cycle off of it. You should like, and cycling off of it, if you have a high caffeine intake and you've gotten used to that, you've built up a tolerance. Cycling off sucks ass. I don't know if you've had to do that. I've had high caffeine consumption of the past, but man, you better expect to not get anything done when cycling off for like a month. And I say like a month. Some people only like cycle off a week and they'll just diminish it just a little bit. Man, a lot of developers have a really bad caffeine habit. And what gives you temporary motivation, because it does give you motivation, will hurt you in the long run. I promise you. I have been at many different levels of caffeine. One of the best things that I did for myself is cycling off of it. I take 50 milligrams of caffeine for workouts, and I'm even trying to cycle off of that, but that that's high for me right now. And I feel like my energy throughout the day is steadier. Alcohol was a big one during the lockdowns and stuff. I started making an excuse to like drink and play video games with friends, and I wouldn't hang out a lot. And then that habit just like stuck with me, right? And then when I would hang out with more people as the years went on, and um I would drink with them. And alcohol is for me, like everyone's a different drinker. For me, I do it to give me like a burst of energy and motivation. It always gave me that. I'm burned out from the week. Give me some motivation, give me some energy. Let's kind of release that stress. Um, and I'm a happy drunk, but what really sucked about it wasn't even the day after. It was like five days after. When I really paid attention to it and I really started weaning myself off, it would take five days, even with like six beers in me over the course of like five hours, maybe six, I would feel that for five days later. Like if I really paid attention to my motivation, I look back at what I accomplished that day. It took me five days for it to start my motivation to be restored to what it was. So you just like let's just say you drink once a week, even just a little bit, you then um have to go back to work or you are want to work on your projects, anything like that. You expect yourself to take five days to start getting as productive. Um, you might be doing stuff, but to have that motivation and have that focus and that drive to where you were before you started drinking, pay attention to that. Alcohol is one of those things where it like it affects you longer than you think. And it like, even my mood and everything, like I feel I realize I don't even need to drink that much to then have my mood affected, right? And mood can take a little bit longer to get restored. Now, I'm not saying that I just had zero motivation two days later and I was just angry or depressed or sad or anything like that. But I was like 60%, 70% of the way there. And that affects what I'm capable of. Like that affects what I get done for the week. And even if I'm like 80%, 85% of the way, why the fuck would I want to be like that more than half the week for drinking a little bit on the weekends? That to me is just stupid. Alcohol is like one of the biggest factors of me being unproductive. And I just didn't understand it. I didn't understand how it affected me. And I think alcohol is like just one of those drugs that's like very normalized and glamorized and marketed to us. Um, a lot of people use it as a social lubricant. Like, I'm not gonna lecture you. Of course, that's bad. You should get comfortable in uncomfortable situations, and eventually you will feel comfortable in social situations, right? But man, I think it affects people more than you think. And weed and nicotine. Um, those are two big ones. These things like really screw with your motivation. You when you become dependent on it, these things create a like your body builds up a tolerance for these things, and you need more and more and more just to feel normal. And I think more people need to call themselves out on this. It's normalized too much. It's weird. Like if you are someone that's ambitious, you actually want to achieve things in life, but you don't feel motivated to achieve them, there's probably like a dissonance, there's a conflict with yourself because you know you're capable of more, but you just don't feel like you have the energy for it. Start with drugs. These that these are drugs. Start with the drugs that you are ingesting and try to wean off. I think that's a big one. A lot of you a lot of people will argue against this. In moderation, inmoderation is okay. Kind of, but like it depends on how ambitious you are. Like, if you actually want to be very successful in life, moderation for these drugs, you need to challenge yourself on that. And then just sleep. Not enough people are getting sleep. I need eight and a half hours. I need to hit that pillow and give myself eight and a half hours. I usually take up to a half an hour to fall asleep. Um, so I get about eight. I probably could use about like a full eight and a half, but you need to know this about yourself. A lot of us aren't getting enough sleep. You know this. Man, if you just improved half of this so far, your motivation to learn to code would go up. It really would. But you need to like working out is going to be incredibly helpful, just with your mood in general, just with the perspective that you form over what you need to get done. It just improves over time, especially with like um high intensity interval training to get that heart rate up. Man, it's such it's such a fantastic thing for mood. Like if you're feeling down, if you're kind of feeling like you have the blues and we're going into winter, less sunlight, most people don't get enough vitamin D. And man, the working out during winter is such a mood lifter. It's so fantastic for aspiring developers that are kind of getting burned out. And, you know, a lot of aspiring developers kind of they they like coding, but they don't really like the job search. And you pair these, and a lot of people just start kind of panicking, uh, creating anxiety around it, and they don't really learn to love coding and enjoy it. Um if you really want to improve your mood around your situation and you trying to become a developer, like high-intensity interval training, getting that heart rate up, and lifting, heavy lifting can do that too. Um it's so helpful for mood. Um I think the big thing that I want to address, and I I touched on it, but you need to learn to be bored. You need to learn to do house chores without listening to a podcast. You need to learn to go on a walk without listening to a podcast. You need to learn to take the headphones off, listen to nature, listen to the sounds. I there's just this vibrant aspect of life that is crushed in our society that is overconsuming. When you do like a proper dopamine detox, and you can look at that and how to do that, there's just like when you walk outside, the sun is brighter, the grass, the trees, they're more vibrant. You feel better, you feel life again, finally, again. And a lot of that gets suppressed. A lot of the beauty in life, everything around us, being able to appreciate what is around us, it just gets suppressed and suppressed and suppressed with this overconsumption. Learning to code is more than just learning syntax, the technical part of it. It is also building up really good habits to replace a lot of these really bad habits that are completely demolishing your motivation and your focus to be able to actually do this. You need to learn to be bored. Participate in activities that are boring, that feel boring. Give it a week. Give it a week. And I'm not saying you have to give up all of this stuff at once. Wean yourself off of one or two things over one week. Pick one thing to wean yourself off over. Next week you start weaning yourself off over the other thing. But you need to learn to be bored. Pick up a book. Read. It's very easy to listen. It's very easy to listen. It's harder to read and keep your attention. If you're not used to reading, it's harder to read and keep your attention focused on a block of text that all looks very similar with no pictures. If you need a picture book, read a picture book. Start with that, but then escalate to words. I like you you think I sound silly, but I'm I'm very actually very serious. It's why I put the bookshelf. It's it's a big thing that I want people to do is just take time out of their day to just be bored and do things that are boring because this is gonna sound really weird, but this is what it's coming to. People, the lifeguards that are able to stare at the water for hours at a time would make good developers. People who are willing to shut off their podcast, shut off the video consumption, pick up a book for an hour a day and just read, read that book, they're gonna make good developers. People who can be bored, that I can trust that their focus, that their motivation is going to be way higher than people that overconsume. If I can train someone to learn to code, that's easy. It takes time, but that's the easy part. To train them to be consistent, have good habits, have good communication, so much more that goes into being a dev. The technical part takes long, but that's the easy part. You start improving, and here's a beautiful thing: you start improving your habits, you start really focusing on your brain chemistry that affects your motivation, that affects your focus. You start focusing on that stuff, but all the learning becomes easier. The job search becomes more manageable. It doesn't feel overwhelming, it doesn't feel as stressful. I I want to share one last thing. I developed chronic tinnitus seven years ago, something like that. I hear ringing in my ears 24-7. If you ever get that, it is something very hard to deal with in the beginning, especially if you go on forms and people talking about they're just they feel hopeless. Let's just keep it simple for YouTube. They feel very hopeless. Getting tinnitus taught me how malleable the brain is. Like if I focus on it right now, I can hear ringing. 99.9% of the day, I don't hear it. I focus on it, I hear it. But my brain can adapt to that stimulus because it doesn't serve me. The only time I hear it is like when I it's kind of interesting because it's almost like a health monitor for me. If I eat something in high sugar, high carbs, I start noticing it more. It gets louder, right? So it's not its normal volume, it gets louder. And I use that to be able to pick out the foods that do well for me. I I use that to realize my body doesn't like caffeine from certain sources. It's interesting. It's actually been incredibly helpful. And my perspective on tinnitus, to see it as like a health healthometer, it completely changed how I interpreted the stimulus. I went from very hopeless to like improving my health and really focus on that more than I've ever been. It's just it's just weird, something that seems bad at first, but my entire perspective changed. And I think that's what a lot of people need to do with learning to code and becoming a developer. A lot of this stuff that feels difficult and boring and straining and anxiety inducing. If you figure out how to change your perspective and how you see all of this, it becomes like a game. You can really gamify a lot of this and you can feel achievements and grateful for a lot of things that you're going through. And you might not see. that now but perspective is everything and I think a lot of the advice that I gave can help improve that perspective. So what is my final tip? Learn to stare at a wall.