We all know that writing tests for our code is “what we should do”, and maybe we’re even doing that already. But it feels like extra busy-work that slows us down – and they hardly ever catch any bugs anyway, right? …
Maybe we’ve even tried TDD, and felt that it was just adding even more ceremony to the problem with no real advantages.
But the advantages are definitely there. When done properly and appropriately a TDD approach can greatly accelerate your ability to produce code that solves the right problems faster - and more correctly! We just need a good grounding in what TDD _actually_ is (and isn’t) and how to do it properly – especially in the context of C++, which brings it’s own idiosyncrasies and bottlenecks to the matter.
That’s what this workshop aims to be. Whether you’ve never written a test before, or you’ve had some mileage with TDD already, be prepared to ratchet up your productivity by thinking about things in new ways and gaining more approaches to breaking down problems in sustainable ways.
As a community we've tried many different ways to express, propagate and handle error conditions in our code over the years. Each seem to have different trade-offs, with none being perfect in all cases.
In C++ we adopted exceptions as the primary mechanism early on, and the standard library uses them extensively.
Yet many - 52% according to last year's Standard C++ Foundation survey - ban exceptions in all, or part, of their codebases!
Recently there has been a lot of interest in using ADTs (Algebraic Data Types) such as `std::optional`, or the proposed `std::expected`, for error-handling. There are definitely advantages here, but we're still not quite there yet. Can we do better?
This presentation summarises the material from my earlier talk, 'Option(al) Is Not a Failure', where I survey existing error-handling approaches and score them against each other, leading up to the new proposal, p0709r1, 'Zero-overhead deterministic exceptions'. We then dig into this proposal in more depth and look at the implications, considering also the supporting proposals, p1028 (std::error) and p1029 ([[move relocates]]) and others. We'll also look at experiences with similar mechanisms in other languages, notably Swift, to get an idea of how it might work out in practice.
In the end we should have a solid idea of which error handling strategy to use when, what's coming next, and how to approach code now that will play nicely in that possible future.
Phil Nash, JetBrains
Phil is the author of the C++ test framework, Catch2, and the composable command line parser, Clara. As Developer Advocate at JetBrains he's involved with CLion, AppCode and ReSharper C++. More generally he's an advocate for good testing practices, TDD and using the type system and functional techniques to reduce complexity and increase correctness. He's previously worked in Finance and Mobile as well as an independent consultant and coach specialising in TDD on iOS.
C++ has something very few other languages have: a well defined object life cycle. Understanding this key aspect of C++ is critical to writing clean, maintainable, and efficient C++.
Anyone who is a beginner or intermediate C++ programmer will gain a much better understanding of how the compiler treats objects and what behavior we can rely on. We will study and discuss many examples as a class in a group discussion.
We will cover:
C++ is a big language, and it gets bigger every year. Is C++ it *too* big? Do we just continue to make the language harder to learn? Or, perhaps, do these language additions actually make the language better and easier to use? We will take a pragmatic look at the changes brought to C++ over the years and what impact they have had on how we write code.View presentation
Jason Turner, Trainer and Consultant
Jason has 2 decades of C++ experience and is a regular conference speaker, developer, and trainer. He is host of the YouTube channel C++ Weekly and co-host of CppCast, the first podcast for C++ developers.
In this training we would deal with the following:
The training would be focused on C++ in general, but would include a look into the features of C++11 to C++17 and the proper usage of those. It will also include some actual practice on real C++ code. Attendees would gain better view on writing maintainable long living C++ code.
The training would cover both the nitty gritty bits and bytes of the language and the bigger design issues like how to identify that your if-else should become a state-machine, actor model vs. data model and concurrency design.
Amir Kirsh, Academic College of Tel-Aviv-Yaffo
C++ lecturer at the Academic College of Tel-Aviv-Yaffo and at Tel-Aviv University. Previously the Chief Programmer at Comverse. Expert in C++, software design and development in general. The author of a known C++ book in Hebrew that you may have on your shelf.
This workshop explains how to use Modern C++ to write safe, efficient, and maintainable embedded programs. Step by step, it shows how to leverage C++ language features to write abstractions that represent and manipulate hardware in a bare metal environment. It also explains how to make these abstractions easy to use and hard to misuse.
Using concrete programming examples, this workshop explains how to use C++ features such as classes, overloading, and user-defined type conversions to hide messy hardware details behind cleaner interfaces. It shows how to use templates and inheritance to capture commonality among devices and promote code reuse without sacrificing performance. It illustrates practical uses for modern features such as constexpr, static_assert, and type_traits to make embedded code safer, faster, smaller, and more maintainable. It demonstrates programming styles and idioms that turn potential run-time errors into compile-time errors, and turn run-time computations into compile-time computations.
Participants should have experience programming in C++, or experience in C along with a basic knowledge of the C++ constructs such as classes, access control, and constructors.
This workshop includes programming exercises. The exercises run on a simulator provided by the instructor. For the exercises, students will need a computer with a development environment that can edit, compile, link, and execute command-line applications written in C++14.
You've probably heard the terms lvalue and rvalue, if only because they occasionally appear in compiler error messages. However, if you have only a vague understanding of what they mean, you're not alone. Lvalues and rvalues aren't actually language features, but rather semantic properties of expressions and sub-expressions. Understanding lvalues and rvalues provides valuable insights into the behavior of built-in operators, the code generated to execute those operators, and the meaning of some otherwise cryptic compiler error messages. Also, understanding lvalues and rvalues is essential background for working effectively with reference types and overloaded operators. This session covers what you need to know about lvalues and rvalues in C++.
Dan Saks, Saks & Associates
Dan Saks is the president of Saks & Associates, which offers training and consulting in C and C++ and their use in embedded systems. Dan used to write the "Programming Pointers" column for embedded.com online. He has also written columns for numerous print publications including The C/C++ Users Journal, The C++ Report, Software Development, and Embedded Systems Design. With Thomas Plum, he wrote C++ Programming Guidelines, which won a 1992 Computer Language Magazine Productivity Award. Dan has taught C and C++ to thousands of programmers around the world. He has presented lectures, workshops, and keynote addresses at conferences such as the Software Development Conference, the Embedded Systems Conference, the ACCU Conference, code::dive, NDC, CppCon, and Meeting Embedded. Dan also served as secretary of the ANSI and ISO C++ Standards committees and as a member of the ANSI C Standards committee. More recently, he contributed to the CERT Secure C Coding Standard and the CERT Secure C++ Coding Standard.
This class is a full hands-on introductory course to how to use Conan, the open source C and C++ package manager. In this course you will learn how to consume existing packages in your applications and how to create packages for your own libraries. Integrations with different build systems, development of packages, versioning, dependencies conflicts, ABI compatibility and binaries management: All these concepts will be approached and learnt in real working exercises, installing, creating, cross-building, uploading and downloading packages.
Diego Rodriguez-Losada, JFrog
Diego's passions are robotics and SW engineering and development. He has developed many years in C and C++ in the Industrial, Robotics and AI fields. Diego was also a University (tenure track) professor and robotics researcher for 8 years, till 2012, when he quit academia to try to build a C/C++ dependency manager and co-founded a startup.. Since then he mostly develops in Python. Diego is a conan.io C/C++ package manager co-creator and maintainer, now working at JFrog as senior SW engineer and C/C++ advocate.
Avoiding dynamic memory (heap) allocations is a common practice in embedded development. In this talk we will discuss common problems and solutions, why to avoid heap allocation in the first place in some cases, and what does the C++ standard have to say about this?View presentation
Asaf Helfer, BrightSource Energy
Asaf has been writing C++ professionally for over 13 years, and for fun with no profit for even longer. He's currently working at BrightSource Energy, where he leads the solar field devices application and communication software team. He's enthusiastic about creating and improving good and clean software design, and about the options it opens for reusing the code in simulations and automated testing. He spends his free time lamenting his lack of free time and teaching math to second graders.
STL algorithms are something every C++ programmer should know. As range algorithms are expected to arrive to C++ 20, there are even more useful tools that we should at least be aware of, if not use daily.
In this talk we will cover what ranges add to C++20 standard library, as well as go over all the different views and actions available in the range-v3 library which can be used today.
We will see examples of combining algorithms, views and actions effectively to write more expressive and sometimes even more performant code.
This talk is inspired by Jonathan Boccara’s talk '105 algorithms in less than an hour'.View presentation
Initialisation semantics is widely regarded as one of the most difficult aspects of the C++ language. We have many different kinds of initialisation and many different syntaxes for it, and they interact in complex and often surprising ways. C++11 introduced the concept of 'uniform initialisation'. But instead of unifying, this feature introduced even more complex rules, which were subsequently amended in C++14, C++17, and will be changed again for C++20.
In this talk, I'll first summarise the history of initialisation in C++. I'll then give a systematic overview over the current initialisation rules and common pitfalls and surprises. There will be some practical coding guidelines to help using those rules effectively. Finally, we will discuss recent proposals towards making initialisation semantics in C++20 simpler and more user-friendly.View presentation
Timur Doumler is a C++ developer specialising in audio and music technology, member of the ISO C++ committee, and program chair of the Audio Developer Conference (ADC). He is passionate about writing clean code, providing good tools, evolving the C++ language, and building inclusive communities.
Writing asynchronous code is never easy. The programmer must consider things like race conditions and dead-locks, it's harder to reason about the code and all kinds of pitfalls come up. On the other hand, async operations become more and more common with the raise of multicore computing, with more network communication used and with some of the architectures we develop to (e.g. OSes that supply only async API for I/O operations).
Coroutines are the newest (planned) addition to the C++ language to ease the development of such code and make it much simpler, closer to traditional, synchronous code and easier to reason about.
In this talk we'll learn what kind of problems coroutines come to solve, what the solution looks like from the user perspective and a glance towards the much wider solution space that coroutines open for us with various usages already exist.
This is an 'intro to coroutines' kind of presentation, definitely not delving into the 'dirty details' of how things are implemented in the low level.View presentation
Yehezkel Bernat, Microsoft
Yehezkel is a SW developer at Microsoft for the last year. Previously, he spent 7 years working at Intel. He also works as TA for OOP course at Hadassah College for the 7th year already. C++ is Yehezkel's favorite language and he is always happy for opportunities to teach it or talk about it.
When legacy code is mixed with modern language features and patterns, when the rich heritage of C++ and its compatibility restrictions co-exist with the adoption of best practices from other languages and technologies, some of us C++ developers become lost and need to follow and stick to a more conservative path. Recent independent research studies show that developers are staying with C++11, only slowly moving to C++14 and rarely adopting C++17. They tend to avoid using unit testing frameworks, are barred from throwing exceptions, and often still build packages manually. Alongside the areas where strict limitations are imposed on the subset of the language used, there are others, like game development, that find workarounds to emulate language features not yet accepted to the language standard. What are the real reasons for this state of affairs, what biases might be at play, and what are some of the improvements planned?
In this talk, we will overview the C++ ecosystem based on several independently conducted research studies, identify the common aligning trends across all the sources, and analyze the reasoning behind them.
Importantly, we’ll see how the work of the C++ committee and tooling evolution can help overcome these difficulties and usher in a brighter future for C++. We’ll get a glimpse into some of the most valuable recent proposals and changes to the language, and see how tooling is helping, or can help, move to newer standards faster.View presentation
Anastasia Kazakova, JetBrains
As a C and C++ software developer, Anastasia Kazakova created real-time *nix-based systems and pushed them to production for 8 years. She has a passion for networking algorithms and embedded programming and believes in good tooling. With all her love for C++, she is now the Product Marketing Manager on the JetBrains CLion team. Besides, Anastasia runs a C++ user group in Saint-Petersburg, Russia (www.meetup.com/St-Petersburg-CPP-User-Group/).
Concepts are one of the biggest new features coming in C++20, set to revolutionize the way we write generic code. A year ago I volunteered to implement Concepts in the Clang Compiler, and am now nearing completion of the feature. I will tell the story of how I got around to doing this, while demonstrating what it is like to take on such a daunting codebase as a compiler for the first time, and some lessons learned. A brief introduction to the feature itself will also be provided.View presentation
Modules are coming to C++ in the next standard, and they will have an impact unlike any other new feature added to C++ since 1998. Modules are a first-class system for encapsulating and defining interfaces to translation units. They are a modern replacement for C++'s textual inclusion system (e.g. headers).
Other features change how you write C++ code. Modules change not only how you write your code; they will change the very structure of your C++ projects, your build system, your IDE, and your tools.
In this talk, I'll show you how modules work, how they contrast with the current header inclusion system, how you'll benefit from them, and the transition path for the C++ ecosystem.View presentation
At the heart of the C++ programming language is the multi-threaded abstract machine and its execution model, the platform-agnostic formal model that generically describes how to run a C++ program. In this talk, you will learn the rules that govern how your C++ code is executed and see how those rules impact the C++ code you write every day.
We'll explore the C++ execution and memory model, and discuss fundamental questions such as:
If you're interested in gaining a deeper understanding of how your C++ code is executed and how concurrency works in C++, you should attend this talk.View presentation
Bryce Adelstein Lelbach, NVIDIA
Bryce Adelstein Lelbach has spent nearly a decade developing libraries in C++. He is the chair of the C++ committee’s Library Evolution Incubator. Bryce is passionate about C++ community development. He is an organizer for the C++Now and CppCon conferences as well as the Bay Area C++ user group. He works at NVIDIA, where he is the team lead for CUDA Thrust, the CUDA C++ core library. He is one of the initial developers of the HPX parallel runtime system. He also helped start the LLVMLinux initiative, and has occasionally contributed to the Boost C++ libraries. On the C++ committee, he has personally worked on the C++17 parallel algorithms, executors, futures, senders/receivers, and multi-dimensional arrays.
What do C++ programs really look like? When developers think about hierarchy and virtual calls they see it as design patterns and code but reverse engineers look at it from a different angle, they think about Assembly puzzles.
C++ is known as a tangled language, templates, lambdas and pointers. All of these features create a jungle of objects intended to make life easier for the programmer. But once the program is compiled, the target program is no longer what it once seemed.
Reversing C++ programs is tedious, demanding, and requires rebuilding inheritance, identifying templates and tainting program flow in order to combat the ties of function overloading and class utilization.
C++ Binaries are a world of mysteries. In my presentation I am going to show how C++ binaries looks like after compilation and how reverse engineers see C++ binaries and understand their logic.View presentation
C++ provides a lot of wonderful tools, but at its heart stands the inheritance mechanism and the engine that drives it - the Virtual Table.
We will talk about the virtual table - when and how it works, and of course, when it does NOT work. We will review the problems that may arise from using it wrongly.
And finally, we will try to provide tools for estimating the performance cost and possible solutions to minimize it.View presentation
I will present a library that utilizes a feature of C++20 to build regular expressions from compile-time strings. This is a novel approach that doesn't have ordinary disadvantages of other regular expression implementations like having to use a linked library or a run-time cost of parsing and interpreting an internal finite machine.
You will see implementation details of the library and problems I have run into during its writing. In the last part of the talk, I will compare other implementations of regular expression engines and show compiled code in Compiler Explorer.View presentation
Hana Dusíková, AVAST
Hana is working as senior researcher in Avast Software. Her responsibility is exploring new ideas and optimizing existing ones. She also propagates modern C++ techniques and libraries in internal techtalks and gives talks at local C++ meetups. She studied computer science at Mendel university and subsequently taught several courses there, including: Data Structures, Computability and Complexity, and Formal Languages and Automata.
Memory Model is probably the single most important change introduced in C++11.
In this talk we will discuss what is a memory model, and more importantly, why we should care. Spoiler alert: The answer in one line: it will help us to write faster more correct code for multi threads and even single thread. Along the way, we will delve into exciting side topics such as Data Oriented Design, Cache Oblivious Algorithms, False Sharing and more.View presentation
Yossi Moalem, Check Point
Yossi is a Team Leader in Check Point's Threat-Prevention division. He has over 15 years of experience as a professional programmer, mainly in C/C++. Yossi considers the standard as light reading and spends all his spare time learning new technologies and methodologies (much to the delight of his wife!!). He likes teaching and sharing his knowledge, but what really does it for him is refactoring legacy code into beautifully crafted code. On the positive side, he loves Led Zeppelin.
When developing a high frequency environment, every transaction is a race against the clock and against other players in the market. Therefore, your critical flow can never be “fast enough” as long as someone else may be faster. In this lecture I will cover some of the techniques qSpark’s trading infrastructure uses to survive in the HFT jungle, and will discuss in detail one of our main techniques: using dummy operations to warm up the instruction cache for critical operations while avoiding branch mis-predictions.View presentation
Nimrod Sapir, qSpark
Nimrod Sapir is the the VP R&D @ qSpark, a leading provider of ultra low-latency trading platforms for high-frequency algorithmic trading. His team is responsible for developing the real-time trading engine of the company, as well as the specialized, low-latency optimized data structures and infrastructures used by the entire company's C++ software stack. Prior to qSpark, Nimrod worked as a storage infrastructure developer in IBM and Dell-EMC.
C++11 lambdas brought us lambdas. They open a lot of new possibilities. Frequently asked questions are:
In this talk I will answer these questions. With the support of C++ Insights (https://cppinsights.io) we will peak behind the scenes to answer questions about how they are implemented. We will also see how the compiler generated code changes, if we change the lambda itself. This is often interesting for development in constrained applications like the embedded domain.
Next I will show you application areas of lambdas to illustrate where they can be helpful. For example, how they can help you to write less and with that more unique code.
After the talk, you will have a solid understanding of lambdas in C++. Together with some ideas when and where to use them.View presentation
Andreas holds an M.S. in Computer Science from Karlsruhe University of Applied Sciences. Since 2010 he has been a software developer and architect for Philips Medical Systems focusing on embedded systems. He has a profound knowledge of C++ and is a frequent SG14 member. He works freelance as a lecturer and trainer. Besides this he develops macOS applications and is the creator of cppinsights.io
Seastar is a C++14/C++17 application framework focused on I/O and multicore. It uses all C++ features we could lay our hands on, and plans to use coroutines and modules as soon as they are available.
The talk will cover the theory behind Seastar, explain how it is used in practice, and cover the advanced C++ techniques we used.View presentation
Avi Kivity, ScyllaDB
Avi Kivity, CTO of ScyllaDB, is known mostly for starting the Kernel-based Virtual Machine (KVM) project, the hypervisor underlying many production clouds. He has worked for Qumranet and Red Hat as KVM maintainer until December 2012. Avi is now CTO of ScyllaDB, a company that is bringing the same kind of innovation to the NoSQL space.