How do you study and stay awake?

Hey, guys. If you also had trouble studying programming because you were constantly falling asleep but you figured out solutions, please share your advice.

I sleep well, have plenty of daylight, take breaks and yet as soon as I try learning how to code, my brain goes HEAVY and my eyes start closing because it’s all just so unbearably boring. To show you the scale of this problem, I’ve been reading this ( A first splash into JavaScript - Learn web development | MDN ) for TWO HOURS now and I’m only halfway through because I spend most of that time fighting an urge to sleep. And I’m not tired right now. x_x


One of the best tips I have ever received is to break up your day into four parts depending on your schedule. Instead of pushing something to the next day, you can push something to the next quarter.

You are trying to read that entire article. Maybe read less at a time and spread it out to look at it only within two quarters of the day.

If you are stressed about something, tell yourself to only stress about something within a certain quarter of the day (not the last quarter). This will teach your body not to be anxious or on high alert when you are trying to fall asleep.

Its also bad to be reading that much on a screen if you are tired and want to go to bed. Now your mind is going to be racing + blue light will mess with your ability to sleep. One hour before bed in the last quarter of the day, read something (or do something relaxing) that has nothing to do with programming. Make it a physical book and not on a screen. You can also knit, draw, etc. Anything relaxing off the screen.


First advice might be useful…

As for others, I already make sure to stop studying at least an hour before going to bed and I always have night light on with lowest screen brightness. But that’s not really related to falling asleep WHILE you’re trying to study in the middle of the day.

1 Like

Learning “dry and boring” topics usually requires a good amount of focus. Where and how you get this focus is important, but its also not something you can usually just “turn on”. You either have enthusiasm for what your learning and doing, or you don’t. The key is being able to either work through the "dry and boring"periods or be able to not see them as dry and boring.

Techniques could be reading about more “interesting” topics, finding enthusiasm through that and then using that to “power” your way through dry topics, or just simply mixing in different topics just so your brain can think about something else you want to learn. This doesn’t mean getting 100% distracted all the time, but having different topics should at least help keep things from being too dry and boring.

The other thing to consider, which needs to be said is make sure you get enough sleep and follow the same sleeping schedule. You should be striving toward 8 hours of uninterrupted sleep, while going to bed and waking up at roughly the same time.


I’m screwed then. :'D I’ll have to make sure that I have something actually interesting to read/ listen/ watch during breaks… The problem is that when I take a break it’s because I’m already falling off the chair and it’s hard to wake up enough to even enjoy a break that would engage my brain. It’s going to be tricky…

No one likes studying. I like to learn, but doing freeCodeCamp projects of lessons for hours a day for the past few months also has created a dry period. It doesn’t mean you don’t like to code, as if you didn’t you wouldn’t be here, it’s just your in a dry place you need to push past.

It also may be that you need a different form of studying. You might be spending too much time reading and not enough time coding projects.


No, I just have no interest in coding. i simply need profession. If I could do what I want for life, I wouldn’t be doing THIS. Guess there’s no way around it, I’ll just have to grind my way through.

If this is really the case then I would suggest you seriously reconsider going into this line of work because doing this stuff professionally is about 25% actual coding and 75% reading and learning (in other words, studying). I don’t see how you are going to succeed at something you have no interest in and are having trouble motivating yourself to learn in the first place.

P.S. My percentages above may be off a little but this profession requires constant learning because it changes so fast and you can’t know everything. To some of us, that’s what makes it fun and rewarding. If you find it so boring that it puts you to sleep then you are going to hate work.


I don’t have anything else I could do. I looked for years. I’m pretty much stuck with this option.
Before, once I crawled my way through same issue with HTML and CSS, working on website was absorbing and interesting. I had to remind myself to take breaks. I assume that it will be the same with JS. EVENTUALLY… The hard part is to learn enough that I could become interested and with JS it will take forever + it’s harder. So I have to find a way to crawl through this stage…

There are technically infinite possible jobs one can work with. If you don’t like coding, learning, or challenges then I wouldn’t go into it. This doesn’t mean “its your only option”, or “last option”, unless its some last ditch option, which might not work out for other reasons.

