• Advertisement
Sign in to follow this  

Strong C++ knowledge, what it means?

This topic is 3953 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 all, I am not sure if this had been asked before, but what exactly does Strong C++ knowledge means to everyone? Is there a particular set of skills or topics that one needs to know? I think there are things which even after programming for years we would not come upon. Personally I have not heard of virtual inheritance until I did a google search on C++ interview questions. Maybe I simply haven't programmed enough. Hope to hear what everyone's opinion on this. Thanks. Thuan Seah Tan

Share this post


Link to post
Share on other sites
Advertisement
Actually, I am curious about that too. What would be considered Knowing "Beginner c++" ; "Intermidiate c++" ; and "Advanced c++" and so on. Because for my OpenGL book it says I should have a good understanding of c++ before doing it. But how much exactly should I know? I mean where is the guidelines? How do I know where I am at if I don't know how far I have gone?

The reason I replied is because I am sure there are MANY people out here who want to know how much is enough and how much is too little?

At list of "Need to knows" and a list of "You should knows" would be nice to have and to look at for reference and guide.

Share this post


Link to post
Share on other sites
Strong C++ will involve knowing the language complete, the standard library, and C++'s eccentricities. Strong programming ability will be knowing how to apply common design patterns in C++, and using standard library features to do it well. I'm not going to list every feature of C++, but if you've got them all down, you're only 50% of the way there. You need to know how to use them, and when to use them.

Hope that helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by _goat
Strong C++ will involve knowing the language complete, the standard library, and C++'s eccentricities.

Hope that helps.


So I suppose STL knowledge is a must nowadays. As to knowing the language complete and C++ eccentricities, does that mean you have to memorize every single bits of the language by heart? Also, does that include knowing how certain things are implemented in compiler (e.g. the vtable of multi inheritance)? I suppose eccentricities refers to know when certain things will compile and work and when certain thing will compile and crash? For example I have seen a question asking what happen if you delete a pointer than is initialized to null.

For now, I am reading books like Effective C++ series, and thinking in C++. While I am certain these books do a good job in covering the language, but I doubt weird and extreme cases.

Share this post


Link to post
Share on other sites
Knowing the STL is a must (and make you programming live easier).
Learning to be a good programmer is slow process.

I don't like labels (beginner, intermidiate or advanced). I've been programming over 15 years (in many languages), am i intermidiate or advanced programmer?
These labels don't say anything. Im still learning every day, there are always things that can be done, nicer or smatter. (That makes programming fun).

"Strong C++ knowledge" just means: Knowing the language, knowing what to use in which situation, can solve problems and make programs that solve the problems.
And no, you don't have to know everything by heart. (Just where you can find things, books,reference card, internet etc).

Just make as many programs as you can and read as much as you can (on different topics).

www.nextdawn.nl

Share this post


Link to post
Share on other sites
Thanks boldyman, your reply made me feel much better now. I have always program with a C++ reference book within reach, and have no idea what would I do without one. I am just hoping to get an employer perspective on what they think is expert. I am pretty sure I am nowhere near Scott Meyers but I hope that doesn't make me a weak programmer. All I can say is I am always learning something new from books and google.


Thuan Seah Tan

Share this post


Link to post
Share on other sites
When it comes to game development, there's a lot more architectural knowledge expected. Examples:

