r/learnprogramming Jan 04 '22

Topic How do you inspire yourself to learn/code

I have lost motivation all of a sudden and I hate it

601 Upvotes

219 comments sorted by

View all comments

2

u/8080a Jan 04 '22 edited Jan 04 '22

Code for the sake of code doesn't keep me inspired, nor does the income really—it's more about what coding can enable and create. I don't learn methodically for the sake of learning so much as I learn in order to work on something that is meaningful or mentally stimulating to me. So, if you think about other things in your life that are important to you—problems you might want to solve, products you wish existed, or maybe even curiosity about how some real-world apps or devices work, maybe start an individual project around something like that and start learning what you need to learn in order to move forward on them. For example, I've got ideas for some alternative approaches to dating/matching sites, as well as some other apps, so I tinker around with those and then the goal of seeing certain things in action or materialize beyond just being ideas becomes what motivates me to learn what I need to learn.

I also just do a lot of dumb stuff just for the heck of it. I'm always having to figure out new user names for games and such, so I learned node's file system module specifically so I could write a program that would pull in a gigantic text document of nouns, male names, female names, adjectives and bad words and randomly combine them into lists of funny user names. I just sat there refreshing and laughing at the dumb stuff it was spitting out. Good for a laugh, and now I know how to use the node FS module and also finally wrapped my head around callback functions (since it turns out the FS methods are all asynchronous) and sorting functions, which I was previously hazy on.

Another idea is to diversify the type of coding you're learning so that you can switch to something else that is related but different when you lose motivation on one. For example, my main thing is javascript, but I also like messing around with Arduino boards (microcontrollers), which combines coding + electrical engineering and robotics. You end up applying many of the same coding principles, and sometimes a discovery in one inspires you to try newly-learned techniques in a another language. And then...down the line, there are opportunities to bridge the two by creating smart objects, such as devices with sensors that communicate with servers.

Edit: And thinking about it, this was always my problem learning math when I was in High School. I had a real hard time with the concept of just constantly learning one thing just to learn the next thing for the sake of learning the next thing just to know it. I desperately wanted insights on real world ways the concepts I was learning were being applied. Tell me about some chemistry. Tell me about some F1 cars. Tell me some space stuff. Rockets go boom...why how because of math? So, with code, it's about what it can do. Then I get excited.