Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Protecting users from their own stupidity


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Protecting users from their own stupidity
Date   Mon, 21 Oct 2002 20:10:27 +0100

Fellow Statalisters (especially StataCorp)

A query about approved programming practice. In official Stata, most programs go out of their way to protect users from their own stupidity whenever there is a possibility that a user might accidentally over-write an existing data set in the memory. In particular, if a data set is present in the memory, then -use- will only input a new data set if the user specifies the -clear- option, and -exit- will not exit from Stata unless either the user specifies -clear- or the data set is unchanged. A notable exception is the -collapse- command, which routinely destroys pre-existing data sets, presumably because any user who uses -collapse- is assumed thereby to have consented implicitly to have the existing data set destroyed. People in the Stata community who write their own packages usually want their programs to conform to the same high level of user-friendliness as official Stata. Is there a general set of rules, approved by StataCorp or otherwise, regarding when programs should or should not routinely overwrite existing data sets in memory without a -clear- option? I ask because I have previously written ado-files (notably -parmest- and -dsconcat-) which can overwrite existing data sets in memory, and I have been advised (by Bill Gould) that they should do more than they do to protect users from their own stupidity (as -use- does and -collapse- doesn't).

Best wishes (and thanks in advance)

Roger

--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk

Opinions expressed are those of the author, not the institution.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index