Category: Science & Technology

C++11/14 at Scale: What Have We Learned? – Vittorio Romeo – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Many years have passed since the release of C++11 and C++14. These standards brought many new features and idioms to the C++ language and revitalized its community.

Nowadays, with C++20 having one foot out the door, it is important to look back at the experience gained using C++11/14 at scale and re-evaluate their impact.

- What have we learned from 8 years of using Modern C++ in production at a large-scale corporation?
- What features were the most useful?
- Which ones were the most misused?

From unexpected benefits/drawbacks to teachability issues, this talk will discuss the most significant consequences of embracing C++11 and C++14 in a company with thousands of engineers. With some *healthy* skepticism, commonly used features and idioms will be reassessed to uncover some unexpected pitfalls or qualities.

---
Vittorio Romeo

Vittorio Romeo (B.Sc. Computer Science) has been a Software Engineer at Bloomberg for more than 3 years, working on mission-critical company C++ infrastructure and providing Modern C++ training to hundreds of fellow employees.

He began programming around the age of 8 and quickly became a C++ enthusiast. Vittorio created several open-source C++ libraries and games, published many video courses and tutorials, and actively participates in the ISO C++ standardization process.

He is also an active member of the C++ community and has an ardent desire to share his knowledge and learn from others: he presented more than 20 times at international C++ conferences (including CppCon, C++Now, ++it, ACCU, C++ On Sea, C++ Russia, and Meeting C++), covering topics of various nature.

Vittorio maintains a website with advanced C++ articles and a YouTube channel featuring well-received modern C++11/14 tutorials. Lastly, he’s active on StackOverflow, taking great care in answering interesting C++ question (60k reputation).

When he’s not writing code, Vittorio enjoys weightlifting and fitness-related activities, competitive/challenging computer gaming and sci-fi movies/TV-series.

---
Videos Recorded & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Automatically Process Your Operations in Bulk With Coroutines – Francesco Zoffoli – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Performing bulk operations is more efficient than performing multiple single operations in many scenarios: memory allocations, I/O, IPC, etc.
At the same time, code that performs operations in bulk requires extra bookkeeping and boilerplate compared to equivalent code which operates on each individual item.
In this talk, we'll see how C++20 coroutines let us get the performance gains of executing operations in bulk, without the maintenance burden.

Often it’s easier to write code that executes on an item at a time rather than on multiple items: it’s easier to write an if condition than to call std::erase_if, it’s easier to call a function than calling std::transform.
When operating on an item at a time, it is also possible to use exceptions for error handling.
Once we change our code to operate on batches of items, the logic often looks completely different from the original one.

Could we keep our code as if we were processing an item at a time, but calling functions on multiple items behind the scenes?
What if we could aggregate all the arguments to a function into a collection, execute the function with the collection of arguments, and redistribute the results to each caller in a completely transparent way?

This talk will show how such a system could be implemented using coroutines.
It will show step by step how to implement a task and awaitable object which can suspend a function in a synchronous context and resume it once the underlying bulk operation has completed, and how to schedule such tasks.

Have you heard of coroutines but haven’t seen an application of them yet?
Did you read about all the new customization points introduced but haven’t still realized how to make use of them?
Are you looking for a practical and interesting use case for coroutines?
This talk is for you!
Join us to learn about a new way of creating powerful abstractions in modern C++.

---
Francesco Zoffoli

Francesco Zoffoli is a professional Software Engineer currently working for Facebook, building monitoring systems. Author of the book "C++ Fundamentals", passionate about programming languages and maintainable software, he has been using C++ throughout his career and personal projects. C++ is his language of choice due to its expressivity, especially its metaprogramming capabilities.

---
Videos Recorded & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Just Enough Assembly for Compiler Explorer – Anders Schau Knatten – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Every other conference talk these days seems to be showing off some code on Compiler Explorer. But what does all that Assembly actually mean?

In this talk you'll learn the very basics of X86 Assembly and the X86_64 calling convention, just enough to understand the full Assembly listing of simple functions on Compiler Explorer. No previous experience with Assembly is necessary, but a basic understanding of C or C++ is useful.

After this talk you will:
- Be able to paste code from your own project into Compiler Explorer, and either understand the Assembly output or know how to simplify it until you do.
- Have a solid understanding of the fundamentals, so you know what to search for and understand it when you need to know more.

