Getting Python Accepted in my Organisation

S

Stuart Turner

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.

Any help appreciated,

Thanks in advance,

- Stuart


"Python is a scripting language like Perl, awk, tcl, Java etc...  it is
not quite a fully developed OO language, but does support some OO that Perl
doesn't.  To be clear, these scripting languages have their place in our
environment, but they are not full replacements for C#, Java, C, etc... 
because they do not come with the full range of libraries e.g GDI
libraries.  Python has to be compared to Perl, Awk in order to evaluate it. 
Perl, until recently, did not support threading.  Why would it? it is a
scripting language and can run async shell commands.  I would be interested
to learn if Python supports a robust threading model (not just a pointer
reference to an object), as this is a significant drawback when using a
scripting language.  CGI only works because the container can thread with
Perl.  Python is object orientated, but I do not know what implementation? 
Essentially any language with a pointer can claim to be OO, although Python
does market itself on OO capabilities.  Do you know what implementation
they have used?
 
    Lets discuss, as I am not a great fan of Perl and if Python is more
structured then it is possibly worth promoting."
 
S

Stefan Arentz

Stuart Turner said:
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.

What do you want to use Python for? What do you use now?

S.
 
S

Stuart Turner

I'm already using it for a ton of things - I want to try and get broader
acceptance in the organisation for it to be made and 'officially supported
product'.
 
S

Stefan Arentz

Stuart Turner said:
I'm already using it for a ton of things - I want to try and get broader
acceptance in the organisation for it to be made and 'officially supported
product'.

IMO that is what you need to communicate: 'already using it for a ton of
things' and probably adding 'being more productive than with tool XYZ'

S.
 
S

Steve Holden

Stuart said:
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.

Any help appreciated,

Thanks in advance,

- Stuart


"Python is a scripting language like Perl, awk, tcl, Java etc... it is
not quite a fully developed OO language, but does support some OO that Perl
doesn't. To be clear, these scripting languages have their place in our
environment, but they are not full replacements for C#, Java, C, etc...
because they do not come with the full range of libraries e.g GDI
libraries. Python has to be compared to Perl, Awk in order to evaluate it.
Perl, until recently, did not support threading. Why would it? it is a
scripting language and can run async shell commands. I would be interested
to learn if Python supports a robust threading model (not just a pointer
reference to an object), as this is a significant drawback when using a
scripting language. CGI only works because the container can thread with
Perl. Python is object orientated, but I do not know what implementation?
Essentially any language with a pointer can claim to be OO, although Python
does market itself on OO capabilities. Do you know what implementation
they have used?

Lets discuss, as I am not a great fan of Perl and if Python is more
structured then it is possibly worth promoting."

First of all, let's dismiss the notion that "Python is a scripting
language". It can be used for scripting tasks, and has been successfully
so used in many environments, but it's a fully-developed programming
language with a well-defined and cleanly-implemented OO model. Many
people call Python a scripting language because it is interpreted, but
the parallel with Java is better that that with Perl, since Python
compiles programs into bytecodes for a virtual machine.

An advantage of Python is that while it is fully object-oriented it is
also well-suited to procedural programming and, unlike Java, you are not
forced to try and fit all tasks into an object-oriented model.

Python does indeed support a robust threading model, and has recently
improved threading support still further by adding explicit features to
support per-thread state in a cleaner way. It has been used to implement
many high-volume asynchronous network server tasks, among which Zope is
perhaps the best known.

The author of your comments asks "what implementation" of OO
capabilities Python uses. This is a very broad question, but basically
Python uses a multiple-inheritance model (though nobody is forced to use
multiple superclasses) and has a very clean object orientation.

For background I have been studying and working with object oriented
languages for over thirty years, and find Python the most natural and
cleanest way to express many object oriented programming solutions.

Finally I feel that the Python community is much more welcoming than
that of most programming languages, which is important if you are
looking for support as your familiarity with the language grows.

Good luck with your Python advocacy.

regards
Steve
 
B

bonono

How about, Google use python extensively ? This I believe is a very
strong argument for any concern about python.

However, policy in organisations can be very funny and many of them may
be set long time ago which even though may no longer be relavent are
still "policy".

I would suggest focus on why the policy(like why distinguish between
script vs compiled language, as the rationale behind it can be
performance) and address it accordingly rather than taking literal
arguments.
 
K

Kay Schluehr

Stefan said:
IMO that is what you need to communicate: 'already using it for a ton of
things' and probably adding 'being more productive than with tool XYZ'

S.

