Dan Saks


Dan Saks is the President of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. He has been a columnist for numerous publications, including The C/C++ Users Journal, The C++ Report, Embedded Systems Design, embedded.com and several other publications. Dan served as the first secretary of the C++ Standards Committee and contributed to the CERT Secure Coding Standards for C and C++.



Choosing the Right Integer Types in C and C++ (2018)

C and C++ provide an assortment of signed and unsigned integer types of various sizes. They give programmers a great deal of control over the speed and space efficiency of their programs. However, the variations in the integer types have turned out to be a major source of portability headaches and other frustrations. C and C++ offer an extended set of integer types that alleviate many of these problems. Unfortunately, many programmers don't seem to know how to use these types, or even that they are there. This talk explains many of these extended integer types and how you can use them to write better code.


East const but constexpr West (2018)

C++ syntax leaves programmers with some discretion about where to place the keywords const and constexpr in declarations.

As an "East const" advocate, I place const to the right of the type that it modifies. I encourage others to do the same.

Despite the similarities between const and constexpr, I do not recommend "East constexpr". I'll show you some insightful things about C++ declarations to explain why this makes sense.


Motivated Reasoning (2015)

The projector in the theater failed just before Dan was to present his talk on "Representing Memory-Mapped Devices as Objects". While the projector was being repaired, Dan kept the audience entertained by sharing some insights into human psychology and its impact on collaborative software development.


Representing Memory-mapped Devices As Objects (2015)

Programmers who develop embedded systems often have to assert direct control over hardware resources such as memory-mapped i/o registers. The longstanding practice has been to use concerns over performance as an excuse for writing some pretty nasty code — heavy in macros, casts, and pointer arithmetics. Such code is often hard to get to working and hard to maintain. It does not need to be so. This talk shows you how to model memory-mapped devices as C++ objects that are more robust, maintainable, and, at times, even more efficient than they would otherwise be.


Sooner Rather Than Later (2015)

Much embedded software demands high standards for reliability. The most effective way to catch bugs in your programs is to not let them in there in the first place. One of the best ways to do that is to code in a style that turns potential run-time errors into compile-time or link-time errors. This talk explains how you can use the C++’s type system along with other semantic information to turn questionable constructs into code that doesn’t build.