I'm really eager to code and create my own projects, but I keep getting sidetracked. I can sit down and start off well, but after about 10-15 minutes, I'm suddenly looking up random stuff, taking a quick break on YouTube, or aimlessly scrolling through unrelated content. Before I know it, an hour has passed, and I feel both bored and frustrated with myself. I enjoy coding when I'm actually in the zone, but maintaining my focus long enough to get there is challenging. I've got a few questions for those who code regularly: How do you resist the urge to jump between tabs? Do you have any methods or systems to enforce discipline? Is this just a common struggle for beginners, or do experienced coders face it too? Any practical tips would be greatly appreciated!
2 Answers
Try the Pomodoro technique! There are YouTube videos where people use this method—like "study with me" or "work with me" sessions. You set a timer for 25 minutes of focused work, then take a 5-minute break. It really helps me concentrate.
Consider blocking distracting sites on your computer and phone. For browsers, LeechBlock is a great free extension to limit your time on certain websites. If you’re on iPhone, look into ScreenZen. Unfortunately, I can't help with Android, but I bet there's similar software out there.

Thanks for the suggestion! I'm definitely going to give that a shot.