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

RE: st: -stylerules- updated on SSC


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: -stylerules- updated on SSC
Date   Thu, 14 Apr 2005 16:10:46 +0100

This is a simple but most valuable distinction. 

-stylerules- is about programming style. Most 
programs have some generality, and most stylish 
programs have much generality. Comments should 
be for explaining what would otherwise be obscure, usually 
more or less clever tricks. 

But do files are fully of nitty-gritty specifics
and as Ron�n implies only very rarely are they 
over-commented. Often the Stata syntax is easy to understand, 
but not the scientific or practical reasoning. 

Nick 
[email protected] 

Ron�n Conroy
 
> Nick Cox wrote:
> 
> > Depends on what anyone means by "many"...
> >
> > I find that novices often over-comment, as in
> >
> >         // now find the sum
> >         su `myvar' if `touse', meanonly
> >         local sum = r(sum)
> >
> 
> I think that there is a useful distinction to be made between 
> commenting 
> a program and commenting a do file. Most novices 
> under-comment do-files 
> that prepare data for analysis and conduct the analysis.
> 
> I was reading over some do-files I wrote 10 years ago and 
> horrified at 
> the tweaks and changes I made to the data which presumably 
> fixed errors 
> identified by the researcher at the time, but whose rationale 
> is nowhere 
> documented. But I am less a Stata novice than I was then.
> 
> At least, until Mata hits my desktop.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index