This is inspired by a tweet from CodeNewbies on Twitter yesterday who asked about things that have improved your mental health. I've struggled with stress and here are the things that have helped me.
To do lists
Writing a to do list gets it all out of your head. You don't have to constantly think "I must remember to do XYZ", all you have to do is to check a list. There are lots of different ways and apps for this, here's what I use.
This is the one I use at work. I tried paper, but things change there so often that I got through an entire Tippex mouse in a month. Since I always need a browser open, having this in a tab doesn't feel like it's taking up space on my taskbar.
It allows tasks and sub-tasks, you can move things into the order you need to do them and assign priorities and tags, and add comments. Each morning I look through what I have to do today and at the end of the day I look through everything and make sure it's all ready for tomorrow's tasks.
I use this on my phone to keep a list of general things to do. It's handy for when I'm out and remember something I need to do. Or someone says "Next week remember to bring X", I can write it down. I like that each note can be different colours (I am easily pleased...).
Not just an excuse to buy nice stationery. This is where I write down things to do today. Each evening I think about the things I need to do tomorrow (or later in the week) and write them down. I go really specific here, like putting the bins out (and getting them back in the next day).
The important thing here is that (unlike with work) it doesn't matter if you don't do all (or any of) the things on your to do list. Maybe if you have no clean clothes then it is important to do the laundry. But if that's not the case, then it doesn't matter if it doesn't get done today. You just add it to tomorrow's list.
Don't put unnecessary pressure on yourself
If you don't have a deadline, then do you really need to do it? Obviously at some point you do - if you say "I'm not going to code today" then it won't matter for a day or even a week. It will if you say it every day for a year. But if, today, you don't have the energy to code, don't. Maybe you want to finish this tutorial/project/etc, but if it takes a day longer what is the consequence? It's not going to be world-shattering bad.
There is a lot of talk in the coding community about coding everyday, but part of that is to get you into the habit. If you've got into that habit, then a day or a week off won't hurt - and might just make you more enthusiastic about getting back into it.
Stress can really do a number on your sleep. For a long time I would wake up around 5am or 6am (sometimes 4am, and once 3am) and be unable to get back to sleep. It didn't matter how tired I was or what time I went to bed. I did a Sleep CBT and now I sleep and it's so good not to be tired all the time and worrying about my sleep. Here are the things I learnt from it:
Routines are your friend. Having a set bedtime means that your body knows when to sleep. If you go to bed before you're tired, then you won't sleep. If you stay up after you're tired then your body gives you a shot of adrenalin to keep you awake and you won't sleep until that's worn off.
Also, around 1.5 hours before your bedtime, finish off your 'work' and relax. Don't do anything that requires a lot of physical or mental effort. This is your time to sit in front of the TV or listen to podcasts while you knit. This allows your body and mind to wind down before bed.
Do your thinking before bed. Don't lie in bed thinking about what you need to do tomorrow, write yourself a to do list before bed.
Don't lie in bed thinking about that terrible thing that happened today, write down the good and bad things that happened today before you go to bed.
Don't lie awake thinking about how you're not going to get back to sleep. Your body hears what you're thinking and therefore decides not to go back to sleep.
If you're struggling not to think about things, one technique is to think the word 'the' every two seconds. 'The' isn't a word replete with meanings, so it won't invoke any thoughts. And two seconds isn't long enough to get any thoughts in.
Those are my most practical solutions: I find it easier to do/not do things than to think/not think things. What has helped you with stress?
(A note on sleep, if you're in the UK, Sleepio is an AI based CBT available on the NHS. It's not always easy, but it really helped me.)