Monday, September 3, 2007

Astoria Seminar Update

In June I announced that I'd be participating in The Astoria Seminar, an
intensive C++ event taking place September 24-26 in Astoria, Oregon. I noted
that the event was limited to 55 attendees, so the attendee-speaker ratio was
guaranteed to be 11:1 or less. Right now, there are still a fair number of
spots open, so it's looking likely that the attendee-speaker ratio will be well
under 11:1.

I can't predict the future, but I think it's highly unlikely you'll ever get
another chance to attend an event with this kind of access to Andrei
Alexandrescu, Dave Abrahams, Walter Bright, Eric Niebler, and me. If you've
been thinking about attending the seminar, but have been undecided, I encourage
you to give it serious consideration. I really do think it's likely to be a
one-of-a-kind event.

For details on the Astoria Seminar, visit http://www.astoriaseminar.com/ .

Scott

Friday, June 15, 2007

The Astoria Seminar: September 23-26

On September 23-26 in Astoria, Oregon, I'll be participating in a C++ event that
I hope you'll find intriguing. The event is kind of hard to describe, because
it's sort of a conference, sort of a workshop, sort of a party.

Fundamentally, five people who know more about C++ than is probably healthy --
Andrei Alexandrescu, Dave Abrahams, Walter Bright, Eric Niebler, and me -- are
going to get together at a boutique hotel (the Hotel Elliot) and nifty meeting
space (the Banker's Suite) and talk serious C++ with the 55 people who choose to
attend. Breakfast is provided, so the talk starts early. After breakfast,
there will be some lecturing or interactive workshops (depending on who's
running the session). Topics are all over the C++ map: memory management,
expression templates, callbacks for C APIs, compiler internals, generic program
design. Then we'll have lunch. It's also provided, so there will be no
interruption to the flow of the conversation. After lunch, it's back to
immersive technical sessions. We'll all need a break after that, but in the
evenings something really interesting happens: we all return to the Banker's
Suite to hang out and talk. Or code. Or whatever. No formal sessions are
scheduled, but all five of us will be there, so if you want to talk code
generation with Walter, he'll be happy to do it. Want Eric to explain
expression templates to you -- or maybe his compile-time regex engine? He's on
board with that. Wonder what Andrei is doing for his PhD research or what new
tricks Dave has in mind for his Boost Python library? Ask 'em. I'll be there,
too, telling you what new book I'm hoping to write. (I'm always hoping to write
a new book, so this topic is always valid :-})

If this sounds like your kind of event, I encourage you to visit the Seminar web
site to learn more: http://www.astoriaseminar.com/ . Please note that
attendance is limited to 55, and we're not kidding, because the space won't hold
any more than that. This suggests that if you're interested, you'd best sign up
soon.

Astoria, by the way, is near the mouth of the Columbia River, so if you or your
family like the idea of a few days in a cute town near the Pacific Ocean, this
could be an opportunity for you to, er, photograph two seagulls with one camera
:-) The Seminar's evening hang-out sessions are optional and unstructured, so
if you'd rather build sand castles on the beach until the sun goes down (or
roast hot dogs and marshmallows on driftwood fires after it does), you can do
that, too.

Scott

Friday, April 6, 2007

April 25 Talk in Redmond, WA

I'll be giving a talk for the Northwest C++ Users Group on some recent work I've
been doing that actually borders on research. The fundamental idea is to find a
way to partition code such that calls can cross partition boundaries only if
certain conditions are satisfied. For example, thread-safe code would not be
able to call thread-unsafe code without explicit permission, ditto for
exception-safe code, etc. Users can define their own partition boundaries (e.g.
Scott's code should not be able to call Jill's code) , and, this being C++, the
rules should, as much as possible, be enforced during compilation. The talk is
called "Red Code, Green Code: generalizing const."

Details are available at http://www.nwcpp.org/Meetings/2007/04.html . I hope to
see you there.

Scott

Friday, March 16, 2007

Public Talks Scheduled for May and September

In May, I'll be speaking at the first Boost conference, to be held in Aspen.
I'll be giving a full-day tutorial on TR1 and some Boost libraries. The
conference site is http://www.boostcon.com/home .

In September, I'll be making my annual trip to Germany to speak on a variety of
C++ and software development topics. I'm especially excited about my seminar on
applying C++ in embedded systems, because this year it's two days long instead
of one.

You'll find details on these talks at the usual place:
http://www.aristeia.com/seminars_frames.html

I hope to see you at one of these events.

Scott

Thursday, January 11, 2007

Shakedown Webinar 2 Recording Now Available

The recording of today's webinar on the implementation of virtual functions
under multiple inheritance is now available. It's a little over an hour long.
There are two ways to view it. You can stream it from http://tinyurl.com/ydefmj
or you can download it (about 150MB) from http://www.aristeia.com/shakedown2.wrf
. The .wrf format requires the Webex player, which I believe will be
automatically downloaded and installed if you stream. If you choose to download
the file and play it locally, you may have to download and install the player
yourself; it's available at http://tinyurl.com/yk37c9 .

This recording is part of my webinar shakedown process, so I very much welcome
all comments. Good or bad, I'd like to know what you think about getting and
viewing the recording as well as about anything in the recording or the webinar
itself. I want to learn how to make webinars and their recordings as effective
and useful as possible, so the more information I get from you, the better job I
can do.

Thanks for your help.

Scott

Tuesday, January 9, 2007

Note about Thursday's VoIP-Based Webinar

This is a quick note for people who are interested in participating in
Thursday's VoIP-based webinar. I've just found out that Webex supports VoIP
audio *only on Windows*. You may be able to hear and/or speak using other OSes,
but for best results, please try to participate under Windows. (On an
experiment I performed recently with a colleague on a Mac, he was able to hear
me, but I could not hear him.)

I apologize for not knowing about this restriction earlier, but these are
shakedown webinars. This is one of the things that just got shaken loose.

Thanks,

Scott

Saturday, January 6, 2007

Signup Information for Shakedown Webinar #2 on Thursday

To register for the second shakedown webinar on January 11 (covering the
implementation of virtual functions under multiple inheritance) click on

https://eval.webex.com/eval/j.php?ED=89967787&RG=1

Fill out the required fields, and click "Register Now." Webex will
send you email telling you how to join the meeting when it starts.

Compared to the first webinar, I plan to make the following changes:
- Audio will be available only via VoIP. You'll need a headset or speakers
to hear the presentation and a microphone to speak.
- I'll record the webinar and make it available for viewing later.

A PDF copy of the materials I'll be presenting is available now at
https://eval.webex.com/meet/scott_meyers28 ; click on the "Files" tab.
You may wish to print a copy and have it available during the talk.

The presentation will start promptly at 10:00AM Pacific time on January 11.
Before you can join, you'll need to make sure that the Webex MeetingManager
software has been installed. This should happen automatically when you
join the meeting (nobody reported problems last week), but you may want to
install the software in advance by following this link:

https://eval.webex.com/eval/meetingcenter/mcsetup.php

I'll be in the virtual meeting room about 5 minutes before the presentation
starts to give a brief overview of the Webex features you're most likely to
find useful, e.g., how to raise your virtual hand, how to send text
messages during the talk, how to disable live video of me, etc.

I look forward to having you in the webinar on January 11 and getting your
feedback after it's over. If you have any problems or questions about
signing up for the webinar, let me know: smeyers@....

Thanks,

Scott

Friday, December 29, 2006

Signup Information for January 4 Shakedown Webinar

To register for the shakedown webinar on January 4 (covering the
implementation of virtual functions under single inheritance) click on
this link,

https://eval.webex.com/eval/j.php?ED=89939522&RG=1

fill out the required fields, then click "Register Now." Shortly
thereafter, Webex will send you email telling you how to join the
meeting when it starts.

The presentation itself will start promptly at 10:00AM Pacific time on
January 4, but before you can join, you'll need to make sure that the
Webex MeetingManager software has been installed. This is supposed to
happen automatically when you join the meeting, but I'm believer in
taking steps to thwart Murphy, so I encourage you to install the
software in advance by following this link:

https://eval.webex.com/eval/meetingcenter/mcsetup.php

Installing this software in advance will also speed your entry to the
meeting, because there will be no need to download and install the
MeetingManager at that time (unless they've done an upgrade in the
interim, which is always possible...).

My expectation is that many of you have never used Webex before, so
I'll be in the virtual meeting room about 10 minutes before the
presentation starts to give a brief overview of the Webex features
you're most likely to find useful, e.g., how to raise your virtual
hand, how to send text messages during the talk, how to modify the
Webex screen layout, etc. (Unbelievably, Webex has no canned video
explaining this stuff.)

My understanding is that there is no limit to the number of people who
can attend this webinar, but only the first 125 people to call in to
the meeting will be able to speak. Anybody beyond that will be able
to hear, but not speak, though everybody in the meeting will always be
able to use text messages to submit comments and questions during the
presentation. Calling in to the phone bridge (audio portion of the
webinar) should be toll-free from a variety of countries; a link to
country-specific situations will be included in the email you get
after you register.

I look forward to having you in the webinar on January 4. Please
remember to show up about 10 minutes early if you want to have me
explain the basics of the Webex client interface.

If you have any problems or questions about signing up for the
webinar, let me know: smeyers@....

Thanks,

Scott

Thursday, December 28, 2006

Free "Shakedown Webinars" on Implementing Virtual Functions

Executive Summary: I'll be holding free online webinars on January 4 and 11 to
evaluate webinar technology. The webinars will cover the implementation of
virtual functions under single and multiple inheritance.


"Webinars" are live seminars broadcast over the Internet. At their best,
webinars give me a way to offer an experience akin to a face-to-face seminar,
but without the need for us to be in the same place. Because the seminar is
live, you can still ask questions or make comments during the presentation. You
can still see the presentation materials as I display them, and you can still
see me point to and annotate specific parts of the materials as I speak. You
can even watch me during the presentation, though my current webcam provides
only low-qualify video. For my part, I can still whip up code examples, and I
can still bring up web sites and walk you through them. The experience can be
much as if I were there with you, except I'm not.

