Sign in to follow this  
Blad3

I'm on a terrible C++ training course. Please help. Questions [LONG].

Recommended Posts

Blad3    156
They say this is a helpful forum (PC ZONE do, in an excellent monthly article written by Dan Marshall: - anyone know how I could get in contact with him btw? I'd like to know exactly how he did it, how he learnt, the process he went through etc. The article is more a self-evaluation of his progress, with examples of his game) : Well, anyway, I need help. Explanations of the course / then a few questions to anyone who can (please) help me (the forum thread on C++ programming tutorials is great. But I use book's too.) First impression's of the training course I'm on is that I've wasted my money. Quite a lot of it: They present you with what could quite possibly be the worst text on C++ ever written. One question need's you to use loops, switch statements - they don't explain what those are(!). A tutor admitted that to me over the phone(!). I say "tutor" but all they really do is read out the answers to the questions for you. For this pleasure you get charged per phone call. In my naivety as a beginner/novice I thought that as well as learning programming on my own I could get help. So far this course has been anything but. If anything it's been a hinderance. It's also obvious this course isn't for n00b programmer's, evident by the text's repetition of "C++ is NOT for beginner programmers". Then it's awful, "pitiful" (as someone on another forum who posted about the same course put it) "explanations". Back to the text: Even if it did describe everything it's just of a low quality; printed pieces of paper stuck into a folder, poorly explained. I can only compare it to other good C++ books which are teaching me slowly, I believe, but this course-text (the one the course provides) isn't teaching me anything really. It's that simple. Anyway on to the questions: When I'm reading a C++ tutorial, what am I looking to do? 1) Understand the rules/syntax (or whatever) of programming which most C++ book's explain well. That's obvious. 2) Should I be memorizing the code examples? Another good way is to answer questions, but I can't really bring that knowledge back to the course I'm on because everything is written in a different context/structure; the book's don't intend for me to answer such questions yet, by "questions" I mean the questions on the terrible course I'm taking. Hopefully this thread doesn't annoy anyone, but I'm just so tired and I feel ill - I mean physically ill as well as stressed - from going through this course, that the only place to turn to for me is anywhere but[the course], i.e. this forum (and the course has just begun(!)) As I've noted already: I've read other (one or two) complaints about this C++ course on random forums too. I enjoy programming so far, the only thing that comes close to putting me off, however, is this course. It probably won't. Won't let it. But I'm teaching myself like I was going to do even if I didn't go on this course(!). That's the way most of you did it, right? Self-taught from the beginning? Anyway, thank's for any advice you can give. To reiterate the questions: When using study guides for C++ programming as a novice, what am I looking to do? Answer as many questions as possible? Memorize the example code in the book to get a better idea of how the language is? Thank's again. p.s. I posted this here because one of the main reason's I'm trying to get into C++ is to learn how to program for games (man, this is going to be hard...but fun :D ), but I'd also like to be good enough at C++ to get a general programming job: How good do you have to be exactly? The course claims at an hour a day I'll be a professional level programmer in eight months, maybe less. I find this hard to believe so far. Maybe eight months for ten hours a day. Ten hour's a day being literally the least I've spent trying to learn programming these past few days. All this fuss over something that's supposed to make learning noitceably easier, but doesn't. Again, I apologise. EDIT: Added "boldness" to the questions. EDIT#2: No, didn't work. :P EDIT#3: Oh wait, yes it did. EDIT#4: Damn course(!) [Edited by - Blad3 on October 8, 2005 10:15:17 AM]

Share this post


Link to post
Share on other sites
programwizard    100
You don't need to pay money to learn a language; maybe an API, but not a language. There are plenth of good free tutorials for C++ on the internet, www.cprogramming.com coming to mind first.
1.) Understand everything about your language; syntax, built in functions, everything.
2.) You don't need to memorize specific examples, just remember how they did it and you'll be fine.
Hope this helps!

Share this post


