Jump to content
  • Advertisement
Sign in to follow this  
BeyondTheWalls

is learning c++ as first and only language a bad way to go?

This topic is 2471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

Started in on the tutorial at www.learncpp.com. Got to somewhere in Chapter 3 a couple weeks back and had to put it down and take a break. From reading the first couple of chapters I have realized lots and lots of patience is going to pay off. Anyways, getting back to it:

Without any experience in programming prior to the above mentioned, is it a terrible idea for me to start right in learning C++? I've seen arguments made for instead to learn C#/Python and I understand (or think I do) that it has reason to do with those already running in their own frameworks or environments or something. Before I go further I must say a couple things:

1. I am taking up the hobby of programming in the hopes of 1 day seeing my GDD come to fruition. This hobby is a means to an end, but my math is less than on par and I do hope that an understanding of computer programming will strengthen this area. But who knows, maybe one day I'll enjoy it enough to do it for a living although my real love is my major in the natural sciences. If computer games are a big fail on my part though, maybe I could use some of these skills towards designing/building better climate/weather models that I am studying right now. Who knows, seems like lots of good reasons to learn programming for more than just this now that I really think about it.

2. I have a fear that learning one language will be hard enough and am afraid that learning a more basic one will dishearten me as I'd be afraid of the extra time needed to transfer my knowledge from one to the other.

So, the question is: If as of right now, I'm looking to use programming as a means to an end for my own personal game creation and my ideas may exceed engine limitations (I have no idea), would it be better to keep going learning C++ basics instead of getting into one of the "easier" (hope that doesn't offend anybody) languages that I would think would eat up more of my time?

Also, even though I have started the learncpp tutorial, I have yet to grab an IDE. I know I need a free one for now because even though I want to be dedicated to this project.. well I don't see myself buying an IDE just yet. Are there choices for free C++ IDEs out there? Any input on which ones are good or which ones should be avoided, much thanks.

edit: are there things that free IDEs don't do that can only be achieved through premium ones?

All in all, thanks for reading.

Share this post


Link to post
Share on other sites
Advertisement
C++ is not a bad language it itself. You can do anything you want. The advantages of some of the other languages is that you can do things quicker then you could in C++. What might take 20-30 lines of code in C++ you can do in 4-6 with C#, Python or Java. So you will be doing more work to get the same end goal.

The other issue with C++ is that most languages give you enough rope to hang yourself, C++, will tie the knot and put it around your neck. There are a lot more little things that you can mess up in C++ that will cause your app to crash and many of those are fairly hard to find.

So it is up to you. If you really want to know C++, dig in and have fun, but expect that there will be days you want to toss your computer out the window.

Share this post


Link to post
Share on other sites

C++ is not a bad language it itself. You can do anything you want. The advantages of some of the other languages is that you can do things quicker then you could in C++. What might take 20-30 lines of code in C++ you can do in 4-6 with C#, Python or Java. So you will be doing more work to get the same end goal.

The other issue with C++ is that most languages give you enough rope to hang yourself, C++, will tie the knot and put it around your neck. There are a lot more little things that you can mess up in C++ that will cause your app to crash and many of those are fairly hard to find.

So it is up to you. If you really want to know C++, dig in and have fun, but expect that there will be days you want to toss your computer out the window.


Where can I learn game-specific advantages/disadvantages of game languages, does anyone know? I really need to know what the constraints are as they apply to what can be done with games.

Thanks for your reply. Btw, for a troll, that's not too bad. :)

Share this post


Link to post
Share on other sites

Without any experience in programming prior to the above mentioned, is it a terrible idea for me to start right in learning C++? I've seen arguments made for instead to learn C#/Python and I understand (or think I do) that it has reason to do with those already running in their own frameworks or environments or something.


Usually, you will hear people describe C# (and Python, even Java) as more "modern" languages in comparison to C or C++. Basically this means more intuitive syntax and more fleshed out standard libraries (helper functions). Also, C#, Python and Java are examples of "managed" languages, which means that you don't generally have to worry about memory management (which can get complicated and easily introduce bugs).


2. I have a fear that learning one language will be hard enough and am afraid that learning a more basic one will dishearten me as I'd be afraid of the extra time needed to transfer my knowledge from one to the other.
[/quote]

The general advice is that there are certain skills that apply to programming in general, and is language agnostic. So learning any programming language is valuable. Learning multiple languages broadens those skills even more. Once you have gained some experience in programming, moving to a new language is simply a matter of learning the syntax and standard libraries - this gets even easier the more languages you have under your belt.

So, pick a language/environment you are comfortable with. If it is giving you too much frastration, switch. You will not loose anything at this point by not sticking to one and only one language. The more "basic" languages you've mentioned here are fully functional languages, and professional software has and is being made with them, yes even games. The technical details of language choice are quite specific (and argued over even by experts, arguments that threads like these often create), and will not concern you for some time.


