Wednesday, October 10, 2007

Delete all files which exist in source

This is useful after backing up files to CD/DVD if you then want to delete everything which has been copied.

d:\ is the directory containing filenames to be deleted.

The current directory should be the one where the files to be deleted exist.

First, to remove any hidden/system/read-only attributes:

attrib -h -s -r * /s

Then delete the files:

for /r d:\ %f in (*) do del ".%~pnxf"

Friday, July 20, 2007

Reading Guide

Reading Guide: "Factory Method

In your Design Patterns book, please study:

1. From the beginning of this pattern (page 107 [DP]) up to the Implementation section

2. In the Implementation section, notes 1, 2 and 5

3. All of the Sample Code (don't worry if you don't know C++, just do the best you can and ask others for help if you need to)

4. Known Uses and Related Patterns

In your Refactoring To Patterns book, please study:

Introduce Polymorphic Creation with Factory Method

1. Motivation (page 89 [RTP]) — outlines the difference between Factory Methods and Creation Methods.
(References Replace Constructors with Creation Methods (page 57 [RTP]))

Related Reading:

1. Replace Constructors with Creation Methods (Refactoring To Patterns, page 57 [RTP]) — study the refactorings carefully."