Curated Video
Multi-Paradigm Programming with Modern C++ - Distributing the Work
Task creation is cheap, but it’s not free. We have to find a compromise between loading all threads with data and introducing unnecessary overhead. In this video we will learn a simple formula for distributing the work, and also discover...
Curated Video
Multi-Paradigm Programming with Modern C++ - Diving into Concepts
So far, we have explored a single use case for concepts. There are more benefits and more tools at our disposal. Some best practices are already defined too. • Different ways to specify type requirements • Most important guidelines when...
Curated Video
Multi-Paradigm Programming with Modern C++ - Structuring Modules
In this video, we learn how modules can be split into implementation and partition units. • Implementation units • Partitions • Modules summary This clip is from the chapter "Structuring Projects in C++" of the series "Multi-Paradigm...
Curated Video
Multi-Paradigm Programming with Modern C++ - Adding Syntactic Sugar
We now can write coroutines that run on executor threads and produce values. Let’s see if we can make working with them a little bit more pleasant. We will also implement await_transform to allow co_awaiting a different type. Finally, we...
Curated Video
Multi-Paradigm Programming with Modern C++ - A Brief History with C++
Every new C++ standard adds support for different programming styles. Understanding the evolution of C++ can improve programming skills. • How C++ started? • Overview of features added in each new standard • Features of the new C++2a...
Curated Video
Multi-Paradigm Programming with Modern C++ - Promise and Future
Publication safety pattern that we have implemented with atomics, is somewhat harder to implement for non-trivial types. Luckily, STL provides some primitives for publication safety. In this video we will learn about std future, std...
Curated Video
Multi-Paradigm Programming with Modern C++ - Thread Pools
Thread pool is a collection of threads that execute incoming jobs or tasks. Clients push tasks on the queue, and threads pick them one at a time. This provides an abstraction for background tasks. In addition, there is a single point of...
Curated Video
Multi-Paradigm Programming with Modern C++ - Enforcing the Guidelines
Guidelines are, first and foremost, a collection of rules. If the rules are not enforced, they will not be followed. The guidelines are intended as specification for static code analysis tools. In this video we will learn how to enforce...
Curated Video
Multi-Paradigm Programming with Modern C++ - Synchronization with Mutexes
Mutex is an object that lets us protect a resource from being accessed from multiple threads simultaneously. Mutex is one of many synchronization primitives. It’s easy to use, but there are a few caveats. • Example of a mutex: Two...
Curated Video
Multi-Paradigm Programming with Modern C++ - Searching and Sorting
Search is the most common operation we perform on data. There are three common types of search: Linear, sorted (binary), and by hash. • Linear search is the simplest way to find things, and often the fastest • Overview of associative...
Curated Video
Multi-Paradigm Programming with Modern C++ - Organizing Source Files
In this video, we learn how to organize source code of a small project. • Overview of the daytime project • Organize code into packages • Separate package interface from implementation This clip is from the chapter "Structuring Projects...
Curated Video
Multi-Paradigm Programming with Modern C++ - What Is a Coroutine?
Coroutine is a function whose execution can be suspended and resumed. Suspension saves the state of the function, then the caller can execute as if the function has returned. Resumption loads the saved state back and continues execution...
Packt
Convert to ES6 Classes
OOP Book List Project: Convert to ES6 Classes This clip is from the chapter "OOP Book List Project" of the series "Modern JavaScript from the Beginning".In this section, you will learn how to build the book list UI, add book to list,...
Curated Video
Multi-Paradigm Programming with Modern C++ - Grouping Tasks with Fork/Join
Fork/Join builds on top of continuation. The idea is that not one, but multiple parallel tasks can consume results of the previous one. And after those tasks are finished, another task aggregates the results. In this video we will both...
Curated Video
Multi-Paradigm Programming with Modern C++ - Task Continuation
Continuation is when an asynchronous task consumes results of the previous one. In this video we will implement and use such pattern. Additionally, we will see how to handle exceptions and propagate them to the caller of a task. • Adding...
Curated Video
Multi-Paradigm Programming with Modern C++ - Coroutines on a Thread Pool
We had implemented a concurrent tasks framework in Section 9. Back then we observed that threads had to wait on each other, which reduces concurrency. In this section, we will create a tasks framework that uses coroutines to achieve the...
Curated Video
Multi-Paradigm Programming with Modern C++ - Copy and Move
Copy creates a duplicate of an object. Move transfers ownership of resources. We can control the behaviors of copy and move by writing copy and move constructors (and operators). • Rules for implementing copy constructors and assignment...
Curated Video
Multi-Paradigm Programming with Modern C++ - Providing a Good Abstraction
Abstraction hides complexity and preserves only the information that is relevant in the context. We create leaky abstractions when we fail to hide information that is irrelevant. This video is an exercise in creating an abstraction. •...
Curated Video
Multi-Paradigm Programming with Modern C++ - Modules in C++ 2a
In this video, we learn about the biggest change to C++ in decades. • Writing our first module • Consuming the module • Visibility and reachability This clip is from the chapter "Structuring Projects in C++" of the series "Multi-Paradigm...
Curated Video
Multi-Paradigm Programming with Modern C++ - General Guidelines
Some guidelines cannot be enforced efficiently. They are still important, especially the guidelines concerning Philosophy, Architectural Ideas, and Non-Rules and myths. • Express ideas directly in code, because compilers don’t read...
Curated Video
Multi-Paradigm Programming with Modern C++ - When to Use Templates
Templates are one of the distinctive features of C++, and arguably the most complex one. When used correctly, templates make your code less complicated, and this is not a contradiction. • Use templates to raise the level of abstraction:...
Curated Video
Multi-Paradigm Programming with Modern C++ - Class and Structs
What is the difference between struct and class, and which one to use? What’s an invariant and why is it important? Where to put error checking code? • Struct versus class: Which one to use? • Class invariants by example • Public and...
Curated Video
Multi-Paradigm Programming with Modern C++ - Passing Things Around
Most languages offer a couple of ways of passing data, e. g. by value and by reference. C++ offers many more. How to choose the right way in every case? • Ground rules for passing arguments • When to pass/return by reference, by value,...
Curated Video
Multi-Paradigm Programming with Modern C++ - Coroutine Machinery
C++ does not specify semantics for coroutines. Instead, the language provides some low-level constructs. The promise is an interface for a coroutine’s state machine, and there are also a few primitives for suspending and resuming a...