It didn't work well in my case. I still use Python for "tons of things"
but it didn't change the attitudes of my co-workers towards learning a
new language. It just changed my status as a programmer inside of the
department. And remember: Python is still cutting edge as a language
but sub-standard when it comes to tool support i.e. you do not have to
introduce just a language but a different culture of programming as it
is common sense now.

Kay
 
R

Roy Smith

Stuart Turner said:
"Python is a scripting language like Perl, awk, tcl, Java etc...

It is difficult to say whether Python is a scripting language or not until
you define what you mean by "scripting language". People throw the term
"scripting language" around with wild abandon these days. As far as I can
tell, what they usually mean is something like, "It's not C++", or perhaps
somewhat more generally, "It doesn't fit the compile-link-load-execute
model I learned in college 20 years ago".
it is not quite a fully developed OO language

Ask the guy in what way he thinks it's not quite fully developed. My guess
is he doesn't really know, or perhaps will latch onto something like "it
doesn't have private data". That is true, but only partially so. And for
people who are hung up on that, you can point out that it's also only
partially true about C++.

Some people have been working with C++ and Java for so long they have
started to think that "OO" means "The way C++ and Java do things", which
pretty much means static typing and complex access control models. It
doesn't have to be that way.
To be clear, these scripting languages have their place in our
environment, but they are not full replacements for C#, Java, C, etc...

With this I am in complete agreement. A good craftsman keeps a wide
selection of tools at his or her disposal. Each is useful for some tasks,
can be pressed into service for many more, and is utterly wrong for others.
because they do not come with the full range of libraries e.g GDI
libraries.

No language has libraries for everything you might ever possibly want to
do. Python has a wide range of libraries for many common tasks, but my no
means all. Still, if it comes down to "language X has a good library for
what we need and language Y doesn't", that will often be (and rightly so)
the decision maker as to which language to use.
Python has to be compared to Perl, Awk in order to evaluate it.

Comparing Python to Perl makes a lot of sense, but comparing it to Awk is
absurd. What Awk provides is decent flow control (including an implicit
read-match-execute outer loop), excellent pattern matching, automatic
memory management, implicit string-numeric conversion, and associative
arrays. Packaging all this up in a handy to use form was a great advance,
and the features it provides are well suited for a large class of data
reduction and text processing tasks.

But, Awk has no OO features, is not extensible, has poor error handling,
and provides no system access. It doesn't even have subroutines. It is,
with some minor exceptions, a "read one input stream, process it in a
single pass, write one output stream" text processing scripting (there's
that word again) language.

If you want to compare Python to other roughly similar languages, I would
include Perl, Java, Tcl, and Ruby. If this guy thinks comparing Python to
Awk makes sense, he either has no clue what Awk is, or no clue what Python
is. BTW, comparing Java, Tcl, or Ruby to Awk would be equally absurd.
Essentially any language with a pointer can claim to be OO,

And Perl is the proof of that statement!
 
E

Eric Nieuwland

Stuart said:
"Python is a scripting language like Perl, awk, tcl, Java etc...  it
is
not quite a fully developed OO language, but does support some OO that
Perl
doesn't.  To be clear, these scripting languages have their place in
our
environment, but they are not full replacements for C#, Java, C,
etc... 
because they do not come with the full range of libraries e.g GDI
libraries.  Python has to be compared to Perl, Awk in order to
evaluate it. 
Perl, until recently, did not support threading.  Why would it? it is a
scripting language and can run async shell commands.  I would be
interested
to learn if Python supports a robust threading model (not just a
pointer
reference to an object), as this is a significant drawback when using a
scripting language.  CGI only works because the container can thread
with
Perl.  Python is object orientated, but I do not know what
implementation? 
Essentially any language with a pointer can claim to be OO, although
Python
does market itself on OO capabilities.  Do you know what implementation
they have used?

So, Java both is and is not a scripting language?
My favourite article says it all in its title:
http://www.python.org/pycon/dc2004/papers/6/
 
T

Tommy.Ryding

I have done the same thing in my organisation.

Show them concrete examples of when they can benefit from Python to
Convince them.
My colleagues and bosses has been conviced and therefore my current
work task is to integrate the interpreter in a VxWorks environment so
"everyone" at the company can use it within our context.

If you are good at convincing you can be lucky and get some fun work
tasks. :)

Good luck!

//T
 
A

Alex Martelli

Stuart Turner said:
"Python is a scripting language like Perl, awk, tcl, Java etc... it is
not quite a fully developed OO language, but does support some OO that Perl
doesn't. To be clear, these scripting languages have their place in our
environment, but they are not full replacements for C#, Java, C, etc...