The foregoing assumes that everything goes well. That's quite an assumption.
Before I can embrace webinars, I need to have a better understanding of how they
really work for the kinds of things I want to use them for. That's where you
come in. I've done small-scale testing of webinar technology, but now I want to
see how well it works with more people in more places using a wider variety of
platforms. To that end, I'm scheduling a two-part webinar for the next two
Thursdays: January 4 and January 11. Part 1 will cover the implementation of
C++ virtual functions under single inheritance, while part 2 will extend the
treatment to multiple inheritance. Both seminars will be free, and both will
tentatively take place at 10:00 AM Pacific Time (GMT-8 hours). Each should run
no more than an hour. Because one of the things I want to examine is
telephone-based audio versus VOIP-based audio, part 1 will use a conventional
phone bridge (i.e., you call a toll-free number to connect to the audio part of
the webinar), while part 2 will use VOIP (i.e, you'll need audio capabilities in
your computer to hear the presentation or to speak during it).

Some of the details of the webinars are still undecided, so at this point, I
suggest you simply set aside the days/times (4 and 11 January at 10AM Pacific
time) if you want to participate.

These are "shakedown webinars," so a primary goal is to learn what doesn't work
as well as it should. To that end, after each webinar I'll explicitly ask for
suggestions on how I can make future webinars more effective. There is a school
of thought that lecture-based webinar presentations are inherently ineffective
-- that they are vastly worse than face-to-face versions of the same
presentations. I'm hoping that this is not the case, but I'm a guy who likes to
buttress his hopes with experience. In addition to testing the technology
behind webinars, then, we'll also be testing the practicality of moving my
face-to-face presentations to the web in the first place.

The webinars will use Webex, a browser-based system that runs on many platforms;
the full list is available at
http://support.webex.com/support/system-requirements.html . To use it, you'll
need to download and install some software, though this is normally handled
automatically. If this sounds intrusive or scary, please withhold judgement
until you've had a chance to see how things work on your platform.

I'll send out a more detailed description of how to sign up for the seminars
when I know them myself -- within the next few days. I hope you'll want to
participate in these shakedown events, because the more people who attend, the
better I'll be able to evaluate how well Webex is up to the tasks I have in mind
for it. Besides, the implementation of virtual functions is interesting stuff:
vptrs, vtbls, how vptrs get set, dealing with invocation of pure virtual
functions, object offset adjustments under single and multiple inheritance,
thunks, vtbl deltas, compiler options to let you know what's going on, etc. --
all this will be covered in the talks.

If you're interested in helping me evaluate webinars and webinar technology,
please set aside about an hour on January 4 and 11 at 10AM Pacific time, and
watch this mailing list for more information on how to participate.

Thanks,

Scott

Thursday, December 21, 2006

Upcoming Talks in 2007

The first half of 2007 is looking to be a busy set of conference months for me.
I'll be speaking at the new Software Development Best Practices India conference
in January (in Hyderabad, Chennai, and Bangalore); at Software Development in
Santa Clara in March; and at the Embedded Systems Conference in San Jose in
April. As always, details on my upcoming public talks are available at
http://www.aristeia.com/seminars_frames.html .

It's not quite official yet (so it's not yet at the page mentioned above), but
I'll almost certainly be giving a talk at the inaugural Boost Conference in
Aspen, Colorado, in May. You can read about that conference at
http://www.boost.org/more/BoostCon07.html . In fact, there still time to submit
talk proposals -- check out
http://www.boost.org/more/BoostCon07_session_call.html . FWIW, my talk there
will likely bear a close resemblance to the newest entry in my list of training
seminars: "An Introduction to TR1 and Boost." Details on that are at
http://www.aristeia.com/TR1andBoost_frames.html .

Whether at Hyderabad, Chennai, Bangalore, Santa Clara, San Jose, or Aspen, I
look forward to seeing you at one or more of these events in the first half of
2007.

Scott

Wednesday, October 4, 2006

New interview; upcoming conferences

There's a new interview with me available at my Articles and Interviews page.
The interview was done in English, then translated into German, and it's the
German version that was published. You'll find links to both versions at
http://www.aristeia.com/publications.html

I haven't added the information to my Upcoming Talks page yet, but in January
I'll be participating at a three-city conference in India. You can see a
marketing-heavy overview in the press release at
http://www.ddj.com/pressroom/090506.htm

I'm on the Organizing Committee for the first-ever Boost conference, to be held
next May in Aspen, Colorado. Details are available at
http://www.boost.org/more/BoostCon07.html. I currently plan to submit a talk
proposal or two, but the Call for Proposals isn't yet out, so whether I'll be
speaking there is unknown. If you're heavy into Boost, keep an eye out for the
Call for Proposals and make one or more submissions. Maybe you'll be the person
who bumps me out of a speaking spot!

Other talks in October and November I've already announced for Portland, Oregon,
and Frankfurt, Germany, continue to be listed on my Upcoming Talks page,
http://www.aristeia.com/seminars.html

Scott

Monday, October 2, 2006

Survey regarding new electronic version of my books

My publisher and I are planning to put together a new electronic version of my
books to replace the current CD version (which has only the second edition of
EC++ and no copy of ESTL). To that end, Addison-Wesley is soliciting input,
which their crack marketing team puts this way:

Help Addison-Wesley with NEW edition of C++ CD from Scott Meyers
With the successful publication of “Effective C++, Third Edition” Scott Meyers
and Addison-Wesley Professional are now planning to revise the CD based on that
work. To begin, we wish to survey both users and non-users to understand your
needs and desires for any new version.
User: If you are a current or past user of the CD, and you would like to help
guide its future development, we ask that you respond to the survey posted at
http://survey.pearsoncmg.com/MEYERSS6\
.htm.
Non-User: If you haven’t used this CD in the past and would like to help guide
the development of a publication you might well find useful in your work, we ask
that you respond to the survey posted at
http://survey.pearsoncmg.com/CPLUSNU6\
.htm.
Not only will you have the opportunity to influence our decisions, but, complete
the survey today and receive a 50% off coupon from awprofessional.com and enter
for the chance to win your choice of either a one-year subscription to a Safari
MAX 30-slot Bookshelf or 12 Pearson Technology Group books of your choice.
Surveys end, October 13, 2006

I'd be grateful if you would take whichever of these surveys is appropriate for
you. Both Addison-Wesley and I want to make sure we produce a product in
electronic form that will truly help you get the most out of the information in
my books.

Thanks,

Scott

Wednesday, September 6, 2006

Part 5 of "A Pause to Reflect" now up at TCS

This final list is a collection of my five personal most meaningful C++-related
"Aha!" moments. You can find it at
http://www.artima.com/cppsource/top_cpp_aha_moments.html.

Scott

Wednesday, August 30, 2006

Part 4 of "A Pause to Reflect" now up at TCS

This week's list is my picks for the five most important people in the history
of C++. You can find it at http://www.artima.com/cppsource/top_cpp_people.html.

Scott

Wednesday, August 23, 2006

Part 3 of "A Pause to Reflect" now up at TCS

This week's list is my picks for the five most pieces of software in the history
of C++. You can find it at
http://www.artima.com/cppsource/top_cpp_software.html .

Scott

Wednesday, August 16, 2006

Part 2 of "A Pause to Reflect" now up at TCS

This week's list is my picks for the five most important non-book publications
in the history of C++. You can find it at
http://www.artima.com/cppsource/top_cpp_publications.html .

Scott

Sunday, August 13, 2006

Two Changes to Mailing List Policy