Do you know how virtual functions are implemented by the compiler?
Do you know how templates are implemented?
Are you familiar with the implementation and pitfalls of malloc, free, and the standard new and delete operators?
Do you know how to override and overload new and delete? How are strings stored in the std::string class?
What are the common implementations and performance characterisics of the popular STL classes and functions?
How do your stack and heap lay out in memory? (And on a related note, how to buffer overflows work?)
What are the benefits and pitfalls of static and shared libraries? (Related: allocation/freeing rules when working with shared libraries? What causes loader locks?)
How do you deal with basic thread safety problems?
Can you use SSE and other extensions like atomic compare-and-swap? How do you go about determining if those extensions are available?
What affects the compiler's ability to inline a function?
How could you write a profiler into your code?
What are memory mapped files and why are they useful?
What is IOCP and why is it useful?
Can you throw and catch exceptions? What about SEH? How is exception handling implemented? (There's so much to be asked here...)
Are you comfortable with RAII?

Just an incomplete list there. Some of those are more important than others, not all are strictly C++, and a couple are platform dependent.

Share this post


Link to post
Share on other sites
Geez.. Promit, I am not sure should I feel happy or demoralize about trying to get into game industry. On one hand, I am happy that someone is willing to give examples of what is expected, on the other, I couldn't barely answer any of the questions.

Guess it's going to be a long night for me here googling to find out!


Thuan Seah Tan

Share this post


Link to post
Share on other sites
I believe that being a strong c++ programmer goes beyond the list of technologies you know, and into the more intangible sense of understanding and problem solving that is required of difficult programming. I could blurt out a list of c++ features I know, and technologies I have mastered, and tools I can use, but that gives very little insight on how good of a c++ programmer I am. Expertise level can not be objectivly categorized (rightly), because the things that determine it are subjective skillsets and code, "intuitions".

Without even considering what things you understand, look at yourself honestly and you will know what level you are at.

Share this post


Link to post
Share on other sites
Quote:
Original post by tts1980
Geez.. Promit, I am not sure should I feel happy or demoralize about trying to get into game industry. On one hand, I am happy that someone is willing to give examples of what is expected, on the other, I couldn't barely answer any of the questions.

Guess it's going to be a long night for me here googling to find out!


Thuan Seah Tan


On the other hand, companies are kind of liers when it comes to job ads. They always want the Perfect Guy That Doesn't Exist. They will ask you to be young, passionate, with years of experience (quite difficult if you are young). You'll also have to know everything about everything, ranging from a programming language (generally C++), OO design practices, OO methodologies, be very familiar with the hardware, and so on.

But they also know that a guy who have all these qualities is going to ask too much for them - and they won't be able to afford it, unless he's applying for a manager role (in which case, the hw and sw knowledge are less important).

So in the end, what they want is a passionate, hard working guy with a solid brain. If you feel you have a good knowledge of C++ (comfortable with the language?), then you can apply to jobs which requires "Strong C++ Knowledge". If they really need a skilled person, you'll fail at the interview - but at least, you tried.

The reason why they do that is that they don't want to waste their time with people who consider they're not good enough - because you can be pretty sure that at least 50% of these guys will NOT be good enough.

So go ahead and ask for an interview (and maybe you'll find that these guys have a limited knowledge of C++, and that what they consider to be strong knowledge is below your own standards).

Regards,

Share this post


Link to post
Share on other sites
The ICT-sector doesn't exclude you on not being programmer with advanced C++ skills (or what every language). They choose people by their years of experience (believe me, this is your strongest foothold). With only five years of experience you already are considered as a valuable programmer in the ICT-sector and at this point you are usually in the position to discuss your salary :D.
If you supply a portfolio which has some demo's showing something specific, you are usually set for a position (unless they find someone with more years of experience, which is simply bad luck for you).

This all off-topic...

It 'think' that you have Strong C++ knowledge if you know how to solve every problem with C++ with or without using the available API's and other libraries. Knowing STL very well is just a recommandation and not a requirement, but it saves you alot of time.

Labels are usually used to specify how much time and effort it will take to fully comprehend example code.
Beginner level example code is for the 'average' programmer a see and understand level.
Intermidiate level you need to look over the code several times understand whats going on.
Advanced level is more or less code which can be understand fully by debugging the code step by step.

Knowing how to use alternative libraries cannot be really used as an argument to say if you have 'advanced' language-skills. This is because libraries continue to be updated and ofcourse new libraries emerge every year.
Knowing where and how to begin to familiarize yourself with a strange library is a skill which belongs in this section of determine your level of skills (you can learn a monkey tricks, but monkey will only that, nothing more).

It is all very fuzzy, so don't get demoralized too soon, nobody knows everything there is, we are all still students.

Regards,

Xeile

Share this post


Link to post
Share on other sites
Thanks for the reply, hope to see more people's view on this.

Personally, I have applied for a programmer job at a local game company and was granted an interview somehow. I am pretty sure heaps of people with much more experiences in C++ have applied for the post. I have just graduated from college recently so I am thinking how on earth am I suppose to pit against those C++ gurus. To say I can learn and catch up to them within the next couple of days would be insulting and impossible.

In any case, I guess this will be a good learning opportunity for me to learn in what area I am lacking in. Ya, we are all still students. ;-)

Share this post


Link to post
Share on other sites
Quote:
Original post by tts1980
Thanks for the reply, hope to see more people's view on this.

Personally, I have applied for a programmer job at a local game company and was granted an interview somehow. I am pretty sure heaps of people with much more experiences in C++ have applied for the post. I have just graduated from college recently so I am thinking how on earth am I suppose to pit against those C++ gurus. To say I can learn and catch up to them within the next couple of days would be insulting and impossible.

In any case, I guess this will be a good learning opportunity for me to learn in what area I am lacking in. Ya, we are all still students. ;-)


First off, grats with getting a interview (its a chance at the very least :D).

Nowadays communication skills seem to be very valuable to companies. Not so surprizing since you only work in groups nowadays.
So if you can show-off some 'good' communication skills (which an interview gives you a perfect opportunity for), you might be even valued above those 'gurus'. Especially those 'old-timers' which prefere solo-working, will get a hard time getting another job.

