August 29, 1998

Create Timeline Templates

When utilizing project management tools, create a timeline template that models your development methodology. Set up the dependencies and defaults within this template. Then you can copy and paste it as new projects come up, changing the task lengths accordingly. Include all of the steps required for your business’ project,

ANALYZE Your Visual Source Safe Database

Set up a task in your scheduler of choice to run the ANALYZE.EXE programagainst your Visual Source Safe (VSS) database at least once a month.This tool allows VSS to check the integrity of its data files (which storeyour source code), and make any fixes necessary. If you have an activesource

Who’s Backing Up Your Source Code?

Utilizing version control systems is very important, but if no one is backing up your version control database, you are needlessly stepping close to the brink of disaster. Most source code systems store your source code and revision histories in a database or proprietary file structure. Find out where and

Set Up Useful Shortcuts in the Send To Folder

If you develop applications that use components that need to be registered, consider setting up a shortcut to regsvr32 in the “Send To” folder on a user’s machine as part of your set-up process. For in-house applications, you can save yourself a trip to the user’s desk if you try

Better Alternatives to Macros

Macros in C++ are better avoided. They are unsafe, hard to debug, and may bloat your .exe files. C++ offers significantly better alternatives to them: 1. Function-like macros should be replaced with inline functions. Inline functions are safer since they allow type checking. Furthermore, they also support overloading and can

Standard vs. User Defined Conversions in Overloaded Function Call

A non-explicit constructor taking a single argument is also a conversion operator, which casts its argument to an object of the constructor’s class. When the compiler has to resolve an overloaded function call, it takes into consideration this user-defined cast: class Numeric { float f;public:Numeric(float ff): f(ff) {}//constructor is also

Choose Distinct Member Function Names When Using Multiple Inheritance

When two or more classes serve as base classes in multiple inheritance, you want to choose a distinct name for each member function in order to avoid name ambiguity: class AudioStreamer {//real-time sound playerpublic:void Play();void Stop();}; class VideoStreamer {//real-time video playerpublic:void Play();void Stop();}; class AudioVisual: public AudioStreamer, public VideoStreamer {/*_*/};AudioVisual

Before You Resort to Void *…

Void * can serve as a generic data pointer, yet it suffers from the well-known ailments associated with pointers: it can be NULL or a dangling pointer. Furthermore, it usually has to be cast back to its original type in order to access its data–a dangerous and sometimes costly operation

Default Template Argument

Like ordinary functions, templates can have default type arguments. A good example is STL’s vector. It actually has two arguments–the second one is an allocator class template. Since an allocator is something you should rarely care about, it has a default value: the implementation’s allocator, which spares you the bother

No more posts to show