* Phlip:
Next tip: Always fold duplicated code into reusable abstractions.
On my current project, working as a hired hand after some years off the
job market, the manager insists on duplicating a whole set of some forty
plus files in two mutually communicating applications, and that the
files absolutely /must/ be different (it's specifically and very very
strongly disallowed to make one file that can be used identically in
both places), using manual update to keep the files in synch, and source
control merging (twice for each near-duplicated file) as a general
solution to the problem of him working on the same files as others.
This simple device allows the manager, who also does some programming,
to create any desired amount of problems for the others, who are placed
physically at maximally separated locations in a large building, so as
to avoid any teamwork or cross-communication (60% of the project members
are now on the way out of not just the project but out of the firm).
Needless to say I won't be working there again, but amazingly they /do/
use smart pointers, and these smart pointers have a feature that allow
raw pointers to be passed around, even for smart-pointer managed
objects, namely, that the smart pointers are intrusive, keeping the
reference count in the referred object rather than in the smart pointer.
The smart pointers also have implicit conversion to and from raw
pointers, to make it even more simple & natural to use raw pointers for
managed objects. Still, this was such a great improvement over just raw
pointers that one of the original developers commented at lunch that "I
now think we should have used /only/ smart pointers, everywhere".
Uh, have I said enough?
Think so, yes...