Best way to learn C++ as an experienced engineer?

New / Eng
Atinlay2️⃣

New Eng

PRE
Albertsons
Atinlay2️⃣more
Aug 17 70 Comments

I have 8 years of professional experience as a software engineer. Most of my professional experience is in Python/Ruby. I did a few classes in C++ in college. What would you recommend for learning C++ for a new role? Note for clarification: my new role requires c++.

Things I’m cobsidering: codecademy, coursera (ira pohl’s classes), a tour of c++ (stroustrup), effective modern c++ (meyers).

Would love any advice from the experienced c++ engineers out there!

TC: 375k

comments

Want to comment? LOG IN or SIGN UP
TOP 70 Comments
  • Facebook / Eng
    Ô ptimist

    Facebook Eng

    PRE
    Facebook
    Ô ptimistmore
    But whyyyyyy?
    C++ should be put to rest.
    Rust and golang all the way!
    There are very few domains where C++ is still relevant and maybe C would be enough there.
    Aug 17 15
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      And full disclaimer I wrote c++ for two decades including c++11 and 14 and yes it is better in some ways than back in the 90's. But I saw the light...
      Aug 17
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      Well good try but that code is C.
      Aug 17
    • Microsoft
      Tier 1

      Microsoft

      BIO
      #1 in Prestige
      Tier 1more
      C is closer to C++ than to go or rust
      Aug 17
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      You can't be serious...
      Aug 17
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      Also, even if only modestly relevant, go was also designed by Pike and Thomson, Thomson who wrote Unix and created B with Ritchie (Thx wiki for reminding me)
      C and go share one property that is their best. The languages are dead simple. C++ is dare I say the exact opposite.
      Aug 17
  • Sit on a cactus. it's pretty much exactly like that.
    Aug 17 1
    • Facebook ris
      Make sure you can identify and remember all the individual needles (stl templates) as they enter your buttocks/rectum.
      Aug 19
  • Intel LG75
    The truth is C++ will remain popular for system programming. There is no replacement for it when performance and low level control are critical. It’s so versatile from client applications, games, to servers, embedded. If you are good in C++ there is nothing you can’t do.
    Aug 17 13
    • Amazon / Eng
      fahrenheit

      Amazon Eng

      PRE
      Zalando
      fahrenheitmore
      No. Buffer overflows.
      Aug 18
    • Intel LG75
      With C++11, a lot of issues with memory management can be avoided. Resource management is hard. This was why C++ got the bad reputation traditionally. Garbage collection has its own problems. These are trade offs you make depending on the projects.
      Aug 18
    • Amazon / Eng
      fahrenheit

      Amazon Eng

      PRE
      Zalando
      fahrenheitmore
      Avoided with no guarantees. The way forward is for static analysis to ensure you don't fuck up. Approaches like Rust help a lot here. I agree that C++ remains a tolerable way to work in spaces that require no GC, but it will not be the tool of choice for long for that space, as Rust matures.
      Aug 18
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      C++ 11 and up are helping with mitigation of buffer overflows but yeah, keep on dreaming.
      Aug 18
    • Intel LG75
      This is good discussion actually. I am now curious about rust. What I just read is it’s like C++ without some of the safety issues. Should be easy to pick up.
      Aug 18
  • New / Eng
    Atinlay2️⃣

    New Eng

    PRE
    Albertsons
    Atinlay2️⃣more
    OP
    🙄
    Aug 17 0
  • Amazon / Eng
    fahrenheit

    Amazon Eng

    PRE
    Zalando
    fahrenheitmore
    I echo the warnings about the hellscape you're about to walk into, and salute you. Just make sure this investment makes sense long-term; it's not that C++ will be gone anytime soon, but there are indeed strong reasons to consider dedicating time elsewhere, depending on how far into the future you expect to make a living off of no-GC programming.

    Anyway, make super sure any material you choose to consume has been written **after** the recent-ish wave of deep changes to the language. C++11 features are a must. Modern C++ is an entirely different beast from older practice, and you only want to invest into understanding the older ways if you *need* to work on a legacy project. And, again, carefully consider the consequences of doing that.
    Aug 17 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      Thanks! Yeah a lot of what I’m seeing is c++ 11 or later, I’m hesitant to even look at material from before then, as I don’t want to learn the wrong stuff.
      Aug 17
  • WeWork RPvk36
    Good C++ engineers are always in demand somewhere.
    Aug 17 11
    • WeWork RPvk36
      Software engineering is an applied science, so yes it does matter. Your fancy log(n) algorithm doesn’t mean shit in practice if it bypasses the L2 cache.
      Aug 18
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      Well.... That depends on N, doesn't it?
      Caches will speed things up to a point, especially when cache effext is a linear factor. Sometimes they compound but usually not...
      Aug 18
    • Amazon / Eng
      fahrenheit

      Amazon Eng

      PRE
      Zalando
      fahrenheitmore
      There are also plenty of cache-oblivious algorithms for whatever you may need where the details of how memory is managed and the layout of data in memory will not be an issue. For the bigger problems you anyway want a library or service that implements the data structure you need in a super-optimized way; this is why you don't reinvent e.g. search algorithms, you just put your shit into the right database engine with the right index implementations. The focus on algorithmic complexity for application-side microoptimizations is an obsolete game of brain teasers whose only value is masturbating your ego and gaming idiotic recruitment systems to improve TC. It's not useful for actual engineering except in extremely niche applications.
      Aug 19
    • Facebook ris
      I wouldn't say extremely niche but otherwise I generally agree. I would say that FB does have a case of Not Invented Here and invests a lot of effort into creating their own infrastructure solutions when they could probably get away with using something else. It is nice when you end up on a team that works with that kind of stuff though, because the skillset is transferrable if you want to do things for which existing libraries or high-level interfaces do not exist (e.g. say you want to write a funky new graphics pipeline or work with GPGPU).

      Ô ptimist: <1yoe, E3, TC 160 something? Not counting signing bonus, standard new grad offer.
      Aug 19
    • Facebook / Eng
      Ô ptimist

      Facebook Eng

      PRE
      Facebook
      Ô ptimistmore
      So you are a new grad and you worry about nobody knowing how to deal with that stuff, stuff which most likely you never dealt with yourself. Typical.
      How many companies have you experienced to have an informed opinion and feel bold enough to claim fb has a case of not invented here?
      It's indeed your prerogative to have an opinion. But please don't make a fool of yourself while you are representing Facebook.... It reflects badly on me.

      🤦🏻‍♂️
      Aug 19
  • Facebook / Eng UnND55
    Watch the Herb Sutter talks on modern c++, in particular the back to basics one. This should give the right intuition around ownership, which is a pretty important part of switching to a non-gc language. A tour of c++ is also a good idea, it's short but touches on a lot of areas. Effective modern c++ is good to read once you have some familiarity with c++ but you're probably not going to get much out of it until you have some more experience.
    Aug 17 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      Thanks!
      Aug 17
  • Microsoft refreshers
    Effective C++ to learn the idiomatic way. Watch CPPCON and learn how the experts are approaching modern C++. But you’ll never “learn” it until you use it in some project.
    Aug 17 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      Thanks 🙏🏻
      Aug 17
  • Amazon y33tcode
    Learn rust instead OP. Lots of rust projects coming out in low level spaces at Amazon, although C++ was used in the past.
    Aug 17 2
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      I do plan on learning rust and golang on the side. My role requires c++ so I will learn and use that for now. But I’m eager to learn the strengths of each language.
      Aug 17
    • Amazon y33tcode
      Ah well if you have an immediate use for c++ then by all means, I thought you were just learning it on the side for funsies.
      Aug 17
  • Microsoft jPzm21
    I tend to learn new languages or tech by starting a side project that I’m interested in and aligns well with the tech I’m exploring. I learn best by doing rather than through classes. The sources you mention might be good to get off the ground, though personal experience points to being able to learn similar amounts in shorter time. Everyone learns differently so YMMV.
    Aug 17 0
  • Intel LG75
    Find a good c++ project on github and contribute to it
    Aug 17 2
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      Do you have any recommendations? I’m sure there are tons of projects out there, but being new to c++ I don’t have a good sense of what projects are out there. Some that come to mind: folly, boost, tensorflow. Others?
      Aug 17
    • Intel LG75
      Depends on the app you want to work on. I.e ui libraries (Qt, wxwidgets). More here https://en.cppreference.com/w/cpp/links/libs
      Aug 17
  • Clover Light, LLC WhatWeWent
    Accelerated C++ by Koenig and Moo is a great book to learn idiomatic C++ and is not too long. It assumes you already know another language so doesn’t waste time explaining stuff like what an array is nor does it go into esoteric template metaprogramming stuff. It’s dated though, so you’d want to follow-up with Effective Modern C++ by Meyers for best practices with C++11 and up.
    Aug 17 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      Thank you!
      Aug 17
  • Facebook BtXi30
    I worked with c++ over 10+ years. I was told c++ was dying since my first working day. But the fact is that language still have its strength in the scenarios in which latency or efficiency is important.
    Aug 17 0
  • Oracle qmnzs
    Do LC in C++
    Aug 18 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      That was actually my plan once I get a little comfortable. When switching jobs I LC’d in python and I think it actually improved my python quite a bit.
      Aug 19
  • Facebook
    literal no

    Facebook

    BIO
    .
    literal nomore
    If you want to learn C++, learn all the weird tricks and behaviors. It doesn't help day to day, but having C++ on your resume is a magnet for interview questions about templates and move semantics.
    Aug 17 1
    • Oracle qmnzs
      Not at FB, no C++ specific stuff
      Aug 18
  • Airbnb kYFK02
    Search for “learn c++” on amazon and order the top rated items....

    Wtf help yourself first
    Aug 17 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      I noted the resources I have found, looking for advice from experienced devs who may know the space better than a google/amazon search, but thanks.
      Aug 17
  • Magic Leap pulsemory
    Come up with an idea, implement it in the language you want to learn.
    Aug 17 1
    • New / Eng
      Atinlay2️⃣

      New Eng

      PRE
      Albertsons
      Atinlay2️⃣more
      OP
      Yeah that’s a decent idea, thanks! One thing I’m trying to learn is “idiomatic” c++. Pointers, references, stl, etc. It is still a bit daunting to read open source libraries (e.g. Folly) because I don’t have a great grasp of the language constructs yet.
      Aug 17
  • Amazon krackjax
    Start with BWDR’s C programming book
    Aug 17 0

Salary
Comparison

    Real time salary information from verified employees