Yesterday I updated the web page describing my mailing list polices
(http://www.aristeia.com/MailingList/) to reflect a couple of things I've been
doing for a while, anyway. First, I eliminated mention of "RFAs" (requests for
assistance), because I found that I could almost never bring myself to bother
you people with situations where I needed help. (I ended up bothering other
people.) Second, I no longer post to my mailing list when I make updates to my
publications' errata lists. I used to batch the updates and post to the list
when I did a batch, but now I put updates online as issues come to me. The
result is that there is no longer much of a delay between the time I know about
an issue and you can, but updates are now too frequent to fit into the
low-volume charter of this mailing list. Probably the proper solution to this
problem is to have my web site offer an RSS feed for errata updates, but I
currently have neither the knowledge nor the time to implement such a feed, so
for the foreseeable future, the best way to find out whether there are any new
updates for my books or my CD is to check the appropriate web pages from time to
time.

Scott

Wednesday, August 9, 2006

New series of articles now appearing at TCS

For the next five weeks, I'll have a short article at The C++ Source (TCS --
http://www.artima.com/cppsource ) listing the 5 most important C++ somethings in
each of 5 categories. The series is called "Five Lists of Five," and in Part 1,
I list what I consider to be the five most important C++ books of all time. You
can find it at http://www.artima.com/cppsource/top_cpp_books.html . Unlike most
of my writing on C++, this series isn't very technical, but I hope you find it
interesting enough to tune in each week to see what five things I've decided are
more important than all their peers.

Happy reading,

Scott

Thursday, August 3, 2006

Upcoming Talks Through Year-End

I've scheduled a number of talks on a variety of topics this fall near Portland,
Oregon and in Germany. The details are available at my Upcoming Talks Page
(http://www.aristeia.com/seminars_frames.html), but the overall summary is shown
below:

20 Sep Dresden, Germany Better Software -- No Matter What
21 Sep Dresden, Germany Designing & Implementing Effective C++ Classes
22 Sep Dresden, Germany High-Performance C++ Programming
25 Sep Stuttgart, Germany What's New in Effective C++?
26 Sep Stuttgart, Germany Effective C++ in an Embedded Environment
27 Sep Stuttgart, Germany Design Patterns, Templates, and Policy-Based
Design
11 Oct Portland, Oregon The Keyhole Problem
26 Oct Portland, Oregon An Introduction to C++ Library Functionality
in TR1 and Boost
9 Nov Beaverton, Oregon Effective C++ in an Embedded Environment
27 Nov Frankfurt/Main, Germany Concepts and Architecture of the STL
28 Nov Frankfurt/Main, Germany Programmer Discretion and Software Quality

Also, I have a five-part C++-related article that will start appearing soon (I'd
hoped it would have started appearing by now). I'll post details to this
mailing list when they are available, but I thought you might be interested to
know that I still do a little writing from time to time :-)

Scott

Friday, April 28, 2006

Latest ESDS Book, "Code Quality"

The latest book in my Effective Software Development Series has just been
published, Diomidis Spinellis' "Code Quality." This book is a companion to
Spinellis' earlier "Code Reading," but it also stands on its own. It addresses
the "ilities" of quality software: reliability, maintainability,
comprehensibility, etc, -- the non-functional aspects of quality.

Like "Code Reading," all the examples in the book are real and drawn from
open-source software projects.

I encourage you to check out "Code Quality." It's web site is
http://www.spinellis.gr/codequality/.

Scott

Tuesday, January 31, 2006

Talks in Europe in April and September

I've just updated my "Upcoming Talks" page
(http://www.aristeia.com/seminars_frames.html) to include public talks I'll be
giving in Oxford, England, in April and in Dresden and Stuttgart, Germany, in
September. For details, check out the page and the links it contains.

I hope to see you at one or more events in 2006.

Scott

Friday, December 9, 2005

Upcoming Talks Posted

I've just updated the list of public and open-enrollment talks I'll be giving in
January, February, and March of next year. All are near Portland, Oregon, or
Santa Clara, California. There's quite a mix of topics, including a couple of
new talks I've never given before. Details are available at the usual location:
http://www.aristeia.com/seminars.html.

I hope to see you at one or more talks next year.

Scott

Thursday, October 6, 2005

Do you have a 5th printing of Effective STL?

Each time a new printing of one of my books comes out, I'm supposed to get
a copy. Normally I do, but there are occasional snafus, and I recently
realized that I lack a copy of the 5th printing of Effective STL. Worse
yet, my publisher is unable to find one. I'd really like to have a copy of
the 5th printing, so if you have one, I have a deal for you.

I spent the last two days updating ESTL for the upcoming 7th printing (you
can check out the panoply of changes at
http://www.aristeia.com/BookErrata/estl1e-errata_frames.html), and I'm
willing to trade an autographed copy of the new printing (when it comes out
in a few weeks) for a copy of the 5th printing, ideally a 5th printing in
pristine condition -- no writing in or on it, no folded pages, etc. If you
have such a printing and are interested in a trade, please let me know.

Thanks,

Scott

PS - The printing number is at the bottom of the copyright page.

Wednesday, September 14, 2005

New Pseudo-Publication: An Annotated Draft Article

A lot of my job is thinking about C++ programming and writing up my
thoughts. Sometimes I get midway into a writing project, but, for one
reason or another, I abandon it before it's ready for publication. In the
past, such not-ready-for-prime-time documents simply sat on my hard drive,
swirling round and round in the purgatory of perpetual unfinishedness.
Now, thanks to the wonder of web publishing, even stuff not worthy of
publication can be published! (In my more cynical moods, I call such
publications "blogs.")

Today I made available on the web an annotated draft of an article I
started but now plan to never finish. Here's an overview, taken from the
document I've made available:

In the late summer of 2004, I became interested in identifying the best
return type for factory functions. I ultimately drafted an article on the
topic, which I intended to submit for publication in some magazine. I sent
the draft to a number of people for comments, but then I got caught up in
finishing Effective C++, Third Edition, and by the time I got back to the
article, it was many months later.

As I reviewed the article and the comments I'd received on it, I realized
that (1) a lot of the material had been incorporated into the new version
of Effective C++, where I'd done a better job writing it up, and (2)
revising the article for publication and bringing it up to date would
require more time and energy than I had available. Still, I didn't want to
abandon the article completely, because (1) I'd already put a lot of time
and energy into it, and (2) I felt that some of the material -- notably the
interactions of auto_ptr and tr1::shared_ptr -- continued to be worthwhile.
I thus decided to annotate my November 2004 draft with comments on things
I'd change if I were to revise the article for publication, then make the
annotated draft available on the web. The result is what you see below.

...

I hope that the technical information in the draft is interesting and
useful, but I also hope that this document sheds some light on the process
of producing something ready for publication.

If you're interested in reading an article that, um, isn't really worthy of
your time, check out
http://www.aristeia.com/Papers/resourceReturnProblem.txt.

FWIW, I don't plan to make a habit of this. I finish most things I start.

Scott

Monday, September 12, 2005

C++ Connections in Las Vegas in November

This November, the "C++ Connections" conference will take place in Las
Vegas. The lineup for this show is very strong, and I'm not saying that
just because I'm both a speaker and a member of the Program Committee.
Microsoft is a major sponsor of the show, so there will be lots of C++/CLI
expertise there, but there will be lots of platform-independent material,
too. The two talks I'll be giving (using the STL efficiently and modeling
memory-mapped IO) are listed at my "Upcoming Talks" page
(http://www.aristeia.com/seminars_frames.html), but I encourage you to take
a look at the full schedule at
http://www.cpp-connections.com/shows/cppfall2005/, because the variety and
quality of the talks and speakers is really quite remarkable.

There is no doubt that this event will be one of the strongest C++ events
in 2005 -- and probably 2004 and 2006, too. If there is a chance that you
can participate, I encourage you to give it strong consideration.

Scott

Friday, September 2, 2005

Upcoming Talk in Bellevue, Washington

On Wednesday, September 21, I'll be speaking at the Northwest C++ Users
Group in Bellevue, Washington. The topic is "Two View of C++," and you can
get all the details at http://www.nwcpp.org/Meetings/2005/09.html.

I hope to see you there.

Scott

Wednesday, August 24, 2005

Revised Book Errata Update Policy

In the past, I've collected bug reports for my books and then updated the
web pages two or three times each year, posting to this mailing list the
latest changes to the errata pages. This has been slightly less hassle for
me, but it's not been ideal for readers, who might go months without being
informed of errata that had been reported.

Since publication of EC++/3E, I've been trying to update the books' errata
pages on an ongoing basis, adding new issues as they come in. This
essentially eliminates the time lag between a bug being reported and it
appearing at my web site, but because I don't want to increase the
frequency of postings to this mailing list, it means that I no longer have
an easy way to identify the latest bug reports to come in.

At some point, I hope to have a more sophisticated errata system that would
allow, for example, filtering errata based on when they were reported. I'd
hoped that I could cajole Addison-Wesley into providing such a system for
use by all their authors, but it's become clear that that is unlikely to
happen. For the time being, then, there will be no easy way to identify
the most recent additions to my books' errata lists. On the plus side,
when you visit the errata lists, you should see a comprehensive listing of
all the issues that have been reported.

I hope you find the errata lists useful. They're my Hall of Shame, but I
am always interested in comments on how my publications can be improved.

Scott

Tuesday, July 26, 2005

Two Interviews; Updated EC++/3E Errata

Two more interviews with me are now available:
- Q&A with Bookpool customers: http://www.bookpool.com/ct/98031
- Q&A with LinuxPlanet:
http://www.linuxplanet.com/linuxplanet/interviews/5942/1/

Also, I've now updated the EC++/3E errata list with the latest bug reports
and "interesting comments." It's at the usual place:
http://www.aristeia.com/BookErrata/ec++3e-errata_frames.html

Scott

Monday, June 13, 2005

Brief Interview; EC++/3E Errata

As part of the rollout of the new edition of Effective C++, I've done a few
interviews, and a short one is now available at
http://techrepublic.com.com/5100-3513_11-5735561.html?tag=nl.e606

Also, I've posted the inevitable first set of errata for the book at
http://www.aristeia.com/BookErrata/ec++3e-errata_frames.html
Nothing too serious so far, I'm pleased to report.

Scott

Tuesday, May 24, 2005

Two more EC++/3E Sample Items

Two more sample Items have now been made available. One of them is Item 9
("Never call virtual functions during construction or destruction"). You
can get that via the Bookpool page for 3E (http://www.bookpool.com/ct/197),
where you can also read about how to win a chance to interview me. They
apparently think this is something you might want to do :-) I don't get any
kind of kickback on purchases through Bookpool, but I can tell you that the
people there seem very, very nice, so I encourage you to check out their
site.

The other Item now available is at Addison-Wesley's page for 3E. The Item
is #47 ("Use Use traits classes for information about types"), and the URL
is
http://www.awprofessional.com/content/images/0321334876/items/meyers_item47.pdf

Enjoy!

Scott

Friday, May 6, 2005

Two Book-Related Questions

Now that the third edition of Effective C++ is done, I have time to turn my
attention to two other book-related issues, and I'd like your feedback.

- ELECTRONIC PUBLICATION. We'd like to come out with a new electronic
version of all three of my books to replace the current CD (which has
only two books on it). Any comments you have on the proper format and
feature set for such a product would be most welcome. Should we again
use an HTML-based approach on CD? Should we go with PDF instead? Is
there some other format or delivery mechanism that would be most useful?
Please let me know your thoughts on how you'd like to electronic versions
of my books made available.

- ERRATA LISTS. Currently, my book errata lists are hand-coded HTML. It's
so primitive, it's not even retro. It's ugly, you can't do things like
search for all entries for a particular page or printing or made after a
certain date, etc. It is, quite honestly, an embarrassment, but it's
easy for me to maintain, there are only so many hours in a day, and one
has to prioritize, etc. Still, I'd like to do better. If you have a
suggested way to approach this problem, or if you know of errata sites
for other books/CDs/etc. that do this particularly well, please let me
know.

Thanks,

Scott

Tuesday, May 3, 2005

EC++/3E Sample Item Now Available

Addison-Wesley has just made Item 27 from EC++/3E ("Minimize Casting")
available for download at
http://www.awprofessional.com/content/images/0321334876/items/meyers_item27.pdf.
This means that in approximately 8 minutes, I should start getting bug
reports...

Scott

Friday, April 29, 2005

EC++/3E is Finished

Just a quick note to let you know that I sent final camera-ready copy of
the third edition of Effective C++ to my publisher last week. I expect
physical books to exist in bookstores around the end of May. Between now
and then, there will be sample Items posted at various locations, and it
looks like at least one will appear as an article in DDJ. I'll make
announcements here when those things happen.

Sample Items and magazine articles are part of a marketing campaign
designed to whip you into a buying frenzy, but if you're already gripped by
frenzy and like to order books from Amazon, I'd appreciate it if you'd do
it via the following link, because then I get a small kickback from Amazon.
(The cover image, ISBN, and ordering information for the book is correct,
but most of the textual information (e.g., reviews) at that site is for the
second edition, not the third, sigh.)


http://www.amazon.com/exec/obidos/tg/detail/-/0321334876/ref=ase_scottmeyersho-2\
0/103-3864411-8060659?v=glance&s=books

I can't in good conscience fail to note that you can buy it for less at the
Addison-Wesley web site, where I don't get a kickback, but where the
supporting information corresponds to the new edition. The URL for that is

http://www.awl.com/cseng/titles/0-321-33487-6/

I hope you enjoy the third edition of Effective C++. It's a significant
update, as you'll be able to see from the information at the AW web site.

Scott

Wednesday, April 6, 2005

Partnership with DevelopMentor; September Talks in Germany

Two things:
- New training partnership with DevelopMentor.
- September talks in Ludwigsburg, Germany.

TRAINING PARTNERSHIP

For some time now, demand for my training services has outstripped my
availability, and I've been looking for a way to address this mismatch
without compromising quality. I ultimately decided to enter into a
partnership with DevelopMentor, a training company I've known since
1995. I've worked with the DevelopMentor people as a class instructor, as
a class attendee, and as a provider of training materials, and I've always
been impressed with their way of treating people (well), the quality of the
training they provide (high), and their commitment to maintaining these
ideals (consistent). As a result of the partnership, DevelopMentor will
have exclusive access to my training materials and will be able to offer my
courses using instructors I've personally approved. Their web site is
http://develop.com/ and their main page for my courses is
http://develop.com/us/technology/technology.aspx?tech=7


SEPTEMBER TALKS IN GERMANY

As I've done for the past several years, I'll be giving a week of talks in
Germany in the fall. The talks themselves will be in English, though, if
you are particularly unlucky, I may try to speak to you in German if you
are there. You'll find a list of the talks at the usual place:

http://www.aristeia.com/seminars.html

Scott

Saturday, January 22, 2005

Updated Errata for MEC++ and ESTL

I just updated the errata pages for MEC++ and ESTL. You'll find them at
the usual places
(http://www.aristeia.com/BookErrata/mec++-errata_frames.html and
http://www.aristeia.com/BookErrata/estl1e-errata_frames.html), but the new
entries are as follows:

For MEC++:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
9/16/04 fb Many Many single-argument constructors in the book
would best be declared explicit. [This bug
report should be combined with sk's existing
3/5/96 Interesting Comment on the same topic.]

1/22/05 tk 54 As noted above by cc about page 50, fully
constructed objects will be automatically
destroyed if an exception is thrown, but this
guarantee applies to local (i.e., auto) objects
only if the exception is caught. Add a footnote
alluding to the footnote on pg. 50.

10/27/04 ms 67 In 1st para, should also mention that a catch
clause for runtime_error can also catch
underflow_error exceptions.

9/12/04 nd 70 In code at bottom of page, both "what" member
functions should be declared const.

9/12/04 nd 71-2 Once the decision to catch by reference has been
made, a decision must be made about whether to
catch by refernce-to-const. As always, const
should be used unless the handler needs to be
able to modify the exception object.

8/24/04 ms 155 HeapTracked::operator delete incorrectly throws
an exception if asked to delete the null pointer.
It should do nothing in that case.


For ESTL:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
9/18/04 dxm 44 The comment next to the call to remove_copy_if
near the bottom of the page could suggest that
values are removed from c before copying them to
goodValues. In fact, c is not modified at all;
undesired values are simply skipped during the
copy. Reword.

12/21/04 nds 67 In the description for resize, it's not true that
if n is less than the current size, new
default-constructed elements will be added.
Rather copies of a single
default-constructed element will be added.


Scott

Sunday, January 9, 2005

New book in my Series; Updated "Upcoming Talks" List

The latest book in my Effective Software Development Series, Bill Wagner's
Effective C#, has recently been published, leading me to hope that people
will stop asking me when I'm going to write it :-) I learned a lot from
reading it, and I think you will, too. For details on the book, check it
out at AW (http://www.awprofessional.com/title/0321245660) or Amazon
(http://www.amazon.com/exec/obidos/tg/detail/-/0321245660/qid=1105253646/sr=8-1/\
ref=pd_ka_1/104-5668479-8651933?v=glance&s=books&n=507846).

You might also want to check out my updated "Upcoming Talks" page at
http://www.aristeia.com/seminars_frames.html, because there are five new
listings for March (four at the Software Development conference).

I wish you all a happy, healthy, and prosperous 2005,

Scott

Wednesday, November 10, 2004

New Open-Enrollment Seminars Scheduled

After I announced the existence of my new training course, "What's New in
Effective C++?", several people wrote to ask when it would be available for
enrollment. One thing led to another, and now I've scheduled two new
open-enrollement seminars at OGI (in Beaverton, Oregon) in January:

18 Jan 2005: Better Software -- No Matter What
19 Jan 2005: What's New in Effective C++?

You'll find links to all the details on these seminars (as well as to the 15
December offering of "Effective C++ in an Embedded Environment") at my "Upcoming
Talks" page, http://www.aristeia.com/seminars_frames.html

I hope to see you at one or more of these seminars.

Scott

Monday, November 8, 2004

Wanted: Candidate reviewers for EC++/3E

I'm making decent headway on the next edition of Effective C++, but I have
a problem: I need to find a few good pre-publication reviewers to read my
draft and tell me how I can improve it. Now, I know all kinds of C++
experts, but the target audience for my book isn't experts, it's practicing
programmers who are at roughly an intermediate level of knowledge and
experience with the language. As somebody who subscribes to this mailing
list, it is highly likely that you do NOT qualify; you already know too
much. However, perhaps you know somebody who might qualify, somebody who
is comfortable with the basics of C++, but who is interested in knowing
more. If you do, and if that person would be willing to undertake the hard
work of reading 250-300 pages of not-fully-refined prose and offer detailed
suggestions on how the book could be improved (without regard for whether
they will hurt my feelings -- I *need* to know the bad stuff), and if that
person would be available for the task beginning sometime in January and
ending no more than about a month later, I'd appreciate it if you'd have
them contact me.

I don't need very many people for this -- maybe 2 or 3. My preference is
to have a small number of high-quality reviewers rather than a large number
of poorer-quality reviewers. But my need for this small number of
high-quality reviewers is great, because I can't produce a book that's
truly useful to its target audience if I don't get advance feedback from
people in that audience. Experts can help me identify subtle coding or
reasoning errors, but non-experts can tell me "I have no idea what you are
talking about in this paragraph," and that's the kind of thing I really
need to know.

There's no monetary compensation for this work. Rather, people who do it
get (1) a chance to make a real impact on the final version of the book,
(2) an autographed copy of the final book, possibly with a custom cover
that only a few people will get (I'm not sure about that last part, I have
to work it out with my publisher), and (3) my sincere gratitude.

People who are interested should contact me directly.

Thanks very much for your help with this.

Scott

Wednesday, November 3, 2004

New Training Course; Updated Projects List

I've added a new course to my "Training" page
(http://www.aristeia.com/whatsNewInEC_frames.html). It's a much more
detailed description of the "What's New in Effective C++?" seminar, which I
debuted last month in Germany. Good course, in my opinion, but I can't
claim to be fully objective :-)

BTW, if you took a look at my "Project Ideas" page
(http://www.aristeia.com/projects_frames.html) immediately after I sent out
the announcement about it, you may have missed the "Lint with autofix" and
"Detailed Exhibit Information" ideas that I added a few hours later. If
so, I encourage you to check out those projects now, as I'm especially
eager to see somebody pursue them.

Scott

Monday, November 1, 2004

New "Project Ideas" Page

From time to time, I come up with ideas for projects or articles that I'd
like to pursue, but which I know in my heart of hearts I'll never find time
for. Rather than let the ideas wither and die in my "Stuff I'd like to do
but never will" folder, I decided to put them at my web site, with the hope
that somebody else will pursue them and write up the results. You can find
the initial list of project ideas at
http://www.aristeia.com/projects_frames.html. Have at it!

Scott

Wednesday, October 27, 2004

"Double-Checked Locking" Article now online

The DDJ article that Andrei Alexandrescu and I wrote for DDJ is now
available at my web site. It's the first entry listed at
http://www.aristeia.com/publications_frames.html. I recommend the
"slightly updated" version, because it's, um, slightly updated, but you'll
definitely want to print it to read it, because the LaTeX-derived PDF is
really ugly on-screen.

Scott

Monday, September 20, 2004

New Series Book, "Effective Enterprise Java"

The latest book in my "Effective Software Development Series" is now out:
Effective Enterprise Java, by Ted Neward. I don't pretend to be a
hard-core Java or Enterprise guy, but I really enjoyed watching this book
unfold as it was being written. It's filled with pragmatic advice from a
guy with lots of experience who knows how to explain what he is talking
about. If you're a Java developer in an enterprise environment, or if you
just like a well-written book that's filled with useful insights about
programming enterprise systems, I encourage you to give this book a look.
Right now, it's on sale at Amazon for about 1/3 off
(http://www.amazon.com/exec/obidos/tg/detail/-/0321130006/qid=1095719933/sr=8-1/\
ref=pd_csp_1/104-5668479-8651933?v=glance&s=books&n=507846),
and no, I don't get a kick-back if you buy via that link :-)

As long as I have your attention, let me remind you about my upcoming talks
in Germany (Stuttgart and Berlin) and Canada (Vancouver at OOPSLA). There
are links to all the talks at http://www.aristeia.com/seminars_frames.html,
but at the time I wrote those descriptions, the talks existed only in my
head. I'm now done with two of them ("Better Software -- No Matter What"
and the revamped "Design Patterns, Templates, and Policy-Based Design"),
and I have to say that I'm very pleased with the way they came out. If
you'd like to see a description of one or both of these talks that was
written after the talk was done (so I *really* knew what would be in it),
let me know, and I'll happily send you an updated description. One of
these days the new descriptions will make it to my web site, but I'm
holding off on that until I finish the last new talk I'm working on for
Germany, "What's New in Effective C++?"

Scott

Sunday, August 15, 2004

Minor update to EC++ Errata

In response to the latest reprint request from Addison-Wesley, I updated
the errata list for EC++. Below are the latest changes (in my usual "sort
of HTML" format).

Scott


DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
5/16/04 md 77 "an intuitive semantics" ==> "intuitive
8/15/04
semantics"

5/16/04 md 83 "minimalness" ==> "minimality"
8/15/04
244

7/ 7/04 al 205 valueDelimOpen and valueDelimClose should be
8/15/04
declared private in MyPerson, because clients
should not be able to call them. They're just an
implementation detail of the class.

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ------- ----------------------------------------------------------
7/21/04 am 179-180 Another way to deal with the need to downcast if you can't
redefine allAccounts or BankAccount is to declare
something like NewBankAccount as a sibling class to
SavingsAccount and CheckingAccount, then adopt a policy of
deriving new classes only from NewBankAccount. You'll
still have to downcast from BankAccount to Savings-,
Checking-, or NewBankAccount, but once you're in
NewBankAcount, you can use a virtual creditInterest.

Friday, August 13, 2004

Request for comments on extended "Easy to use correctly, hard to use incorrectly"

I'm working on materials for my upcoming full-day seminar, "Better Software --
No Matter What," (see http://www.aristeia.com/seminars_frames.html for scheduled
offerings) and I've put together a draft of the portion of the seminar on the
guideline, "Make Interfaces Easy to Use Correctly and Hard to Use Incorrectly."
This is essentially an extended version of the arguments I advance in my recent
IEEE Software article (
http://www.aristeia.com/Papers/IEEE_Software_JulAug_2004.pdf).

The materials include a number of examples of interfaces that violate the
guideline, but I'm interested in other examples, because too many of mine are
drawn from C++ and Windows. (The talk is language- and platform-independent.)
If you have time and interest, I'd appreciate it if you'd take a look at the
materials at http://www.aristeia.com/Personal/easyhard.pdf and let me know if
you have any other examples that would reinforce my points. If you have other
comments on the materials in general, I'd welcome those, too.

Thanks very much for your help in my campaign to identify ways for programmers
to improve software quality.

Scott

Monday, July 26, 2004

ESTL Errata Updates

It turns out that ESTL is ready for a reprint, too, so I've updated the
ESTL errata page at
http://www.aristeia.com/BookErrata/estl1e-errata_frames.html. The new
additions (not all of which I fixed for the upcoming printing -- the errata
page shows which ones I did) are as follows:

Bugs:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- ------------------------------------------------
6/ 4/04 tb Item 7 Item title should make clear that this applies
only when the container owns the pointers.
Containers of pointers not owned by the
containers should of course not use delete on
them.

6/28/04 he 197 The statement in the 2nd prose paragraph that
"equal_range not only does the job of find for
sorted ranges, it also replaces count" is
incorrect, because this part of the Item is
discussing STL algorithms, and the equal_range
algorithm is based on equivalence, while the
find and count algorithms are based on equality.

7/20/04 gc 228 Regarding reference [24], the article appeared in
December 2000 (not November), and the URL for that
article is now
http://www.cuj.com/documents/s=8000/cujcexp1812austern/

2/28/04 mp 257 Add an index entry under "set" pointing to page
199 for "idiomatic test for membership."

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
3/29/04 df 74 An alternative to "&v[0]" is "&v.front()". df argues
that this is "the most explict way to do it." To me,
"&v[0]" is equally explicit, but both work.

1/ 4/04 or Item 24 Another advantage to a function like efficientAddOrUpdate
vis-a-vis operator[] is that use of operator[] requires
that the value type of the pair (i.e., the mapped_type)
support default construction for insertion, but
efficientAddOrUpdate does not.

Scott

Saturday, July 24, 2004

MEC++ Errata Updates

I just got word that MEC++ is up for another reprint, so I took the
opportunity to update the errata list. There are only three new entries:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
! 4/19/04 cc 50 The para after the first code fragment says that 7/24/04
the window will always be destroyed, even if an
exception is thrown, but this this true only if
the exception is caught. If it's never caught,
there is no guarantee that local objects will be
destroyed.

! 6/ 9/04 jw 70 In 3rd para, bad_typeid isn't thrown when a null 7/24/04
pointer is used with dynamic_cast, it's thrown
when a null pointer is dereferenced in a call to
typeid.

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
1/18/04 sdm Item 34 A topic related to this Item is how to link object code
generated from different C++ compilers. For one take on
that topic, consult Karsten Hoof's February 2004
CUJ article, "GNU & Native Compilers." For another,
see Joe Goodman's March 2004 CUJ article,
"Interoperability & C++ Compilers."

Scott

Saturday, July 3, 2004

DDJ Article Conclusion; Seminars in Germany and at OOPSLA

Part 2 of the article by Andrei Alexandrescu and me on double-checked locking is
now out in the current (August) issue of Dr. Dobbs Journal. If you're not a DDJ
subscriber, I believe that you can download a PDF copy of the magazine from
DDJ.com. If not, the full article (both parts) will be available at my web site
in mid-October. Check in with http://www.aristeia.com/publications_frames.html
at that time for links.

During the first week of October, I'll be giving seminars in Stuttgart and
Berlin. The Stuttgart seminars should be especially fun, because they're either
new and improved or just plain new. Briefly, here are the topics for Stuttgart:

- DESIGN PATTERNS, TEMPLATES, AND PBD. This will be a revision of my current
course on this topic to focus more on variations of well-known patterns instead
of on GOF patterns themselves.

- WHAT'S NEW IN EFFECTIVE C++? I'm working on the third edition of the book
now (a significant rewrite), and this brand new seminar will cover material new
to the third edition.

- BETTER SOFTWARE -- NO MATTER WHAT. A language-independent seminar on things
programmers can do to improve software quality. This includes my keyholes work
as well as a lot more. This will be a full-day version of a seminar that has
never been longer than a half-day before.

In Berlin, I'll be presenting my two-day STL seminar based on Effective STL.

At OOPSLA in late October, I'll be reprising BETTER SOFTWARE--NO MATTER WHAT.
OOPSLA attendees should benefit from the feedback I get from the world premiere
in Stuttgart :-)

For details on all my upcoming seminars, consult my Upcoming Talks Page,
http://www.aristeia.com/seminars_frames.html.

Scott

Tuesday, June 22, 2004

Guest Column in current IEEE Software

Some 18 months ago, Martin Fowler asked me if I'd be interested in
guest-writing his "Design" column in IEEE Software. I said that I would
once I figured out what I wanted to write about. I finally did, and you
can find the result in the July/August issue of the magazine. Thanks to
the kind people at IEEE Software, you can also view a PDF copy at:

http://www.aristeia.com/Papers/IEEE_Software_JulAug_2004.pdf

Scott

Monday, June 7, 2004

EC++ Errata Page Updated

I just got word that Effective C++ is due for another reprint, so I've
updated the book's errata page with the latest changes. None of the bugs
I fixed is technical in nature, but there they are, anyway:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
4/ 4/04 sdm xiii Bad line break in URL in footnote. 6/ 7/04

5/20/04 md 107 At end of 3rd para, "SHRT" is in wrong font. 6/ 7/04

6/ 1/04 md 203 In last line, "theName" ==> "name". 6/ 7/04

6/ 7/04 sdm 203 Bad line break in 2nd-to-last para in 6/ 7/04
"valueDelimOpen".

6/ 2/04 md 218 In 2nd to last line, "accidently" ==> 6/ 7/04
"accidentally". Both spellings are correct but
I use the "ally" form everywhere else in the
book, so I should use it here, too.

1/19/04 jyt 231 Arrow tail protrudes slightly into the oval 6/ 7/04
surrounding "overflow_error".

For those of you who like to keep track of such things, this will be the
book's 16th printing.

I also added this observation to the "Interesting Comments" part of the
book's web page:

DATE
REPORTED WHO PAGES WHAT
-------- --- ------- ----------------------------------------------------------
1/19/04 jyt Items There are several example base classes in the book that
16, declare nonvirtual destructors or that declare no
22, destructor at all, a violation of Item 14.
26,
40,43,
49,50

Scott

Thursday, June 3, 2004

Recent Bogus Message and What I've Done About It

As many of you noticed, somebody recently spoofed my email address and sent out
a message with a subject of "Re: Hello" and a worm-laden attachment. Sigh.
I've since deleted the bogus message from the web site archives, and I've
reconfigured the mailing list so that all postings not only have to come from
me, they also have to be approved by me before they are propagated. I hope that
this will prevent further abuse of the mailing list.

As an aside, when I poked around the administrative portion of the mailing list,
I found that since starting the mailing list four years ago, I've sent out only
68 messages, but 2300 unauthorized messages have been automatically rejected.
In retrospect, I suppose I'm lucky that only one bogus message has been
propagated, but I still feel badly for wasting your time.

While I was housecleaning at Yahoo, I also deleted two bogus files in the
download area.

With luck, I won't need to bother you about this for another four years. I
apologize for the inconvenience of what has already happened.

Scott

Wednesday, June 2, 2004

New article in the current DDJ

Over the course of several months, Andrei Alexandrescu and I wrote what we
think is a nice article on why double-checked locking can't be made to work
portably in C++. Dr. Dobb's Journal agreed to publish it, but they decided
it was too long for a single article, so they broke it into two pieces.
The first piece just came out in the July issue. The second part will be
published in the August issue (which, in classic magazine publishing logic,
will be available around the beginning of July).

We hope you enjoy the article. If not, it'll clearly be Andrei's fault :-)

Scott

Monday, April 5, 2004

Upcoming Talks Update

Two talk-related items:

- My seminar on using C++ in embedded systems, originally scheduled for
May 6 at OGI CPD (the Oregon Graduate Institute Center for Professional
Development), has been postponed due to some newly-cropped-up
scheduling conflicts. It will be rescheduled for sometime this summer.

- My talk next Wednesday on "Double-Checked Locking, Threads, Compiler
Optimizations, and More" at the Northwest C++ Users Group in Redmond,
WA, is still on. This is just a reminder. I gave this talk at the
Software Development Conference a couple of weeks ago, and I really do
think you'll find it interesting. There's just a lot going on under
the hood in a C++ program.

For details on all my upcoming talks (including those above), visit my
talks page: http://www.aristeia.com/seminars_frames.html

Scott

Wednesday, March 10, 2004

New talks scheduled in Redmond, WA, and Beaverton, OR

In addition to the four talks I'll be giving at the Software Development
(SD) Conference in Santa Clara, CA, next week, I've scheduled two new
presentations:

April 14 in Redmond, WA: Double-Checked Locking, Threads, Compiler
Optimizations, and More

May 6 in Beaverton, OR: Effective C++ in an Embedded Environment

The April 14 talk (which is the same as my first SD talk next Wednesday) is
the result of joint work with Andrei Alexandrescu over the course of
several months as we struggled to figure out the interaction of threads,
volatile, lazy initialization, instruction reordering, cache coherency, and
other topics. I think the material is quite interesting.

The May 6 talk on using C++ for the development of embedded systems is one
I've given for a year or so, but I keep tweaking the material in response
to insights from embedded developers. The May 6 presentation should be the
best one yet.

As always, you'll find a summary of my upcoming public appearances at
http://www.aristeia.com/seminars_frames.html, including links to full
descriptions of each talk.

I hope to see you at one or more of my talks in Santa Clara, Redmond, or
Beaverton.

Scott

Monday, December 29, 2003

Updated Errata Lists

I've just completed my customary year-end updates to all my publications'
errata lists. The revised lists are at the usual URLs; you'll find links
to them at http://www.aristeia.com/books.html#errataLinks
As a mailing-list exclusive, below you'll find summaries of the new
entries.

As always, I hope you find the errata useful, and I apologize for their
needing to exist. Sigh.

Scott





NEW ENTRIES FOR EFFECTIVE C++:

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ------- ----------------------------------------------------------
11/13/03 dfc 9, The code for the String class isn't exception safe. When
73 I wrote the book, I frankly wasn't concerned about
exception safety, but I should have been. When I write
the third edition of the book, I'll be careful to pay
attention to exception safety throughout.

12/10/03 sn Item 12 As Item 11 explains, bitwise copy is virtually always
incorrect for pointer data members, but it is often
simpler to "do the right thing" via assignment vis-a-vis
initialization for pointer data members. So it may make
sense to assign to pointer data members instead of
initializing them.



NEW ENTRIES FOR MORE EFFECTIVE C++:

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
12/18/03 sdm Item 31 Nat Goodspeed's article in the January 2004 DDJ, "Double
Dispatch Revisited", contributes an interesting new
approach to implementing support for double dispatch that
also supports inheritance.



NEW ENTRIES FOR EFFECTIVE STL:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
9/17/03 hs 99 The claim in the 3rd prose para that map nodes
could be put in write-only memory is dubious.
Among other things, the value part of the pair
is generally modifiable, and the node almost
certainly has pointers to its children, which
may change over time.

9/17/03 hs 163 In the middle of the page,
DoSomething::operator() should be declared
public.

12/22/03 mc 201 I should make clearer in my discussion of
multimap::find vs. multimap::lower_bound that
only lower_bound is guaranteed to locate the
*first* element with a given key value; find
is guaranteed only to locate *some* element
with the given key value. I may want to make
this clearer in the tables on pg. 200 and the
inside front cover, too.

7/28/03 jp 206 The problem would be in agreement with the
code, and clearer, if it said simply "get rid
of all the elements in the vector whose value
is less than x and that occur after the last
value at least as big as y".

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
11/04/03 sdm 67 According to my most recent tests, the last para on the
page continues to be true, but it's worth noting that
the vector that ships with VC7.1 (Visual C++ .NET 2003)
performs 17 reallocations. Instead of doubling the
capacity each time, it appears to grow at a rate of 1.5
instead.



NEW ENTRIES FOR THE EFFECTIVE C++ CD:

DATE DATE
REPORTED WHO WHAT FIXED
-------- --- ------------------------------------------------------- --------
3/12/02 ga In the final comment preceding P12 of M2 (Item
chunking), "hierarch" ==> "hierarchy".

3/12/02 ga In P2 of M4 (Item chunking), there is an extra space in
"( Item 28)".

Friday, December 26, 2003

Advice for Prospective Book Authors

Recently, I had my nth telephone call explaining the facts of publishing
life to a prospective book author, and it finally convinced me to do
something I've been threatening to do for years: write up some comments on
the topic. 12,000 words and several rounds of feedback from authors and
editors later, you can see the result at
http://www.aristeia.com/authorAdvice.html It's my hope that prospective
authors will find the information interesting and useful, while armchair
authors will at least find it interesting.

Happy New Year :-)

Scott

Thursday, December 18, 2003

Fixing EC++ CD's Display Problems under IE6

In March of last year, I posted a message to this list explaining that my
Effective C++ CD doesn't display properly with version 6 browsers, and I
solicited patches to address the problems. I got a patched set of files
for IE6 from Attila Feher, but to my frustration and disappointment, they
disappeared into the Legal Department at Addsion-Wesley and never came out,
so I was unable to make them publicly available.

Earlier this month, however, I got a note from Ian Roberts explaining what
changes needed to be made to the CD's files, so I took the opportunity to
write a program to perform the edits automatically. This program, CDFix,
is now available at http://www.aristeia.com/BookErrata/CDFix.zip
I'm adopting a "Don't Ask, Don't Tell" policy with respect to AW's Legal
Department: I'm not telling them about the program, and I'm hoping they
don't tell me to stop distributing it :-)

I encourage you to give it a try if you'd like to use the CD with IE6. If
it works, great. If not, you can always delete the edited files and fall
back on the originals on the CD. And if you find ways to improve CDFix,
e.g., to make it also edit the CD's files so that they work better with
other browsers, please let me know.

Scott

Monday, December 8, 2003

Upcoming Talks

I've updated my "Upcoming Talks" page with new conference talks in February
and March. In February, I'll be giving a tutorial at the Embedded World
Exhibition & Conference in Nürnberg, Germany. In March, I'll be giving
several talks at the Software Development Conference in Santa Clara,
California. One of those talks (the one on double-checked locking) is
based on new work that Andrei Alexandrescu and I have been doing. For
links to the details on all these talks, consult
http://www.aristeia.com/seminars_frames.html

Also, this is a final reminder that next Monday I'll be giving a full-day
seminar at OGI in Beaverton, Oregon, on making effective use of C++ in
embedded systems. If you're interested in how compilers treat different
language constructs, the ins and outs of avoiding code bloat (especially as
regards templates), how to effectively model memory-mapped IO, or how to
make sure you don't run into trouble by confusing units like miles/hour
with different units like kilometers/second, you might want to consider
attending, because these topics and more are on the docket. You'll find a
link to details on this talk at the same page I mentioned above.

I hope to see you at one or more of these talks. In the meantime,
Happy Holidays :-)

Scott

Wednesday, October 22, 2003

Upcoming Seminar on using C++ in an Embedded Environment

During the course of the past year, my most popular C++ seminar has been my
new one on making effective use of C++ in an embedded environment. For
whatever reason, I've offered this as an open-enrollment course several
times in Europe, but never as an open-enrollment course in the USA. Until
now. On Monday, December 15, I'll be presenting this seminar in Beaverton,
Oregon, and if you're working with embedded systems and are interested in
how to use C++ in that environment or how to *better* use C++ in that
environment, I encourage you to consider attending.

For details on the seminar, consult the web page at
http://cpd.ogi.edu/courseSpecific.asp?pam=1399. I hope to see you in
December.

Scott

Tuesday, October 7, 2003

Updated Book Errata Lists

EC++ and MEC++ are up for new printings (the 15th and 17th, respectively,
on the off chance you care), so I took the opportunity to update the errata
lists for both them and ESTL. You'll find the updated errata lists at the
usual locations:

EC++: http://www.aristeia.com/BookErrata/ec++2e-errata_frames.html
MEC++: http://www.aristeia.com/BookErrata/mec++-errata_frames.html
ESTL: http://www.aristeia.com/BookErrata/estl1e-errata_frames.html

Below I've appended the new entries for each list. These are easier to
peruse to see if you care about any of the changes.

I haven't actually made the changes for the new printings yet, but when I
do, I'll update the EC++ and MEC++ errata lists to show the fix dates for
the changes that will appear in the next printings. That should be done by
next week, so check in with the errata lists then if you're interested in
how the new printings will differ from the current ones.

Scott

PS - Interested in a glimpse at new functionality being added to C++'s
standard library? Check out
http://std.dkuug.dk/jtc1/sc22/wg21/docs/library_technical_report.html


****************************************************
* NEW ENTRIES FOR EFFECTIVE C++ *
****************************************************

Errata:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
9/18/03 ss 99 The function returnStudent is dangerously
declared on this page, because it returns a
reference to what could be a temporary object.
For details, consult FAQ 32.08 of C++ Faqs by
Cline, Lomow, and Girou.

8/13/03 mc 222 There is more to the Singleton pattern than I
describe in this Item. In particular, I make no
mention of how to limit instantiation of a
singleton class to one. The technique is
clearly related to Singleton, but as mc notes,
"You can't spell 'singleton' without spelling
'single.'"

Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
6/17/03 wk 77 There are pathological cases where pass by value is
accomplished by instantiations of "copying constructors"
rather than by the class' copy constructor. For details,
consult the
href="http://groups.google.com/groups?hl=en&lr=lang_en|lang_de&ie=UTF-8&oe=UTF-8\
&threadm=3eba7ee4%40news.microsoft.com&rnum=1&prev=/groups%3Fsourceid%3Dnavclien\
t%26ie%3DUTF-8%26oe%3DUTF-8%26q%3DI%2Bfound%2Bevidence%2Bto%2Byour%2Beducated%2B\
guess%2Bmostly%2Bin%2B12.8%252F8%2B(recursive"
target="_top">comp.lang.c++.moderated thread on the topic
.

7/ 1/03 sv 108 The last sentence says you *must* use overloading, but if
you are willing to change the API, you have other choices,
e.g., you could pass a vector of values.

5/19/03 sdm Item 34 Because it's not possible to declare nested classes
without defining the class in which they are nested,
nested classes can lead to unnecessary compilation
dependencies. An alternative design is to unnest the
class and include both classes in the same namespace.
However, this is viable only when the nested class is
public, because namespaces offer no encapsulation.

6/11/03 sf Item 38 A drawback to the advice in this Item is that callers
going through the derived class interface must specify
all parameter values; the default parameter values
apply only via the base class interface. An
alternative design is to respecify the (same) default
value in each derived class, but then if the default is
changed in the base class, all derived classes must be
updated with the new value, too.

8/13/03 mc Item 43 Slightly edited, mc writes: "You are not completely
fair in this Item. The trick with auxillary classes is
needed in order to allow overloading of any
functionalities involved in the name clash, but the
clumsiness and the lack of virtual behavior are not
valid arguments. Explicit qualification is clumsy, but
so is explicit upcasting of pointers (it takes more
than one line, compare upper page 196 with middle page
197). So clumsiness is not the argument here. Moreover,
calling pls->draw(); on page 197 would still be an
error just as on page 196, so don't bad-mouth the first
approach on that account. Reversely, applying the
pointer upcast trick on page 196 instead would conserve
the virtual behavior. So the only argument left is that
only one of the methods can be overloaded, the other
will be lost (this is reason enough to apply the
technique you offer). In the end, there's no error in
your text, but I think that the code and the
formulation makes the reader focus on the wrong aspects
of the problem."




****************************************************
* NEW ENTRIES FOR MORE EFFECTIVE C++ *
****************************************************

Errata:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
! 4/30/03 mh 209 RCIPtr::init should test oldValue against NULL
before dereferencing it.

6/ 8/03 sdm 265 Bad line break: AbstractA-nimal ==> Abstract-
Animal

! 6/ 7/03 mh 266 2nd and 3rd paras discuss the assumption that
base classes have no data. The correct assumption
is that *derived* classes have no data.


Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
6/ 3/03 sxb 202 The bug for these pages reported by ct on 9/16/98 is
206 incorrect, because when RCPTR::operator= is called with
a raw pointer as an argument (e.g., p->next), a
temporary RCPtr will be created from the raw pointer,
hence the reference count won't go to 0 when
removeReference is called. (I'll keep the code in the
book as is, because it behaves correctly, and I don't
want to mess with code in the book any more often than
I have to.)




****************************************************
* NEW ENTRIES FOR EFFECTIVE STL *
****************************************************

Errata:

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
8/ 1/03 lfr 51 In 2nd-to-last para, "unsigned integral value"
==> "unsigned integral type"

5/19/03 drm 168 My claim that "Declaring operator() const in
predicate classes is necessary for correct
behavior, but it's not sufficient" is too strong.
E.g., it would be safe to modify data members that
don't affect the outcome of the predicate. Reword.

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
9/30/03 mp 188 In the operator() implementation at the top of the page, it
might be preferable to write the test this way,
return lowVal < val && val < highVal;
so that val is both numerically and *physically* between
the bottom of the range on the left and the top of the
range on the right. mp finds this clearer and also nearer
to the mathematical notation "lowVal < val < highVal." (mp
attributes this idea to either Steve Maguire's "Writing
Solid Code" or "Debugging the Development Process."

5/16/03 drm Item 26 "The advice of this Item seems kind of strong. Counting
in my last bit of code: 49 const_iterators, 3 iterators, 0
problems (so far). I think a better slant to the Item
might be: be careful, const_iterators have certain
restrictions. I don't see that those restrictions
necessarily lead to the recommendation to prefer iterator."

Upcoming Talk at OGI next Thursday (Oct. 16)

The Oregon IEEE Computer and Communications societies asked me to be their
October speaker, so next Thursday (October 16) I'll be giving a talk on
"The Keyhole Problem" at OGI in Beaverton. You can find all the details at
http://www.ieee-or.org/events/EventDetails.asp?eventid=187 and
http://cpd.ogi.edu/class.asp?n=04-IEEE-1016

I hope to see you at OGI on Thursday evening!

Scott

Thursday, October 2, 2003

"Effective XML" is now out

The second book in my Effective Software Development Series has just come
out, Elliotte Rusty Harold's "Effective XML." Many books have been
published that mimic the format of my "Effective" books, but this is the
first one to come out where I offered advice to the author on how to better
make the book "work." Rusty is an established author, so he knows how to
write, and his knowledge of XML is outstanding. I think you'll find that
"Effective XML" offers exactly what the subtitle promises: "50 Specific
Ways to Improve Your XML."

You can read more about the book at
http://www.awprofessional.com/catalog/product.asp?product_id={8E524FFF-F58B-4C5A\
-BBC8-6E02DC159996}&session_id={0994EFB6-20AC-468B-8C72-2603CCFD9EBF}

Scott

Tuesday, July 22, 2003

"The Keyhole Problem" and other books

For over a year now, I've been interested in what I call "keyholes" in
software: gratuitous restrictions on what can been seen or expressed.
Keyholes arise in software written in any language and for any domain; they
exist in both web-based and native applications. As a result, this
research is separate from my work on C++ programming.

I've decided that my next book will be about keyholes. In particular,
about why they are harmful and how programmers can avoid them. I've set up
a web site devoted to the project, "The Keyhole Problem." I'll post
chapter drafts there for people to offer feedback on. In addition,
Artima.com has graciously offered to host a mailing list devoted to
discussion of the book material in particular and keyholes in general.

If you're interested in learning more about this project and/or signing up
for the Keyholes Mailing List, please visit the project's web page,
http://www.aristeia.com/TKP/ There you'll find a draft paper from last
summer that gives a good overview of what I mean by keyholes, and you'll
also find a draft book chapter. If you're interested in reading the
chapter, I suggest you wait a few days, because I plan to post a revised
version of that chapter by the end of the week. (When the revised chapter
is available, I'll post to the Keyholes mailing list, not to this list.)

Speaking of writing books, you may recall that in March, I announced that I
was going to work on a new edition of Effective C++. That's happening,
too. When there's more to say on that front, members of my mailing list
will be the first to know, but for now, I'll just say that that project is
proceeding concurrently with my keyholes research.

Also on the writing front, the next book in my Effective Software
Development Series is nearing publication: Elliotte Rusty Harold's
"Effective XML." It's organized like my "Effective C++," and I think that
Rusty does a great job of applying that format to XML development. The
book is slated for publication in September. When it comes out, I'll let
you know. In the meantime, you can get a flavor for the book at
http://www.ibiblio.org/xml/books/effectivexml/

Scott

Saturday, June 7, 2003

First ESDS Book: "Code Reading"

A little over a year ago, I announced that I was working with Addison
Wesley on a new book series, the Effective Software Development Series.
Now I'm pleased to announce that the first book in the series has come out.
It's "Code Reading" by Diomidis Spinellis, and I think it's really good.
(Duh. It wouldn't be in the series if I didn't.)

The subtitle of the book is "The Open Source Perspective," and at one
point, I remarked to Diomidis that the most accurate title for the book
would actually be something like "Everything you need to know about
examining open source software projects."

Fundamentally, the book is about how to go about making enough sense of
unfamiliar software systems so that you can modify or extend them. All of
the examples are from Open Source projects, and the book ships with a CD
containing the full source of everything the book mentions. That's some 7
millions lines of code on the CD.

You can find more information about Code Reading at
http://www.awprofessional.com/catalog/product.asp?product_id={DE5EA6BB-1743-406B\
-A680-D1B335BA7EA2}

I hope you like this opening salvo in the Effective Software Development
Series.

Scott

Thursday, May 1, 2003

Talks in Germany September 22-26

I'll be in Germany giving talks on various aspects of C++ during the week of
September 22-26. For details (topics, locations, etc.), please consult my
Seminars page, http://www.aristeia.com/seminars_frames.html. All the talks will
be in English, but during breaks, etc., es ist moeglich, dass ich versuchen
werde, ein Bisschen auf Deutsch zu reden :-)

