help wfrules: Rules for best practice in workflow

Basic rules for effective workflow

1: Provenance: Document your work so that the provenance of every result
can be easily determined.

2: Posting Principle: Once a file is posted, it should
never be changed. Never change a variable that has been posted.
Never share a file till it is posted.

3: Run order: Do-files should be named so that when run
in alphabetical order they exactly recreate your datasets
and/or replicate your analyses.

4: Basic backup: Make at least two, bit-verified backup copies;
store them in different locations.

5: Drukker's Dictum: Never type anything that you can obtain
from a saved result.

6: Long's Law: It is always faster to document it today
than tomorrow.

7: Label variables: Create a note and variable label
for each new variable. Categorical variables should have value labels.

8: Never final: Don't name it "final"; it never is.

9: Test graphs: Don't rely on how graphs look on the screen; always
display graphs in the presentation medium (e.g., black and white print,
color projection) before you present them.

10: Use datasignature: Set the datasignature before saving a dataset;
confirm the signature when you load a dataset.

11: Seek help the right way: The clearer and more detailed the information
you provide, the greater the chance you will get the help you need.

12: Organize files: It is easier to create a file than to
find a file; easier to find a file than to know what is
in the file; and it is tempting to create a lot of files. Use a carefully
planned directory structure that provides a clear context for each file.

Rules for replication

1: Backup and archive your dataset and do-files.

2: Keep a research log.

3: Document the provenance of all reported results.

4: Always set the seed when using random numbers (set seed #).

Also see

Workflow