[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Article of interest: Python pros/cons for the enterprise

estherschindler

2/20/2008 11:22:00 AM

This is part of a series examining the strengths and weaknesses of
various scripting languages, with particular attention to enterprise
(read: big company) use.

You Used Python to Write WHAT?
Python is a powerful, easy-to-use scripting language suitable for use
in the enterprise, although it is not right for absolutely every use.
Python expert Martin Aspeli identifies when Python is the right
choice, and when another language might be a better option.
http://www.cio.com/arti...
124 Answers

Tim Chase

2/20/2008 1:58:00 PM

0

> You Used Python to Write WHAT?
> http://www.cio.com/arti...

"""
Furthermore, the power and expressivity that Python offers means
that it may require more skilled developers.
[...down to the summary...]
Python may not be an appropriate choice if you:
[...]
* Rely on teams of less-experienced programmers. These
developers may benefit from the wider availability of training
for languages like Java and are less likely to make mistakes with
a compile-time, type-checked language.
"""

Oh noes! You might need competent programmers that actually
understand what they're doing!

(they might even have to write testing code to make sure their
code works as intended...it's a good thing that Python includes
unittest and doctest modules in the stock install)

Sigh. Any programmer that can overcome the hurdles of learning
Java or C# can quickly/easily pick up Python as long as they're
willing to unlearn some bad habits.

-tkc


Carl Banks

2/21/2008 1:39:00 AM

0

On Feb 20, 8:58 am, Tim Chase <python.l...@tim.thechases.com> wrote:
> > You Used Python to Write WHAT?
> >http://www.cio.com/arti...
>
> """
> Furthermore, the power and expressivity that Python offers means
> that it may require more skilled developers.
> [...down to the summary...]
> Python may not be an appropriate choice if you:
> [...]
> * Rely on teams of less-experienced programmers. These
> developers may benefit from the wider availability of training
> for languages like Java and are less likely to make mistakes with
> a compile-time, type-checked language.
> """
>
> Oh noes! You might need competent programmers that actually
> understand what they're doing!
>
> (they might even have to write testing code to make sure their
> code works as intended...it's a good thing that Python includes
> unittest and doctest modules in the stock install)
>
> Sigh. Any programmer that can overcome the hurdles of learning
> Java or C# can quickly/easily pick up Python as long as they're
> willing to unlearn some bad habits.


C++ is a compile-time, type-checked language, which means it is
totally safer for newbies than Python. Yep, your big company is
totally safe with newbie C++ programmers.


Carl Banks

TerryP

2/21/2008 6:20:00 AM

0


Thanks for the link, was a nice read.

"Have specialized needs better served by other languages that you already
know. For example, if you want to do a lot of text processing and you have
a basement full of Perl programmers, there's no compelling reason to
switch."

Now that really hits the sweet spot hehe.


The threads topic reminds me of a project I had in mind not so long ago, I
wanted to write it in Ruby because I could get it done in a few hours and
move on to other work but chose not to because I could not find a way
to /100%/ secure some information that had to be both kept classified and
apart of the program for business reasons.

So obviously ANSI C and the hunt for a suitable networking library to fill
in the biggest time waster came to mind.


Then I remembered any one we wanted to *prevent* getting that information
out of the Ruby scripts could do the same with a little (easy) forensics
work if the application was done in C or C++. So choosing a language like
Ruby or Python wouldn't be much worse for the situation.


Needless to say I went back to using languages on a scale of best shoe to
fit first and the project got side-stepped by new hardware and a stop-gap
in a can.


--
The young Georgia miss came to the hospital for a checkup.
"Have you been X-rayed?" asked the doctor.
"Nope," she said, "but ah've been ultraviolated."

Bruno Desthuilliers

2/21/2008 9:55:00 AM

0

Carl Banks a écrit :
> On Feb 20, 8:58 am, Tim Chase <python.l...@tim.thechases.com> wrote:
>>> You Used Python to Write WHAT?
>>> http://www.cio.com/arti...
>> """
>> Furthermore, the power and expressivity that Python offers means
>> that it may require more skilled developers.
>> [...down to the summary...]
>> Python may not be an appropriate choice if you:
>> [...]
>> * Rely on teams of less-experienced programmers. These
>> developers may benefit from the wider availability of training
>> for languages like Java and are less likely to make mistakes with
>> a compile-time, type-checked language.
>> """
>>
(snip)
>
> C++ is a compile-time, type-checked language, which means it is
> totally safer for newbies than Python. Yep, your big company is
> totally safe with newbie C++ programmers.
>

Mouarf ! Brillant demonstration, thanks Carl !-)

(and BTW, +1 QOTW)

Nicola Musatti

2/21/2008 1:30:00 PM

0

On Feb 21, 10:55 am, Bruno Desthuilliers <bruno.
42.desthuilli...@wtf.websiteburo.oops.com> wrote:
> Carl Banks a écrit :
[...]
> > C++ is a compile-time, type-checked language, which means it is
> > totally safer for newbies than Python. Yep, your big company is
> > totally safe with newbie C++ programmers.
>
> Mouarf ! Brillant demonstration, thanks Carl !-)
>
> (and BTW, +1 QOTW)

Newbies learn, and the fundamental C++ lessons are usually learnt
quite easily. Unless we're talking about idiots, that is, but in this
case at least C++ is likely to make their deficiencies evident sooner
than most other programming languages. So, yes, your big company is
likely to be safer with newbie C++ programmers than with Python newbie
programmers.