I hope to see you in Germany in September.

Scott

Friday, April 25, 2003

Updated EC++ Errata; 11/02 CUJ Article now Available

Two things:
- Effective C++ Errata Updated
- My November 2002 CUJ Article is now Online

I just updated the errata list for Effective C++. As always, it's at
http://www.aristeia.com/BookErrata/ec++2e-errata_frames.html A detailed
list of changes (in the usual pseudo-HTML I use internally) is listed
below. In conjunction with the recent updates I made to the errata pages
for ESTL and MEC++, I'm pleased to report that all the problems I know
about in my books are now listed online.

Also, you can now find a PDF copy of my November 2002 CUJ article, "Class
Template, Member Template -- or Both?" at
http://www.aristeia.com/Papers/CUJ_Nov_2002.pdf

Enjoy!

Scott


[New EC++ Errata Entries]

DATE DATE
REPORTED WHO PAGES WHAT FIXED
-------- --- ----- ------------------------------------------------ --------
10/12/02 bj 12 Clarify whether the "ISO/ANSI sanctified version
of C" I refer to in the book is now C99, not C89.

4/10/03 wk 77 The final bullet point on the page is misleading.
C++ imposes constraints on how copy constructors
behave, so rather than writing that a copy
constructor defines what it means to pass by
value, I should say that it defines how an
object is passed by value.

