Date: Mon, 19 Apr 2004 12:44:02 -0600
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: Translating SAS code to a C extensionmoduleforPython
Content-Type: text/plain; charset=us-ascii
"Tim Churches" <tchur@OPTUSHOME.COM.AU> 04/17/2004 3:52 PM wrote:
>On Sun, 2004-04-18 at 03:33, Jack Hamilton wrote:
>> "Tim Churches" <tchur@OPTUSHOME.COM.AU> 04/16/2004 5:17 PM >>>
>> + On Sat, 2004-04-17 at 10:14, Jack Hamilton wrote:
>> + > The really interesting thing to know would be "Did SAS and this
>> + > provide the same answers?"
>> + The author notes in his article
>> + " Some 700 more lines later and 430 lines of regression tests and
>> + done."
>> + I am familiar with some of the author's work in bio-informatics,
>> + always writes nearly as much test code as actual business logic
>> That's good, but not that common.
>Not common but not rare either for Python (or other object-oriented
>language) programmers. Python comes with a comprehensive unit testing
>framework (based on the Java JUnit framework), as well as facilities
>allow higher-level (functional) tests to be embedded in comment
>in the code. Both can then be run automatically at installation or
>time code or data changes.
I wish SAS had such a facility. ODS has made such tests easier, but
they're still not automated. Perhaps SAS Institute has internal tools
used for regression testing, but I don't recall hearing about them.
>Indeed, many programmers are now consciously
>adopting "Extreme Programming" techniques in which you a) decide what
>your function or class needs to do, b) write the tests for it to
>it does what it is supposed to, including in all the "corner" cases,
>then and only then, c) write the code which actual implements the
>function or class.
Also would be a good thing for SAS to have. This will probably come
along as SAS becomes more object-oriented and extensible. If I were
using SAS through Python extensions I could use whatever's built in to
>Yes, but we must assume that that was not possible in this case.
>However, it is just as easy for a SAS programme which writes other
>programmes (a metaprogramme, in other words) to emit C, or Python, or
>Java, as it is for it to emit SAS code. It just requires the original
>SAS programmer to think outside the SAS square. I think that will
>more and more now that Java is being integrated with SAS and SAS
>programmers realise that there is programming life beyond the SAS
>step and macros (as many SAS programmers already or always have). I
>wish that SAS had chosen to integrate a more user-friendly language
>Java (e.g. a language such as Python) - but I can understand why they
They had at one time chosen Python as the base for some procedure, but
backed it out because they decided that Python wasn't sufficiently
popular, and in any case they were already doing some Java stuff and
didn't want to incorporate yet another language.
I suppose someone could write a wrapper making the Java interface to
SAS accessible to Python or Perl.
>Sorry for the rambling nature of this thread, but the relationship of
>SAS to newer programming languages is of considerable interest, at
And to me, and at least several other readers.
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA