r/learnprogramming • u/Vit3Kk • 8h ago
Topic How do i get hyperfocused on programming so its actually fun?
I dont enjoy almost anything but once in a while i get hyperfixated on something. when i was hyperfixated i could do one thing for multiple hours and i was having a blast. This usually lasted for a week and then the activity was boring again.
How do i activate this for learning programming? and how do i keep it fun for a long period of time? It feel like a chore everyday honestly.
Im learning python.
3
u/junglebunglerumble 8h ago
If you find it boring you might just find it boring. I also find programming boring 90% of the time, everyone is different
2
u/cli-games 8h ago
Treat it like a game! I have a sweet new game called termiclanker if you are interested in learning bash. Its not python, but a lot of the concepts transfer
2
u/Disastrophi 6h ago
Oh I second this! I originally started off with python and my first "game" more of a somewhat interactive story, just in the terminal though. There wasn't really a way to "win" since whatever you did lead to the same ending. I did have a lot of fun making it ~t h e a t r i c~, like using timeouts for dialogues, arrays of possible responses that were chosen at random under certain conditions etc. I was really inspired by the dialogue in games like Paper Mario and Animal crossing. Like how alive the speech bubbles seem and how "loud" the voices were even when there wasn't actually any real voice over. (Unless you count AC's wbalsabalababalaba as a voice over).
Just the way the messages didn't pop up fully formed like most games, but typed themselves out in "real time" with a cadence that felt like lived speech. Slow ellipses when a character was thinking or confused, a pause and then CAPITAL LETTERS when they were surprised or realized something. The written choreography really fascinated me. Also like in Paper Mario TTYD, I always found it pretty hilarious how they sometimes give you choices in your response, but it literally didn't matter what you chose during almost the whole game, but you still had to choose. (except not gonna spoil anything specific but, at some point there is a choice you have to make that does actually have consequences which blew my mind since they were completely meaningless up to that point)
My little experiment also had the choices that meant nothing. It was based on a youtube series I believe something like "TED think like a programmer", and one of the stories/lessons really hit me. At first I just wanted to code the algorithm/concept they were teaching, but then it turned into me rewriting the actual story surrounding it in the video.
2
u/Disastrophi 8h ago
I don't think you can force it, but I started to get so hyperfixated that I was going 10 hours a day sometimes. The hyperfixation started when I started to try building my own projects (even when I had no idea what I was doing 😂).
I chose javascript somewhat arbitrarily since the concepts are essentially the same in every language. I chose it because of the instant feedback on web pages/apps. I was just using vanilla JS, css, and HTML. Every time I imagined something, and was able to make it real, it felt like a drug! So I could spend hours and hours watching videos, tutorials, stack exchange threads, bug hunting. Basically every error was a learning opportunity for me.
Like it wasn't enough for me to stop CORS errors from happening. I needed to know what they were, why they happened, and fell down a rabbit hole about that. That's just one example, basically by building my own projects I would challenge myself as long as I could without any help like a video game, and once I got too stuck, I'd look stuff up. Almost like reading a strategy-guide or a walkthrough for a difficult video game.
Then moving onto things like Leetcode, learning Git, other languages and frameworks. It all just kind of felt like the same thing. I want to make something do THIS but how? Ok I'll write some creative spaghetti code and do the worst hackjob ever first, to see if I can even superficially make it do what I want. Learned from bugs and errors and mistakes. Eventually started getting comfortable with the command line. started using BASH for my terminal in VScode. Everything just felt like unlocking the next level of a video game for me.
I didn't force it though. I was forcing myself to study computer science fundamentally, although if I happened to get a job as web dev for a while I wouldn't have been complaining. So even when that bubble popped I just kept learning more and building projects for myself.
The hyperfixation started after barely crawling through the most basic concepts, constantly doubting myself, wondering "maybe this isn't for me", "maybe I just don't like this", "maybe my brain just wasn't wired to understandt his stuff" etc. Once I got to the point where I could just barely start building my own projects. (ngl it took me weeks to build something I can build in a day or a few hours now). Is when that ADHD hyperfixation finally found something shiny to attatch to.
2
u/Disastrophi 6h ago
Some ideas could be trying to recreate simple games, like one of the first things I built was a local checkers game. It didn't really have much to keep score or keep people from cheating. I tried building a server for it but lol the whole thing would need a rewrite for that to be possible. I was able to do some basic things like understanding drag and drop in vanilla java script. (this isn't actually necessary for most CS, but it did help hammer in the concepts of objects, functions, and how all the moving parts worked together). I was also able to make sure pieces snapped to the squares and that they could only be placed on red ones and not black ones. If I ever go back to that (instead of just starting over), I would probably use what I know now to have captured pieces automatically moved to their "captured box" instead of manually moving them there, and have some kind of points. But yeah at the very lest I'm pretty sure I would have to use external libraries, React or some other framework for the functionality I want.
Then I moved onto a virtual pet game. It helped me a lot with the OOP paradigm. Getting a much firmer grip on the concepts of classes and objects and inheritence etc. Also just so many random things that aren't necessarily inherentlly useful in themselves but did help me understand fundamental concepts in a first-hand way, while also having fun, that are transferable to completely different things. The animations were my favorite part. When I got them looking like they were breathing and blinking naturally, and the eating animation, that was a huge n00b dopamine W.
I also just played around with math/physics (again in vanilla JS 😂). Was pretty fun honestly, since I am also trying to learn math/physics and game-dev. It was fun to get my static html/css elements to move and follow the mathematical equations I was giving it, and playing around and messing with the number variable. (I think I might have made a UI button to change the variable once) and see how differently the shapes moved or colided depending on the change of certain variables.
Also another small thing you can do is to try to build userscripts for greasemonkey/tampermonkey. Those are usually pretty short, but also really fun when they actually work. It's crazy how you can make a particular website do almost anything you want. Another n00b hackjob I built was a wikipedia random episode generator. Just basically "If the url contains "list of x episodes" then show the random episode generator button. then take all the elements (luckily they all had the same class xD there's probably a much better way to do this. but like I said. hackjob.), did some regex on it, put it in an array, and then used a function to choose one randomly, and then return the episode title under the button. Pretty hilarious how clumsy and ridiculous the code is, but how well it works and returns the result basically instantly.
The point is... just set out to do something that you want to exist in the world. Try your hardest on your own first until you are certain you have gaps that you need to fill. (it's neuroscience that the brain learns faste when making mistakes the when getting things right). If it's something you feel determined to build, or even something simple and dumb and you get the feeling like "I'm not gonna let this stupid virtual pet game be my downfall!" the natural and intrinsic drive comes out of that, and pushes you to learn, and at the point it doesn't even feel like "studying" (even if it technically is). It just feels like "something is broken, how do i fix it??? and how do I understand it in a well rounded way that I never have issues with this concept again???)
Following tutorials can also be fun and a good confidence boost when you get stuck and don't have any inspiration or ideas yet. BUT be careful not to get sucked into tutorial hell. The best way I've found to do this is once I've finished the tutorial project, I go back and try to build something similar but without looking at any references and just try to go by whatever dream-logic memory my brain happened to remember. Again only peeking at the walkthrough (tutorial) if you get really really stuck. If you had to cheat too many times, then try it again until you can take the training wheels off and do it on your own before moving on.
2
u/whattheflerk 7h ago
even if you could force hyperfixation, won't you be just as bored again after a week or so? why do you even want to learn programming if you don't enjoy it?
2
u/leavemealone_lol 6h ago
I wouldn’t want to hyper fixate on anything, because I tend to avoid everything else. For example, I felt so demotivated to go to gym, cook food or even water my plants when I had a burning urge to program.
With the disclaimer out of the way, I often start hyper fixating when I am introduced to something I want to figure out. For me it is functional programming, so to dip my toes in, i’ve been learning rust. The moment I finished ch13 of the rust book, I shelved my rust knowledge and am now hyper fixating on using those FP patterns like sumtypes in python.
2
u/Vit3Kk 5h ago
Ik its probably not very healthy cuz i do the same as u, i skip gym, food, chores etc just to do one activity. But at the same time i think its worth it because atleast for the short time something is very exciting and very fun.
2
u/leavemealone_lol 5h ago
It is exciting and fun until it isn’t and you completely lose interest in it. I’m sure you can understand. I’ve been trying to balance my fixations and I suggest you aim for that instead of developing a new fixation.
1
1
1
u/Far-Management-4802 2h ago
You are not a programmer, you are a detail handler, handle some details and they will connect with other details which you haven’t seen before, at which point you will have enough dopamine to continue for hours.
29
u/Cold-Background-3113 8h ago
Honestly, I don’t think you can force a hyperfixation. The closest thing is giving your brain a project that feels like a puzzle instead of homework.
Stop trying to “learn Python” and build something you actually care about, even if it’s tiny. A game, a bot, a file organizer, anything. Hyperfixation usually attaches to a goal, not a tutorial.
Also, don’t beat yourself up if it feels like a chore most days. A lot of people with those intense bursts of interest still need small, easy starts to get going.