10/20/02 kk 125 In final sentence of 2nd-to-last paragraph,
clarify that callers must use the array form of
delete.

9/26/02 mh 127 It would be better if someFamousAuthor returned
a const String instead of just a String. This
would be consistent with the advice of Item 21.

10/12/02 bj 135 In first para, note that the "C philosophy that
variables should be defined at the beginning of
a block" is for C prior to C99.

! 10/12/02 bj Item 41 The first design problem includes the ability to
create "stacks of stacks of strings," but the
given solution has a private copy constructor,
making it impossible to create a Stack of Stacks.


Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
2/17/03 dyx Items "Our programming guidelines now recommend implementing
16-17 assignment operators like this:

T const& T::operator=( T other )
{
swap( other ); // non-throwing operation
return *this;
}

My reply:

This is fine (except for the const return type :-}), as
long as you make clear that this approach may be
needlessly expensive. For example, if all your data
members are of built in types, their assignments can't
throw, so doing swaps instead of assignments just burns
cycles needlessly. For large objects, you're talking
about duplicating an object's contents on the heap in
order to be able to perform the non-throwing swap.
There's nothing wrong with that, but my experience has
been that people advocating this approach to implementing
operator= often overlook the cost that it incurs. It's
exception safe, but it's often not cheap.

12/30/02 ma Item 19 It's true that virtual functions must be members, but one
can get virtual-acting behavior by having a non-virtual
function (possibly a non-member) call a virtual function.
This can be especially useful for functions like operator<<,
which must be non-members but can be made to act virtual by
internally calling a virtual function, e.g., one named
"print" or "write".