Link to post
Share on other sites
bjle    322
I think the most important thing for you to do would be to just keep making your own little programs, or changing things around in the examples to see what happens. Don't try to memorize programs, if you've been doing or thinking of doing that. You only need to memorize the concepts, which is best acheived through practice. I don't think one hour a day for eight months is enough to be an "expert programmer", but you'd probably be on the level of at least some "professional programmer"s, (by which I mean they make money by programming.)

Since you seem very motivated, I think you have a good chance of getting good at programming it whether this course helps or not. People here can probably suggest challenges or tutorials appropriate for your level if you ask (and indicate your level), which might make the process easier.

Share this post


Link to post
Share on other sites
Blad3    156
programwizard - thank's a lot for the advice and speedy response.

"How they did it". *Gulp*. As in algorithms / language design? Not good at that. By this you mean the explanation they give afterwards? Understanding how they did it my self is the hard part. Not sure I know how, or exactly what you mean tbh.

So I wasted my £1600+ then (probably)? bah. By the way that's $2,816+ USD.

Share this post


Link to post
Share on other sites
Blad3    156
bjle - wow, thank's for the response, inspiring :) Right, no memorization. Thank's. This is great.

And yes, I meant "professional programmers".

Share this post


Link to post
Share on other sites
stylin    758
Quote:
Original post by bjle
I think the most important thing for you to do would be to just keep making your own little programs, or changing things around in the examples to see what happens. Don't try to memorize programs, if you've been doing or thinking of doing that. You only need to memorize the concepts, which is best acheived through practice. I don't think one hour a day for eight months is enough to be an "expert programmer", but you'd probably be on the level of at least some "professional programmer"s, (by which I mean they make money by programming.)

Good advice, but one hour a day for (only) eight months will not allow you to be a professional programmer of any sort (at least not for the few companies I've been fortunate enough to be employed by), least of all a programming position at a game studio.

Blad3, there's talent and then there's knowledge, both of which can be attained, it just takes a little longer than that.

EDIT: You've got great motivation. Don't let this course turn you off to realising your goals. The professional programmer's I spoke of above are the driven ones - the ones who learn and then learn more because they can. I started off in IT, then moved to systems-networking. Now I've enrolled myself in a technical college because, like you, learning is half the fun for me. Keep yor mind sharp and your eye on the prize. [wink]

[Edited by - stylin on October 7, 2005 7:42:56 PM]

Share this post


Link to post
Share on other sites
Blad3    156
"there's talent" - I'm not sure I know what "talent" is anymore - I think it's hard work and luck/chance. But yes, I agree. Anyway I realise that it won't make you a pro games programmer, for sure. I now have every doubt that it would make you an entry level pro in a regular programming job too. Thank's for the response.

Share this post


Link to post
Share on other sites
Themonkster    159
I have always learnt by doing. Once you understand the fundementals I would try to create so programs of your own. I always found that this drove my learning more than following texts. remember to keep it simple.

Share this post


Link to post
Share on other sites
Blad3    156
Thank's man. You guys are CHANGING my concept of programming, the way I think about learning it. "Write your own little program's". Wow, this is exciting. I can't wait to see what will be posted next. thx.thx.:D

EDIT: stylin, read the edit. I'll keep going, I'm just trying to write something more than a program with basic if statments/basic indicators. Bool next. Basic bool.

[Edited by - Blad3 on October 7, 2005 8:55:49 PM]

Share this post


Link to post
Share on other sites
dudedbz1    100
I agree with all that learn from doing. I actually started off C++ with a nonstandard tutorial and thought that the "program"(I had no idea it was called a compiler) messed up and I was doomed. But then I realized I'm not doomed, so I looked at more turorials and then a book. But the idea is really, dont memorize the example, memorize how the example works instead.

Its a good idea what you're doing. Though my suggestion is if your doing bools make sure you know ints pretty well... though thats just my opinion...

Good luck!

-DBZ-

Edit: And uhhh, I see your first 5 posts were here, so WELCOME! That is, if you didnt have another name before lol.

Share this post


Link to post
Share on other sites
Blad3    156
Thx for the response. Didn't introduce myself, sorry, didn't have a previous forum name, this is my first post.

I'm Blad3, and I'm a n00b (not just to games programming, but to programming of any type). There.

Share this post


Link to post
Share on other sites
Extrarius    1412
The most important thing to remeber when you're learning to program is that your computer is NOT fragile! Feel free to experiement randomly, and make all kinds of little programs that do whatever you can figure out how to do. If you can't figure something out, find an example and change it in different ways to see what happens.

Next, I'd really suggest that as you learn to program, you also learn good coding practices. For example, almost every programming books I've seen is full of really obscure abbreviations for variable names, things like actbal for "account balance" or weird stuff like that.
A good book on coding practices is Code Complete, 2nd Ed., but you want to learn at least the basics (variables, functions, how to use structures) before you read it because it will refer to all those things and tell you good ways to handle them.
It's more applicable to modern 'object oriented' languages (Java, C++, etc), but I still think it will teach you a lot about creating good code (just working isn't enough, it needs to be readable and maintainable also) even if the only language you know is plain C.

