Python Productivity Gain?

Harry George harry.g.george at boeing.com
Mon Feb 16 02:42:51 EST 2004


"kbass" <kbass at midsouth.rr.com> writes:

> In different articles that I have read, persons have constantly eluded to
> the productivity gains of Python. One person stated that Python's
> productivity gain was 5 to 10 times over Java in some in some cases. The
> strange thing that I have noticed is that there were no examples of this
> productivity gain (i.e., projects, programs, etc.,...).  Can someone give me
> some real life examples of productivity gains using Python as opposed other
> programming languages.
> 
> From my our personal experience, I have been programming with Python for
> about 6 months (but I have been programming in other languages for over 10
> years) and I have noticed that the more I had gotten use to programming in
> Python, the more my programming speed has increased. But ... this is true
> with any language that you program in as long as you are learning the
> methodologies and concepts of the programming language.  Your thoughts.
> 
> Kevin
> 
> 

My experience is with in-hoiuse code, so I can't show examples, but I
can give impressions.  We had Java code which did XML, matrix
manipulation, and lisp s-expression reader/writer.  We converted that
to Python.  It took roughly 1/3 less code (measured with wc -l), the
code was easier to read (consensus in code reviews), and it has proven
more maintainable (roughly 1/2 flowtime for similar enhancements).

The algorithms didn't change, so this wasn't just a matter of learning
the problem space better ("write one to throw away").  My impression
of the productivity improvements:

a) No compilation step.  If you program in a "change one feature and
then run unittests" style, the edit-run cycle is critical.  Python was
several seconds (> 15, < 60) faster per cycle.  We may have had an
exceptionally slow java setup, but I've seen similar effects on other
platforms.

b) Clarity of thought.  We could see the forest and not just the
trees.  This led to refactoring, which simplified maintenance.

As for learning the language vs knowing others: We've now had a dozen
compsci people learn python.  Each had considerable experience with
other languages.  After a couple of weeks, each person says things
like "Wow, this is amazing."  In code reviews, they learn better
idioms, but the basic impression of productivity is there from about 2
weeks after they start.

My biggest problem is with people who are not willing to refactor to
clean up working code.  Without that step, some of the potential
improvement from python is lost.  I've looked at their non-python code
and see this is apparently a personal programming trait.  People who
write clean code in python also do so in VB, java, COBOL, etc.  I
think python makes refactoring easy enough that people who care about
clean code are very impressed with the language.

-- 
harry.g.george at boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 342-0007



More information about the Python-list mailing list