Don't worry about getting along, it won't be that hard if you enjoy doing the job.

Regards,

Xeile

Share this post


Link to post
Share on other sites
Quote:
Original post by tts1980
Thanks for the reply, hope to see more people's view on this.

Personally, I have applied for a programmer job at a local game company and was granted an interview somehow. I am pretty sure heaps of people with much more experiences in C++ have applied for the post. I have just graduated from college recently so I am thinking how on earth am I suppose to pit against those C++ gurus. To say I can learn and catch up to them within the next couple of days would be insulting and impossible.

In any case, I guess this will be a good learning opportunity for me to learn in what area I am lacking in. Ya, we are all still students. ;-)


I recently scored a C++ game programming job (as well as a 25% salary increase, woohoo!), and the only advice i can give you is dont stress too much about the actual knowledge (but dont skimp on revision). Don't pretend to know more than you actually do, show a keen interest and that you are a quick learner. Remember, job interviews aren't just about how much you know, its about your personality too: They want someone who they think they can work well alongside for the next X years.

Share this post


Link to post
Share on other sites
Quote:
Original post by tts1980
Geez.. Promit, I am not sure should I feel happy or demoralize about trying to get into game industry. On one hand, I am happy that someone is willing to give examples of what is expected, on the other, I couldn't barely answer any of the questions.

Guess it's going to be a long night for me here googling to find out!
I have plenty of resources on that stuff, and I can clarify anything you might have questions about. Just ask -- probably in a separate thread if it's a bigger discussion.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by tts1980
Geez.. Promit, I am not sure should I feel happy or demoralize about trying to get into game industry. On one hand, I am happy that someone is willing to give examples of what is expected, on the other, I couldn't barely answer any of the questions.

Guess it's going to be a long night for me here googling to find out!
I have plenty of resources on that stuff, and I can clarify anything you might have questions about. Just ask -- probably in a separate thread if it's a bigger discussion.


Okay then... I'm asking. Can you provide some resources, Promit? Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by SanityAssassin
Quote:
Original post by Promit
Quote:
Original post by tts1980
Geez.. Promit, I am not sure should I feel happy or demoralize about trying to get into game industry. On one hand, I am happy that someone is willing to give examples of what is expected, on the other, I couldn't barely answer any of the questions.

Guess it's going to be a long night for me here googling to find out!
I have plenty of resources on that stuff, and I can clarify anything you might have questions about. Just ask -- probably in a separate thread if it's a bigger discussion.


Okay then... I'm asking. Can you provide some resources, Promit? Thanks!


I'm asking too!

Share this post


Link to post
Share on other sites
I am re-reading C++ for Game Programmer for a start. I am keen on resources (ideally a book) that goes into how C++ features are implemented. Oh.. tips and tricks along the line of overriding of new and delete. Guess the list can go on and on. ;-)

Share this post


Link to post
Share on other sites
Quote:
Original post by raidtab

I recently scored a C++ game programming job (as well as a 25% salary increase, woohoo!), and the only advice i can give you is dont stress too much about the actual knowledge (but dont skimp on revision). Don't pretend to know more than you actually do, show a keen interest and that you are a quick learner. Remember, job interviews aren't just about how much you know, its about your personality too: They want someone who they think they can work well alongside for the next X years.


Congrats! Revision, that's exactly what I am doing now! It feels like an exam actually and I am digging out all my beginner C++ books, just to make sure I know most stuff.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
When it comes to game development, there's a lot more architectural knowledge expected. Examples:

