DEV Community

Cover image for How to struggle with debugging before sleeping?
Edoardo Debenedetti
Edoardo Debenedetti

Posted on

How to struggle with debugging before sleeping?

Hi! New poster here, I have a question for you, experienced devs.

The problem

I'm a second year Computer Engineering student, and I'm building my first big project (a mobile app) for the Software Engineering course. I'm loving it: it's challenging, interesting, and I'm truly believing in what I'm building with my teammates.
But I have a problem: I cannot fall asleep.
When I go to bed I start thinking of the project, what I need to do, what I want
to do and how to solve bugs and problems.

The more I think, the more I find solutions, the more I struggle trying to fall asleep.

So, am I the only one? How did you solve this problem?
Do you get up and take notes? Aren't you worried to forget everything?

Top comments (10)

Collapse
 
val_baca profile image
Valentin Baca • Edited

1) Braindump. Write things down; type them if you must. Either just a bulleted list or full paragraph journal-style is good.

2) Stop working earlier. If I'm going to bed at midnight, I try to close the laptop at 10:30PM or yeah, no sleep. No sleep means a cascading failure of do { more coffee; poor code; more stress; less sleep; } while (true)

3) read fiction before bed, or meditate.

4) this might sound a little crazy, but really does help: talk into your phone's voice memo's app. It's kind of like Rubber duck debugging

Collapse
 
dedeswim profile image
Edoardo Debenedetti • Edited

Thank you! My problem's that since I live in a campus, the border between studying/working and living is extremely thin, so even though I stop coding before it's still worry hard not to think of what I've done/what I need to do 😪

I'll definitely give a try to the recording method 👌

Collapse
 
jess profile image
Jess Lee

I use a meditation app to quiet thoughts and aromatherapy to sleep sounder.

I generally trust that a solution will resurface itself if I think of it, so I don't get up and take notes while I'm trying to sleep.

Collapse
 
dedeswim profile image
Edoardo Debenedetti

Thanks 😊
Which app is that?

Collapse
 
jess profile image
Jess Lee

Headspace!

Thread Thread
 
dedeswim profile image
Edoardo Debenedetti

Thanks a lot! 😊

Collapse
 
dmfay profile image
Dian Fay

Valerian root tincture. If you have a health food store nearby (US) you can get it there; I grow my own in the backyard since the climate & terrain are suitable. It tastes terrible so shoot it in a bit of water, but it does the trick if your thoughts are racing for whatever reason. If it was a good idea it'll come back to you.

Collapse
 
dedeswim profile image
Edoardo Debenedetti

I'm unfortunately living in China, at the moment, so I think I won't be able to find it 😥
Btw thanks anyway 😊

Collapse
 
jake profile image
Jake Casto

Dude I was in the exact same place you are. I work 15 ~ 16 hour days (home office) so I'm programming right before I go to sleep. Working at night became a powerful asset to me, I was able to think clearly while trying to fall asleep and find and fix bugs without being on my PC. It turned into a habit that killed my sleep (was getting 4 hours of sleep a night, it was awful).

Try to think about that before you go to bed, take a long shower before you go to bed and get all the thinking done then, and you can jot down notes when you get out over getting out of bed to take notes.

I tried taking notes while in bed & it got me nowhere, I ended up stressing about the notes... "What if they aren't accurate, What if this breaks the application?".

Collapse
 
dedeswim profile image
Edoardo Debenedetti • Edited

Thanks for the answer! 😊
Actually taking notes would 100% stress me 😂
I'll to come to a sort of end of chapter before going to bed, so that I don't have so much to think of.
The problem is that the app is still in a very early stage, and it's really difficult to find a sort of end of chapter 😂