r/learnprogramming • u/Ecstatic_Comfort_139 • 1h ago
Discussion How can I focus longer on programming?
I'm a creative person. I like creating things, and I would love to create my own apps and programs. However, I find it hard to concentrate on programming, and I found out that it's not something that I can just do whenever, for example, something like video editing. No, I have to fully concentrate on programming the whole way unless I have already learned something and I have to recall it.
I don't have ADHD. Could this be solved?
3
Upvotes
4
u/Professional-Owl1687 1h ago
Program something you enjoy
2
u/Beregolas 1h ago
This points to it just being "a skill issue", by which I don't mean to say you are bad... you just don't have enough practice to make it automatic yet. Writing and talking about your code makes you reason about it more, which helps you build mental models and makes thinking about it more automatic. If you program alone, this is often an issue. Basically try to explain it to learn more about it.
Also, in many ways programming is more taxing that video editing. It requires you to have more abstract knowledge in your head, to translate your ideas into text instead of visual ideas, and it requires you to think about multiple possibilities at once. I would call myself a pretty good programmer, I enjoy doing it and even with ADHD, I never had an issue to sit down and "just program", but it's definitely one of the most mentally taxing things I've ever done, especially on harder projects. I think the only thing that regularly was more mentally draining was playing Go (board game)
Many ADHD tips and tricks also just work for normal people. One that many neurotypical people find particularly helpful is: You are allowed to take breaks. Your code gets better when you take creative breaks. Anything that moves your body and doesn't occupy your brain counts. Go on a 15-30 min walk without music, without a podcast or audiobook. Nature is a bonus, if you can get it. Just think about whatever comes to mind, your programming project for example. Don't force it though. We often have far too many distracting background thoughts and tasks, aand since we are never bored anymore, they don't properly clear out.
General tips for better concentration apply: Nutrition, Sleep and sports. If you think you might lack in any of those, change it! It's worth it!
1
u/funcyChaos 1h ago
It is difficult to solve. I either a) wait for a deadline and rush or b) wait for inspiration and ride the wave
•
u/OtherwiseOne4107 36m ago
Proper sustained focus on something intellectually challenging is hard to do. It's normal. You are not deficient, you are using a complex organ in a way it's not used to, and that is tiring. It will get less tiring the more you practice.
When I was at uni, I had a physics tutor (who was a professor, the real deal), who said he could only focus on something challenging for 20 minutes. So he'd do 20 minutes, stop, do something less taxing, and then go again later.
•
u/dicewitch 1m ago
Have you tried the pomodoro method? Easier to focus 100% on one thing for 25 minutes and then take a break, vs half concentrate on it for "as long as possible"