Tuesday, October 5, 1999

Updated MEC++ Errata; Talks at C++ World

Two topics:
- The MEC++ errata list has just been updated
- I'll be speaking at C++ World in Miami in December

I've just updated the errata page for More Effective C++. You'll find it
at http://www.aristeia.com/BookErrata/mec++-errata.html. I'd hoped to
include the latest changes in this mailing as a Mailing List Exclusive, but
I wasn't really set up for that. In the future, I'll try to organize my
bookkeeping so that when I update an errata list, I can include the changed
entries in the message that announces the updated list.

I've agreed to speak at the "C++ World" conference in Miami on December 2
and 3. For details, check out http://www.cwconference.com/. The talks I'm
going to give are described below. These are the descriptions I submitted
to the conference organizers, but the descriptions you'll see in brochures,
etc., will be shorter, because it's important that all conferences hack the
talk abstracts until they bear little resemblance to what the speaker
originally submitted. Ahem.

Real World C++ (Renamed "Succeeding with C++" at the behest of the
conference organizers. Don't ask.)

When Scott started consulting on C++ projects, he figured his biggest
challenges would center on the proper use of language features. He was
so naive. Over the years, he's discovered that the biggest obstacles to
success in C++ involve a little C++, a fair amount of
language-independent software engineering, and a healty dose of decent
management. This talk presents over a dozen specific guidelines that
Scott has found to significantly improve the chances of success on real
software projects in C++. Some guidelines focus on specific language
issues (e.g., casts, virtual destructors), while others focus on broader
matters (e.g., the need to embrace abstraction, the importance of
specifications, the need to develop staged releases). Compared to Meyers'
usual talks, this seminar is less intensively technical, but it covers a
broader array of issues, and it is definitely about C++ software
development.


Implementing operator->*

Most C++ programmers know little about operator->*, but the topic is both
interesting and instructive. Especially interesting is the use of
templates, including member and partially specialized templates. This
talk begins with a review of how operator->* is generally used, then
proceeds to examine two different ways to implement it for smart pointer
classes. It ends with a tantalizing idea: smart pointers to members.


The Strange Tale of auto_ptr

auto_ptr is a smart pointer template in the standard library with the
simplest of conceptual specificatons: an auto_ptr is an object that acts
just like a pointer, except it deletes what it points to when it (the
auto_ptr) is destroyed. This simple description turns out to mask a
design challege of considerable proportions, one that required two
fundamental rewrites during standardization, and even the final
specification for auto_ptr has noteworthy flaws. (For example, some of
its intended uses won't compile.)

This talk describes the tortured path auto_ptr travelled from initial
concept to final specification, focusing on the design challenges that
made auto_ptr so difficult to pin down. Attendees can expect to learn
not just about auto_ptr, but also about how several features of C++ can
interact to make a seemingly simple class extremely difficult to design.


The material in the talk on operator->* is the same as that published in
the current issue of Dr. Dobbs Journal.

Scott

Wednesday, September 22, 1999

New MIND Article; URL problem in DDJ Article

The October issue of Microsoft Internet Developer ("MIND")
(http://www.microsoft.com/mind/) contains an article by me, "Browsing
Innovations for Books on CD-ROM." The article describes the novel features
AW and I developed for the Effective C++ CD. This is the introductory
paragraph of the article:

What should a book on a CD-ROM look like? How should it behave? When I
began to think seriously about putting my book, Effective C++
(Addison-Wesley, 1998), onto a CD in the spring of 1998, I didn't
know. From what I could tell by talking to producers and consumers of
existing CD books, nobody else did either.

MIND makes the first part of the article available at their web site as a
teaser. The URL is
http://www.microsoft.com/mind/1099/browsing/browsing.htm. The material in
the article is quite similar to that in the paper Jason Jones and I
presented at the recent Conference on Human Factors and the web
(http://zing.ncsl.nist.gov/hfweb/), "Document Design for Effective
Electronic Publication". That paper is available at
http://zing.ncsl.nist.gov/hfweb/proceedings/meyers-jones/index.html. The
material in the MIND article is also similar to what I say in the CD's
introduction, and you can read that at
http://meyerscd.awl.com/DEMO/INTRO/INDEX.HTM.

(I should really be pushing you to track down a copy of the current MIND, I
suppose, but MS was a pain to work with on this article, plus they used the
incorrect product image in the article (the cover for EC++/2E instead of
the EC++CD), so I find it hard to get too excited about pushing you towards
them.)

I hope you like the MIND article (or the close cousins I mentioned above),
but please note that these pieces are *not* about C++, they're about
designing electronic documents.

In the meantime, it has been brought to my attention that DDJ munged a URL
during preparation of my article on operator->*. On page 36 of the current
(October DDJ), the correct URL is this:

http://www.xmission.com/~ksvhsoft/code/index.html

Typos like this are one of many reasons why working with magazines is a
pain and why I insist on typesetting my own books.

Scott

Wednesday, September 15, 1999

My DDJ Article on operator->*

The October issue of Dr. Dobb's Journal (http://www.ddj.com/) contains an
article by me, "Implementing operator->* for Smart Pointers." I just
received my issue in the mail today, so it should be generally available
now or quite soon. This is the introductory paragraph:

When I wrote More Effective C++ in 1995, one of the topics I examined was
smart pointers. As a result, I get a fair number of questions about them,
and one of the most interesting recent questions came from Andrei
Alexandrescu. He asked, "Shouldn't a really smart smart pointer overload
operator->*? I've never seen it done." I hadn't seen it done, either, so
I set out to do it. The result is instructive, I think, and for more than
just operator->*; it also involves insights into interesting and useful
applications of templates.

I wasn't thrilled when DDJ insisted on moving all my code examples into
separate listings, because I think it makes the article harder to read.
At some point in the future, I hope to make an HTML version of the article
available at my web site, and that version of the article would have the
code examples mixed in with the descriptive text (which is how I originally
wrote the article). If/when such a version is available, I'll let you
know.

I hope you like the article.

Scott