Why I’m able to Code 4 Hours with NO breaks (how to stay focused & productive)

preview_player
Показать описание
As someone who oftentimes struggles to stay focused & productive, I'm constantly trying new things to combat that struggle. Well when it comes to coding, I've finally found something that works for me! That is, I code for 4 hours with no breaks. I disregard any advice regarding the Pomodoro Technique. I ensure I have no distractions. And I try my best to stay healthy, mentally & physically, so that I can successfully implement this 4 hour code block.
In this video, I want to lay out why I feel this works for me, and how I'm able to accomplish it. Enjoy!

------------------------


📓 Learning Resources:

👨‍💻 My Coding Gear:
Рекомендации по теме
Комментарии
Автор

me, who should be coding, watching this video: 🤡

PauloLNavarro
Автор

My method is to set a timer for 4 hours, but pause that timer when I want to take a break or have to do something. That way it's guaranteed I get 4 hours of work done, and I can have breaks if I want to.
How do I guarantee I actually work those 4 hours instead of just procrastinating until bed time? Rules. No entertainment until the timer has hit 0, break time can only be used for things like going to the bathroom, cooking meals, going to the store, or simply resting for a few minutes. This method must also be started first thing in the morning, otherwise it's easy to procrastinate starting the timer.

descai
Автор

For me, the biggest challenge to my focus at work is when I’m stuck on a problem. Like, tried all my ideas and still hitting the same roadblock. It just makes me wanna get up and do something else. I think I need to get a little better at facing that adversity instead of being avoidant.

jeckert
Автор

I also found it hard to focus when I code for short sessions, but coding for 2-4 hours and then hitting a break is fine as I have much time to focus and really get to the mood and zone!

miladhaghpanah
Автор

This is exactly what I do. 3-4 hours, lunch, then another 3-4 later in the night. Helps me to sleep more as well
plenty of water & B12 too.
for best results, no checking your phone. Just wake up, move to desk, and begin programming

Reecepbcups
Автор

100% correct. As a senior engineer, I can focus 3-4 hours at a time. Distractions, meetings, IMs only delay me.

NathanHedglin
Автор

I do agree with this. When I was studying for CFA (finance) I read the textbooks cover to cover. The longer I read the more bored I get but at the same time my reading comprehension and analytical skills increased by a large margin. And so by the time I read more than 2 hours. I stop feeling bored. It’s similar to attending a college lecture. It’s doable the first hour. The second hour becomes super tedious. But once you past the second hour. You just don’t have to urge to play video games or wanting to get out. You just get into this bored zone and your brain just becomes a sponge that keeps on acquiring new into. Plus when you study or code on hard stuff, your brain feels like you just finished taking a super hard exam. So these two combined together, you become very productive. I only stop working/studying when I finish my task or get sleepy.

armynso
Автор

Couldn't agree more I wake up at 4:30-5am to get at least 2hrs of work done before my daughter wakes up. During that time I only focus on all the important tasks I need to get done. So I can save the less important tasks for later when I'm distracted running around the house like a crazy person.

Chewy
Автор

25/5 wasn't working for me, but I found that 120/15 is great! So, I guess it depends. The problem with doing 4hrs straight is you get no break from a hard problem. When I leave a hard problem and come back, I usually have new solutions.

davidalanroyster
Автор

The thing that really helps me (and probably won't work in all companies) is to have two projects going on at all times. That way when I have a blocker or get stuck on a tricky problem, I stop working on that project and switch to the other. This alternation allows me to never block the flow state of programming. I've done 7+ hours of coding this way. My manager was terrified of this at first, but now will always let me pick two or three features to work through at a time. I find that by the time I come back to the other project, my subconscious will have been working on the problem in the background and I'll be able to start again. Of course, if the thing blocking me was a person, that becomes harder

YOSOYXOSE
Автор

Working for 4 hours straight is definitely a goal right now. You're definitely right about the friction not being the work itself but the idea of the work. It's the activation energy to get the process started. The funny thing is, once you've finished a long session like that, you feel great. It's just getting started that is the hard part for me.

camerenisonfire
Автор

i agree that the normal 25/5 pomodoro doesn’t really work, but doing 45/15 or 50/10 helps and also it can be used to just get started. if i’m tired and could use a break, i’ll take a break. if i’m in the zone, i just won’t.

iseeten
Автор

That's how I rolled for years, I would just get in the flow and work for hours with no breaks, but at the end of the day I would get a tension headache. In my case I prefer breaks just to avoid the headaches. I can get back in the flow state quite fast if my tasks are broken down in an intelligent way so they are not that hard, or that easy to accomplish. I sometimes use pomodoro, or just go by feel, but I do get at least one break in a two hour period and do the absolute best I can while not taking a break.

andy
Автор

Definitely find this approach to allow me to get more done. As someone with ADHD it’s impossible for me to get any work done with constant context switching. I usually throw on my airpods, turn on noise cancellation and get to work.

williemazehaze
Автор

I am a dev and I use the pomodoro technique a lot! I guess what makes it work for me is that I take lots of notes during my sessions about what it is that I'm working on. This capturing of context allows me to easily jump back into it after the break.

omarmefire
Автор

Definitely the video I needed. I get stuck on a leet code problem for 20 mins, I take a 40 mins break

raghav
Автор

When I was 18 I was living with my parents and they would not let me get the internet, and I didn't have a cell phone, but I could take a USB stick to the public library, and friends to get stuff I want, applications, documents etc.
I was self taught. And I absolutely loved it, once over the majority of the learning curve, my imagination was my limits.
And I would eat.. breathe.. sleep.. coding!
I've even had problems I'm absolutely stuck on for hours, and I would solve the problem in my sleep, waking up with the solution!
4 hours HA what about 12 or more Consecutive!

davidprock
Автор

2x 2-3 hours blocks are what I like to work with, inserting a food + walk break in between. I get a little antsy and hungry usually around the 3 hour mark. This is all on point though. Great video man. Subscribed!

intuitiveperformance
Автор

This is such a great idea! Since I started working as a professional software engineer I work 4 hours straight on coding. If it helps one think that was really helpful to me to concentrate was the competitive programming competitions, after being there 3 or 4 times sat down focusing on a set of problems you start to find easier to concentrate for 4 or even more hours in coding. The other think that helped me a lot is to have a computer exclusive for coding, no Facebook, no Instagram, no slack, no reddit. Just my coding tools and something for music.

Thanks for the video, Forrest! Keep doing this great contet!

badcode
Автор

Out of all your splendid videos I’ve had the pleasure of enjoying over the years, this one is your finest 👌🏻 Love this. Someone needed to state this perspective

sbstorage