Advertisement

Need Some Advice

Started by May 23, 2010 12:44 AM
9 comments, last by Oberon_Command 14 years, 5 months ago
I'll be graduating high school next year and plan to go for a degree in Computer Science at a state college. After college I hope to get a programming job (either coding games or not), but I have a problem. For the past year or so I've been trying to get my head around C++. I've bought and read through a few beginner's C++ books, but I just can't seem to comprehend how to implement the things I learn. The math isn't the problem, as math is actually a strong suit of mine. My problem is with the C++ syntax. When I open up my IDE of choice to work on a small simple program, I freeze up, and can't seem to figure out how to code the program to do what I want. I just don't know how to implement the things I learn. It just seems like I can't remember all the things I'm taught, and I'm worried that this we'll affect me in the future in regards to college and a career. Does anyone have/had this problem? Does anyone have any advice for me to help deal with this problem?
No I don't have that problem, but I have seen a lot of people having that problem. They seem to know programming a lot: the semantics, proper formatting, etc. But when it comes to implementing things, they freeze up, and then pull off code from somewhere on the Internet.

Start small.

If you are making a game, think about how to implement the main menu. A screen with an image and two menu options: one is play and one is exit.

Then you think about how to link the main menu and the game when user press ENTER when Play is selected.

Progressively, implement one thing at a time.
Advertisement
Quote: Original post by alnite
No I don't have that problem, but I have seen a lot of people having that problem. They seem to know programming a lot: the semantics, proper formatting, etc. But when it comes to implementing things, they freeze up, and then pull off code from somewhere on the Internet.

Start small.

If you are making a game, think about how to implement the main menu. A screen with an image and two menu options: one is play and one is exit.

Then you think about how to link the main menu and the game when user press ENTER when Play is selected.

Progressively, implement one thing at a time.


The problem is that when I freeze up, the only things that I can remember is how to do very basic things like display and take input in a command console format.

I just can't see how to work things out. For example with your menu idea:
I'd open up my IDE. I have how I want the menu to work in my head, but I have no idea how to realize that idea with code.
Quote: Original post by OmegaMB
I'd open up my IDE. I have how I want the menu to work in my head, but I have no idea how to realize that idea with code.


Do you know how to draw an image to the screen?

Do you know how to read the UP/DOWN/ENTER keys from the keyboard?

Do you know classes and can you make instances? (hint: you'd create two instances probably in an array, and everytime up is pressed, you move the current index up by one)

Do this, one by one. Done.
Quote: Original post by OmegaMB
I'll be graduating high school next year and plan to go for a degree in Computer Science at a state college. After college I hope to get a programming job (either coding games or not), but I have a problem.

For the past year or so I've been trying to get my head around C++. I've bought and read through a few beginner's C++ books, but I just can't seem to comprehend how to implement the things I learn.

The math isn't the problem, as math is actually a strong suit of mine. My problem is with the C++ syntax. When I open up my IDE of choice to work on a small simple program, I freeze up, and can't seem to figure out how to code the program to do what I want.

I just don't know how to implement the things I learn. It just seems like I can't remember all the things I'm taught, and I'm worried that this we'll affect me in the future in regards to college and a career.

Does anyone have/had this problem? Does anyone have any advice for me to help deal with this problem?
It sounds like you're having problem breaking down problems into smaller, more manageable parts, instead trying to figure out how to solve the entire thing in one go. I'd recommend that you put C++ on the shelf for a while and try out Haskell or another functional language, that'll more or less force you to decompose your problem into smaller parts, since you can't just write a huge doEverythingMyProgramIsSupposedToDo()-function.

You should also try to fo the decomposing before you even think of opening an IDE. As alnite is saying, "OK, now I'm going to make a game like Pacman" isn't going to get you anywhere, but if you start off with "OK, I need to draw an image, then I need to draw a grid of images, then I need to read input, then I need to change an image's coordinates based on that input, etc." you'll find that it isn't all that hard.

It can't be said enough; programming is all about recursively splitting problems into smaller problems, and let the combined solution to those small problems become the solution to the whole.
Quote: Original post by alnite
No I don't have that problem, but I have seen a lot of people having that problem. They seem to know programming a lot: the semantics, proper formatting, etc. But when it comes to implementing things, they freeze up, and then pull off code from somewhere on the Internet.
I also noticed that. I suppose this is direct consequence of a school system which is geared towards providing brains with pre-digested notions and discouraging creativity.
At a certain point, the mind realizes that it's in charge of creating the rules instead of following them and gets lost...

Previously "Krohm"

Advertisement
Try Beginning C++ Game Programming, that was my first book and it was pretty good.

Before implementing your own ideas, just work on tutorials that you can just type up yourself. Make sure you aren't just reading and/or copy pasting code. Make sure to type it, learn things line by line and change things to see how they work.

NBA2K, Madden, Maneater, Killing Floor, Sims

Quote: Original post by Krohm
Quote: Original post by alnite
No I don't have that problem, but I have seen a lot of people having that problem. They seem to know programming a lot: the semantics, proper formatting, etc. But when it comes to implementing things, they freeze up, and then pull off code from somewhere on the Internet.
I also noticed that. I suppose this is direct consequence of a school system which is geared towards providing brains with pre-digested notions and discouraging creativity.
At a certain point, the mind realizes that it's in charge of creating the rules instead of following them and gets lost...


In the US, at least, I know that homework are more important than projects, and the homework consist of answering theoretical questions, ask students to compile a pre-written source code and answer a few questions about the code or make a few adjustments then explain the behavior. Final exams are nothing but the glorified version of homework.

It's like grading art students based on how good they are at analyzing Renaissance paintings.
Sadly, "education" these days consists almost entirely of box-ticking, jumping through hoops and passing exams. That can't be considered to be "learning", if you ask me.

I'd agree with others here and consider that you need to break the problem down. You'll see quickly how easy seemingly tough problems can be if you disassemble them into constituent parts and analyse each in turn. You'll achieve more and this, consequently, will feel more rewarding.
Quote: Original post by alnite
In the US, at least, I know that homework are more important than projects, and the homework consist of answering theoretical questions, ask students to compile a pre-written source code and answer a few questions about the code or make a few adjustments then explain the behavior. Final exams are nothing but the glorified version of homework.

It's like grading art students based on how good they are at analyzing Renaissance paintings.


I think that's highly school and even teacher specific. In the school I just graduated from I'd say most of the teachers have you do everything yourself (including design in most cases), but I've had others that give you a bunch of stuff where you just analyze their code.

This topic is closed to new replies.

Advertisement