2/17/03 dys Item 19 Regarding the last bullet on page 88, dys writes:

The same rule should be used for other operators that
require a different class as a left-hand operand. For
example, CORBA uses "Any <<= Type", and for all classes
besides Any, operator<<=(T) is a non-member. I propose
the following change to your algorithm. Instead of

else if (f is operator>> or operator<<)

write

else if (f is an operator and needs another class as
its left-hand operand)

6/15/02 sdm Item 33 Randy Meyers (no relation) has a nice article on inlining
in C99, including an explanation of how the C99 rules differ
from those in C++, in the July 2002 issue of the
C/C++
Users Journal
.

10/13/02 ya Item 36 ya writes: "Nonvirtual functions may call other functions
which are virtual. In that case, derived classes are indeed
presented with mandadory implementation, but only in the
highest, close-to-the-surface level. By overriding virtual
functions, the overall behavior of the nonvirtual function
can change in derived classes. Such usage of nonvirtuals is
very useful and is the basis for the 'template method'
design pattern."
This is true, but it's important to note that the
externally observable behavior of any function is defined by
its specification (i.e., it's interface), not by its
implementation. A nonvirtual implemented using template
method may behave differently for different derived classes,
but its behavior is still bounded by its specification.
Callers don't care whether the function is virtual or
nonvirtual. All they care about is that the function they
call exhibits the behavior its specification promises.
For implementers of derived classes, it's a different
story. They care very much about whether a base class
function is virtual or nonvirtual, because that affects what
they are allowed to vary. In Item 36, my remarks are
focused on the relationship between authors of base and
derived classes, not on the relationship between authors of
a class and clients of that class.

Saturday, April 19, 2003

ESTL and MEC++ Errata Pages Updated

I just updated the errata pages for Effective STL (ESTL) and for More
Effective C++ (MEC++). Here are links:

ESTL: http://www.aristeia.com/BookErrata/estl1e-errata.html
MEC++: http://www.aristeia.com/BookErrata/mec++-errata_frames.html

New entries for both books are below.

I hope to update the errata page for Effective C++ by the end of this
month. I'll let you know when I do.

Scott


----------------------------------------------------------------------
NEW ENTRIES FOR ESTL
----------------------------------------------------------------------
Bugs:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- ------------------------------------------------
2/ 1/03 fr 90 Missing colon at end of page. (The missing colon is
actually deliberate, but replacing "try" with "try
this:" will probably be clearer, so that's the change
I'll make.)

1/31/03 fr 91 Include an xref to Item 7 near the definition for
DereferenceLess for readers who are confused about
why DereferenceLess is a non-template struct
containing a templatized operator().

4/18/03 lz 157 In 1st line, "many elements" ==> "many elements
with a particular value"

2/26/03 shh 166 In the third bullet point on the page, "returns
true or false" ==> "returns true or false (or
something that can be implicitly converted to
true or false)."

2/26/03 shh 211 In line 5 of 4th prose para, "do this is with"
==> "do this with"


Interesting Comments:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- -----------------------------------------------------------
7/16/01 sdm Item 4 If you're interested in the technical and standardization
issues surrounding list::size, check out the July 2001
href="http://groups.google.com/groups?hl=en&lr=lang_en|lang_de&ie=UTF-8&oe=UTF-8\
&threadm=uZj47.33018%24WS4.5267300%40news6-win.server.ntlworld.com&rnum=1&prev=/\
groups%3Fhl%3Den%26lr%3Dlang_en%257Clang_de%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Du\
Zj47.33018%2524WS4.5267300%2540news6-win.server.ntlworld.com"
target="_blank">comp.std.c++
thread discussing the matter.


12/ 2/02 jr 46 The code at the bottom of this page has two shortcomings:
(1) though it works when iterating over an entire container,
it's incorrect if given an arbitrary end iterator, because
the call to erase will invalidate the end iterator; and (2)
because each call to erase shifts all succeeding elements
down by one, the linear-looking loop really runs in
quadratic time.

Here's code that addresses both problems, where endIt is the
arbitrary end iterator to be used and, for consistency,
beginIt is an arbitrary begin iterator to be used:

vector::iterator i = beginIt;
while(i!=endIt && !badValue(*i)) ++i;
vector::iterator j = i;

while(i!=end){
if(badValue(*i)) {
logFile<<"Erasing "<<*i<<'\n';
} else {
*j=*i;
++j;
}
++i;
}

c.erase(j, end);

Note that the second while loop is essentially a variant of
remove_if (see Item 32).

jr reports that in simple tests he performed comparing the
performance of this code with that on the bottom of page 46,
he saw speed improvements of 2-3 orders of magnitude.

2/22/03 fr Item 34 When using an algorithm expecting a sorted range (e.g.,
includes, set_union, etc.) on a standard associative
container (especially a map or multimap), it's important to
pass the correct comparison function. The easiest way to do
this is to pass the result of the value_comp member
function:

typedef multimap map1, map2;
...
bool subMultiset = includes(map1.begin(), map1.end(),
map2.begin(), map2.end(),
map1.value_comp());

This works for sets and multisets, too, because for those
types, value_comp returns the same thing as key_comp.
However, as noted in Item 44, for operations like
lower_bound, etc., it's generally better to use member
functions instead of algorithms when both are applicable.

2/20/03 fr 156 Because postincrement is less efficient than
preincrement, the if statement may be better
implemented as follows:

if (p(*begin)) {
*destBegin = *begin;
++destBegin;
}

2/26/03 shh 159 In order to make sure that the initial summary value
passed to accumulate is of the appropriate type, shh
suggests using this form:

Y sum = accumulate (
begin, // acts like a T*
end, // acts like a T*
static_cast(initValue) // initValue need not be of type
Y
);



----------------------------------------------------------------------
NEW ENTRIES FOR MEC++
----------------------------------------------------------------------

Bugs:

DATE
REPORTED WHO PAGES WHAT
-------- --- ----- ------------------------------------------------
8/14/02 sdm 66-67 The inheritance-based conversions described on
these pages apply only to public inheritance.
For non-public inheritance, things get a bit more
complicated. For details, including a rationale
for the behavior, consult the July 2001 CUJ
column by Jim Hyslop and Herb Sutter,
target="_blank">"Baseless Exceptions."

1/ 6/03 ais 67 In the examples near the top of the page, it
would be good to note that catch-by-value can
lead to the slicing problem, a topic that is
discussed on page 70 in Item 13.

12/ 6/02 ddg 99 In last sentence "When countChar returns," ==>
"When the statement containing the call to
countChar finishes executing,"

Wednesday, March 19, 2003

The Next Edition of Effective C++

I'm beginning to work on the third edition of Effective C++. The second
edition was a fairy conservative sprucing up of the original, but for the
third edition, I expect to make more extensive changes.

I constrained the second edition to follow the Item breakdown of the first
edition fairly closely, but this time I plan to start with a reasonably
clean slate and ask myself, "What are the 50 most useful pieces of advice
for professional developers NOW?" Without a doubt, some of the current
Items will make the cut, but it's time to include new topics, almost
certainly including design and implementation in the presence of templates;
dealing with issues related to exception safety; the impact of threading,
etc. At the same time, I want to continue to avoid undue overlap among my
three books, so there's little chance I'll devote significant space to
topics I already treat in More Effective C++ or Effective STL.

I'll also maintain what I consider to be fundamental strengths of the book:
Items that are short, specific, to the point, and that take both the
Standard and real compilers/libraries into account.

I have plenty of ideas on what EC++/3E should contain, but I'm hoping
you'll offer suggestions, too. What Items or parts of Items are no longer
needed? What new topics should be addressed? What did I do right that I
should avoid breaking? What needs fixing? Are there any things I did or
didn't do in More Effective C++ or in Effective STL that I should be sure
to copy or be sure NOT to copy? Are there ideas from other books I should
steal? In short, how can I make EC++/3E the best EC++ ever?

I hope to receive a lot of email in response to this message, so please
don't be offended if all you get is a pro forma reply. I have only so much
time and energy, and I hope we agree that it's more important for me to
work on the book than to send everybody a personalized reply to each
suggestion. Actually, if you squint just right, you can think of the
revised book as a personalized reply to each of you, because I'll take all
your feedback into account as I work on it.

If would be most convenient for me if you'd send all suggestions to
EC++3E@....

Thanks in advance for all the help I know you'll offer.

Scott