You are here:

C++/Programming for dummies?

Advertisement


Question
QUESTION: Hello,

I have absolutely no experience in any programming language or even anything remotely close to it.

I am interested though in learning Computer Programming.

What I would like is to be able to design small programs and applications to begin with, perhaps even applications that would work on iphones and the like (if thats even possible for me).

What I basically want to know is. .

Is it possible to learn this kind of stuff from online courses and tutorials without having to go to college?

And how hard is it going to be to learn? (I know that's a relative question but I hope you know what I mean)

Any other info you feel would be relevant would also be great!

Thanks!

Oh, as a side question I might as well ask while I'm at it. What types of programming and such would cover the skills needed to model and skin for video game mods?

ANSWER: Hi, Tristen.

You can absolutely learn everything you need from online tutorials, but that is going to require a good bit of drive on your part.  It's going to largely depend on what kind of learner you are.  If you are comfortable sitting down and figuring things out on your own with nothing more than some help files, some online tutorials, and maybe some forums or similar to pose questions to, then by all means, go for it.  If, on the other hand, you find a classroom situation is easier to learn in, then you may want to invest in at least an introductory course in C++.  Here are a couple of online resources for learning C++ for you:

http://www.cprogramming.com/
http://www.cplusplus.com/doc/tutorial/

Additionally, you probably ought to pick up a book or two on C++.  I don't really have a particular book that I can recommend on the subject.  I'd say just head to a book store, hit up the programming section, and flip through the available C++ books.  See which ones you find are comfortable to read and give good information.  There are a ton of online communities that can help you out, too, this site being just one of them.  I am, in fact, helping out a guy in Finland who contacted me via this site as he's learning C++.  I don't have a teaching certificate or a masters degree (required for teaching at the university level), but I can teach C++ with the best of them. :)

