i got this as a question a while ago and wanted to answer it, tried writing a thread, lost motivation. so here is said long post in short:
- solve problems you have - gives you real satisfaction to keep on going
- build stupid shit - you shouldn't care about whether the thing you're writing will be used by anyone else than you. make a BBS. make a hobby OS. do cool shit that you want to do. give zero fucks.
- keep on doing it - i've been coding for 9 years. pure experience matters a lot
building stupid shit is really the most important one out of these three. you build muscle memory for coding stuff, and you gain obscure knowledge. both very useful when encountering problems in the real world.

by