Why companies still use C++ and what should I learn then

Started by
45 comments, last by kop0113 10 years, 8 months ago
Hi guys! I was reading what usually companies ask to applicants and it seems that I want to work for let's say Riot or Blizzard or such companies I should know C++ (for Web jobs, php).
But I've looked for topics where members ask what to study first and you usually let is start with C#.
So, my question is:
Knowing the requirements usually include C++, should I really begin with C#?
Advertisement

Look at it this way: When hiring a new driver, the McLaren F1 team would look for someone who knows how to drive a Formula 1 car... but that driver would not have begun their career driving an F1 car; they would have started out driving a cheap two door hatchback with a learners license along with the rest of us! wink.png

C++ is a complex language that not only makes it easy to shoot yourself in the foot, but it ensures that you'll blow off your whole leg when you do so.

If you want to learn C++, it will be much easier to do so after you've mastered a similar language, so that you can just focus on it's quirks/pitfalls, rather than all the basics as well!

If you learn C# first, then learning C++ later will be easier. And before you ask if that's a waste of time, experienced programmers learn new languages all the time. Sometimes you're expected to read the manual for a new language one day, and start programming with it in the next day. The ability to learn a new language is an ability that you'll also need later, so it doesn't really matter which language you start with, as long as that language acts as a comfortable learning area. In the long run, you'll learn so many different languages that you'll actually get really good at the ability to learn new languages!

To begin with though, learning a new language is very time consuming, so it's best to choose a comfortable one.

If you start with C++ first, you will likely have a bad experience with all it's sharp edges, and then not enjoy learning new languages wink.png

[edit] P.S. I'm a C++ fanboi, who uses it daily; it's my favourite language, despite it's many problems. I learned it early in my career, and did have a bad time (learning through a lot of painful mistakes).

I also use many other languages, because they're often a more suitable tool -- C++, despite my obsession, is not always the best tool to be using.

e.g. I love using C# for making my game's GUI tools because it makes a lot kinds of tasks very easy for me to solve quickly... I use Lua to write my gameplay code, because I find it's a better fit to those tasks, and I get stuff done quicker with less bugs. I'll use PHP to make quick web-apps, even though I think PHP is a horrible language! I use Java for my server code, because the person I'm collaborating with is more comfortable using Java. [/edit]

But I've looked for topics where members ask what to study first and you usually let is start with C#.

I'd say Python comes up even more often than C#, and for good reason.

Anyway, the consensus from academic circles (read: people who are tasked with teaching hundreds of students to program, year after year) is veering towards this: starting with a language that is overly complex, incoherent, low on expressive power or otherwise user-hostile means you are wasting your time. My gut feeling is that it's even more true if you are trying to learn on your own. Everywhere people are opting for Python, Scala, etc. when choosing languages for introductory programming courses.

I recall one particular experiment where a school carried out their two initial programming courses in two groups. The first group used Scheme for the first course. It is an excellent learning language that looks nothing like languages common in production use. The second group used Java. Both groups took the second course, whose subject was object-oriented programming, in Java. Even on such a limited timescale, the end result was that the students of the first group were better at programming in Java at the end of the second course. One can only imagine how much better they grasped programming in general. Also note that Java, while clunky and lacking expressivity, is much more forgiving than C++ is.

Also depends on where you are and what your goals are.

I am a professional developer. I used C++ a few times in the 90s. In my city, there is not a big demand for C++ developers. They are very rare. On the opposite end of the spectrum, there is a ton of demand for PHP and C#.

From a professional standpoint, the answer for me was obvious... (back in the 90s I was a visual basic programmer).

From a game development standpoint... C++ seems to still be the king and for good reasons. It is a very overly complex language that lets you have minute detail on your code, which is required for AAA titles.

If your goal is to try to work for a big company that produces AAA titles then eventually you are going to have to learn C++.

However realistically speaking, those companies don't just snatch up new C++ developers and start them off. YOu have to start small. Learning C# is a great way to do that. You learn about Object Oriented programming, the C structure is still the C structure, and you will probably enjoy it more. C++ is a very frustrating language to try to make your first language.

Patience is the key.

As far as game dev goes, you have to start small and build up. Start with games like Pong, Galaga, tetris, etc... 2D games that can be written easily in Java or C# as well as C++. C# can actually handle quite a bit, I've seen some extraordinary systems built in C#.

Good luck

For more on my wargaming title check out my dev blog at http://baelsoubliette.wordpress.com/

