Do i need to start to learn good programming practice like Entity component system?
Where did you get the idea that this is “good programming practice”?
It’s usually overkill, especially for indies and hobbyists.
I read that ECS was base on composition.
So? Is there something about composition that makes it always better than inheritance? Or are you just trying to skip the learning process and reading a bunch of articles online in the hopes of skipping “bad” practices for yourself, and you found a bunch of people promoting composition over inheritance and blindly just accepted it as universal truth without considering context?
Hint: It’s the latter choice.
It’s exactly what you are doing right now. Instead of making mistakes, learning, and redoing, you are here asking how you can skip all the mistakes and avoid redoing things.
That’s basically the worst possible way to learn programming, and if I were to be bold enough to speak directly I would suggest it is a very bad sign as far as the future of your programming skills go.
If I have the choice between just picking on-my-own some new set of programming skills/practices vs. asking online for people to pick for me, the correct answer is always to pick for yourself, make mistakes, and learn 10× faster from them. Not only do you learn much slower if you never fail, having people pick for you means you never even learn why they chose this or that. How can you be a true programmer if you can’t make decisions for yourself?
It’s a bad sign for your future because:
#1: You simply aren’t going to develop very well as a programmer. It will take you 10× longer to get anywhere compared with just making mistakes and learning from them.
#2: It’s a very bad characteristic of a programmer. I simply can’t imagine someone who has this kind of tendency—to run away from failures and mistakes—ever becoming a real programmer, let alone actually good/successful at it.
I know why globals are evil without ever having been told. Why? Because I screwed up every one of my beginner-level projects with them, and I dealt with the mess they cause first-hand.
We all have to go through our own battles with bad coding practices. Those hardships make you street smart, not just book smart. A real programmer has to be both, so stop asking online for everyone to make your decisions for you, roll up your sleeves, and get dirty by yourself.
L. Spiro