The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I cannot associate with the feeling. Although, in graduate school I'd pull 24hr days with little sleep between them, it was by design and with much caffeine. In real life, I'm a champion catnapper. Coffee does not keep me awake, either.
Realizing it's not an option for you, I'd just not that an alcoholic beverage in a quantity known as "a drink" will put me to sleep in ca. 1hr. (330ml beer, 110ml wine, 30ml single malt scotch). I do not bring this up idly: does your faith not allow exceptions for true medical need (perhaps with the approval of a respected religious figure)? I note this only in that, so far as it goes, the effect of alcohol on the body is basically harmless (assuming one isn't a heavy drinker/alcoholic) compared to the other medications. I know that religion often has its own whys and wherefores, but exceptions for true medical treatment are sometimes made - better for you then then the other sleep aids (although you may receive a 'no' because the others exist). This paragraph is rhetorical - no need for you to actually answer.
There are a lot of things to try, thankfully. One thing is to make sure you're not eating too close to when you're going to bed. Another is (as others have suggested) to get some exercise during the day, which is good for both stress and sleeping. Put bluelight filters on your screens (though I've heard this might not work) or eliminate screen time at least an hour before bed. You could try meditation, not everyone's thing, but it's an option: Before Sleep | Beginners Spoken Guided Meditation | Chakra Alignment |How to Chakra Balance - YouTube[^]. Make sure the bedroom is dark and cold. I've heard you should have warm feet, but I don't know if that's true.
If none of that works (or you could do it in tandem) consider going for a sleep study. You could have something like sleep apnea.
Everyone has there own method, nothing works for everyone and nothing works every time.
I've found a useful technique which have worked on most occasions.
First off make sure you have a good amount of water content, not hungry, not overly fed.
Make sure you don't have to go to the bathroom, cause you will have to just when you are about to doze off.
Eat a good 3 - 4 hours before sleep time.
Take a walk for 1 KM or at least 200 steps after dinner.
Try not to lie on mattress, use something like yoga mat or one of those expensive mattresses that are good for your back.
When lying on the bed, close your eyes think of all the different things that are coming to mind. Let the proverbial thoughts flow. Now paint all those thoughts on the (imaginary) canvas in front of you. And then paint everything white.
Once your head is clear along with a white background noise (I have found a sound with pattern relaxes me, like that of an old ceiling fan, one of those that look like they are about to fall off), or start counting one and two on inhale and exhale.
If you are spiritual by nature and Muslim try replacing one with Allah and two with Hoo, or YAH and WEH if you are a Christian.
Eat a healthy meal, drink water and go for a 30 minute walk. Listen to music while you do and don't really think about anything important.
It's important to let go of your stress and not hold onto it for days on end.
Developers often use stress as a motivator to get stuff done, but that's also super unhealthy.
My own appendix exploded because I did that too and I nearly died.
If you're still in your early 20's you should be fine though.
Last time I had that problem, it was because my boss was pushing me to finish a project well ahead of time. After working Friday morning through Sunday night with no sleep, I finished the project. He still complained.
So after a good nights sleep, I waited until payday, got my check, cashed it at the local branch of the back it was drawn on, then turned in my resignation. The company had a habit of keeping your last check if you quit, so I turned that around on them. I also handed over evidence to the customer (a state Corrections agency) where billing for my team had been padded by my boss with a lot of extra hours that no one worked. After all, sooner or later, it would have been discovered, and I did not want to be blamed for it.
I moved on and they paid a hefty fine to avoid prosecution.
I am a dev and I read the article (I did not go as far as downloading more) and still know 1/10th of SFA about parsers. Fortunately I guess I have never needed to know.
In an earlier post one of our cohort was describing his trouble getting to sleep. With no disrespect intended to you for your stellar work, if he knows nothing of parsers (like myself) I suggest he go to your page and completely concentrate on your documentation. I am sure he will either render himself safely asleep or get overly enthused on parsers and algorithms such that he forgets that he is tired.
So, just seconds ago, I pulled the trigger and deleted permanently all my deleted mail. Funny to think about how rare an event that is. I mean, I did delete it - I didn't want it and didn't think I ever would because, if I did, I'd shove it in some folder and forget it there, instead.
Do you others also hesitate to complete this tension-fraught job?
Well - that's somehow built into the question, or conversely, why not delete them permanently.
Anything worth keeping is put someplace specific. Ultimately, if you just endless keep deleted email, isn't it like "those people" who fill their desktop with so many icons is obscures the point of having desktop icons.
I do that all the time.
It goes in my bin, which permanently deletes it after 30 days.
I keep pretty much all work mail and most personal mail, but newsletters, order confirmations, build status updates, etc. go right into the bin folder (after having read them).
Or mail like "here's my contact details". I create a Contact, save the details there and delete the mail.
Sometimes even mails with attachments that I should read. I download the attachment, put it where it belongs (like source control or ticketing system) and delete the mail.
That said, I still nearly have around 3000 mails saved since 2010.
Everything before that time somehow got lost when I took a new email address and apparently(?) purged my old account.
I have no idea what happened, but it was quite a shock when I found out at the time.
However, I can't say I ever missed any of those deleted mails, I think we keep them mostly for a little piece of mind and "just in case".