Video & On-Demand

Hardening C++ with Bjarne Stroustrup

An interview in Software Engineering Daily with Bjarne on the recent announcements by the NSA and the forthcoming CRA from the EU against the use of C++ based on security concerns.

Hardening C++ with Bjarne
Bjarne Stroustrup

From the interview:

Bjarne wishes for more support rather than calls to drop the use and teaching of C++ altogether. Especially in light of how much progress the C++ 17, 20 and 23 mean to the language but also how using the core guidelines and modern static analysis can reduce vulnerabilities considerably. 

Getting Started with Boost.Asio: Timers and Serial Ports -- Richard Thomson

Utah C++ Programmers has released a new video.

Getting Started with Boost.Asio: Timers and Serial Ports

by Richard Thomson

From the video description:

I/O operations are inherently asynchronous -- we don't know when input will arrive and when output will be generated. Network I/O can be particularly bothersome because of the long delays between sending a request and obtaining the response.

Boost.Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. Boost.Asio covers timers, serial ports, files, pipes and TCP/IP networking.

This month, Richard Thomson will give us an introduction to Boost.Asio concepts and asynchronous programming with this library. We'll look at how to use timers to notify our application of time passing and how to talk to serial ports asynchronously.

https://www.youtube.com/watch?v=XB3uEit5R_Y

Writing Native Win32 Applications with WinLamb and Modern C++ -- Richard Thomson

Utah C++ Programmers has released a new video:

Writing Native Win32 Applications with WinLamb and Modern C++

by Richard Thomson

From the video description:

The Win32 Windows API has been around for decades as a C API for GUI applications. At its heart, every Win32 application is a program that receives messages from Windows, decodes those messages and dispatches them to appropriate code for handling the message.

Graphical user interfaces are a natural fit for object oriented programming and C++ GUI frameworks like MFC (Microsoft Foundation Classes) were created to make writing GUI applications easier.

As Win32 applications evolved to incorporate COM (Component Object Model) objects, a need to write small components adhering to well defined interfaces became more important. Writing such components with MFC results in a heavyweight object and additional deployment dependencies. C++ libraries like ATL (Active Template Library) addressed the need to create interoperable binary components that were lightweight with minimal or no deployment dependencies.

The Windows Template Library (WTL) took the lessons learned from writing small COM objects with ATL and applied them to writing complete Win32 applications. The result is a complete library for writing Win32 applications using the static polymorphism of templates instead of the dynamic polymorphism of MFC.

Are there other ways to look at writing Win32 applications?

WinLamb is similar to WTL in that they are both header-only libraries that wrap the Win32 API. While a WTL program uses message map macros to select the appropriate handler for a message, WinLamb uses lambda functions for the message handlers and an internal dispatching mechanism.

This month, Richard Thomson will give us a walk through of using WinLamb to create Win32 applications. We'll look at how to create an application from scratch with CMake and using the project wizard in Visual Studio. (Since our application isn't cross-platform, but Windows only, we won't lose anything by using Visual Studio's wizard.)

From this skeleton application, we'll look at:

  • how to add message handlers to the main window
  • how to add controls to the main window
  • how to define and use resources
  • how to use a dialog box as the main window
  • how to separate GUI logic from application logic
  • Win32 API helpers provided by WinLamb

https://www.youtube.com/watch?v=2K52YX-vHv4

The C++ Language: Present and Future -- Daniel Garcia

This year we had a wonderful C++ start at Universidad Carlos III de Madrid. The Department of Computer Science and Engineering was honored to have Prof. Bjarne Stroustrup giving a seminar on C++ to start the semester.

We are always happy to have Bjarne Stroustrup with us. Since 2019 he holds a Honorary Doctorate by Universidad Carlos III de Madrid and he has visiting us several times.

Both talks were very well attended with a nice mix of professional developers from industry, students (bachelor, masters and PhD) and researchers and professors from several different departments.

This is a short summary of the two talks he gave:

Day 1: C++ 20: Reaching the aims of C++.

About the video

Out of necessity C++ has been an evolving language. I outline some early ideals for C++, some techniques for keeping the evolution directed, and show how C++20 comes close to many of those ideals. Specific topics ncludes type-and-resource safe code, generic programming, modularity, the elimination of the preprocessor, and error handling. Naturally, over the years, C++ has acquired many “barnacles” that can become obstacles to developing elegant and efficient code. That has been a recognized problem since the early days of C – Dennis Ritchie and I talked about it – so we must distinguish between what can be done and what should be done. The C++ Core Guidelines is the current best effort in that direction.

Day 2: Type-and-resource Safe programming in ISO Standard C++.

About the video

You can write C++ with no violations of the type system, no resource leaks, no memory corruption, no garbage collector, no limitation of expressiveness or performance degradation compared to well-written modern C++. This talk show how this can be achieved – and guaranteed – by the applying the C++ Core Guidelines, simple supporting libraries (mostly the ISO C++ standard library), and static analysis.

Many examples demonstrate how this can be done with code that’s dramatically simpler than older C++ (and C) code. This talk will touch upon RAII, type deduction, span, range checking, nullptr, initialization, invalidation,  casting and variants.


 

CopperSpice: A Peek at C++23

New video on the CopperSpice YouTube Channel:

A Peek at C++23

by Barbara Geller and Ansel Sermersheim

About the video:

C++23 is about to be published and we selected five of the most interesting changes. Two of these are enhancements to Lambda Expressions and the other three add new functionality.

Watch our new video to find out how the C++23 standard can improve readability, maintainability, and performance.

Please take a look and remember to subscribe.

Writing Functors with Boost.Lambda2 -- Richard Thomson

Utah C++ Programmers has released a new video:

Writing Functors with Boost.Lambda2

by Richard Thomson

From the video description:

Lots of standard algorithms require some sort of 'functor' or 'function object' in order to apply predicates and transforming functions to values. This makes the algorithms generic, but requires you to write your own function object classes or lambda functions, which can get a little noisy in the syntax.

Boost.Lambda2 is a library that allows you write lambda functions that look like simple expressions with placeholders for the arguments.

This month, Richard Thomson will give us a breakdown of the Lambda2 library in Boost that makes writing function objects simple and readable. We'll see how to use them with common standard algorithms before looking a little more deeply into how this library is implemented.

https://www.youtube.com/watch?v=3605p3oRwxY

I'll Build Myself -- Phil Nash

Screenshot_2023-01-02_112437.pngA new instant classic for the new year, by the great Phil Nash of C++ on Sea...