Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”

    CppCon

    4 HN recommenders · recommended in 5 months, 2020–2025

    YouTube

    52:01 · 158K views · Nov 2, 2017

    Louis Brandy presents the most common and infamous recurring C++ bugs seen in Facebook's huge codebase, including shared_ptr data races and operator[] pitfalls. He explains the surprising complexity behind seemingly simple code.

    HN recommends it as a must-watch catalogue of C++ footguns, often cited in debates about Rust and C++ safety.

    Software Engineering & LanguagesC, C++, Rust, Go & systems languagesSecurity & hacking
    1. 1:47:45
      CppCon 2017: Herb Sutter “Meta: Thoughts on generative C++”CppCon105K views • 9 years ago
    2. 1:13:41
      CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"CppCon235K views • 12 years ago
    3. 1:39:25
      CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”CppCon149K views • 10 years ago
    4. 1:19:52
      CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon264K views • 10 years ago
    5. 1:29:06
      CppCon 2015: Herb Sutter "Writing Good C++14... By Default"CppCon193K views • 11 years ago
    6. 57:39
      CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior..."CppCon94K views • 10 years ago
    7. 1:54:00
      Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022CppCon277K views • 3 years ago
    8. 31:19
      CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"CppCon122K views • 10 years ago
    9. 1:24:36
      C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024CppCon23K views • 1 year ago
    10. 1:31:14
      CppCon 2017: Titus Winters “C++ as a "Live at Head" Language”CppCon53K views • 9 years ago
    11. 1:40:46
      CppCon 2015: Bjarne Stroustrup “Writing Good C++14”CppCon351K views • 11 years ago
    12. 59:53
      CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”CppCon147K views • 7 years ago
    13. 55:49
      CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"CppCon119K views • 10 years ago
    14. 1:15:46
      CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”CppCon178K views • 9 years ago
    15. 1:29:54
      CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"CppCon188K views • 11 years ago
    16. 1:36:27
      CppCon 2016: Dan Saks “extern c: Talking to C Programmers about C++”CppCon175K views • 10 years ago
    17. 1:33:12
      De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter CppCon 2019CppCon90K views • 7 years ago
    18. 1:14:22
      CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”CppCon289K views • 9 years ago
    19. 1:40:27
      CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"CppCon323K views • 12 years ago
    20. 1:04:26
      CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”CppCon40K views • 8 years ago

    5 comments from Hacker News

    1. @wyldfireJan 2020· in “C++20 Reference Card”

      No. Sorry for being unclear. [1] is a great video that covers a lot of good stuff in particular this usability bug. It's worth watching in its entirety. If you don't want to sit through the video, here's the broken code in question: void Obj::update() noexcept { unique_lock<mutex>(m_mutex); do_the_mutation(); } "unique_lock<mutex>(m_mutex);" has no effect, but you might mistakenly think that this will block on m_mutex. Labeling unique_lock's constructor as [[nodiscard]] would force you to think twice. See [2] for more details. [1] this video [2] [LINK]

      Strongly recommendsView on HN
    2. @oconnor663Jan 2023· in “Swift Achieved Dynamic Linking Where Rust Couldn't”

      There are many differences when it comes to safety: - Like you said, Rust doesn't let you data race on the contents of an Arc. - Rust also doesn't let you data race on the Arc itself (i.e. repointing a global Arc without synchronization). This is Bug #5 in this great talk: this video - Rust also doesn't let you retain a reference to the contents of an Arc longer than you retain the Arc. This is the bug that C++ Core Guideline R.37 is about: [LINK] But I'm not sure I'd call these Arc vs shared_ptr differences per se, because almost any comparison between a Rust container and its C++ equivalent looks similar.

      RecommendsView on HN
    3. @ddulaneyApr 2025· in “Pitfalls of Safe Rust”

      Unfortunately, operator[] on std::vector is inherently unsafe. You can potentially try to ban it (using at() instead), but that has its own problems. There’s a great talk by Louis Brandy called “Curiously Recurring C++ Bugs at Facebook” [0] that covers this really well, along with std::map’s operator[] and some more tricky bugs. An interesting question to ask if you try to watch that talk is: How does Rust design around those bugs, and what trade offs does it make? [0]: this video

      RecommendsView on HN
    4. @slavik81Jun 2021· in “My favourite C++ footgun”

      I'm a big fan of Scott Meyer's Effective C++ . It's a little dated now, but it was the most valuable book I'd ever read on the language. Louis Brandy's Curiously Recurring Bugs at Facebook presentation from CppCon17 has somewhat of the same feeling, though it only covers a few bugs: this video

      RecommendsView on HN
    5. @dureuillFeb 2024· in “Too dangerous for C++”

      The point of the article isn't that single-threaded non-atomic shared pointers are unfeasible in C++, it is that their usage is too dangerous. The fact that it wasn't included in the standard library for this reason is an argument for this. The fact that even `shared_ptr` has thread-safety footguns, one of which made it to the famous C++ talk, “Curiously Recurring C++ Bugs at Facebook”[1], is another. By the way, every single of the bugs from that talk is impossible in safe Rust. [1]: this video

      CitesView on HN