Hacker News new | ask | show | jobs
by ben_w 410 days ago
I've had one co-worker with something like a decade of experience on paper, who was proud of his C++ despite having never heard of the standard template library — lots of `new` and `free`, not a single smart pointer (https://en.cppreference.com/w/cpp/memory#Smart_pointers). And the code they wrote had a lot of copy-paste going on, which I ended up finding because I'd put in a "TODO: deduplicate this" comment somewhere and found it in his newly duplicated class one day.

They absolutely were not interested in learning anything. I left knowing more C++ than they did despite having started there with total C++ experience of a hello world tutorial, and the fact that I still don't count myself as a C++ dev today.

2 comments

To be fair when a company says they use C++, it can mean anything from "C with classes" to crazy metaprogramming with almost automatic memory management. Since they have over 10 years experience, they are almost definitely in the former camp.

I would never utter the phrase "I know C++" because it can mean so many different things to so many different people, and I don't think anyone truly knows the whole language.

Not using templates nor smart pointers doesn't sound that bad to me(unless the entirety/majority of the codebase was written with them in mind), the duplication thing is more questionable.

It's not so much that this specific person didn't use smart pointers, it's that they had never even heard of them, and wasn't interested either.

"C with classes" is probably a good description, given what I saw from that one person — they didn't understand sub-typing either, and only had a cargo-cult understanding of access specifiers (revealed when the rest of us asked them why they'd duplicated a class file rather than subtyping).

Tbh, I also (sort of) knew C++, studied in school and a few semesters worth in college (CUDA, DSA, Computer vision elective,compiler design) but I still don't know STL. (I had been then interviewing using Java and Python.)