Learning C++ as a first language

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
zoodog411
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 15
Joined: Mon Apr 13, 2009 10:14 am

Learning C++ as a first language

Post by zoodog411 »

sorry if ther e is another post similar to this one and sorry if my spelling is not the best. im typing up this thread from my ps3 since my comp is down anyways for a while now i wanted to learn c++ as a first language and found it was well hard to say the least anyways i was talking to a indy game deveeloper who used c++ as his first language and he said the way i was learning it was wrong. well after yelling at me for a while i realized i wasnt getting far in learning. now is c++ the best first language? the guy i spoke to said half of his effort of learning was a waste and didnt benifiit him. he said it would be best for me as a 16 year old to learn another language to learn to program. so i have about 60 bucks to burn on books should i keep learning c++ buy some good books or learn pearl or something and get some books on that and move up to something as difficult as c++. what would be the best choice. sorry again ifthis looks as if a 5 year old wrote it. this took 15 minutes to write on tye ps3 non stop and my fingers are burning. i hope i got my point across «°.°»
XianForce
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 767
Joined: Wed Oct 29, 2008 8:36 pm

Re: Learning C++ as a first language

Post by XianForce »

I don't really think there is a "best language to start with", and if such a thing does exist, it will be different for every person. I learned C++ as my first language (with a VERY VERY VERY SMALL C background), and I believe I learned it quite well and haven't had many problems. I think with any language you choose to use, there will be difficulties, if there wasn't EVERYONE would be a programmer... So I think it's really a personal decision, but think about this:

How difficult is it for you to grasp some of the concepts? - If the answer to this is "REALLY HARD" :
Are you taking time to UNDERSTAND, not just read, the material? If yes, I think it's safe to say it may be better to start with something easier.

But if your only having minor difficulties, I think the best thing is to work through it, reread the chapter, look at outside sources on the topic, etc. In time you'll get it.
fingerfry
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 34
Joined: Tue Sep 01, 2009 6:31 pm
Favorite Gaming Platforms: Xbox 360, PC, Gameboy Advance SP
Location: Palm Desert, California
Contact:

Re: Learning C++ as a first language

Post by fingerfry »

It all depends on the person. I started learning C++ as a first language and I didn't feel I was getting anywhere, but as soon as I switched to Blitz3D, I understood a lot more. I leaped ahead learning concepts instead of trying to focus on learning the syntax. Visual C++ wasn't letting me grasp simple concepts as easy. I like to play around with code and in VC++ I had to create a whole new project, and include header files, etc. With Blitz3D I can just start it up, paste some sample code in, and compile. I like to alter little bits of code to see what it does, and with Blitz it is easy to do that :) Good luck :mrgreen:
Image
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: Learning C++ as a first language

Post by K-Bal »

I've been thinking about this for some time.

If you just want to make games and do creative stuff I would recommend something like Blitz or maybe Python with pyGame. You will have graphical feedback from the start and can directly dive into creative production.

On the other hand, If you want to gain fundamental knowledge on computers and programming techniques, I would start out with x68-Assembler. You won't get confused about programming paradigms and you will learn what really happens in your computer. I could give you some tasks from my university class. Gyro is also proficient in this domain.
Assembler is not complicated, programming complex things with Assembler is complicated. So when you have reached a certain level, you can move up to a higher level language like C, C++, etc., and learn about software design and implementation.

Cheers,
Marius
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Learning C++ as a first language

Post by davidthefat »

I started when I was 12, you can do it
User avatar
zoodog411
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 15
Joined: Mon Apr 13, 2009 10:14 am

Re: Learning C++ as a first language

Post by zoodog411 »

fingerfry wrote:It all depends on the person. I started learning C++ as a first language and I didn't feel I was getting anywhere, but as soon as I switched to Blitz3D, I understood a lot more. I leaped ahead learning concepts instead of trying to focus on learning the syntax. Visual C++ wasn't letting me grasp simple concepts as easy. I like to play around with code and in VC++ I had to create a whole new project, and include header files, etc. With Blitz3D I can just start it up, paste some sample code in, and compile. I like to alter little bits of code to see what it does, and with Blitz it is easy to do that :) Good luck :mrgreen:
well ok ya at my attempt to learn c++ i looked at every little peice of code wanting to understand it. i understood what peices of code did and the basic structure of a program and why its structured that way. but i dont know what the computer was doing if that makes sence someone told me learning c++ and learning to program are tottally different. also when i read some refs im like wtf is this english please? id ask people in the irc and theyd say the same thing. i belive i dont undestand b/c i dont understand how programmimg exactly works but i do get what the code does but not in reff terms. sorry if it sounds like a 5 year old wrotes this again. so isee most of you say go with c++ if so what are some structured books that makes sence and are easy to understand as in a c++ intro to ontermidiate book and a ref a dummy could undestand? sorry again i hope i got my point across
User avatar
hayk0510
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 21
Joined: Tue Mar 10, 2009 11:03 pm

Re: Learning C++ as a first language

Post by hayk0510 »

