I deal with this more than often, especially while freelancing. The first obvious choice is to be proactive (ex: sleep, eat right, etc...)
But to actually deal with it WHILE you're in the middle of feeling that way (as in you feel this way at this very second while reading this) is different.
I have 2 tips to deal with this:
First is start with an insanly small task. Fix a typo. Make a single test case. Make an issue for a bug. Something small to get a small win. Then repeat again. And again... Before you know it, you're moving along and working. Those little wins trigger dopemine and doing it repeatedly gives you more enough to crave it, thus working more.
Second tip is just don't work. Seriously. Do more exploring around in the space. Look at some random repos. Browse this site, reddit or Twitter. Just get yourself doing something. Usually what happens to me, I end up relating things back to work and end up working.
Bonus tip: chill. Seriously... Mental health is real, if your mental is too fatigued to work, then just sit on the bench. No use in straining yourself. You brain is a muscle like everything else.
Hope the methods to my madness helps!
I love all this advice. Great stuff!
The mental health tip is good to. Having a good therapist/psych is a good solution if you CAN'T do the above. It's possible that there's something splash'n in the ole' noggin that either needs medication or CBT.
Yes, I will try to use them...
I like the second tip, stop working and read random stuff at dev.to for example.
Back in time, I was doing the first tip by answering a random question on StackOverflow and helped me a lot.
Will try it soon.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.