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