🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem with sleep

Started by
42 comments, last by Anri 6 years, 4 months ago

Try to eat some vegetables and stuff. Lack of proper sleep seems to be related to melatonin which is produced in the gut. In serious, I eat plenty of fresh vegetables and cook at home and do get proper sleep. One way to know if you get proper sleep is if you dream. I dream mostly about programming my game Bluejay's Quest and C-Lesh. I sleep well and in the morning have a lot of solutions to programming problems I had.

Codeloader - Free games, stories, and articles!
If you stare at a computer for 5 minutes you might be a nerdneck!
https://www.codeloader.dev

Advertisement
2 hours ago, francoisdiy said:

Try to eat some vegetables and stuff. Lack of proper sleep seems to be related to melatonin which is produced in the gut. In serious, I eat plenty of fresh vegetables and cook at home and do get proper sleep.

I cook at home too, but I've serious problem to eat vegetables. When I didn't was interested in programming yet and focused more on the body, I did try to eat vegetables for like a week, but after that it became really hard to eat a considerable amount necessary.

46 minutes ago, Luhan M. said:

I cook at home too, but I've serious problem to eat vegetables. When I didn't was interested in programming yet and focused more on the body, I did try to eat vegetables for like a week, but after that it became really hard to eat a considerable amount necessary.

Greens - like raw parsley and cilantro will do the trick. I started eating greens back in college and I noticed that my sleep improved greatly. The green color in plants is used by good bacteria in the gut which in turn produce simple fats for the cells of the gut lining which strengthens digestion and removed toxins from the gut. You'll notice a difference not only in digestion but also in sleep.

Codeloader - Free games, stories, and articles!
If you stare at a computer for 5 minutes you might be a nerdneck!
https://www.codeloader.dev

17 minutes ago, francoisdiy said:

Greens - like raw parsley and cilantro will do the trick.

Leafy greens like spinach, kale, arugula are great for this too. Spinach/arugula salads are a great way to ease yourself into eating leafy greens (and a pretty widespread option when dining out).

If you don't love eating things like spinach and kale cooked (and believe me, I understand. Kale is not on my favourites list), or you find cooking them to be difficult, it might be worth investing in a juicer. Most of the benefits, less eating slimy greens :)

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Spinach is good it has that sugar that the good bacteria use for energy. Juicing doesn't really work unless you eat the pulp from what I found out. It seems that the fiber in the vegetables is the most important component.

Codeloader - Free games, stories, and articles!
If you stare at a computer for 5 minutes you might be a nerdneck!
https://www.codeloader.dev

Just to suggest the complete opposite of everything... have you tried drinking? :D

I had a few glasses of red wine with dinner last night and had one of the best nights sleep in ages.

 
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

Agree with addressing your diet and exercise. Be aware that lots of food additives are stimulants. You may be more sensitive to these than you realise.

Try only having caffeine on waking, and only drinking decaf tea / coffee during the day. Little / no liquids in the evening helps, as it can prevent you waking needing the loo. Chocolate is also a stimulant, especially darker choc, and certain brands can have additives to the shell etc. And stay away from fizzy drinks etc these are loaded with stimulants.

Another trick is to not use curtains / blinds so sunlight wakes you regularly in the morning. And yeah, wind down with tv / book, don't program before bed in my opinion, it will be on your mind, and your code will be awful. :)

53 minutes ago, ChaosEngine said:

Just to suggest the complete opposite of everything... have you tried drinking?

I still living with my mom, and I have no source of incoming, so, for now it won't possible (these things tend to be really expensive here) =/

11 minutes ago, lawnjelly said:

Agree with addressing your diet and exercise. Be aware that lots of food additives are stimulants. You may be more sensitive to these than you realise.

I think coffee maybe is affecting me more than I think (I'm not sure), because sometimes I drink it kinda late (5:30 pm).

 

12 minutes ago, lawnjelly said:

Another trick is to not use curtains / blinds so sunlight wakes you regularly in the morning

I generally let it a little open , but I can't let it all open, because my brother doesn't get up early.

 

14 minutes ago, lawnjelly said:

And yeah, wind down with tv / book, don't program before bed in my opinion, it will be on your mind, and your code will be awful.

As you said and @L. Spiro, I'll try to not program before bed today to see if it helps me.

17 minutes ago, Luhan M. said:

I think coffee maybe is affecting me more than I think (I'm not sure), because sometimes I drink it kinda late (5:30 pm).

There's your problem. Don't drink coffee in the late afternoons (say, 3pm onward). Drink it judiciously after about 1pm.

Decaf is your friend if you need to wean off the afternoon coffee.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I had problems sleeping, too. In hindsight, they may have started when I got my first smart phone.

I started watching YouTube and whatnot late in the evening while already in bed but recently I am forcing myself to not look at my phone at least an hour before I plan to sleep. Instead I'm reading books (those things made from paper) for an hour. I've only been doing that for three weeks, but I believe it already improved the situation. I tend to fall asleep faster and then wake up a few minutes before my alarm, just like it used to be in highschool.

This topic is closed to new replies.

Advertisement