Do you know how virtual functions are implemented by the compiler?
Do you know how templates are implemented?
Are you familiar with the implementation and pitfalls of malloc, free, and the standard new and delete operators?
Do you know how to override and overload new and delete? How are strings stored in the std::string class?
What are the common implementations and performance characterisics of the popular STL classes and functions?
How do your stack and heap lay out in memory? (And on a related note, how to buffer overflows work?)
What are the benefits and pitfalls of static and shared libraries? (Related: allocation/freeing rules when working with shared libraries? What causes loader locks?)
How do you deal with basic thread safety problems?
Can you use SSE and other extensions like atomic compare-and-swap? How do you go about determining if those extensions are available?
What affects the compiler's ability to inline a function?
How could you write a profiler into your code?
What are memory mapped files and why are they useful?
What is IOCP and why is it useful?
Can you throw and catch exceptions? What about SEH? How is exception handling implemented? (There's so much to be asked here...)
Are you comfortable with RAII?

Just an incomplete list there. Some of those are more important than others, not all are strictly C++, and a couple are platform dependent.


Based on my interview experiences, from this list I think the most important items are:

Do you know how virtual functions are implemented by the compiler?
(Try to know as much as you can about polymorphism, use of the virtual keyword, and, at the very least, have an understanding of multiple inheritance and the diamond problem)

Do you know how templates are implemented?
(Also, where are they used, why are they used, etc.)

What are the common implementations and performance characterisics of the popular STL classes and functions?
(Don't worry too much about the STL, focus on common data structures and algorithms. Be able to optimize for speed and memory usage)

How do you deal with basic thread safety problems?
(If you put that you understand multithreading on your resume, prepare to answer questions about different types of synchronization objects - mutex, critical sections, etc., when you'll need them, and be able to explain what happens to a simple piece of code, like incrementing a variable, with and without a sync object like a mutex)

What affects the compiler's ability to inline a function?
(Focus less on memorizing the compiler's criteria for inlining, focus more on what does inlining a function actually do? When would you want to inline a function? When wouldn't you want to inline a function?)

How could you write a profiler into your code?


In general, don't focus too much on low-level compiler specific stuff. Try to focus more on C++ itself (don't worry too much about the STL, I've yet to be asked an STL-specific question), your ability to write code, and your problem solving abilities.

Some other stuff you might be asked:
* Implement a simple function (e.g. fibonacci sequence) both recursively and iteratively.
* Implement a function that checks if 2 rectangles intersect and if they do compute the area of the intersection.
* Implement a queue, stack, linked list, etc. and optimize for speed and/or memory usage.
* Given a certain class hierarchy for game objects, how would you place a new type of game object (monster, tree, weapon, whatever...) into it.
* Multiple by a certain number without using the multiply operator.
* Explain the different uses of the static keyword.
* Explain the different uses of the const keyword.
* Explain the benefits of using a linked list vs. an array and vice-vera.

Also, as raidtab said, don't stress yourself out.

Share this post


Link to post
Share on other sites
I have to second the notion that knowing STL for an interview isn't really crucial (especially if you're interviewing for a company working on console/handheld games where there's often restrictions/regulations on executable sizes and it is pretty tricky to use STL/templates and still keep your executable size down. STL is still much nicer though and is probably a lot more viable on PC and some of the next-gen systems).

Essentially, as far as C++ knowledge goes, know pointers, pointer math, be able to identify how different things affect performance and/or memory, polymorphism (can you implement it using C?), be able to spot and correct bad code (I'm not saying that you should be optimizing every little piece of code you come across, but if you see bad code, whether it works or not, you should be able to identify and fix it).

As for more general topics, memory management (ways of preventing fragmentation, etc.), 3D math (well, math in general, but especially matrix, vertex math and their applications), and a million others.

If you're interviewing for more specified roles (i.e. AI, rendering, etc.) then you will obviously need to know a lot about those domains.

Share this post


Link to post
Share on other sites
Just thought I'd share a funny story about interviews and C++.

When I first learned C++ formally, it was back in '98 or so (1st year uni) when the standard was fresh and you can bet your sweet behind it wasn't being properly covered in university courses. (Even today I imagine there is some pretty disgusting ignorance of the standard library in those courses.)

So not that long ago, I was interviewing for this company and they wanted me to write some code to do some processing on an array... anyway, the guy interviewing me just happened to be one of the TAs from one of those 1st year uni courses.

So I start out writing:

template <typename RandomAccessIterator>
void whateverItWasCalled(RandomAccessIterator begin, RandomAccessIterator end) {


Oh, you should have seen the look on his face :) (I didn't get the job, but I did shortly afterward interview again at the same company for another position and got that instead. :) )

Share this post


Link to post
Share on other sites
Not quite sure about other universities, but the one I graduated from doesn't really go in depth in C++. Standard library aren't even covered. They just teach you the basics to get the job done. Perhaps they are expecting students to pick up more in depth stuff on their own?

Pardon my ignorance, what's a TA?

Share this post


Link to post
Share on other sites
Quote:
Original post by tts1980
Not quite sure about other universities, but the one I graduated from doesn't really go in depth in C++. Standard library aren't even covered. They just teach you the basics to get the job done. Perhaps they are expecting students to pick up more in depth stuff on their own?

Pardon my ignorance, what's a TA?

Teacher's Assistant.

That's similar to my experience. We covered language-specific stuff only enough to actually learn the language-agnostic stuff. And in higher level classes they simply assumed you'd pick up whatever language was needed for the class. Very few classes were concerned with learning a language, and most instead sought to teach other concepts that would be applicable regardless of language. Which fits the whole "a language is just a tool to get a job done; pick the most appropriate for the job" mentality.

Share this post


Link to post
Share on other sites
Thanks Agony. That reminds me of what one of my supervisor used to say "Programming languages are like breakfast cereals to programmers", should be able to pick up another language easily.

My revision brought me to this topic on template metaprogramming. Wonder is this commonly used in the game industry? The article showed how you can unroll loops and do some other fancy computation at compile time.

Share this post


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

  • Advertisement