Share this post


Link to post
Share on other sites
Glak    315
Cut your losses and drop the course. You've already lost your money but if you keep going you are also losing your time and your sanity.

Share this post


Link to post
Share on other sites
Blad3    156
Thanks both. I've seen code complete 2ed recommended in the gamdev beginner section.

I *might* be able to get my money back, I'll see. I so want it to teach me C++, but oh well.

Now, examples - could you possibly give me any? Because atm all I can do it code simple programs, I just fail to see what the next step is. Where to go next. I mean I've stopped reading at while loops, won't go on as I still don't quite understand what comes before it. But atm I'm just coding bool, so (this isn't mine) [wow this is sounding confused, sorry]:

"The following program shows the use of nested if statements in determining if both of two Boolean expressions are true. If the user’s input is that they are at least 18 years old and a citizen, the program outputs that they are eligible to vote. Otherwise, the program outputs that they are not eligible to vote."

#include <iostream>
using namespace std;
int main(void)
{
int age;
char choice;
bool citizen;
cout << "Enter your age: ";
cin >> age;
cout << "Are you a citizen (Y/N): ";
cin >> choice;
if (choice == 'Y')
citizen = true;
else
citizen = false;
if (age >= 18)
if(citizen == true)
cout << "You are eligible to vote";
else
cout << "You are not eligible to vote";
else
cout << "You are not eligible to vote";
return 0;
}

I mean, what do I take away from this? Now I understand how to add bool to a program, how to use it with nested if else statements, but so what? Should I really just make as many small programs as I can from this? Am I really learning anything? I suppose I'll just have to wait and see. My use of the above types is limited also.

I should probably just read the rest of the book.

I'll just shut up and code. Tired. Not making sense. Must...code...

Share this post


Link to post
Share on other sites
jfclavette    1058
Quote:
Original post by Blad3
Thanks both. I've seen code complete 2ed recommended in the gamdev beginner section.


Code complete is a very fine book, but I doubt it's what you are looking for right now. If you need a C++ book, let me recommend Accelerated C++

Share this post


Link to post
Share on other sites
Blad3    156
So many books and tutorials. I've heard of this one.

I think my problem is, apart from being a complete n00b, that I "know" bool (kind of), I "know" int, if, if else, if else if, etc. etc. and there's only so much you can do, so much you can code with knowing just that small amount, it's very basic after all. I should just move on to loops properly... I wanted to try and get ok at coding with the if else statements etc, but I think there's only so much I can do until I know more. Like loops...

[Edited by - Blad3 on October 8, 2005 12:30:36 AM]

Share this post


Link to post
Share on other sites
silverphyre673    454
Ugh... I don't know what this course is, but it sounds like a waste of time, money and sanity. Honestly, you don't need a course to learn C++. I'm 16 and I've been programming in it for 3 years now; I was self taught. This doesn't mean that taking a class wouldn't have helped, or that you're a wimp if you take one. I would've if I had the opportunity. I just mean that due to the sheer volume and ease of access to information on programming, in C++, various APIs that work with it, and in most other languages, computer programming is unique in how wide open it is to people with the will and tenacity to learn.

Don't let this course ruin your learning - cut your losses now. All you need is a computer, internet access, a compiler, and free time to practice. Buy yourself an introductory text - I used "Teach Yourself C++ in 21 Days" from Addison-Wesley. It will teach you all the basics of the language - post here when you are ready to move on =)

Just remember that when you land in a bad situation like the one you're in right now, it doesn't mean that this will be the end of your career in the field. It's just a roadblock. I suggest that you learn on your own, and use these forums when you get stuck. Gamedev.net is probably the most important resource I have ever had access to for learning how to program. We're nice!

And I have never heard of an "indicator", either.

Oh, and as for how you should go about learning: don't take my word for it. This is just some advice, which you should realise, due to my age (16) and experience (3 years programming seriously), is not as good as you can get. Anyways, for learning a particular language, you need to learn the syntax and structure (how to use it). However, all languages are the same on a basic level. The real skill is learning a new way to think. As you spend more and more time programming, you will develop this skill, and it will become easier for you to learn. It's great. I recommend you write lots, lots, lots of programs, look through other's source code occasionally, and avoid getting burned out. Take pride in what you do. Learn a language fully - C++, like it or not, is the language of choice for professional game programmers, at this time. Eventually, you will start making games you will be really excited about, and that makes all the struggle worthwhile. I do have enough experience to know that.

Good luck in your adventure, and don't let this course get you down. Come back to the site often, and avoid the lounge. It is bad.

Edit:

Quote:

p.s. I posted this here because one of the main reason's I'm trying to get into C++ is to learn how to program for games (man, this is going to be hard...but fun :D ), but I'd also like to be good enough at C++ to get a general programming job: How good do you have to be exactly? The course claims at an hour a day I'll be a professional level programmer in eight months, maybe less. I find this hard to believe so far. Maybe eight months for ten hours a day. Ten hour's a day being literally the least I've spent trying to learn programming these past few days.


Anyone who says they will turn you into a professional programmer in a year, with the expectations that has attached to it, is selling bullshit. Spending 10 hours a day learning is probably asking for burnout. It is a constant learning progress, and you can never just sit back and rest on your laurels, ever. Game programming is cutthroat, it seems, and breaking into the industry is supposed to be difficult. What you need is a portfolio, a selection of games you have made yourself, or as part of a team. This takes time to develop, both the skills you need to make the game, and the time spend programming the game itself. Finally, I don't know how "good" you have to be to be a pro game programmer - I don't exactly have a job =) There are the legendary heros, like John Carmack. There are indie developers who make shareware games and sell maybe 500 copies of a $5 game. Look through the articles section which is linked on the top of every page. There is a section on the game industry - breaking in, doing interviews, interviews with professional game programmers. Best of luck to you.

