Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


How do I know what code to put into creating certain programs?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Motoky   Members   -  Reputation: 182

Like
0Likes
Like

Posted 18 September 2012 - 05:39 AM

Hey, I'm currently studying DirectX, I did learn some of the basics of C++ before this and a bit about DirectX.

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.

Sponsor:

#2 apatriarca   Crossbones+   -  Reputation: 1745

Like
0Likes
Like

Posted 18 September 2012 - 07:24 AM

The more you program, the more you are able to predict what kind of code you need to create something and how to organize everything. You should start small, creating programs you are able to make and then aim to more difficult ones. You should try to break your programs in smaller incremental steps you are able to make.

#3 the_visualist   Members   -  Reputation: 168

Like
0Likes
Like

Posted 18 September 2012 - 07:35 AM

Do it the way we all did it in the beginning: just start hacking code together. If you realize that your current architecture doesn't do the job, then think about a better one and rewrite the whole thing. Repeat this until you finished the project.
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.

#4 Motoky   Members   -  Reputation: 182

Like
0Likes
Like

Posted 18 September 2012 - 07:39 AM

Would you recommend to just keep getting as many books as possible and maybe get different programmers perspectives? I know programming is all down to practice and doing it yourself, but sometimes I find certain books go into to much detail and don't just get to the point whereas others don't explain something enough. The internet can also be a pain at times to find information if you don't put in the right combination of words lol.

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.

#5 JTippetts   Moderators   -  Reputation: 8583

Like
3Likes
Like

Posted 18 September 2012 - 07:48 AM

Just practice. You don't need to spend a ton of money on books. You just have to accept that pretty much everything you write for the next couple years is going to be utter crap, and use that time to keep practicing. Eventually you'll realize you're spending more time coding and less time hitting the web looking for answers. You'll always have to do plenty of that, though, as there is always something else to learn. You'll never get to the point where you know it all, and if you think have gotten there, you're wrong.

#6 AdrianC   Members   -  Reputation: 602

Like
0Likes
Like

Posted 18 September 2012 - 07:52 AM

Yeah you need to get more practice. Books are good, but at one point you have to start doing some actual programming. Pick a simple task, and code it yourself without the help of books.
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.

#7 Geometrian   Crossbones+   -  Reputation: 1581

Like
0Likes
Like

Posted 18 September 2012 - 10:26 AM

Sometimes I'm not really too sure what the best method is to learning, besides actually programming.

Since the best method of learning is programming, why not program?
And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.

#8 alnite   Crossbones+   -  Reputation: 2124

Like
0Likes
Like

Posted 18 September 2012 - 11:40 AM

This is the dilemma in learning programming. Unfortunately, you just have to code away. Start small. Even printing a series of characters from a - z, or every other character, will get you somewhere.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS