PyOpinion: Does Python Programming Marginalize You?

John Mitchell johnm at magnet.com
Tue Jun 6 13:16:23 EDT 2000


Alright, I'll bite.  Background: I'm a the senior software engineer at a
100-person web company, and I've been doing web for ~4 years, python for
almost as long.

On Tue, 6 Jun 2000, Richard P. Muller wrote:

> Does Programming in Python Marginalize You?
> 
> And yet, I worry that using Python marginalizes one. Python is hard to
> beat for writing applications that run on a single computer. But
> that's yesterday's computing model. The future of computing, heck, the
> present of computing, is in writing programs that run through a web
> browser. And the fact of the matter is that 99% of web browsers
> surfing the internet run Java and JavaScript, which gives these
> languages a huge advantage over Python, an advantage that Python's
> superior design may not be able to overcome.

Yesterday's computing model?

In our business, *no one* cares about client-side Java -- too much
start-up time, and it looks like heck. You didnt mention ShockWave and/or
Flash, which are client-side programmable.  Using JavaScript is more or
less a hack -- you cant guarantee it's enabled, so any checking or
computation must be re-done on the server side.  There are *hundreds* of
nasty bugs and incompatabilities with the different browser's JavaScript
implementations, and if you get a client-side problem they wont show up on
your logs...


> I'm aware of CGI scripting with Python. It's great. But JavaScript
> pages load faster than CGI pages, and are easier to program, to
> boot. Plus, JavaScript can directly call Java Applet methods, enabling
> it to do functions that are simply impossible with CGI scripts.

No one uses CGI anymore, FastCGI et al are faster, although CGI can be
quite quick.  One site we run that gets ~1M hits/day has a one-line Perl
script on the home page!

I'd disagree with the "faster" bit, also the "easier" bit.  Having
client-side JavaScript call client-side Java is cool, no doubt, but rather
difficult in a Internet situation where you cant tell people which browser
& Java flavor to use, and cant detect client-side errors!
(Intranet: maybe.)

> I'm also aware of the JPython module, which promises to enable
> us to write applets in Python instead of Java. But who among us has
> actually *used* JPython? Or, for that matter, who has come across a
> random web page on the net that uses JPython applets? 

JPython is stunning.  It works, and works well.  It's already found a few
niches, one of which being testing Java apps.  Java's lack of
interactivity is a bummer (although: check out BeanShell:
http://www.beanshell.org/ )

> Do I recommend that students today learn Python? Certainly

Check out Guido's "Computer Programming for Everybody", which discusses
programming as a tool for teaching thinking, in addition to the normal
uses: http://www.python.org/cp4e/


> If we don't want to see Python wind up like Ada, what should we do?
> I've been teaching a 6-lecture short-course on Python here at Caltech,
> in an effort to introduce more people to the language. I'm thinking
> about learning enough JPython to give an additional lecture on that
> language. Hopefully, if enough people use JPython for writing Applets
> we can help establish it as a reasonable alternative to Java.


Go learn JPython, although that wont take long.

There are other client-side language alternatives: ShockWave/Flash are
excellent.  I'll *never* write another applet if I can help it.  
(Although you can compile a shockwave movie to Java if you want to...)


I make my money writing web applications, and I disagree with your
client-side emphasis.  Server-side mostly we use Java, but that's because
of buzzword-compliance.  It's a tremendous pain in the ass.

For heavy string-formatting programs with loose specifications, Python
will beat the tar out of Java every time.  Matter of fact, I cant really
think of a niche for Java.  Hmm.  Maybe I should beat management with the
cluestick again.


- j






More information about the Python-list mailing list