I'm also going to link you to this article, which is an interview with the lead programmer at Raven Software (a really famous company, if you haven't heard of them already), which may provide you with some answers about the industry. Good night!

Share this post


Link to post
Share on other sites
Blad3    156
Quote:
And I have never heard of an "indicator", either


Yes, hehe, I was meaning to change that, I think I meant switch statements :? Yes I did...

Thanks for the advice.

Anyway, back on to loops.

silverphyre673, when I said pro I meant general programming at it's lowest level where you get paid, not game programming. But even then "eight months" sound's like BS even more to me now than ever before.

Share this post


Link to post
Share on other sites
silverphyre673    454
Well, it all depends on what field it is... writing an operating system is not writing Microsoft Excel is not writing Halo is not writing a web server. I have a friend, a sophomore this year in college, who got paid several hundred dollars, I believe, to write a program for our high school that is a student database. Nothing *too* complex, but the school needed it, and were willing to pay for it. That is general programming, and he got payed for it. So I suppose anywhere from a year or two, if the task is somewhat small and you work very hard, to many years, if it is just a hobby, is how long it would take. As to how *good* you have to be, I think that that is a difficult to articulate question. I'll just say that you'll figure it out yourself as you go along whether your skills are competitive for a given purpose.

Share this post


Link to post
Share on other sites
Extrarius    1412
Topics that you should learn in approximate order:

