Talks and Short Courses
These
are a selection of some of Steve's recent conference talks and
tutorials. They range in length from ninety minutes to three
hours each.
Practical Design Patterns
in C++
An introduction to the
concept and use
of design patterns in the C++ context. While we do introduce the
student
to some of the concepts that underlie design patterns, most of our time
is
spent in highly practical examination of specific design patterns as
implemented in the C++ language. The
class includes sections that show how to employ patterns in
combination to
solve sophisticated design problems, and advice as to how to select
among
available patterns in a specific context. The course also covers
many of
the lesser known features of the C++ language and C++ programming
techniques
and idioms that are of practical importance when applying the
patterns. This is a shorter "tutorial" version of the full-length class.
High-Level Coding in C++
This talk
discusses how code can be written in
modern C++ to
minimize error and maximize programmer productivity without sacrificing
(and typically
improving) speed. In particular, we’ll
examine how to reduce or eliminate use of arrays, pointers, loops, and
the
if-statement.
Typelist Meta-Algorithms
We give a brief
introduction to typelists, a common
mechanism for creating and manipulating lists of types for compile time
manipulation. We then show how a
typelist may be used to generate type-based conditional code in a
maintainable
way. This in turn motivates development
of a suite of STL-like typelist meta-algorithms, meta-function objects,
and
meta-function adapters. We’ll finish up
by looking at sample applications of typelist meta-algorithms.
C++ Gotchas
What will it be this time?
Low-level coding errors? Mis-use
of idiom? Failure to defend one’s code
against summer interns? All of the
above? This talk will expose a
collection of new and old C++ gotchas and discuss how they can be
avoided or
corrected.
Mechanics and Applications
of Class Template Partial Specialization
Class
template partial specialization is a
straightforward C++ language feature that is vastly underused. This talk covers the basics of partial
specialization mechanics and shows how the feature may be used in
straightforward ways to customize code based on statically-available
information. We’ll also show how the
feature may be used in less obvious ways to supplant and simplify
function
template overloading, extract information about types, uninstantiate
templates,
and rebind allocators without using the rebind mechanism.
Cluing in the Compiler
Ever wonder exactly what
the standards committee was
thinking when they added the typename
keyword to the C++ language? This talk
discusses just how ignorant the compiler can be when translating
template code,
and why and when seemingly unnecessary uses of typename
and template are
required. Along the way we’ll examine a
version of the
Monostate pattern that allows the seamless addition and removal of
Monostate
members (at compile time) simply by referencing them, and elucidate the
syntactically challenging “rebind” mechanism of the standard STL
container
allocators. As a parting shot, we’ll
show how to use template un-instantiation to avoid the rebind mechanism
entirely.
Welcome Visitors
Does the Visitor pattern
have you stumped or just
annoyed? This talk will take you through
the standard GOF Visitor, Robert Martin’s Acyclic Visitor, and Andrei
Alexandrescu’s
ad hoc Visitor. By the end of the talk,
you and Visitor will come to understand and respect each other.
C++ Hierarchy Design Idioms
While C++ itself has
relatively few rules on how the
language may be employed, the community of competent C++ programmers
employs a
large set of implicit design and coding idioms.
This class examines a number of generally accepted low and mid
level
design idioms for class hierarchies.
We'll cover base and derived classes, coding for polymorphism
and
safety, and the interplay of various design forces on the eventual
shape of the
hierarchy.
C++ommon Knowledge
Many C++
projects are staffed by expert C or Java
programmers with only limited exposure to C++, or talented recent
university
graduates who have had only academic experience with the language. This is a real and present danger, since most
C++ code is being written by individuals like these, and is therefore
not what
most C++ experts would consider to be production quality.
This talk is designed to address this
pervasive problem by providing essential, common knowledge that every
professional C++ programmer needs to know—language, patterns, and
idioms—in a
form that is pared to its essentials and that can be efficiently and
accurately
absorbed.
Writing and Augmenting STL
Generic Algorithms
Effective use of STL
conventions to produce reusable and adaptable
generic algorithms.
Effective Use of Patterns
and Idiom
The importance of
convention, idiom, and patterns in modern C++ design
and coding.
Sleepers and Time Bombs
How to recognize bugs in
your code that are just waiting to happen at
some unspecified future time. Scary.
Writing STL Iterator
Adapters
Mechanics and usage of
the standard iterator adapters with advice on
how to write your own ad hoc adaptations.
Expert Operator Overloading
Just what
the title says. We cover every
nuance from
traditional use of nonmembers to permit conversion of the left
argument, all
the way to use of the curiously-recurring template pattern for
automatic code
generation, and everything in between.
We also include discussion of allied topics of
argument-dependent
lookup, infix vs. non-infix lookup, and member templates, template
members, and
argument deduction.
Function Pointers and
Function Objects
An in-depth discussion of
"C++ callable entities"; functions, function
pointers, function objects, pointers to member functions, and
tr1::function with advice on
how to employ them effectively.
Bit-Wise Templates
Combining C++ templates
with low-level bitwise operations with results
that are surprising, interesting, and useful.
Effective Use of RTTI in C++
How to avoid falling into
common coding and design errors with runtime
type information, and how to use RTTI correctly.
Forgotten C++ Coding
Techniques
A collection of coding
techniques from the past that are still useful
today.
Do You Copy?
What
everyone should know about C++ copy
operations; idioms,
mechanics, and common errors. We also
discuss the closely related areas of direct vs. copy initialization
semantics,
the return value optimizations, copy-like member template operations,
and effective
swap implementations.
Semantics
Consulting Home