What you want to do is learn how to program. This can be achieved MUCH more easily, IMO, with a language like Python or Ruby(which is my personal favorite right now). Please stay away from Perl (for your first language) and pick up something that is nice to you and something that will be fun to program with. You will never get good if you don't enjoy it.

Python is an excellent choice for you, assuming you want to write games. Remember to always go for the higher level of abstraction (Python) when you can, and only go down to the lower level (C++) when you have to. Note that I'm not saying to avoid low level languages, because learning those will make you a better programmer. However, as a first language, you want to learn programming concepts first, specific language quirks second (C++ has a lot of these). When I was a beginner, I was told by great programmers to learn Python -> C -> Lisp. But you have different tasks in mind. The thing they told me was that the other languages don't matter as much as the first.

My advice? Learn Python and then pick up C++. But I'm not sure you'll want to switch after learning Python :). MIT freshmen use this book in the intro course to CS, http://openbookproject.net//thinkCSpy/ . Save your money and take a girl out on a date ;)

BTW, it's nice to see this community growing. Falco and his team are doing great.
"Manually managing blocks of memory in C is like juggling bars of soap in a prison shower: It's all fun and games until you forget about one of them."
User avatar
zoodog411
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 15
Joined: Mon Apr 13, 2009 10:14 am

Re: Learning C++ as a first language

Post by zoodog411 »

Thank you all for your input But Im going to just go with c++ as my first language. I think I can do it , my problem was not that i didnt know how to code or understand the c++ syntax it was just like. when i read a referance I was just like wtf is that mean yes printf prints shit but all this long explanation shit i dont get it lol. anyways can anyone recomend me a well structured book and a referance i was told on the irc the all in one referance for dummys was good?

Sorry for the bad puncuation and spelling its hard to type on a ps3
User avatar
combatant936
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 39
Joined: Wed Jul 29, 2009 11:11 pm
Current Project: It's a secret!!
Favorite Gaming Platforms: N64, SNES, PS2, PC
Programming Language of Choice: C++, 65816 asm
Location: Pennsylvania
Contact:

Re: Learning C++ as a first language

Post by combatant936 »

zoodog411 wrote:can anyone recomend me a well structured book and a referance
I've read Beginning C++ Game Programming and Sams Teach Yourself C++ in One Hour a Day and both of these are pretty decent books for beginners. However, in the first one the author does not explain things in very much detail and just shows you what to do. I would recommend the second one because it helped me understand how things are working instead of just showing me what to do.

http://www.amazon.com/Beginning-Program ... 809&sr=1-3

http://www.amazon.com/Sams-Teach-Yourse ... 771&sr=8-2
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Learning C++ as a first language

Post by davidthefat »

User avatar
tajdadon
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 6
Joined: Wed Jan 27, 2010 12:08 am

Re: Learning C++ as a first language

Post by tajdadon »

Get C++ for dummies, that's the book that I started out with and it's real thorough and it compares some aspects of c++ with real life which should help you understand it on the methodical level better
User avatar
kamokow
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 68
Joined: Wed Aug 05, 2009 9:36 pm
Programming Language of Choice: C++
Location: Canada

Re: Learning C++ as a first language

Post by kamokow »

tajdadon wrote:Get C++ for dummies, that's the book that I started out with and it's real thorough and it compares some aspects of c++ with real life which should help you understand it on the methodical level better
Like making theoretical nachos with C++... good times.
Image
User avatar
JordanMaster22
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 2
Joined: Sat Nov 28, 2009 9:50 pm
Favorite Gaming Platforms: PC, Emulators (With Controllers), Xbox, Dreamcast
Programming Language of Choice: C++

Re: Learning C++ as a first language

Post by JordanMaster22 »

I think C++ would be a good choice. It's not such a hard language once you get into it. C++ is my first language (other than god-forsaken GML). And of course some people will have troubles learning new languages. That doesn't mean everyone will. I used a book called SAMS Teach Yourself C++ in 21 Days. Books are your best friend.

Did he really say it would be best for a 16 year old to learn something else? Weird. I don't think it's that hard and I'm 14. Don't listen to him on that one.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Learning C++ as a first language

Post by Falco Girgis »

I'm sorry, but any indie developer who says or said that learning C++ was a "waste of time" or "didn't benefit" him should quite literally be bitch slapped on the spot and have his title of "indie developer" shifted to "script kiddie."

But yes, it really all depends on what you would like to do. If you just want to hop into writing a game as soon as possible without caring about learning a general, multipurpose programming language and learning some computer science to go with it, then you are probably going to want to stay away from C++.

If you have a genuine interest in computer science, mathematics, and aspire to be a knowledgeable developer (or want to break in to the industry), then you need to learn C++ at some point. Whether that be your first language, or you learn it later in life is completely up to you.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Learning C++ as a first language

Post by Ginto8 »

davidthefat wrote:I started when I was 12, you can do it
And I started at 11, and now at 13 I'm already thinking in binary :lol: But really, if you have good capabilities when it comes to comprehending logical structure, you'll be perfectly fine. Personally, I learned from stuff like the antiRTFM youtube tutorials, but that isn't for everyone. Books are great too. ;)
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Post Reply