Java is not a full replacement for Java? Note that Java was placed in
both lists. It makes sense in the first one because the typical
implementations of Java and Python are very similar: compilation to
bytecode, execution of the bytecode by a virtual machine (Python is
slightly handier because it does the compilation automatically for you
if you haven't done it beforehand, but that's a secondary issue). There
are also many direct similarities between the languages' semantics
(immutable strings, assignment by "object reference"), as well, of
course, as many differences.

I suspect there's a meaning-changing typo here and what was meant was
not Java but Javascript, in the first sentence.
because they do not come with the full range of libraries e.g GDI

This assertion is simply absurd. The archetypal example of a language
which does emphatically NOT "COME WITH" a full range of libraries is C,
which only comes with a pitifully weak "standard library" -- that
doesn't matter much because you can easily download and use lots of
libraries that do not "come with" the language as such. For example,
GDI is a library that comes with Windows, and you can easily use it from
C -- and, of course, Python (for one of many ways to do the latter, see
http://jotsite.com/blogArchives/cat_python_programming.php under entry
"Using Ctypes to access Windows API").
Perl. Python is object orientated, but I do not know what implementation?

There are many implementations of the Python language. If you like
Java's implementation best, for example, you can download Jython and run
it on a JVM: then, the implementation will be whatever the JVM supplies
(Jython compiles Python sources into .class files, using JVM bytecode).
Essentially any language with a pointer can claim to be OO, although Python
does market itself on OO capabilities. Do you know what implementation
they have used?

The best abstract description, funny enough, can be found in a book
written quite independently from Python -- "Putting Metaclasses to Work"
-- shorn of the static-typing aspects. Python developed a very similar
(but dynamically typed) object model quite independenty from that book's
authors; lately, some metaclass characteristics were inspired by it (but
Python values simplicity, so for example it doesn't autoresolve
metaclass conflicts -- you'll find a recipe to do that easily as the
very last one of the 2nd edition of O'Reilly's Python Cookbook).

Lets discuss, as I am not a great fan of Perl and if Python is more
structured then it is possibly worth promoting."

For completeness, one should probably also consider Ruby as "more
thoroughly object-oriented"; unfortunately, the implementation may be
more problematic there -- the standard one is slower and there are fewer
choices. Ruby's object model is much more similar to Smalltalk's or
Objective C's (shorn of static typing in the latter case, again).
Another variant worth looking at is Boo -- only implemented for dotNet
(but then, if C# is also being considered, that apparently doesn't
matter) and based on type inference, with several similarities to Python
(I have no experience of Boo since Mono's installations on MacOSX
haven't worked well for me, but on paper it looks nice).


Alex
 
A

Alex Martelli

How about, Google use python extensively ? This I believe is a very
strong argument for any concern about python.

I must admit to feeling very good when I read this kind of comment (it
IS nice to see one's employer held up as a good example -- and, I WAS
hired at Google in good part based on my Python skills, and authorship
of the "Python in a Nutshell" book, which is among our standards books
for new hires). However, let me play devil's advocate: the mix of
software that Google develops, considering what we offer to the public
and some reasonable speculation about the infrastructure that must be
behind those offers, is clearly heavily slanted towards _networking_.

So, our use cannot necessarily be "concern-allaying" for a firm which
(say) doesn't care about networking, but rather wants to program games,
or traditional business applications, or personal/group productivity
apps, or ... But fortunately there are plenty of "success stories" in
each and every one of these fields.

For example, for games, Civilization IV is being developed mostly in
Python (with C++ for some low levels, and BoostPython as "glue"); other
Python success stories show it used in payroll applications (the hugely
successful PayThyme), productivity ones (OSAF's Chandler), etc, etc.

Look around the web for "Python success stories" and you may find many
other examples in as huge a variety of fields as one might wish.


Alex
 
A

Alex Martelli

Roy Smith said:
No language has libraries for everything you might ever possibly want to
do. Python has a wide range of libraries for many common tasks, but my no
means all. Still, if it comes down to "language X has a good library for
what we need and language Y doesn't", that will often be (and rightly so)
the decision maker as to which language to use.

....except that -- with ctypes, SWIG, Jython and IronPython
implementations, pyrex, BoostPython, and a zillion other tools, it's
just about impossible to give examples of libraries which Python cannot
use pretty easily and successfully. Library availability (through any
or all of these tools) is one of the strong practical argument FOR
Python!-)


Alex
 
B

bonono

But when we talk about organisation(and convincing sometimes not on
merit sake), banner name helps. I was once in organisation where The
MS/Intel/IBM combination is a sure thing because even if there is
anything went wrong, it wouldn't be the reason for scrutiny comparing
with say using a machine with AMD inside.
 
B

bonono

But when we talk about organisation(and convincing sometimes not on
merit sake), banner name helps. I was once in organisation where The
MS/Intel/IBM combination is a sure thing because even if there is
anything went wrong, it wouldn't be the reason for scrutiny comparing
with say using a machine with AMD inside.
 
M

Magnus Lycka

Stuart said:
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
 
S

Stuart Turner

Thanks to Everyone for replying - it has given me much food for thought.

- Stuart
 
A

Alex Martelli

But when we talk about organisation(and convincing sometimes not on
merit sake), banner name helps. I was once in organisation where The
MS/Intel/IBM combination is a sure thing because even if there is
anything went wrong, it wouldn't be the reason for scrutiny comparing
with say using a machine with AMD inside.

The good old "nobody ever got fired for [X]", hm? You may be a shrewder
judge of human nature (or, at least, "human nature as evidenced by
CYAing behavior of humans within suitably disfunctional organizations")
than I was by my implied assertion that successes _within a certain
broad area of software development_ may be more relevant than successes
by "prestigiously named firm" in somewhat-unrelated fields.

It would still be easier to respond to your posts if you didn't
top-post, though (i.e., if you didn't put your comments BEFORE what
you're commenting on -- that puts the "conversation" in a weirdly
distorted order, unless one give up on quoting what you're commenting
on, or invests a lot of time and energy in editing...;-).


Alex
 
S

Steve Holden

Magnus said:
Stuart said:
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.
[...]
Life would be easy if tools were only chosen on technincal, economical
and practical merits...
Altogether now" "If I ruled the world ..."
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?)
Quite. People have said exactly that, you know ;-)