(Compiler Explorer is an increasingly popular tool which allows you to see exactly what the compiler does with your code. Check it out at https://godbolt.org/.)

---
Anders Schau Knatten
Anders started programming in Turbo Pascal in 1995 and has worked as a software developer in various languages since 2001. He's currently a Senior Software Engineer at Zivid, where he's working on machine vision in C++. He's the author of https://cppquiz.org and the blog C++ on a Friday https://blog.knatten.org/. He also gives terrible C++ advice as @AffectiveCpp.

---
Videos Recorded & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Discovering a User-Facing Concept – Christopher Di Bella – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
How do we wield concepts to get effective usage? There's a lot of presentations talking about the technical details of concepts over the past few years, but far fewer delve into how to derive a concept in detail. Simply understanding how language features work isn't good enough: we need to know how to use them in order to get maximum effectiveness out of a feature.

What are concepts supposed to describe? What are patterns to follow and patterns to avoid? What's the difference between a "constraint" and a "semantic requirement"? What's the difference between a concept that's applied to a function and a concept that's applied to a type?

In this session, we will answer all of these questions, by studying an algorithm, identifying its requirements, and discovering a concept.

This session builds off themes from Andrew Sutton's Concepts in 60: Everything You Need to Know and Nothing You Don't, and Sean Parent's Generic Programming.

---
Christopher Di Bella

Christopher Di Bella is a software engineer working on Google's Chrome OS toolchain team. In a nutshell, this means he's responsible for delivering a high-quality LLVM toolchain to Chrome OS developers, and some of that work includes libc++. Christopher is passionate about generic programming and education, and is also a #include <C++> organiser. When he's not programming, Christopher likes to watch films, play games, swim, snowboard, and go on the occasional hike.

---
Videos Recorded & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Evolving an Actor Library Based on Lessons Learned from Large-Scale Deployments – Benjamin Hindman

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
To meet the performance demands of a large-scale container orchestrator (Apache Mesos) we built a pre-C++11 library that, in 2009, was the first library we knew of that combined an actor programming model with futures/promises. In the first part of this talk we'll discuss why we chose to use futures/promises to build a large-scale distributed system and why actors are the perfect complementary programming model. The library served us well, helping to scale Mesos to clusters larger than 75,000 physical machines, but not without numerous bouts of optimizations and introductions of new, more efficient, constructs. We'll discuss what we learned along the way, in particular that while the intention and interface of the library was good, the underlying implementation of the library performed tons of unnecessary synchronization and dynamic memory allocation.

Now 10 years later we've rebuilt the library from scratch as part of ongoing research into distributed systems at UC Berkeley. We'll discuss how the new library focuses on *continuations* rather than futures/promises while providing the same simplicity as before when composing code. We'll walk through how programmers can use low-level constructs of the library to explicitly compose continuations together, or how they can use higher-level constructs that they can compose without using continuations at all.

The library is coroutine friendly and has some overlap with 'A Unified Executors Proposal for C++' (P0443R13), in particular that both approaches are lazy vs the eager approach of futures/promises. However, our library has a particular focus on supporting actors. This has some important design implications with respect to scheduling and memory allocation that we'll discuss in depth during this presentation, highlighting some of the differences with outstanding proposals.

---
Benjamin Hindman

Benjamin Hindman is one of the creators of Apache Mesos. He began working on the project as a PhD student at UC Berkeley, and it followed him to Twitter where he is currently employed. Mesos now runs on thousands of machines at Twitter, Airbnb, etc. -- even when Ben is away skiing in Tahoe or surfing in Santa Cruz. An academic at heart, Ben's research in the areas of programming languages and distributed systems has been published in leading academic conferences. Ben has spoken about his research, Mesos, and his libprocess and stout libraries at numerous conferences and companies. He most recently spoke at FutureStack in SF and the Hadoop Summit Asia in Beijing.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Understanding and Mastering C++’s Complexity – Amir Kirsh – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
You probably write in C++ not because it is the simplest available language. There are other attributes C++ brings: efficiency, low footprint, direct memory access, enhanced control over runtime behavior, and more. In "The Design and Evolution of C++", Bjarne Stroustrup explains the design decisions taken since the language was conceived and during its evolution. What makes C++ powerful? How has C++ survived more than 4 decades, while other languages have disappeared into oblivion? Why do we still use C++ (and will we still be using it in a decade from now)? And most importantly, why it is not so complicated after all, and even becomes easier to use over time! Being both a teacher and a practitioner, seeing beginners struggle at first with the language but then turn to love it, my goal is to assure you that mastering C++ is doable, then motivate you to do so.

---
Amir Kirsh

Amir Kirsh is both a Lecturer and a practitioner. Teaching at the Academic College of Tel-Aviv-Yaffo and at Tel-Aviv University while keeping hands on, mainly on C++, as a Dev Advocate at Incredibuild and previously as the Chief Programmer at Comverse. Amir is also one of the organizers of the CoreCpp conference in Tel-Aviv and the CoreCpp meetup group and a member of the Israeli ISO C++ National Body.
---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Law of Demeter: A Practical Guide to Loose Coupling – Kris Jusiak – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
In this practical session, we will go through examples that follow and/or violate the Law of Demeter principle (LoD) [1].

We will take a deep dive into what kind of design issues that exposes and how to fix them.
Additionally, we will focus on the testing aspect of following the LoD principle together with Single Responsibility and Dependency Inversion principles.

At the end of this session, the audience will have a better understanding of how to write a loosely coupled code, how to easily test it and why the Law of Demeter principle is so important in Software Design.

Let's !"only talk to our immediate friends" at CppCon-2021!

---
Kris Jusiak
Kris is a Software Architect passionate about programming and who has worked in different industries over the years including telecommunications, games and most recently finance for Quantlab Financial, LLC. He has an interest in modern C++ development with a focus on performance and quality. He is an open-source enthusiast with multiple open-source libraries where he uses template meta-programming techniques to support the C++ rule - "Don't pay for what you don't use" whilst trying to be as declarative as possible with a help of domain-specific languages. Kris is also a keen advocate of extreme programming techniques, Test/Behavior Driven Development and truly believes that 'the only way to go fast is to go well!'.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Your New Mental Model of constexpr – Jason Turner – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
In my experience as a trainer, YouTuber, and speaker, I find that many people have a mistaken impression of what constexpr is and for what it is suited. I see people over-complicate constexpr by conflating it with meta programming and template-related topics. Students will often fail to recognize where and when constexpr could be used. Experts will get concerned about the "contract" you are making with the user of your library by marking functions as constexpr.

In this talk, I will present a mental model for how you should consider constexpr. I will explain what constexpr is (less mechanically and more metaphorically), give practical applications for constexpr, and help you figure out where constexpr fits into your application or library.

In the most straightforward sense, constexpr is moving work from runtime to compile-time. This mental model that I will present will ask, "what work would you rather do at compile-time?" We will find this answer by looking at constexpr as a continuum. On one end of the continuum is the use case of moving a runtime fixed-size vector into a compile-time fixed-size constexpr array, and on the far end is executing your entire program at compile-time and simply outputting the results at runtime.

---
Jason Turner

Host of C++Weekly https://www.youtube.com/c/JasonTurner-lefticus, Co-host of CppCast http://cppcast.com, Co-creator and maintainer of the embedded scripting language for C++, ChaiScript http://chaiscript.com, and author and curator of the forkable coding standards document http://cppbestpractices.com.

I'm available for contracting and onsite training.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Plenary: Small Inspiration – Michael Caisse – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
This talk is the Embedded Track Keynote.

Less than 1% of microprocessors sold each year find their way into general purpose computers. Desktops, laptops, and servers of all sizes represent a very small fraction of the compute that surrounds us. We interact with a few of these systems but most go unnoticed. These invisible, unsung embedded devices offer lessons in engineering at all scales and can provide inspiration to seasoned practitioners and future technologists.

Join me as we learn from the embedded world and become inspired to inspire.

---
Michael Caisse started using C++ with embedded systems over 30 years ago. He continues to be passionate about combining his degree in Electrical Engineering with elegant software solutions and is always excited to share his discoveries with others.

Michael works for Ciere Consulting where he provides software consulting and contracting, C++ training and mentoring, and electronic design.

When he isn't fighting with compilers or robots, he enjoys fencing with a sabre.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

C++20 Templates: The next level: Concepts and more – Andreas Fertig – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
C++20 is probably the biggest change to the language since ever. In this session, we will look into some changes that templates received with C++20. The biggest change is the introduction of Concepts.

We don’t stop there. We will also talk about improvements to CTAD and NTTP. Of course, we will also look into how templated lambdas work in C++20.

By the end of the talk, attendees have learned about the newest C++20 template updates and how to apply them.

---
Andreas Fertig, CEO of Unique Code GmbH, is an experienced trainer and lecturer for C++ for standards 11 to 20.

Andreas is involved in the C++ standardization committee, in which the new standards are developed. At international conferences, he presents how code can be written better. He publishes specialist articles, e.g., for iX magazine, and has published several textbooks on C++.

With C++ Insights (https://cppinsights.io), Andreas has created an internationally recognized tool that enables users to look behind the scenes of C++ and thus to understand constructs even better.

Before working as a trainer and consultant, he worked for Philips Medizin Systeme GmbH for ten years as a C++ software developer and architect focusing on embedded systems.

---
Videos Recorded & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology