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

Re: Re st: RE: open source

From   Mark Schaffer <>
To, Nick Cox <>
Subject   Re: Re st: RE: open source
Date   Mon, 06 Sep 2004 16:36:17 +0100 (BST)


Quoting Nick Cox <>:

> I was thinking largely in terms of one's 
> _rights in principle_ as a user of StataCorp 
> ado code. 
> You are quite correct in terms of what 
> you can do as a matter of courtesy basing 
> your code on StataCorp code. And StataCorp
> would look pretty foolish being picky with 
> e.g. you because of how you use -ivreg- 
> code inside -ivreg2-, not to mention my 
> own parasitic efforts. The whole benign symbiosis
> between company and user-programmers depends on
> that. 
> But at the end of the day it's _their_ code and 
> if need be they would fight with lawyers to defend it against 
> abuse. That's not "open source".

This is an interesting point.  I had never considered that StataCorp 
regarded their ado code in this way, even in principle (and even if I 
could think of a plausible way in which it could be "abused").  I, and I 
suppose David, who started this thread, and now Alfonso, had thought that 
StataCorp's view of their ado code was more akin to "open source" than 

Is there an official statement from StataCorp about this somewhere?  -help 
copyright- isn't very informative on this point.

As for commenting ado code, what I would like to see is code that I, as a 
programmer, can sit down, read, and learn from, without having to engage 
in excessive detective work.  I did my formal training in programming an 
embarrassing number of years ago (clue - I subsequently albeit briefly had 
arpanet privileges), but I doubt the principles of documenting code have 
changed an awful lot since then.  I have a vague memory of Bill Gould 
writing somewhere that lots of comments slow down the execution of code, 
but I would hope there would be ways around this in practice.


> Also on readability, I think I agree with you. The in-house
> StataCorp style is often relatively sparse on comments, but 
> even comments can be over-done. Although I've certainly seen 
> user-written programs that were to me essentially 
> unreadable, purely as a matter of presentation, I've also 
> seen comments not far from 
> // here we add the variables 
> gen c = a + b 
> to which one reply is that if you need 
> the comment, you probably shouldn't be trying 
> to read the code. 
> Contrariwise, I today used a triply nested local 
> macro, such as 
> ```1''' 
> Although user-programmers might reasonably want 
> an explanation of that, it is hard of think of one that 
> is universally satisfactory. 
> So, precisely what kind of comments do you want more 
> of? 
> (One prescriptive document on Stata programming style is 
> -stylerules- from SSC.) 
> Mark Schaffer 
> Quoting Nick Cox <>:
> > Well, I doubt that StataCorp would want 
> > to make claims that just aren't true, 
> > or that could be seen as seriously misleading. 
> > 
> > The executable, and the underlying 
> > C code, of Stata are emphatically not open 
> > source, and they are likely to remain 
> > proprietary for the foreseeable future, 
> > and the unforeseeable future too. 
> > 
> > It is of course correct that user-written 
> > ado files are in a fairly strong sense 
> > open source, although fairly useless 
> > without the executable. Also, StataCorp-written ado 
> > files are in a very weak sense also open source, 
> > but only because they are visible. 
> I'm not sure this is a "very weak" sense.  Numerous users have, I
> think, 
> taken StataCorp-written ado files and changed them to suit their own
> purposes.  Some of these have become available to other users via
> ssc, 
> etc.  I also recall hearing that StataCorp's preference is for
> commands to 
> be in -ado- form, and perhaps the desire for openness is partly
> behind 
> this.  That said, StataCorp ados are typically rather sparsely
> commented 
> and hence not always easy to make sense of.
> I would in any case agree with David that this openness is an
> attractive 
> feature of Stata and one that might deserve more prominence and
> perhaps 
> development (making ados easier to read, for example?).
> *
> *   For searches and help try:
> *
> *
> *

Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3008


This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed.  If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail.  In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail.  Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail.  Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.
*   For searches and help try:

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