http://www.artima.com/weblogs/viewpost.jsp?thread=42242

[...]
regards
Steve
 
M

Magnus Lycka

Steve said:
Quite. People have said exactly that, you know ;-)

Anyone else besides you? ;^)

Seriously, it really depends on what aspects of Java and COBOL
you compare. As you noted, COBOL is better in some ways...

Well, I've never coded a lot in either language, but I've worked
fairly intimately with COBOL and Java developers in some projects,
and my exposure to COBOL made me understand a lot about the bugs
that haunt mainframe systems. (I actually wrote a Python program
that generated COBOL and JCL for database export/import.)

It's one thing that it's so verbose: We had one architect who
wrote enough pseudo code and SQL statements to keep around 10
COBOL coders fully occupied (and we still had a team with as
many testers as coders, so it wasn't that the coders spent
half their time testing).

Still, the really distinguishing factor I saw in COBOL on
mainframes wasn't bloat, but this completely static world
view.

For other programmers, COBOL programmers appear as inhabitants
in flatland, who haven't discovered that there is actually a
third dimension. They still view memory as a punch card. They
constantly run into things like: "We didn't think anyone could
possibly have more than 20 employments during a month, and it
turns out that his whole category has, but we've upped it to 30,
and that seems to work so far." As a non-COBOList, the natural
response is obviously to write code that works with any number
of employments, and doesn't allocate the same amount of memory
for those with one employment as for those with 25. In COBOL
this seems to be prohibitly complex in many cases. Heck, they
even determine the full size of files when they create them. We
had some special (probably very expensive) software system that
allowed us to dynamically allocate new space to files as data
was added, but that was considered black magic, that only a few
wizards understood.

From this perspective, Java is much closer to Python than to COBOL.
Still, Python is more dynamic than Java. I'd say that going from
Java to Python is similar to going from COBOL to Java. Maybe scary
at first, but an eye-opener that makes you feel more powerful. A
bit like a journey to a foreign continent. I do think the step
from COBOL to Java is bigger then the step from Java to Python though.

In one way, COBOL and Python are the similar languages, and Java is
the odd one: While COBOL is archaic, and appears retarded for
modern programmers, it's easy to learn--at least if you haven't
programmed before... It was designed to be easy for non-programmers
to use. Python is a great newbie language. Java has tried to avoid
a lot of the traps of C/C++, but it's still much more difficult
to get started there, than with Python or COBOL.

COBOL has been very successful. It's still used a lot today, after
all these decades, and while it lacks a lot of the abstractions in
modern languages, it has for instance numeric types that don't give
the kinds of surprises that floats do.

While the perfect modern successor to COBOL would probably have some
features that are lacking in Python 2.x, I think we're pretty close.
With datetime and decimal, we have the fundamental types that were
missing before. OO is available but not forced upon us. The initial
threshold to become productive is low, but we won't hit the ceiling
as we evolve. Sure, there isn't full standardized support for all
things we need, such as message queueing systems or distributed
transactions, but that's not too hard to fix. There are C APIs...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top