How do I know what code to put into creating certain programs?,
Members - Reputation: 183
Posted 18 September 2012 - 05:39 AM
Sometimes I'm not really too sure what the best method is to learning, besides actually programming. The way I do it is I read from the books, take the examples from the CD's, look through it and actually understand what it's doing, write out a very simple step by step on how to create this, I try not to mention any names of function's, structures, datatypes, etc. So when I get to a certain step I have to search for the information myself and I think it helps me remember the functions and such.
The only problem I am having with this is knowing what I need to put into programs. Say if I have read through an example program, I know what it's doing, what it accomplishes in the end, but then I want to write it from scratch, I just have no idea what steps I need to take, the order of the code. My mind just goes blank.
I've been taking my studying seriously for 2 years I would say, so it's not a very long time. I'm learning from books and have a huge list of books to work through on C++, DirectX, Computer Science, etc.
I just want to know if I am doing something wrong for me to just not know what needs to go into a program. I will give you an example, I'm currently working through an example program that takes the directional arrows on the keyboard as input and displays an image corresponding to that arrow. I'm working with Direct3D Input at the moment, so it's all based on keyboard, mice and gamepad input, but I'm starting the very first and basic program. I know how to do the basic Windows programming, like displaying windows, etc.
Crossbones+ - Reputation: 2275
Posted 18 September 2012 - 07:24 AM
Members - Reputation: 188
Posted 18 September 2012 - 07:35 AM
After a while you will get a feeling for it so you don't have to rewrite every project ten times, so just keep practicing.
Members - Reputation: 183
Posted 18 September 2012 - 07:39 AM
I mainly want to program video games, I have an idea in my head already and I think with enough practice I might be able to get something basic up and running without looking at examples and such.
Moderators - Reputation: 12303
Posted 18 September 2012 - 07:48 AM
Members - Reputation: 602
Posted 18 September 2012 - 07:52 AM
Also, if your goal is to make games, DirectX is definitely not the way to go. It takes way too long to get anything done, and it will just confuse a beginner. Grab SFML for 2D games.
Crossbones+ - Reputation: 1808
Posted 18 September 2012 - 10:26 AM
Since the best method of learning is programming, why not program?
Sometimes I'm not really too sure what the best method is to learning, besides actually programming.