Getting Python Accepted in my Organisation

Magnus Lycka lycka at carmen.se
Thu Nov 3 12:36:12 EST 2005


Stuart Turner wrote:
> Hi Everyone,
> 
> I'm working hard trying to get Python 'accepted' in the organisation I work
> for.  I'm making some good in-roads.  One chap sent me the text below on
> his views of Python.  I wondered if anyone from the group could give me
> some advice on how to respond / if they had been in a similar position.

This has to be addressed differently depending on what kind of people
you are trying to convince, and what they fear, what they are trying
to avoid, and what they feel that they could gain from it.

In my opinion, any programmer can gain from using Python in addition
to Java/C++/COBOL or whatever main language they use. Some people
don't want to change though.

I used Python to develop some tools for testing and deployment in a
fairly large development project within a state agency in Sweden. I
had cleared this with my closest managers, but after some time, some
middle manager responsible for software configuration on the PCs went
through the roof when he heard that we had used unauthorized tools.
The immediate removal of Python from all computers was ordered and
executed, but it didn't take long before they realized that they didn't
have anything that could really replace the tools I had made. Since
the software tests would have been much more time consuming without
these tools, we got a dispensation to use Python for some months, until
some better tools were aquired. Some time later, some DBA tools were
needed, and the DBA department said it would take several months to
develop them. I was allowed to write a Python tool to use in the mean
time, and it took two weeks, part time. Long after my consulting there
ended, when Python's days were supposedly over, I got a phone call,
with a question about Python installations. They needed to run my tools
on more machines now...

Life would be easy if tools were only chosen on technincal, economical
and practical merits...

To put things into perspective, it's important to get beyond the very
broad categories of programming languages. It's pointless to judge
Python on the merits of Perl or AWK, just because a certain label is
sometimes applied to all three. That would be like saying that Java
is more or less like COBOL. (OO COBOL?)

Actually, if you've coded Java, and then had to struggle with the
inflexible structures of COBOL on mainframes, where dynamic allocation
of memory for variables is rocket science, and even file sizes are
typically fixed from file creation, the dynamic and flexible nature
of Java feels very powerful and liberating. Python brings you yet
another step away from that stupid static world of the 1950's. If
you haven't tasted Python, you might feel that Java is as good as
it gets, but once you've gotten used to Python, you'll realize that
you can get more done faster and better...

Just as Java was initially designed for embedded devices, Python was
initally designed for scripting, but both languages have proven to
be very useful in other contexts, and they have evolved into something
far beyond the initial idea.

Like Java, Python compiles into bytecode which is executed by a virtual
machine. Unlike Java (but like C++) Python is a multi paradigm language,
which supports, but doesn't enforce OO. Python uses classes, modules and
packages to support modularity, and scales well, both up and down.

Development is Python is fast, and Python source code is typically
easier to read and understand than code in other languages. It's
about as far away from Perl as you can get in this respect. Readable,
simple and explicit are three words that could describe Python's core
values. Python tries hard to make it easy for the coder to do things
right, rather than to stop him from doing things wrong. Many of the
well meaning restrictions in other languages get in the programmers
way, and ugly workarounds and non-optimal, error prone and convoluted
code is the result.

The speed of Python development is largely due to Python's dynamic
nature. Features such as dynamic typing mean that we save a lot of
redundant typing and can avoid a lot of workarounds that you need in
other languages. There is a cost here: Some bugs that the compiler
would catch in e.g. Java, won't surface until runtime. On the other
hand, programs aren't bug free just before they compile. The only
safe way to develop significant software in a reliable way is with
automated tests, and written correctly those tests will find all the
bugs the compiler would have found, and much more beyond that.
Writing good test code as well as the target code is typically less
typing than just the target code in Java or C++, and you get much
more confidence in code correctness than any compiler or analysis
tool can provide. If you want static code analysis, there are
tools like PyLint and PyChecker that does that too.

The code-test cycle in Python is often much faster than just the
code-compile cycle in e.g. Java, if you take into consideration that
Java requires more typing to get the same stuff done.

Python's standard library is not quite as rich as Java's but it's
fairly big, and using the Java implementation of Python you have
access to Java's libraries. It's faster to whip up a Swing GUI in
Jython than in Java.

Organisations successfully develop and maintain large applications
in Python. They are not as large (in LoC) as if they'd been written
in C++ or Java etc, but that's hardly a shortcoming. ;)

My employer, Carmen Systems, use Python extensively in mission critical
systems that save millions of dollars for major airlines and railway
companies. Not only do we use Python in R&D and in our customization
projects. We also provide Python training for our customers and
encourage them to use Python to adapt and extend our systems further.

Python is easy to learn, yet powerful, and it meshes well with other
technologies, regardless of your platform.

For opinions about Python from others, look here:
http://www.pythonology.com/
http://www.thinkware.se/cgi-bin/thinki.cgi/PythonQuotes



More information about the Python-list mailing list