Instructional Video9:24
Curated Video

Multi-Paradigm Programming with Modern C++ - Distributing the Work

Higher Ed
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...
Instructional Video6:56
Curated Video

Multi-Paradigm Programming with Modern C++ - Diving into Concepts

Higher Ed
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...
Instructional Video6:51
Curated Video

Multi-Paradigm Programming with Modern C++ - Structuring Modules

Higher Ed
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...
Instructional Video4:11
Curated Video

Multi-Paradigm Programming with Modern C++ - Adding Syntactic Sugar

Higher Ed
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...
Instructional Video5:15
Curated Video

Multi-Paradigm Programming with Modern C++ - A Brief History with C++

Higher Ed
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...
Instructional Video9:34
Curated Video

Multi-Paradigm Programming with Modern C++ - Promise and Future

Higher Ed
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...
Instructional Video12:37
Curated Video

Multi-Paradigm Programming with Modern C++ - Thread Pools

Higher Ed
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...
Instructional Video5:51
Curated Video

Multi-Paradigm Programming with Modern C++ - Enforcing the Guidelines

Higher Ed
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...
Instructional Video16:46
Curated Video

Multi-Paradigm Programming with Modern C++ - Synchronization with Mutexes

Higher Ed
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...
Instructional Video4:29
Curated Video

Multi-Paradigm Programming with Modern C++ - Searching and Sorting

Higher Ed
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...
Instructional Video7:12
Curated Video

Multi-Paradigm Programming with Modern C++ - Organizing Source Files

Higher Ed
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...
Instructional Video5:05
Curated Video

Multi-Paradigm Programming with Modern C++ - What Is a Coroutine?

Higher Ed
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...
Instructional Video6:06
Packt

Convert to ES6 Classes

Higher Ed
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,...
Instructional Video8:34
Curated Video

Multi-Paradigm Programming with Modern C++ - Grouping Tasks with Fork/Join

Higher Ed
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...
Instructional Video9:32
Curated Video

Multi-Paradigm Programming with Modern C++ - Task Continuation

Higher Ed
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...
Instructional Video6:09
Curated Video

Multi-Paradigm Programming with Modern C++ - Coroutines on a Thread Pool

Higher Ed
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...
Instructional Video7:20
Curated Video

Multi-Paradigm Programming with Modern C++ - Copy and Move

Higher Ed
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...
Instructional Video7:49
Curated Video

Multi-Paradigm Programming with Modern C++ - Providing a Good Abstraction

Higher Ed
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. •...
Instructional Video5:34
Curated Video

Multi-Paradigm Programming with Modern C++ - Modules in C++ 2a

Higher Ed
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...
Instructional Video8:10
Curated Video

Multi-Paradigm Programming with Modern C++ - General Guidelines

Higher Ed
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...
Instructional Video4:07
Curated Video

Multi-Paradigm Programming with Modern C++ - When to Use Templates

Higher Ed
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:...
Instructional Video5:59
Curated Video

Multi-Paradigm Programming with Modern C++ - Class and Structs

Higher Ed
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...
Instructional Video7:53
Curated Video

Multi-Paradigm Programming with Modern C++ - Passing Things Around

Higher Ed
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,...
Instructional Video13:52
Curated Video

Multi-Paradigm Programming with Modern C++ - Coroutine Machinery

Higher Ed
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...