As to your side question, modelling and skinning are not at all programming related.  That's not to say that there aren't some artists who can program (I know several) or programmers who can model/skin/texture/animate (I am one and I know a few others), but the two disciplines are largely unrelated to one another.  If you want to try your hand at 3D art, I would recommend you pick up Blender (http://www.blender.org/) and learn how to use it.  Please note, however, that the only reason I recommend Blender is because it's free.  I hear great things about it, but the interface is so unlike any other 3D modelling package that I cannot easily use it, and thus choose not to.  I prefer to work in 3D Studio Max or Maya, both of which I have done modelling, skinning, texturing, and animating in.  There is a very large community surrounding Blender, though, and some great things have been done with it.  It just isn't my cup of tea, since art isn't my strong suit or my career path.  I'll stick to what I know.

Oh, and I just remembered, if you're specifically targeting game mods, Milkshape 3D (http://chumbalum.swissquake.ch/) is a simple 3D package specifically designed for making assets for mods.  It actually has built-in support for many of the package formats for current and existing game engines.  It's also dirt cheap.  I've used this in the past and rather liked it.  It's a stripped down editor, to be sure, but it does the job and does it more easily than more full-featured programs.

OK, I hope all of this helped.  If you have any further questions, don't hesitate to ask.

---------- FOLLOW-UP ----------

QUESTION: Hey!

Thanks very much for your fast response!

I do have an additional question.

I realize we are talking about programming here so to a certain extent it't going to be complicated. But if I pick up a book or go get a tutorial online for beginners, when I start reading it am I going to be able to figure out what its talking about or is the terminology and such going to be way over my head.

When I try to learn something new I tend to get discouraged before I can get past the ". . . Huh?" stage.

As an example, I have attempted to learn HTML in the past and got frustrated and quit for a while. (I'm currently taking an online course for it)

I guess kind of what I mean is do I need to understand some other (most probably complicated) thing in order to really understand C++ or is it something that can fairly easily be picked up right from the get go?

Thank you again!

As another side question. Assuming I do learn C++ well enough to use, what sorts of things would I be able to do with that knowledge? I know that might be a broad question but just like some examples of what one person on his personal computer might actually be able to accomplish.

ANSWER: Hi, Tristen.

I firmly believe that absolutely anyone can learn to program.  However, some people are more inclined to it than others.  When first starting out, it can be a bit daunting.  If you follow basically an tutorial out there, though, your first program will be written in minutes ("Hello, World!").  You might not fully understand everything that's going on in it at first, but with time, you'll learn what everything means.  You don't need any prior knowledge to pick up C++ -- it's wholly self contained.  As you encounter the jargon of programming, take note of it, try to understand it, but don't get too hung up on it.  Some of it is tossed about regularly, and some of it almost never comes up.  You will likely find that, once you get going, you'll be able to understand just about anything anybody is talking about in the language.

Once you understand C++, you can create applications of any sort.  I would say that most programs you use were written in C++ or Visual Basic.  I don't know for sure which is more prominent, though I'd guess C++.  Pretty much every game out there, on any platform, was written in C++.  PS3, Xbox 360, Wii, iPhone, PC... almost every game on these systems is written in C++.  Now, don't expect to be writing massive applications in a few weeks that you can sell or otherwise distribute.  It will take time to reach that level.  You can almost immediately start on simple games and such, though, if you like.  In fact, Tic-Tac-Toe is often one of the first programs written.  If you like, I could work up some simple programs for you to work on as you become more familiar with the language.  I still have all of my old school assignments around here somewhere, and we were writing simple games within the first couple of weeks.

OK, as always, if you have any further questions, just let me know.

---------- FOLLOW-UP ----------

QUESTION: I'm glad to hear you say that you think anyone can learn it. For a long time I thought that computer programming was something that you could only really get into if you were one of those kids that was top of their class and went on to super schools and had IQs of 600+.

Anyway, I have been looking at the tutorials on both the sites you linked and so far I am liking the cplusplus.com better because I think it's worded more toward those that don't yet understand the terminology. But I still can't help but get a little frustrated when in the first few minutes I see paragraphs like this. .

"The values of the columns Size and Range depend on the system the program is compiled for. The values shown above are those found on most 32-bit systems. But for other systems, the general specification is that int has the natural size suggested by the system architecture (one "word") and the four integer types char, short, int and long must each one be at least as large as the one preceding it, with char being always 1 byte in size. The same applies to the floating point types float, double and long double, where each one must provide at least as much precision as the preceding one."

And this. .

"In order to use a variable in C++, we must first declare it specifying which data type we want it to be. The syntax to declare a new variable is to write the specifier of the desired data type (like int, bool, float...) followed by a valid variable identifier."

I look at those statements and I'm just like "ok. . . Huh?" and I get discouraged because I feel that if I don't understand what it means I have to sit there till I do and no matter how many times I read it, it just doesn't make sense.

(I swear, if I learn this stuff well enough I am writing my own tutorial that will be worded so that my cat can learn it.)

And I would be thrilled for some little programs to play with! Thanks!

This is getting a little ahead of myself but just out of curiosity, assuming I make say average progress on this, how long do you think it would take me to be able to make a small application for my phone that simply asked me simple questions on a daily basis and at the end of the month gave me a tally of the information. Preferably not looking like a noob made it lol.

Thanks again for all your help!

Answer
"The values of the columns Size and Range depend on the system the program is compiled for. The values shown above are those found on most 32-bit systems. But for other systems, the general specification is that int has the natural size suggested by the system architecture (one "word") and the four integer types char, short, int and long must each one be at least as large as the one preceding it, with char being always 1 byte in size. The same applies to the floating point types float, double and long double, where each one must provide at least as much precision as the preceding one."

This paragraph is just discussing data sizes, and it's nothing you need concern yourself with for a while.  Eventually, this knowledge will be second nature.  For now, it's utterly useless to you.  So, yeah, just ignore that for now.

"In order to use a variable in C++, we must first declare it specifying which data type we want it to be. The syntax to declare a new variable is to write the specifier of the desired data type (like int, bool, float...) followed by a valid variable identifier."

This paragraph is simply a convoluted way of saying this: when you want to declare a variable, give its type, then a name.  For example:

   int myInt;
   bool myBool;
   float myFloat;

These are three variable declarations (declaration is a bit of jargon, but it's pretty self explanatory, too... you're just saying, "Hey, here's a variable.").  The first declares an integer type variable, the second a boolean type variable, the third a floating point (decimal) type variable.  There are certain built-in variable types, and then you can create your own variable types using classes, structs, enums, and typedefs, but you'll get to that later.  The rules for naming a variable are simple: start the name with a letter or an underscore, and everything else must be alphanumeric (no symbols, except underscores).

Again, though, don't get too hung up on the jargon.  If you find it hard to follow, ignore what they're saying, look at what they're doing.  Faced with the second paragraph, followed by something like my three line example, I think it's pretty easy to figure out how it works.  Even if you don't fully understand what they're doing, just copy it.  Sometimes it help to just accept that things are as they are and you will understand them better at a later point.  You can copy what they're doing and start changing things around to see how it impacts things.  I can honestly say that you will never stop learning about programming, you'll just keep getting better.  I am always a better programmer than I was one year ago.  That's just how it goes.

OK, moving on to some simple program ideas.  Start with "Hello, World!"  Once you have an application which prints text to the screen, then we'll move on to simple input.

Program 1 - Hello World
   Write a program which prints the text "Hello, World!" to the screen.

   Functions you will need to use:
       - cout

Program 2 - Number regurgitation
   Write a program which asks the user to input a number.  Then, print that number back to the screen.  Output should be something like:

   Please enter a number: 42
   You entered the number: 42

   Functions you will need to use:
       - cout
       - cin

Program 3 - Random numbers
   Write a program which asks the user for two numbers: one low number and one high number.  Then, generate a random number between those two numbers (including both as the extreme values).  Print the randomly generated number to the screen.  Output should be something like:

   Please enter a low number: 5
   Please enter a high number: 10
   Your random number is: 6

   Functions you will need to use:
       - cout
       - cin
       - rand
   Bonus points for:
       - srand
       - time

OK, we'll start with these three.  They'll give you an idea of input, output, and random number generation.  The third one requires a bit of math, too, to figure out how to get the random number to be within a set range.  Send me your code once you've written these and I'll go over it with you.  If you get stuck on any of them, just ask, and I'll help you out.

Now, if you notice, with just the first two programs, you already would have covered much of the requirements for your theoretical phone app -- input and output.  The only requirements left would be file I/O (to store each daily result and load them up at the end of the month), date checking, and, ideally, nice graphical display.  File I/O is pretty easy to work up.  Date checking will likely be something built into the SDK (Software Development Kit) for your phone, and graphical display will also be part of the SDK.  A production-quality app will take some work, but the underpinnings of it are all easily within reach in a matter of days.  Pretty cool, huh?

OK, if you have further questions, let me know.  Work on the programs I listed above, and get back to me with your results.  No rush in this, of course.. at your own pace.  If you would prefer to take this stuff off-site, and communicate directly via e-mail, just send me your e-mail address in a private question and I'll drop you an e-mail.  Good luck!

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joseph Moore

Expertise

I've been programming in one form or another since my brother taught me BASIC when I was 6. I've been programing professionally since I was 20, first web development with HTML, JS, DHTML, CSS, etc., then I became a video game developer, writing code in C, C++, C#, SQL, assembly, and various scripting languages. I've even written my own scripting languages, custom designed for the games I was making. I also dabble in Java, PHP, and Perl. I've worked on pretty much every aspect of game development, including graphics, audio, gameplay, tool, UI, input, animation, and physics.

Experience

I've been writing C++ code for 12 years, both on my own in my spare time and professionally.

Organizations
IGDA

Education/Credentials
Bachelor of Science in Game Design and Development, Full Sail University, Winter Park, FL

Awards and Honors
Salutatorian and Advanced Achiever Awards at Full Sail; Independent Games Festival Student Showcase winner, 2004; Featured article on Gamasutra about an experimental game developed in 2004

©2016 About.com. All rights reserved.