Here’s the thing:
Fatigue is normal, but will get worse over time if you don’t address it.
First, recognize that you might be putting too much on yourself. If you studied / programmed 10 minutes a day, every day, you would achieve more than someone who studied 2 hard hours every weekend. So consider whether you’d be fine doing a half an hour or less on some days if you don’t have the energy.
Also as others have pointed out, memorizing everything isn’t that useful, practicing is. Build something fun!
Go does this too, and I believe a couple other modern languages do too. Seems like the need for it is real and has been recognised by language authors