The C++ Programmer Problem
I’ve spent the great majority of my career writing code in C++. After using the language for 14 years, I would consider myself very fluent in the language. I might even say “expert-level,” but the trouble with being even close to an “expert” in C++ is that no one believes you.
In that way it seems C++ is somewhat unique: I don’t think that people who claim to know Python or Ruby would engender the same level of distrust. It seems to be only C++ where if you claim you know it, you are by default treated as though you are lying. Why is this? Perhaps because C++ is something a lot of people claim to know because recruiters think it’s good. Or it could be because those who have some level of expertise in the language know just how complex it really is and by default assume you don’t? It might also be the general distrust shown in an interview setting — numbers on resumes don’t mean anything, and you are guilty of being a non-programming programmer until proven innocent.
Of course I’m not saying that I’m at the same level of Bjarne Stroustrup or Herb Sutter. There are always some language internals I have to look up, like vtable-layout in multiple inheritance or the finer points of overload resolution. I use C++ as a tool, just like any other language. That said, ever since reading Modern C++ Design by Alexei Alexandrescu I have explored the breadth and complexity and the language quite a bit, using advanced features of the language to make writing code easier and less error-prone by finding bugs at compile-time rather than at run-time. When you understand that C++ templates are far, far more than just “containers of T,” you have taken your first step into a larger world.
But what number of developers have made it to the second peak of C++ understanding vs. those who consider themselves “experts” when they are just using C++ as “C with classes”? Hard to say, but it’s understandable that most programmers on the second peak would find it implausible that he or she is meeting someone who has made the summit as well. And so despite 14 years of experience with C++, despite having written one’s own versions of
std::vector, those unlucky few of us must still explain what a virtual function is.
There should be some questions from the other side: what types of questions would only a true expert know? Here are some thoughts:
1. Write out the pointer-to-member syntax from memory.
2. Give an example of partial template specialization.
3. What does SFINAE stand for, and what does it mean?
4. Explain what is meant by “two-phase name-lookup.”
I’m sure there are others. And perhaps your expert programmer wouldn’t know these off-hand, but would at least have had experience with them.
C++ isn’t the most glamorous or “in” language these days, and whatever “coolness” it may have had in the past has been supplanted by scripting languages like Ruby and Python, as well as functional languages like Scala and Erlang. So perhaps it is the fate of those who are truly proficient in C++ to remain a scattered lot, silently practicing and honing their craft, forever to be underestimated.