DEV Community

Aneeqa Khan
Aneeqa Khan

Posted on

How do you code when you are depressed?

Hello all, I want to know how you get yourself to code when you are depressed and sad and you can't do much about it, But you have office work to do.

Latest comments (40)

Collapse
 
bhushieth profile image
BHUSHIETH

order a coffe and you will get intrest on code

Collapse
 
jwp profile image
JWP

I just keep the faith that all things will work out for the good. Without fail, they do. It's just a matter of when and how it all works out.

Collapse
 
aneeqakhan profile image
Aneeqa Khan

Yup, After every sunset comes a new sunrise😊

Collapse
 
webbureaucrat profile image
webbureaucrat

I gamify the GitLab contribution graph--goal of one commit per day, pushing for two or three. Even when I'm very much not feeling it, it's not hard to make myself open my laptop for one commit, which can take just five or ten minutes.

You end up with lots of very small changes over a long time, which is great for productivity because it keeps the state of the project fresh in your mind. It's also great for depression because even in the slow times when you're slogging through a difficult problem, you still have something very visible--a wall of colored-in squares--to show for it.

Collapse
 
aneeqakhan profile image
Aneeqa Khan

Yeah, even a small commit is a commit
Thank you! 😊

Collapse
 
agiksetiawan profile image
Agik Setiawan

Refreshing, outing or work from new place like co-working space

Collapse
 
codewander profile image
Anon

I try to be patient and remember that it will be easier to understand and make progress the next day. A lot of times I measure my success by how much I finish each day, but with depression, it's much easier if you measure how much I finish each week.

Also, I try to shift to things I find very interesting or that are easier. So, I might write some unit tests or improve something about my developer workflow. I find that it's harder to create or write large blocks of greenfield code when I am down. It's easier to read existing code or do smaller refactors.

Collapse
 
aneeqakhan profile image
Aneeqa Khan

Thats a good idea to refactor old code and still get productive today.
Thank you! 😊

 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Not just over-consumption, literally any of it can cause (or worsen) anxiety.

It's normally just a trade-off; but it always amazes me how people who are already stressed and/or dealing with anxiety will still drink one cup after another and wonder why they aren't feeling better yet.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Also less coffee. People underestimate caffeine. A lot.

Collapse
 
sonxe168paint profile image
Sơn Xe 168 Paint

nice

Collapse
 
aneeqakhan profile image
Aneeqa Khan

Thank you everyone for your time and solutions!
It really makes me feel I am not alone in this. However reason of my depressed mood was something personal but still you guys sent me all those advises which really helped me.

I want to share what I have done to cheer me up yesterday.

  • I took a long bath and organised my thoughts. Lot of crying happened but do you know tears contain a number of stress hormones and other chemicals so when you cry you release this stress.
  • I had my comfort food. I agreed junk food have many disadvantages but I believe if you are feeling sad then you have to give yourself some treats. (btw my comfort food is noodles 🍜)
  • I have watched my favourite show (nowadays I'm watching bridgerton). There are also stress reliveing videos on internet. Some like to watch kittens and some like to watch oddly satisfying videos.
  • In the end, I did some night yoga with light music. It was very soothing. 😊
Collapse
 
codewander profile image
Anon

I cannot get enough of the 11 month old snowboarding baby in China.

Collapse
 
j0nimost profile image
John Nyingi • Edited

you don't, take a break ask for a 1-2week leave or atleast tell the hr to give you sometime off. Meet friend's, share what's bothering you with someone you trust and comeback to coding when calm.