by octo_t · 12y ago · 0 comments
I've met people who claim to be 'experts' in C++, but (for example) don't know how to use STL algorithms.
In many such cases, I've been quite surprised to discover just how little I know, even after many years of using certain technologies. And I'm thus very slow to wonder how an expert could not know something. We all work with a subset of a programming language, and while I might expect or hope that all experts would know all things, that's not the case.
To my mind, it's more important that someone knows how to ask questions, read books, accumulate new knowledge, and then assimilate it into what they already know than to come with an encyclopedic understanding of a technology.
Frankly, it's often schools' fault to teach students C++ early, creating that genre of expert C++ programmers, by instructors who generally don't know better.
I remember someone from a C++ shop say: "C++ expert in CV? Expect the gloves to come off in the interview."
I worked with people who work on C++ compilers and static verification tools. They wash their mouths after saying "C++ expert" ;-)
People that put expert on a résumé are just asking for a beating in interviews when the hiring company has a strong team.
Sounds like another example of toxik behaviour to me. I've been working in C++ for 20 years, yet ther are certainly advanced techniques that I could not roll off without errors on a whiteboard and corner cases you catch me on during an interview. What should I put down in my CV? 'vague knowledge of C++?'
I fail to see how 'taking the gloves off' and 'washing their mouth' is substancially different from 'feigning surprised.' It's the same contempt.
So if you are genuinely surprised, a natural reaction would of course be to display this through verbal and nonverbal reactions. But at that point (or even before, as a matter of emotional awareness), people should probably stop and think for a bit what sort of reactions they want to cause in other programmers.
Is the guy wrong (in the sense of giving the wrong impression) for calling himself an expert even though he doesn't know some STL features of C++? Is this something that should be communicated to him? Would it have a net positive effect on your working relationship if it was? Do you feel threatened by an expert who doesn't know this feature? Is there a possibility that you are wrong and that he is only missing a specific feature that you yourself have worked with but is not necessarily stanard? Is your (overt) surprise meant to evoke a certain reaction in the other developer? Would it make your working relationship easier if you hid your surprise instead of making a show of it? Etc.
I hope this comment doesn't come across as condescending, but this sort of interpersonal communication is hard for a lot of programmers I know (at one point including myself). Being aware of these things can help smooth over rough points (and improve productivity, even if you are looking at the purely utilitarian perspective and ignoring general happiness).
In general, #include <algorithm> is a bit worrisome, because it usually indicates someone is trying to be overly clever with C++. On the other hand, if the codebase is written in that style, then the whole codebase should be consistently written in that style. The inconsistency is the worrisome part: either use it everywhere or nowhere.
Anyway, STL is pretty massive, and knowing all of it isn't the same thing as being a C++ expert. Knowing what to avoid is almost as important as knowing what to use.
for (const auto& element : collection) { }
What's wrong with <algorithm>? I use it all the time for sort, swap, and random_shuffle comes up more frequently than I expect.
Unfortunately, the gamedev industry will probably be stuck with pre-C++11 for another decade.
> I forgot that sort was in <algorithm>
Uhm, sillysaurus3, could I see you in my office please.
:-)
If they get a mild panicked look in their eyes and go straight for string, vector, and iostream, my spidey-sense starts tingling.....
EDITed for grammar
I dislike the use of the word 'expert' when describing my skillset. Over the years you begin to realise other people can be more expert in different areas within the same knowledge domain.
I find the willingness to learn to be more important.
In the STL, there's an 'algorithms' package, that gives you a whole bunch of useful stuff: http://www.cplusplus.com/reference/algorithm/
C++ is huge.