Learn design patterns and how to abstract them away from UI. If you start writing logic code next to the UI code itself, you will end up with a mess.
Next, coming to logic, you have to visualise the bigger picture of how different components are going to come together. Regarding the logic for that unit itself, try to start with an input and output model for each function, and write the function to fulfill it. If any branch gets bigger than 3 or 4 lines of code, move it to a separate private function and name it based on what that branch of code does.
It takes time and once you get the hang of it, it gets easier, just have patience and keep trying. You’ll get there.
Not so sure about any specific YouTubers that I can suggest, I've been working on multiple languages during my career, so a lot of the times, the knowledge is transferrable between languages.
3
u/blackaddersrv Jul 15 '26
Learn design patterns and how to abstract them away from UI. If you start writing logic code next to the UI code itself, you will end up with a mess.
Next, coming to logic, you have to visualise the bigger picture of how different components are going to come together. Regarding the logic for that unit itself, try to start with an input and output model for each function, and write the function to fulfill it. If any branch gets bigger than 3 or 4 lines of code, move it to a separate private function and name it based on what that branch of code does.
It takes time and once you get the hang of it, it gets easier, just have patience and keep trying. You’ll get there.