LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: tchur@optushome.com.au
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 >>> wrote: >> >> + On Sat, 2004-04-17 at 10:14, Jack Hamilton wrote: >> + > The really interesting thing to know would be "Did SAS and this new >> tool >> + > provide the same answers?" >> + >> + The author notes in his article >> + >> (http://www.dalkescientific.com/writings/diary/archive/2004/04/12/site_updated.html):

>> >> + >> + " Some 700 more lines later and 430 lines of regression tests and >> I'm >> + done." >> + >> + I am familiar with some of the author's work in bio-informatics, and >> he >> + always writes nearly as much test code as actual business logic >> code. >> >> 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 to >allow higher-level (functional) tests to be embedded in comment blocks >in the code. Both can then be run automatically at installation or each >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 check >it does what it is supposed to, including in all the "corner" cases, and >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 Python.

>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 happen >more and more now that Java is being integrated with SAS and SAS >programmers realise that there is programming life beyond the SAS data >step and macros (as many SAS programmers already or always have). I just >wish that SAS had chosen to integrate a more user-friendly language than >Java (e.g. a language such as Python) - but I can understand why they >chose Java.

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 least >to me.

And to me, and at least several other readers.

-- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sacramento, California USA


Back to: Top of message | Previous page | Main SAS-L page