Psuedocode: Write out stuff in english. This will help you think out the basic concepts. Things like 'if' statements and loops become simple when you say them in english(or other native language). "If the user input 7, display 'Hello'" is pretty easy to understand

Variables: They're just places in memory to store information. In C (and C++), each one can only store a certain format of information('type'), and each variable can exist in different places(called 'scope').

Conditional Expressions: Learn how to write simple logic in code. This is easily practiced by writing if statements - in if(x), the x part is the conditional expression. A 'switch' statement lets you have different sections of code for different values without as much typing as many 'if' statements would take.

Looping: A 'while' loop is just like 'if', except it repeats when the condition is true at the end. A 'do..while' loop is like an if statement at the bottom that makes it go to to the top again. A 'for' loop makes it easier to put all parts of the loop (the part that sets up variables, tests the variables, and chagnes the variables) together because it has a compartments built into it.

Functions: Now that you can create logical code that does various things, you're probably tired of typing long sections of code over and over. A function is a way to store a section of code so instead of typing it over you can just say "I want to run this function's section of code and then keep going from here" and the compiler makes it happen for you

Objects: While individual variables are nice, you usually want to keep certain information together (for example, a person's name and phone number) so grouping them in the code by making them part of an object (in C, a structure, using the 'struct' keyword, in C++ 'struct' and in addition 'class').

Arrays: While individual variables are nice, sometimes you want the same information about a bunch of similar things (such as the name and number of 100 people). Arrays make it easier to loop through the information because you don't have to type Person1, Person2, Person3, .., Person99, Person100 and can instead use a variable to pick the one you want.

Pointers: Arrays of Objects let you conveniently group information, but sometimes you're not sure how much information you'll need. With pointers, you can get more memory as you need it so you don't have a specific limit to the amount of information you can store. A related concept is references, which are not available in C but are in C++.

Templates: In C++, there is a way to make generic types, such as a position object that can store the position as any type of number. This feature is insanely usefull, as you can see by reading the book Modern C++ Design (a very advanced book, but it shows how awesome templates are).

Libraries: Because the people that thought up C++ were pretty smart, they made a bunch of templated objects for you already that are very helpful. Learning to use these built-in classes (and classes from other premade libraries like Boost) can save you a TON of time when you're trying to make advanced programs. Even if you can't find a good class to you, you can make your own library of classes that you use in each project to fill any gaps you find. If you code them well, eventually you won't have any more gaps until you try to do something completely different from what you've done before, and even then the gaps will be small compared to when you started. Code Complete will help you with the step of buidling code you can easily reuse.

APIs: While the previously mentioned libraries are great, they generally don't help you interface with the outside world. Until this point, you're still stuck with files and text. Using the windows API, you can make programs with windows that show pictures, or text with different fonts, or anything else you see in windows. Using Direct3D or OpenGL, you can make fast 3d programs. Using other APIs you can do all kinds of other things besides just printing text on the console.

I've made some extreme simplifications here, but pay attention to the 'titles' (the part before the colon in each section) and you should be doing well very quickly.

Oh, one quick tip on coding stype: Always use braces for if statements and loops, such as:
if(choice == 'Y')
{
citizen = true;
}
else
{
citizen = false;
}
because it makes the code much, much easier to read. You can place the {} in different ways (on their own line, on the end of the previous line, on the start of the next line) but reguardless of where you put them they need to be there to make everything more visible. Indentation is also good, but I guess that just got left out because you didn't use [code] [/code] tags around the code on the forums. Also, you can combine conditions by using || to mean 'or' and && to mean 'and', so you could do
if((age >= 18) && (citizen == true))
{
cout << "You are eligible to vote";
}
else
{
cout << "You are not eligible to vote";
}

Share this post


Link to post
Share on other sites
Blad3    156
Agreed. To be honest if I have to continue with the course there's assignment questions to be answered, but what I'm really looking to get to is a text adventure, hoping that those skills will cross over to general programming job skills. "writing an operating system is not writing Microsoft Excel is not writing Halo is not writing a web server" but first I obviously have to learn general C++ to be able to do any of them. Knowing what level I'd have to be at to do any of that though is a mystery.

Extrarius, VERY helpful. I assume you didn't take the time out to write all that just for me? Thank's.

Share this post


Link to post
Share on other sites
Extrarius    1412
To make a text adventure, you need to know up to Functions, but Objects would make it easier to keep track of things in your head, and without knowing Arrays or Pointers, you won't be able to do anything fancy in your text adventure. With arrays, you could easily have many rooms, but only up to a maximum (the size of the array). With pointers, you could have any number of rooms because you could load them from a file and get more memory as you load more rooms from the file.

Share this post


Link to post
Share on other sites
silverphyre673    454
OK, well, it seems like you haven't programmed before. Sorry if I didn't make myself clear before. You will need to learn the entire C++ language rock-solid to get hired for any development job in that language. You have to realise though that C++'s basic syntax takes up one book. All the other APIs and language extensions add capabilities for things like graphics, sound, networking, and more. None of this is provided in basic C++. You will have to learn all of C++, though.

If you want to be a general programmer, which most people start of as at first, you will need to learn a bit of several things. Graphics, to an extent, are a must. At least learn to use an API like SDL or Allegro, which will make things easier. You will want to learn how to use a GUI of some sort, like the Win32 API, which allows use of Window's GUI system. Once you have C++ down, though, then all these other APIs will come very quickly.

Share this post


Link to post
Share on other sites
silverphyre673    454
Quote:
Original post by Extrarius
The most important thing to remeber when you're learning to program is that your computer is NOT fragile! Feel free to experiement randomly, and make all kinds of little programs that do whatever you can figure out how to do. If you can't figure something out, find an example and change it in different ways to see what happens.


Agreed! I have probably 50 or 60 folders filled with random completed, not-so-complete, and barely worked on programs around the whole spectrum. Some completed games, like pong and minesweeper. Some half-completed stuff, like the GUI system I'm working on. Some stuff that will never be complete. All of it is great experience though, so experiment!

Quote:

Next, I'd really suggest that as you learn to program, you also learn good coding practices. For example, almost every programming books I've seen is full of really obscure abbreviations for variable names, things like actbal for "account balance" or weird stuff like that.
A good book on coding practices is Code Complete, 2nd Ed., but you want to learn at least the basics (variables, functions, how to use structures) before you read it because it will refer to all those things and tell you good ways to handle them.
It's more applicable to modern 'object oriented' languages (Java, C++, etc), but I still think it will teach you a lot about creating good code (just working isn't enough, it needs to be readable and maintainable also) even if the only language you know is plain C.


Writing clean code is good. I take time to make mine very easy to read and understand, but it could be better. The point of doing it this way is that if you are writing a program of any size, when you have to revisit parts of it, you need to be able to quickly and easily figure out exactly what you were thinking 3 weeks ago when you wrote that section. A more extreme example would be 3 years down the line, when some other guy has to maintain code you wrote. He needs to be able to understand what you were doing, too.

Also, listen to Extrarious. I think that he has said what needs to be said [grin]

Share this post


Link to post
Share on other sites
Blad3    156
Extrarius, thanks yet again. So I need to know quite alot in or to start on a full-on text adventure? That's a good thing, because I assume having the goal of programming a text adventure will only help encourage me.

silverphyre673, you explained yourself very well. Knowing that after I learn C++ (which I need to know well) I'll need to learn several different API's (at least one) gives me a better understanding of where I'm going. I already knew about DX/Opengl.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this