Had we been speaking of productivity... but we weren't, were we?

Cheers,
Nicola Musatti

Ryan Ginstrom

2/21/2008 2:47:00 PM

0

> On Behalf Of Nicola Musatti
> Newbies learn, and the fundamental C++ lessons are usually
> learnt quite easily. Unless we're talking about idiots, that
> is, but in this case at least C++ is likely to make their
> deficiencies evident sooner than most other programming
> languages. So, yes, your big company is likely to be safer
> with newbie C++ programmers than with Python newbie programmers.

The danger of memory leaks alone makes C++ a decidedly newbie-unfriendly
language. Java I might go along with, but C++?

Regards,
Ryan Ginstrom
(who learned C++ before Python and has grappled with his share of memory
bugs)

Tim Chase

2/21/2008 3:01:00 PM

0

> Newbies learn, and the fundamental C++ lessons are usually
> learnt quite easily.

Ah yes...that would be why Scott Meyers has written three
volumes[1] cataloging the gotchas that even experienced C++
programmers can make...

And the 1030 page Stroustrup C++ reference is easily comprehended
by the uninitiated[2]. The Python core language is a mere 97
pgs. The documentation for the *entire* standard library is
about the size of just the C++ Language Reference.[3]

Assembly language is pretty easy to learn too. But is it a
productive use of a programmer's time? Only if it's 1975.

-tkc

[1]
http://www.amazon.com/s?url=search-alias%3Daps&field-keywords=scot...

[2]
http://www.amazon.com/dp/0201700735/103-41027...

[3]
http://python.org/ftp/python/doc/2.5/pdf-lett...

Nicola Musatti

2/21/2008 3:11:00 PM

0

Please do not reply personally to newsgroup postings, thank you.

On Thu, Feb 21, 2008 at 4:00 PM, Tim Chase
<python.list@tim.thechases.com> wrote:
[...]

--
Nicola.Musatti <at> gmail <dot> com
Home: http://nicola.musatti.googlepage...
Blog: http://wthwdik.word...

Nicola Musatti

2/21/2008 3:37:00 PM

0

On Feb 21, 3:46 pm, "Ryan Ginstrom" <softw...@ginstrom.com> wrote:
> > On Behalf Of Nicola Musatti
> > Newbies learn, and the fundamental C++ lessons are usually
> > learnt quite easily. Unless we're talking about idiots, that
> > is, but in this case at least C++ is likely to make their
> > deficiencies evident sooner than most other programming
> > languages. So, yes, your big company is likely to be safer
> > with newbie C++ programmers than with Python newbie programmers.
>
> The danger of memory leaks alone makes C++ a decidedly newbie-unfriendly
> language. Java I might go along with, but C++?

Memory *leaks* are just as common in garbage collected languages if
not more, thanks to C++'s deterministic destruction and its standard
library, especially if complemented with smart pointers such as
Boost's shared_ptr. At least C++ programmers tend to know that memory
must be managed, while newbies in other languages are often lead to
believe - wrongly - that the garbage collector takes care of
everything.

Dereferencing invalid pointers however is indeed a more serious
problem. This is the one lesson I had in mind when I wrote my previous
message; newbies that are not hopeless tend to learn it rather quickly
and the number of mistakes of this kind they make tends to fall in a
rather short time. I do admit however that even experienced
programmers make similar errors every now and again.

While attempting to dereference a null reference is a rather common
mistake in languages such as Java and C# - I'm not sure about Python -
the one invaluable guarantee provided by the garbage collector is the
absence of *invalid* references. This is one of the reasons why
there's an ongoing effort to add garbage collection to the C++
standard, albeit in an optional form.

Cheers,
Nicola Musatti

Nicola Musatti

2/21/2008 4:14:00 PM

0

On Feb 21, 4:00 pm, Tim Chase <python.l...@tim.thechases.com> wrote:
> > Newbies learn, and the fundamental C++ lessons are usually
> > learnt quite easily.
>
> Ah yes...that would be why Scott Meyers has written three
> volumes[1] cataloging the gotchas that even experienced C++
> programmers can make...

Scott Meyers's books don't just catalogue gotcha's, but suggest
effective ways to use the language. Moreover their combined word count
is probably below the "Python Cookbook"'s one.

> And the 1030 page Stroustrup C++ reference is easily comprehended
> by the uninitiated[2]. The Python core language is a mere 97
> pgs. The documentation for the *entire* standard library is
> about the size of just the C++ Language Reference.[3]

A more reasonable comparison would be against the core portion of the C
++ standard. This is still roughly three times the Python Reference
Manual. The C++ syntax is way more complex than Python's and mostly
due to its C heritage is also often inconsistent. However, despite its
apparent semplicity, Python allows extremely advanced programming
techniques. I wouldn't be surprised if the proportion of Python
programmers that are capable of exploiting the language's full power
was comparable to the corresponding proportion of C++ expert
programmers.

While I find the Python standard library documentation adequate for a
free, voluntary effort, I consider it one of the weakest spots of
Python as a professional tool. Still comparing its size against
Stroustrup's book's is really comparing apples with oranges.

> Assembly language is pretty easy to learn too. But is it a
> productive use of a programmer's time? Only if it's 1975.

It depends on the task at hand.

Cheers,
Nicola Musatti