[QUOT=âBilly4184, post: 3069203, member: 653158â]I know right. I treat it as malware, I had no idea anyone would actually use it.
From what I can tell, youâre trying to get told about all the ways that something should and shouldnât be used before youâve even really tried it. IMO this is a way of teaching that is very inefficient, and itâs very easy to misinterpret things and categorise different approaches as universally good or bad when it depends on a lot of different things.
The best way to do things, IMO, is to first understand very clearly what you want to do. Then find something that works. Now, if sometime later it turns out that this thing you implemented doesnât fit anymore, you will have learned first-hand one of the cases in which it is not suitable, and in which some other thing might be better. But the thing is, if you had not run into the problem, it may very well be that the first approach was perfectly suitable for the task at hand!
Thatâs why I donât advocate âlearning programmingâ in some kind of abstract or theoretical way. People who do that are the ones who then go around saying that everything is a code smell unless it conforms to some divine design pattern that takes care of all of the possibilities that you will never run into.
I think the best way to learn, is to decide what you want to do (your game or whatever), and hack it together, always being fully aware of what goes on in the code so that when something falls apart, you know exactly why and what you have to do about it.
The one thing you should have, is a good programming textbook so that when something is going wrong in your code and you donât know why, you can look up the relevant information to get a better understanding of what is going on.[/QUOTE]
I am not really talking about the abstract, but when I see a tutorial for example arrays, I see them typing :
int[ ] numbers = {4,3,5,6,8}; This is how you make an array etc. I understand one have to actually know the syntax to program, but I lack some connection between what is written and why I write it to solve the problem at hand.
Then I am on to Altavista searching for how to create a two dimensional array, and then search again to try to figure out why the hell I need to use a two dimensional array to solve a problem etc.
Then I watch a tutorial of someone making a game, and he writes :
int[ ] board = new int[5];
What? What is this? That is no how the other tutorial said you made an array.
Just to end up on another tutorial where someone wrights :
int[ ] stuff;
Wait, what? What is happening here?