Also, even though I have started the learncpp tutorial, I have yet to grab an IDE. I know I need a free one for now because even though I want to be dedicated to this project.. well I don't see myself buying an IDE just yet. Are there choices for free C++ IDEs out there? Any input on which ones are good or which ones should be avoided, much thanks.
[/quote]

I would advise against buying an IDE. If using Windows, the Visual Express IDEs (free) are plenty good. There are certain features that you can pay for, but they are not going to matter to you at this point (if ever). Not sure what choices there are on other OS's.

Share this post


Link to post
Share on other sites

Hi guys,

Started in on the tutorial at www.learncpp.com. Got to somewhere in Chapter 3 a couple weeks back and had to put it down and take a break. From reading the first couple of chapters I have realized lots and lots of patience is going to pay off. Anyways, getting back to it:

No matter what language you decide to start with, patience will be required. Programming and software development requires patience, and no language will magically remove that requirement.

Without any experience in programming prior to the above mentioned, is it a terrible idea for me to start right in learning C++? I've seen arguments made for instead to learn C#/Python and I understand (or think I do) that it has reason to do with those already running in their own frameworks or environments or something. Before I go further I must say a couple things:
[/quote]
Generally speaking, C/C++ isn't a very nice language to start with. It has a lot of corner cases that will frustrate beginner programmers. Does that mean you can't start with it? No, you can start with it, but you'll be in for a long hard climb learning both C++ AND programming. We typically (and by we I mean the moderators and a large number of experienced developers on this site) typically recommend starting with something other than C++. Most of the skills you learn WHILE PROGRAMMING are transferable between languages, so learning Python or learning C# will teach you much that you can use in C++. C# and Python are two recommended starting languages because it is easy to get up off the ground with them, and to see results quickly. Seeing results quickly will inspire you to further heights, thus encouraging the learning process. Once you've picked up one language its not that hard to start picking up another. Once you've got two or three languages under your belt, that third or fourth language is pretty easy. The more languages you know the better you get at solving problems because the wider your repertoire of solutions.
2. I have a fear that learning one language will be hard enough and am afraid that learning a more basic one will dishearten me as I'd be afraid of the extra time needed to transfer my knowledge from one to the other.[/quote]
Most knowledge transfers easily between languages. The thought process on how to solve problems is the primary thing you need to build as a novice and that works between all languages as the underlying principles are the same. There's no such thing as "a more basic language." There are languages that are simpler to work with, more focused in their application, but that doesn't mean they are "basic" and hence "useless", which is the connotation I got from your above sentence. Python, Java, C# have all been used to write games. Just a few that might interest you: Python => Eve Online, a large portion of its client AND server architecture is in python. Java => Minecraft, you may have heard of it. C# => Many games on the xbox 360 arcade are XNA games, written in C#, as well as AI War. Heck, even QBasic can be used to write games.
So, the question is: If as of right now, I'm looking to use programming as a means to an end for my own personal game creation and my ideas may exceed engine limitations (I have no idea), would it be better to keep going learning C++ basics instead of getting into one of the "easier" (hope that doesn't offend anybody) languages that I would think would eat up more of my time?[/quote]
I would suggest NOT starting with C++. I would suggest getting started with either C#/XNA or Python with PyGL/PyGame. Learn the art of programming. Once you have a language (or two) under your belt, migrating to C++ shouldn't be too hard, although you will still run into all of those corner cases I mentioned above.
Also, even though I have started the learncpp tutorial, I have yet to grab an IDE. I know I need a free one for now because even though I want to be dedicated to this project.. well I don't see myself buying an IDE just yet. Are there choices for free C++ IDEs out there? Any input on which ones are good or which ones should be avoided, much thanks.[/quote]
For windws the Visual Studio Express IDEs are the way to go. Linux.. vim with nerdtree smile.png
edit: are there things that free IDEs don't do that can only be achieved through premium ones?[/quote]
Depends on what you mean. Typically speaking the "premium" i.e. paid for IDEs simply have more features such as optimizing compilers and plugin interfaces for IDE extensions,

This brings me to the final part of my post, which is a big list of links of previous discussions much the same as this very one:

This one enjoys fairly significant popularity. (Note that only threads containing significant discussion are included.)

1) Professional Games Made In C#?
2) Java for game development?
3) Java----C/C++
4) c++ or c#
5) Question about Java Vs. C# Vs. C++
6) Java Games?
7) Java is fast?
8) Secondary Language:VB or Java?
9) What makes C++ so powerful?
10) C# games and cheating...
11) Is C# good enough for system utility programming
12) MC++ vs. C#
13) Which language is best for a 3d Games Engine?
14) C# vs C++ as a choice for development
15) Is Java the Future?
16) why C# and not Java?
17) What do you think of the D language?
18) my c++ d c# benchmark!
19) The Definitive Guide to Language Selection
20) Sharp Java
21) C++ or C#?
22) C++ or C#?
23) Java disadvantages
24) C++ or C#?
25) Visual C++.net vs Visual C#.net
26) C# - huh?
27) which language should i learn?
28) C or C++ or C#
29) learn C or C++ ??
30) Is C still useful in gamedev?
31) Why C# XNA When Everyone Wants C/C++
32) JIT compiled code vs native machine code
33) C++ or C?