Here's another point to consider. These days, a lot of tool development at some major studios in done with C#. So not only is it a great place to start learning to program, it can potentially have practical applications later on down the line if you ever get hired by a game shop.

But I've looked for topics where members ask what to study first and you usually let is start with C#.

I'd say Python comes up even more often than C#, and for good reason.

Anyway, the consensus from academic circles (read: people who are tasked with teaching hundreds of students to program, year after year) is veering towards this: starting with a language that is overly complex, incoherent, low on expressive power or otherwise user-hostile means you are wasting your time. My gut feeling is that it's even more true if you are trying to learn on your own. Everywhere people are opting for Python, Scala, etc. when choosing languages for introductory programming courses.

I recall one particular experiment where a school carried out their two initial programming courses in two groups. The first group used Scheme for the first course. It is an excellent learning language that looks nothing like languages common in production use. The second group used Java. Both groups took the second course, whose subject was object-oriented programming, in Java. Even on such a limited timescale, the end result was that the students of the first group were better at programming in Java at the end of the second course. One can only imagine how much better they grasped programming in general. Also note that Java, while clunky and lacking expressivity, is much more forgiving than C++ is.

If you wish to learn C++ in the end stay away from Python, Java and C# are your better options to start with as a lot of the syntax will be the same. Not having to learn a new syntax in your second langauge is really useful as you are focusing more on learning the particulars of the language instead of feeling like starting over. Having to pick up a new syntax becomes easier when you are more comfortable in constructing non trivial coding solutions and algorithms.

I started out with Pascal -> Delphi and then transitioned through C# and Jave to C++, moving away from Pascal/Delphi at the time wasn't really easy as I wasn't that good at coding yet and meant I had to learn a whole new language effectively.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

I started straight into C, then C++, then assembly and did fine.
Many game industry veterans also started with assembly because that's all there was at the time and did fine too.

It's more important the amount of dedication and passion you put into it.

Now I know C, C++, C#, PHP, CSS, asm, HLSL, Cg, HTML, Lua, & Python.

To be honest, after I was fluent in C++; the next languages I learned (HLSL, Cg, Lua, Python, HTML & PHP & CSS, C# in that order) looked unbelievable easy and got them in less than 10 days.
Coming from a low level background let me figure what was happening behind the scenes on the higher level ones (and sometimes you get pissed on the documentation for not telling what kind of algorithm a particular construct uses internally).
Eventually you end up learning how to develop, rather than learning languages.

To be honest, after I was fluent in C++; the next languages I learned (HLSL, Cg, Lua, Python, HTML & PHP & CSS, C# in that order) looked unbelievable easy and got them in less than 10 days.
Coming from a low level background let me figure what was happening behind the scenes on the higher level ones (and sometimes you get pissed on the documentation for not telling what kind of algorithm a particular construct uses internally).

This is something I'd like to point out.

The "drawback" of starting with higher level languages, with garbage collection and all of the good stuff, is that it hinders you from properly recognizing some of the not so obvious issues you might have.

While, say, GC + interpreter would make you believe you have nothing to worry about, the truth is that behind all of that there are a lot of complex things that could come back to bite you. And you won't have any idea of what is wrong with your code when that happens because higher level languages are designed around not letting you know those things.

When starting with lower level languages, (without getting into more heavy concepts like objects, their interactions, design patterns, etc) you get upfront what all of this "memory management" is all about. Simple stuff like pointers, references, pass by value, pass by reference, allocate, deallocate, stumbling into trashed variables because you're deferencing a pointer that points to nowhere, gets you more in the mindset of how the computer works.

After getting through some of those things, the "magic" of higher level languages wears off enough so you can get some insight on what your code is really doing.

I'd say that starting with a low level language, experimenting with it (again, without getting deep into OO stuff) gives you enough material to have an easier time when you grab a higher level language and start experimenting with more bigger concepts like objects, their behaviour, their state, their interactions, the patterns they're built against, the protocols they follow, or with project global stuff like the general architecture of the program.

After that you can get back to a lower level language and apply all of what you have learned. Like a cycle, start low, get higher, then go low again.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Hi! I am the same opinion. At university I started with C, then with Assembly, then Java. C++ and C# I have learned on my own. It was really easy when knowing C. So I think it is good to know a low level language, because it is very easy then to learn higher level languages.

Now I can also Python, which I have also learned on my own.

The reason I started with C++ is because it has an immense amount of resources and information circulating around the internet and books about gamedev. No other langiage has as many libs, tutorials, or books on gamedev as C++ does. That's why I prefer it.

This topic is closed to new replies.

Advertisement