Its possible we are going backwards, it might be a better start if you state what you are interested in, and then seek opportunities related to what those are. There might even be some kind of overlap between coding/tech and what you normally like. Its possible, but not a guarantee.

Its also possible you will just hate it and keep hating it, and when working hate it some more. I’m not sure if that is the best “last option” honestly, it might just end up causing more issues than whatever such a career was originally trying to solve.

1 Like

I have trouble staying focused regardless if I am interested or not but what has helped me is the pomodoro method. Kudos on being able to read for two hours. I trail off in 2 secs…the pomodoro method is just a timer set for 25 mins to allow yourself to strictly focus on your task. When the timer goes off, you take a five min break and once you’ve done an hour or so of work it gives you the option to take longer breaks. It’s easy for me to get overwhelmed but the minute I realize that I can’t conquer everything all at once and that I’m a forever student, it puts me back on track. I use when I’m on my PC and a tomato timer app on my phone when I need help focusing with reading a book. Regardless, sounds like you are trying, major kudos. Happy learning :slight_smile:


I really REALLY looked into all of my options for past 10 years. I got nothing else.

My interest are universaly offensive to humankind, our species are hundreds of thousands of years too early in evolution for me to be able to work with my passions without drowning in hate from everyone. No money here. Can only be done as a hobby if you’re okay with being hated by everyone.

The things I could do require money to learn, money I currently don’t have but I hope to get them via coding. For example I could be a fact- checker. Still very very young profession and courses from legends like Bellingcat are too expensive… It’s something I could get into later in life still.

Wow, I’m a dumbass… I used to do pomodoro but simply forgor about it. I’ll try again, thanks.

Coding is hard for everyone. Taking a long time to learn and being very tired while doing so is normal. If you are struggling to learn, maybe the guide you are using to learn maybe isn’t the best.

I didn’t learn much of anything from some JS textbooks, but learned a ton from interactive sites such as edhessive and freecodecamp.

If coding was easy, everyone would be doing it. The issue is that it is not, and if you can read for hours on the topic try and peruse it. You can learn mostly everything without a 100k collage degree so its worth looking at.


I was in this type of situation for multiple time. Pomodoro is definitely a great idea.
It measure our attentions span and we can use this for discipline ourself.
Also we can challenge ourself to increase our attention span.
Before doing any project or challenges always ask “why”? that will keep you interests in the content and kept you moving.
Also it will help you study smarter but not harder. Sometime I don’t even read the whole tutorial and already figure out the solution by reading some pieces and puzzle them in my head. So why do you want to learn certain topic or challenge? Do you really need to read the whole article or tutorial? Can you puzzle all the good points together and make sense?

1 Like

I don’t remember ever having to read anything for two hours before getting my hands dirty. Chances are you will forget most of that information anyway if it does not get applied to something practical. Learning to code is not like other academic studies, it is much more hands-on. I would suggest you stay active by applying knowledge as soon as possible. Just reading a bunch of text isn’t going to help you learn.

If you find coding itself boring then I guess you just don’t like to code. If you like HTML and CSS it is possible that you should focus more on design and pure frontend things like UI/UX.


If you fundamentally do not like the process of research and problem solving, it will be difficult for you to make a career programing.

That said, studying or researching should not be two straight hours of reading with zero coding. Coding is about making solutions. Memorization is not a good way to learn coding topics.

1 Like

I definitely will look into UI/UX, it sounds like something I might enjoy.

As for exercises, I kept trying that approach and it fails miserably in my case. I tried to learn a bit - do related exercise and repeat. Zero results no matter what source or what language. Tragically, I seem to exercise best once I learned enough and made a bunch of notes by hand. It’s much more effective approach but MY. GOD. is it also unbearably boring…

I enjoy research and problem solving but working on understanding theory is that part that kills me. Once I understand enough, this whole problem slowly but surely solves itself over time.

I have not found coding questions yet that require me to read for two hours straight without any interaction with the content. I’m not sure what you like about research if you just read until fall asleep because you are so uninterested in research? :man_shrugging: