Live data from Hacker News

Ask HN: What did you do to become an expert in C++?

news.ycombinator.com

1–10 of 12 posts

Re: Ask HN: What did you do to become an expert in C++?

#2
(Not an expert, but reasonably proficient.)

I worked with a lot of really good C++ programmers and had them do my code reviews. The best way to learn is to expose yourself to people who know more than you do and give you feedback.

As one of my coworkers is fond of saying, "If you work with people better than yourself, you'll get better. It just happens naturally."

Re: Ask HN: What did you do to become an expert in C++?

#4
It just takes time. 10K hours or whatnot. I've been writing C++ almost every day for the last 10 years, and I'm still learning.

My best advice would be to just do it. Don't focus on memorizing the syntax of pointer-to-member functions or the stupidly complicated overload rules. C++ is powerful but a lot of it is quite useless in practice.

Instead, you should be writing DNS servers, hiding text as bit patterns in JPEGs, or whatever other thing you find intellectually interesting. Sprinkle in some Google and bake for a few years.

I'm sorry to say that like with most things in life, there aren't any shortcuts here.

Re: Ask HN: What did you do to become an expert in C++?

#5
Assuming that I have mastered it, it happened from learning and using Haskell, watching people post and smart people answer in some C++ megathread, and getting a job where the product is written in C++. And also some early experience using it in a CS II class that used Koenig & Moo.

Re: Ask HN: What did you do to become an expert in C++?

#8
As many have said here, it's about actually writing code in the end, personally I learned C++ by writing an electronic schematic editor as a front end to a SPICE circuit simulator, so I learned C++ and the Windows API at the same time. Of course as well as writing code, reading other peoples is useful too, when i was learning there weren't the reasources there are today, you can go over to github or sourceforge and find lots of interesting code to learn from, and do code reviews on to see how you might have done things differently.

Re: Ask HN: What did you do to become an expert in C++?

#10
It's important to distinguish C++ expertise from that of other languages. C++ is so large (and with C++0x will be larger still) that any expert you do meet will know at best a large portion of some subset of the language. And this is fine.

The most important skill is general problem solving, and for this a variety of tools is helpful. So in the C++ world, focus on a few language features that are most different from one another. Make sure you know basically how templates work, but don't fret if you've never seen a specialization or any of the 44 corner cases that are unsupported or undefined. Learn at least common STL containers like vectors, sets and maps, and learn basic_string. Expose yourself to at least one algorithm like fill_n(), and recognize how it is different for vectors versus C arrays. Learn ostringstream. Use namespaces, and learn about the "using" keyword. Learn the basics of classes, constructors and destructors, and the RAII technique. Master all of this before exploring the messes that are inheritance and exception handling.

Post reply on HN