Thursday, December 16, 1999

October MIND Article is now On-Line

Well isn't it just like Microsoft to make a liar out of me? I got word
today that my October MIND article is now fully available on-line. You can
get to it at http://www.microsoft.com/Mind/1099/browsing/browsing.htm.

Scott

Wednesday, December 15, 1999

Updated errata lists; Article stuff; Effective STL Seminar

Three topics:

1. UPDATED ERRATA LISTS for Effective C++, More Effective C++, and
the Effective C++ CD

2. ARTICLE STUFF, including imminent on-line availablity of my October
DDJ article and advance notice of my upcoming CUJ article.

3. ADVANCE NOTICE OF MY EFFECTIVE STL SEMINAR, to be held in Portland,
Oregon, in June, 2000.


UPDATED ERRATA LISTS:
---------------------

On the off chance the world fails to end at midnight on December 31, I
updated my publications' errata lists for the new millennium.

- The errata list for Effective C++ is still at
http://www.aristeia.com/BookErrata/ec++2e-errata.html. New entries are
dated 5/24/99 or later.

- The errata list for More Effective C++ remains at
http://www.aristeia.com/BookErrata/mec++-errata.html. New entries are
dated 10/8/99 or later.

- The errata list for the Effective C++ CD continues to dwell at
http://www.aristeia.com/BookErrata/cd1e-errata.html. New entries are
dated 7/6/99 or later.

I asked AW to update the auto_ptr page that they maintain, but I have no
idea how long it will take them to do it. Fortunately, the change is quite
small. This is what I sent them:

At the MEC++ auto_ptr update page
(http://www.awl.com/cseng/titles/0-201-63371-X/auto_ptr.html), one
paragraph reads as follows:

As it turns out, the dust hasn't quite settled on auto_ptr, because some
minor errors have been detected in the standard's specification: it
doesn't quite say what the standardization committee wanted it to
say. When everything is taken care of, I'll update this page again to let
you know the details.

I'd appreciate it if you'd add the following sentence to the end of the
above paragraph:

(If you just can't wait that long, search for "auto_ptr" in the href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html">Active
Issues List for the C++ Standard Library
.)

Finally, I added email from Bill Wade to the M27 page (it's devoted to
determining whether an object is on the heap). That page remains at
http://www.aristeia.com/BookErrata/M27Comments.html.


ARTICLE STUFF:
--------------

DDJ has generously agreed to make my October article on operator->*
available on-line sometime in the near future. I'll let you know the URL
when they tell me what it is. This is very nice of the DDJ people, because
they don't generally make their articles available for free, so I hope
you'll send them fan mail. In the future, I expect all my magazine
articles to be available on-line a couple of months after they appear in
print, because I'm making that a standard condition when I submit things
for publication.

I've asked the MIND people to make my October article from there available
on-line, too, but I haven't heard back from them, and MS is not known for
its cooperative nature on these matters. Don't get your hopes up.

I'll have a new article in the February CUJ (unless it gets bumped to a
different issue between now and then). I'll use this mailing list to let
you know when the article is out, but let me say right now that I think the
article is one of the most important things I've written in a long time.
This is how it opens:

I'll start with the punchline: If you're writing a function that can be
implemented as either a member or as a non-friend non-member, you should
prefer to implement it as a non-member function. That decision
*increases* class encapsulation. When you think encapsulation, you
should think non-member functions.

I expect this to drop some jaws, but of course, that's the point :-)


EFFECTIVE STL SEMINAR:
----------------------

Recently, I've been looking into the STL in preparation for what I hope
will become a book on the topic written at the level of Effective C++. The
working title is -- duh -- "Effective STL". Yes, you heard it here first.
No, I don't know when the book will be done :-)

Regardless of whether the book comes to fruition, I'm planning to conduct a
hands-on seminar on effective use of the STL in Portland, Oregon, in June
of 2000, probably during the week of June 5-9. The basic idea will be a
combination of lectures and hands-on labs led by me, with the focus being
how to *use* the STL instead of dwelling on the tedium behind things like
iterator categories and what it means to be a model of EqualityComparable.
As in my other C++ books, the material will be broken down into bite-sized
guidelines, and I'm hopeful that this format will be as useful to C++
programmers using the STL as it has been for the non-STL parts of the
language.

I'll have details about the seminar (length, dates, cost, prerequisites,
etc.) in a mailing in the first half of January, but for the time being,
please try to set aside the time and budget to join me in June to learn how
to make *effective* use of the most revolutionary library I have ever seen.
As I mentioned, the seminar is tentatively scheduled to take place the week
of June 5-9, but if you have strong feelings about which week in June it
should occur, send your thoughts to Nancy Pastrano
(NPastrano@TrekServices.com); she'll be handling the logistics for the
event. Nancy's help leaves me time to mull over the significance of the
fact that the non-member algorithm "find" and the member algorithm "find"
don't generally behave the same way, so replacing one with the other does
more than just affect performance...

Scott

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