Python advocacy in scientific computation

David Treadwell i.failed.turing.test at gmail.com
Sat Mar 4 20:23:10 CET 2006


On Mar 4, 2006, at 5:55 AM, Dennis Lee Bieber wrote:


> On Fri, 3 Mar 2006 22:05:19 -0500, David Treadwell
> <i.failed.turing.test at gmail.com> declaimed the following in
> comp.lang.python:
>
>
>> My ability to think  of data structures was stunted BECAUSE of
>> Fortran and BASIC. It's very difficult for me to give up my bottom-up
>> programming style, even though I write better, clearer and more
>> useful code when I write top-down.
>>
>>

IIRC, during 1984, my senior year, BYTE magazine had a cover story on  
OOP. (OH, how I loved the cover art back in the day!) My impression  
after reading the article: WTF is that for? Every class I had which  
needed programming, be it CS or chemical engineering, taught it in a  
very linear, bottom-up fashion. First you read inputs, then do Foo,  
then do Bar, then do (fill in your favorite third-level word).

It was even worse in the chemistry department. No chem major (other  
than myself, as I also was a chem eng major) had _any_ computer  
courses beyond the required Fortran 101. It was a struggle to get any  
chemistry student to do anything that required using LINPAC,  
Mathematical Recipes code or a plotting program.

This level of absurdity reached its apex during grad skewl when I  
wrote a monolithic 30-page program in MS QuickBasic for Mac to  
simulate NMR spectra. No one else was ever able to understand how to  
use the program.

Even worse, that 30-page program disappeared the day Mac System 7.0  
was installed. The byte-compiled basic code became unreadable because  
System 7 permanently broke QuickBasic.

The last program I wrote for anyone else's use was written in VBA/ 
Excel. I hated every minute of it, but the request was made because  
everyone has Excel, and nobody wanted to install Python. VBA has at  
least 3 API's running simultaneously (Excel, VBA-classic and VBA- 
pseudoOOP). Now that I know Py2App, that dragon has been slain.

Which brings me to my last point: Why be beholden to the graces of a  
single-source supplier of a language or OS? Proprietary systems will  
always become either (a) extinct or (b) so crammed with legacy code  
they become unreliable.

I still don't get OOP completely, but Python has helped a great deal.


> 	FORTRAN was quite amenable to "top-down" design (which was barely
> taught during my senior year: 1980; and I'm a CS major -- you don't  
> want
> to see the text used for the "systems analysis" class; I don't recall
> ever seeing a "requirement document" created in the entire text...)
>
> 	I've done lots of FORTRAN stuff where the main program was
> interchangeable...
>
> 	program main
> 	...
> 	call Initialize()
> 	call Process()
> 	call CleanUp()
> 	stop
> 	end
>

Sure. It seems logical now. But remember, I learned WatFiv Fortran,  
which came before even Fortran 77. I saw my first Fortran 95 code  
about two years ago. It took me a while to realize that what I was  
looking at _was_ Fortran!


>> 3. I demand a general-purpose toolkit, not a gold-plated screwdriver.
>>
>
> 	Would a gold-plated sonic screwdriver work? <G> {Let's see how many
> catch that reference}
>

Google makes this game too easy, but it's to Who you refer. How about  
_this_ reference: "What we all need is a left-handed monkey wrench."  
<grin>

:--David




More information about the Python-list mailing list