This particular list is my top ten, because of the sheer frequency with which they occur. 12 days, 10 threads.
1) c++ or c# (5/1/06)
2) Java for game development? (5/2/06)
3) Java Games? (5/3/06)
4) Java----C/C++ (5/3/06)
5) MC++ vs. C# (5/4/06)
6) What makes C++ so powerful? (5/9/06)
7) C# games and cheating... (5/9/06)
8) Is C# good enough for system utility programming (5/9/06)
9) Which language is best for a 3d Games Engine? (5/11/06)
10) C# vs C++ as a choice for development (5/12/06)[/quote]

Share this post


Link to post
Share on other sites
Thank you all very much. The detail of each post kept getting better and better. You guys have put my fears of choosing python or C# to rest and special thanks to Washu for the lists!

This makes me want to finish studying my silly major (haha), go home and eat dinner, and then read up on which of python or C# I want to start in on. Definitely changed my mind regarding C++ if I can get the same things accomplished in less time with other languages.

Take care and see you around the forums. It's nice to know there are awesome resources like this website available. CHEERS

Share this post


Link to post
Share on other sites

Hi guys,

Started in on the tutorial at www.learncpp.com. Got to somewhere in Chapter 3 a couple weeks back and had to put it down and take a break. From reading the first couple of chapters I have realized lots and lots of patience is going to pay off. Anyways, getting back to it:

Without any experience in programming prior to the above mentioned, is it a terrible idea for me to start right in learning C++? I've seen arguments made for instead to learn C#/Python and I understand (or think I do) that it has reason to do with those already running in their own frameworks or environments or something. Before I go further I must say a couple things:

1. I am taking up the hobby of programming in the hopes of 1 day seeing my GDD come to fruition. This hobby is a means to an end, but my math is less than on par and I do hope that an understanding of computer programming will strengthen this area. But who knows, maybe one day I'll enjoy it enough to do it for a living although my real love is my major in the natural sciences. If computer games are a big fail on my part though, maybe I could use some of these skills towards designing/building better climate/weather models that I am studying right now. Who knows, seems like lots of good reasons to learn programming for more than just this now that I really think about it.

2. I have a fear that learning one language will be hard enough and am afraid that learning a more basic one will dishearten me as I'd be afraid of the extra time needed to transfer my knowledge from one to the other.

So, the question is: If as of right now, I'm looking to use programming as a means to an end for my own personal game creation and my ideas may exceed engine limitations (I have no idea), would it be better to keep going learning C++ basics instead of getting into one of the "easier" (hope that doesn't offend anybody) languages that I would think would eat up more of my time?

Also, even though I have started the learncpp tutorial, I have yet to grab an IDE. I know I need a free one for now because even though I want to be dedicated to this project.. well I don't see myself buying an IDE just yet. Are there choices for free C++ IDEs out there? Any input on which ones are good or which ones should be avoided, much thanks.

edit: are there things that free IDEs don't do that can only be achieved through premium ones?

All in all, thanks for reading.

The answer to question 2 is actually that a programming language is nothing more then learning a second spoken language. The skill involved in programming is actually designing algorithms and being able to understand the requirements that are given to you or that you come up with. All these are skills that are nessecary to be able to program in any language.
Now switiching between Java, C# and C/C++ is easier than you expect as their rudimentary syntax is more or less the same. I had a harder time switching to C# coming from Pascal/Delphi than I had switching from C# to C/C++. But after you have switched a few times it generally becomes easy to do, unless switching to lisp or prolog where you paradigm switches as well (functional and logical programming respectivly).

As an IDE pick MSVC express Visual Studio is a very nice IDE and has a good debugger integrated in it, Netbeans is not a bad IDE either to be honest. I don't like eclipse personnally as an IDE for C/C++ development, I just don't like the concept of not having an explicit build button, but thats a personal preference and overall it is a briliant IDE as well.

Share this post


Link to post
Share on other sites
My advice is that if you don't give up easily on difficult issues, go with C++ all the way. What I mean by difficult issues are memory management related ones. It can be a bit harsh and not fun to a beginner to learn that, while also trying to grasp what programming is all about, but on the other side it can educate you in some good practices of how machine resources are used, things that are not so obvious in high level languages that use managed memory, but can also be applied there. It is also good to know what happens under the hood, especially if you want to get into programming real time systems, like games.

Share this post


Link to post
Share on other sites
I would agree that C++ is a more treacherous language than modern languages like C#, but don't let that discourage you from trying. You can do a lot of things in C++ that C# would try to limit, which is why it's dangerous.

Also, once you have an understanding of C++, you can easily switch to Java or C#. You'll have to learn some new concepts maybe, but you'll have a pretty good idea how everything works on the low level. I started with C, then went on to C++, and then Java. My first game was in C++, and I can say that going from C++ to C# (which I've never touched before this semester) was a breeze.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!