Python too complex ?!?!?!

B

Brian

Had a unsettling conversation with a CS instructor that
teaches at local high schools and the community
college. This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

I am a low-end (3-year) journeyman Pythonista, and I
was attracted to the language because of its
simplicity. And I have come to enjoy the richness of
available libraries.

Many of the good people of this NG may be 'too close'
to answer, but has Python, as a general devel platform,
lost its simplicity ? Is library install too complex
and unreliable ? Will my dog go to heaven ?
 
P

Paddy

Had a unsettling conversation with a CS instructor that
teaches at local high schools and the community
college. This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

I am a low-end (3-year) journeyman Pythonista, and I
was attracted to the language because of its
simplicity. And I have come to enjoy the richness of
available libraries.

Many of the good people of this NG may be 'too close'
to answer, but has Python, as a general devel platform,
lost its simplicity ? Is library install too complex
and unreliable ? Will my dog go to heaven ?

It would be nice to have more info on his specific problems. Me, I
find both Activestates and the official Python wiundows installers
just work.

- Paddy.
 
B

BartlebyScrivener

This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python.

If his students have problems installing Python on Windows, show him
this.

http://tinyurl.com/w7wgp

It can't get any easier.

rd
 
T

Tim Chase

programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

A little anecdotal comparison from some of my experience with two
web apps deployed at my current company:

One web app, written in C#/ASP.net one written in Python.

Moved each app to new servers (C#/ASP.net on a new Windows box,
Python app on a shiny new Debian box).

C#/ASP.net app: had to find and install the right version of the
..net libraries. That's an afternoon of my life I won't get back.

Python app: copied my app

C#/ASP.net app: couldn't find VS2003 (in which the app had been
written) any more so had to upgrade to VS2005.

Python app: Continued to use the same development environment.

C#/ASP.net app: (ASP specific) generally requires following a
particular convention. Writing a RESTful web app is next to
impossible given the reliance on the postbacks; and the server
environment doesn't make it easy to make clean URLs

Python app: Django makes web-app development easy and
clean/RESTful (other frameworks may as well...I speak from Django
experience) and push you to Do The Right Thing (tm)

C#/ASP.net app: had to re-partition my server containers so that
it could deploy .Net 2.0 and .Net 3.0 apps side-by-side

Python app: I've had Python 2.3, 2.4 and 2.5 running on the same
machine without a thought

C#/ASP.net app: libraries are often written to a particular
framework version, so if any new functionality requires the new
version the whole app needs to be migrated.

Python app: most of the libraries I use come built in, or they
work with 2.3 or later.

C#/ASP.net app: Installing new libraries, same as upgrading
currently-used libraries. Usually requires paying for, then
manually installing various libraries, clearing distribution
rights, etc.

Python app: There are an abundance libraries that are just an
apt-get away in terms of difficulty, and they are Free Software
so I can install them and deploy them without additional costs.

C#/ASP.net app: 3rd party libraries usually come as source-less
DLLs that you can't peer into

Python app: 3rd party libraries are usually pure python which
you can modify or step into as needed

C#/ASP.net app: really only works well on Windows

Python app: works well on Windows, Linux, BSD, Mac OS X...

C#/ASP.net app: really requires Visual Studio

Python app: works well with Eclipse, Vim, Emacs, Wing IDE,
Komodo, Idle, and piles of other development environments. Heck,
I've written the occasional python program using "ed" or "cat >
x.py".

C#/ASP.net app: files are scattered all over. You've got source
apps, you've got templates, you've got resource files, you've got
GUID files. And VS hides the complexity so when (not "if")
something breaks you get a crash course in what goes on under the
covers.

Python app: I've got .py files (and sometimes templates for my
Django code, and could have I18N files for translations). Very
easy to track down where everything is.

C#/ASP.net app: Code/syntax is horridly opaque, requires braces
and lots of additional overhead code to get things done. Compare
the clutter of a basic C# script with a similarly function Python
script. How much is pure syntactic overhead?

Python app: Code/syntax is rather easy to read (once you
understand list comprehensions and the __foo__ methods)



Yeah, I'd take Python any day...for implementation *OR* for
teaching someone how to program.

-tkc
 
D

Donn Ingle

I dunno about your dog :) but Python libs are not too demanding. From a
Gnu/Linux pov with package managers things are quite simple.

My wish is to find a way to make that even easier because the packaged
modules are not always up to date.

If the Cheese Shop could supply downloads of modules and we could stick on a
gui interface that wraps around import statements to guide the installation
of any missing packages -- that would be progress.

If you are online and the app runs, it can check the "freshness" of your
modules (those called from the app and recursively) and offer to fetch the
latest stable versions.

The gui is an issue. Does one TK or rely on some fall-back system of
gnome/kde/x11/windows dialogue boxes (ending in abject failure by way of
raw_input on the command line)? Or (perhaps) have it fetch a standard
dialogue library which would fetch and install what is needed for future
occasions.

Anyway, this is a bit of a hijack and I have not touched C# in any way, but
I don't think Python has anything to be ashamed of.*

/d

* Okay, maybe decorators but that's just because I am far too thick to grok
them :D
 
D

davisn90210

I dunno about your dog :) but Python libs are not too demanding. From a
Gnu/Linux pov with package managers things are quite simple.

My wish is to find a way to make that even easier because the packaged
modules are not always up to date.

If the Cheese Shop could supply downloads of modules and we could stick on a
gui interface that wraps around import statements to guide the installation
of any missing packages -- that would be progress.

Interesting idea, although it's not something I'd want included and
turned on by default. Should certainly be possible, though, with a
little __import__ magic.
If you are online and the app runs, it can check the "freshness" of your
modules (those called from the app and recursively) and offer to fetch the
latest stable versions.

Something similar to Java's webstart? Implement an __import__ hook
that downloads and caches the latest (stable) versions of libraries as
needed.
The gui is an issue. Does one TK or rely on some fall-back system of
gnome/kde/x11/windows dialogue boxes (ending in abject failure by way of
raw_input on the command line)? Or (perhaps) have it fetch a standard
dialogue library which would fetch and install what is needed for future
occasions.

You wouldn't really *need* a GUI, although it probably should be a
configurable option ... so the user can keep tabs on, and more control
over, what's going on. No reason why it couldn't be totally
automated. easy_install already provides for automated installation
of python apps/libraries, so you could build off that.
Anyway, this is a bit of a hijack and I have not touched C# in any way, but
I don't think Python has anything to be ashamed of.*

/d

* Okay, maybe decorators but that's just because I am far too thick to grok
them :D

It seems there are a number of people who don't grok decorators.
While getting to know how they work underneath does require some
careful reading and out-of-the-box thinking, it's only really
necessary to understand them at this level if you want to actually
implement a decorator. Merely using decorators is, IMHO, much easier
to understand (but still requires a slight brain-warp). I think some
people try to understand decorators too completely too quickly, and
end up labeling them one of those complex/unintuitive/"way out"
things.

--Nathan Davis
 
D

Donn Ingle

Interesting idea, although it's not something I'd want included and
turned on by default. Should certainly be possible, though, with a
little __import__ magic.
Well, since we're shooting the sh*t :), I tried in my one and only released
app (Fonty Python) to wrap the imports in try clauses and then print
helpful strings to the console to guide the user.
I'm really not too clued-up on the __deep__ magic of Python, so I can't say
what tricks there are, but a simple "catch a fail and then start a
solution" process is a general approach.
Something similar to Java's webstart? Implement an __import__ hook
that downloads and caches the latest (stable) versions of libraries as
needed.
I have also never touched Java, so I can't say, but something like that.
The main problem with having modules coming from the web is time. How long
is the life of a URL? The Cheese Shop seems pretty well established and
could serve the role. Perhaps there are already ways of making sure that a
hard-coded link in an app can reach a variable URL online.
You wouldn't really *need* a GUI, although it probably should be a
configurable option ...
I'd agree, but then I grew up with commands lines. I can say with total
confidence that the command-line scares a lot of people and if there are
any questions that need answering during the automated process (and there's
always *something* that crops up ) then a gui is the natural way to reach
the user.
No reason why it couldn't be totally
automated. easy_install already provides for automated installation
of python apps/libraries, so you could build off that.
Totally automated would be the goal. I'd say a throbber or progress
animation of some kind would be needed.

Just thought of a wrinkle - say a new module is available and is installed
and then proves to be broken. How can the app recover? There'd have to be a
system of flags in a db that mark the situation and on re-run can roll back
to the last working module. Then we get feedback to the author of the
module....

And let's not forget all the joy that can be spread by having to compile
modules (on various platforms) from C/C++ and then worry about *their*
dependant libraries!

Oh fun times :p

(I think I can see why this has never been approached.)
Merely using decorators is, IMHO, much easier
to understand (but still requires a slight brain-warp).
I'm still stuck with those things. I can't really find an example that I
want to use. My brain keeps saying "yeah, but that's so smoke and mirrors
and I could do it this way ... which seems much plainer."
I think some
people try to understand decorators too completely too quickly, and
end up labeling them one of those complex/unintuitive/"way out"
things.
I have put them in the bag along with Design Patterns and Threads as "things
that I don't have to worry about because liff is too short. And like the
Spanish Inquisition, they're welcome to surprise me when I least expect it,
but I'm not going to lose my mind waiting :D

/d
 
B

Berco Beute

A little anecdotal comparison from some of my experience with two
web apps deployed at my current company:

One web app, written in C#/ASP.net one written in Python.

Moved each app to new servers (C#/ASP.net on a new Windows box,
Python app on a shiny new Debian box).

C#/ASP.net app: had to find and install the right version of the
.net libraries. That's an afternoon of my life I won't get back.

Python app: copied my app

C#/ASP.net app: couldn't find VS2003 (in which the app had been
written) any more so had to upgrade to VS2005.

Python app: Continued to use the same development environment.

C#/ASP.net app: (ASP specific) generally requires following a
particular convention. Writing a RESTful web app is next to
impossible given the reliance on the postbacks; and the server
environment doesn't make it easy to make clean URLs

Python app: Django makes web-app development easy and
clean/RESTful (other frameworks may as well...I speak from Django
experience) and push you to Do The Right Thing (tm)

C#/ASP.net app: had to re-partition my server containers so that
it could deploy .Net 2.0 and .Net 3.0 apps side-by-side

Python app: I've had Python 2.3, 2.4 and 2.5 running on the same
machine without a thought

C#/ASP.net app: libraries are often written to a particular
framework version, so if any new functionality requires the new
version the whole app needs to be migrated.

Python app: most of the libraries I use come built in, or they
work with 2.3 or later.

C#/ASP.net app: Installing new libraries, same as upgrading
currently-used libraries. Usually requires paying for, then
manually installing various libraries, clearing distribution
rights, etc.

Python app: There are an abundance libraries that are just an
apt-get away in terms of difficulty, and they are Free Software
so I can install them and deploy them without additional costs.

C#/ASP.net app: 3rd party libraries usually come as source-less
DLLs that you can't peer into

Python app: 3rd party libraries are usually pure python which
you can modify or step into as needed

C#/ASP.net app: really only works well on Windows

Python app: works well on Windows, Linux, BSD, Mac OS X...

C#/ASP.net app: really requires Visual Studio

Python app: works well with Eclipse, Vim, Emacs, Wing IDE,
Komodo, Idle, and piles of other development environments. Heck,
I've written the occasional python program using "ed" or "cat >
x.py".

C#/ASP.net app: files are scattered all over. You've got source
apps, you've got templates, you've got resource files, you've got
GUID files. And VS hides the complexity so when (not "if")
something breaks you get a crash course in what goes on under the
covers.

Python app: I've got .py files (and sometimes templates for my
Django code, and could have I18N files for translations). Very
easy to track down where everything is.

C#/ASP.net app: Code/syntax is horridly opaque, requires braces
and lots of additional overhead code to get things done. Compare
the clutter of a basic C# script with a similarly function Python
script. How much is pure syntactic overhead?

Python app: Code/syntax is rather easy to read (once you
understand list comprehensions and the __foo__ methods)

Yeah, I'd take Python any day...for implementation *OR* for
teaching someone how to program.

-tkc

Thank you very much for this VERY useful summary. It gives me tons of
ammunition in case the latest .Net zealot walks into my office :)
 
J

John Nagle

He has a point. Many Python enthusiasts are in denial about this,
but, face it, the binary library situation isn't in good shape.

Try running something that needs, say, MySQL and OpenSSL on a
shared hosting server and see how far you get. Or try to install
the same set of modules on both Linux and Windows.

John Nagle
 
J

John Salerno

Brian said:
Had a unsettling conversation with a CS instructor that
teaches at local high schools and the community
college. This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

I am a low-end (3-year) journeyman Pythonista, and I
was attracted to the language because of its
simplicity. And I have come to enjoy the richness of
available libraries.

Many of the good people of this NG may be 'too close'
to answer, but has Python, as a general devel platform,
lost its simplicity ? Is library install too complex
and unreliable ? Will my dog go to heaven ?

I'm a complete noob about most of this, but it sounds like his problem
may have more to do with what needs to be done on a Linux machine, than
anything specifically pertaining to Python. How can you call installing
Python (or any third-party modules) on Windows 'hard'?

Maybe his students just have a harder type figuring out how to install
things in Linux? I don't know...
 
M

MonkeeSage

Had a unsettling conversation with a CS instructor that
teaches at local high schools and the community
college. This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

I am a low-end (3-year) journeyman Pythonista, and I
was attracted to the language because of its
simplicity. And I have come to enjoy the richness of
available libraries.

Many of the good people of this NG may be 'too close'
to answer, but has Python, as a general devel platform,
lost its simplicity ? Is library install too complex
and unreliable ? Will my dog go to heaven ?

I started out with some javascript and ruby background, and I
"mastered" (i.e., could do everything I wanted to do in) python in a
few months (including playing with the GTK bindings). I only have a
GED, so I'm not the smartest programmer in the world or anything. But
even so, the learning curve for python, for me, was very gradual.
Nothing to too complex to swallow a spoonful at a time. After several
years of using python (a very short time in the long-run, mind you), I
think that the basic concepts are as simple as ever, and it remains a
prime candidate for a CS 101 course.

On the other hand, C# and .NET seems like a lot of baggage to bring to
the table. First off, you have to introduce the CLR and how it relates
to C#, then you have to deal with all the public, private, etc,
syntaxis for constructors/destructors. I don't see how anyone could
claim that C# is simpler to teach than python. I mean, (non-PC
statement follows), it's easier to teach retarded, blind children to
recite the lord's prayer backwards, in sign language, than it is to
get a working .net environment set up for actual use w/o installing
the latest visual studio. And not everyone had five-million dollars
(or a corporate license) to get the latest and greatest VS.

Regards,
Jordan
 
K

Kay Schluehr

Had a unsettling conversation with a CS instructor that
teaches at local high schools and the community
college. This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

I don't understand this complaint. How does your instructor installs
libraries for C#? When he uses Linux for teaching purposes I assume
his students have little problems typing some shell commands and when
he uses Windows his students might feel comfortable double clicking on
a Windows installer - most likely containing prepackaged binaries.
What have I missed?

Kay
 
A

alain

I don't understand this complaint. How does your instructor installs
libraries for C#? When he uses Linux for teaching purposes I assume
his students have little problems typing some shell commands and when
he uses Windows his students might feel comfortable double clicking on
a Windows installer - most likely containing prepackaged binaries.
What have I missed?

Kay

I think i understand his complaint.
Have you ever tried to install a package making use of easy_install?
If you have, then you understand this is a real pain in the ass,
especially if your internet access requires proxy authentication.
The world was easy before easy_install !

Alain
 
K

kyosohma

Had a unsettling conversation with a CS instructor that
teaches at local high schools and the community
college. This person is a long-term Linux/C/Python
programmer, but he claims that the install, config, and
library models for C# have proved to be less
problematic than Python. So both his courses (intro,
data structs, algorithms) are taught in C#.

I am a low-end (3-year) journeyman Pythonista, and I
was attracted to the language because of its
simplicity. And I have come to enjoy the richness of
available libraries.

Many of the good people of this NG may be 'too close'
to answer, but has Python, as a general devel platform,
lost its simplicity ? Is library install too complex
and unreliable ? Will my dog go to heaven ?

If this professor was only using Windows for his environment, then I
might be able to understand his argument better. There are many more
external modules for Python that don't have Windows installers than
there are with binaries. And I've had more than my fair share of
broken setup.py files.

On the other hand, if all that is needed are the standard libraries,
than it's a breeze to install Python since they're all included.

Mike
 
C

Chris Mellon

If this professor was only using Windows for his environment, then I
might be able to understand his argument better. There are many more
external modules for Python that don't have Windows installers than
there are with binaries. And I've had more than my fair share of
broken setup.py files.

On the other hand, if all that is needed are the standard libraries,
than it's a breeze to install Python since they're all included.

Mike

These modules exist, but aren't that common. Certainly anything you're
likely to be using in an introductory compsci course is well packaged.
And even if it's not, it's really not that hard to create packages or
installers - a days work of course prep would take care of the
potential problem.
 
K

kyosohma

These modules exist, but aren't that common. Certainly anything you're
likely to be using in an introductory compsci course is well packaged.
And even if it's not, it's really not that hard to create packages or
installers - a days work of course prep would take care of the
potential problem.

I stand corrected. Thanks for the clarification.

Mike
 
D

Diez B. Roggisch

alain said:
I think i understand his complaint.
Have you ever tried to install a package making use of easy_install?
If you have, then you understand this is a real pain in the ass,
especially if your internet access requires proxy authentication.
The world was easy before easy_install !

setuptools might not be flawless, but it works for me most of the times
- and always better than pure distutils.

BTW, you can download eggs and install them from files - so while
teaching easy_install how to deal with proxies (are these still used by
anyone - I thought that was in the 90ties... ) certainly would be good,
it isn't necessary.

Diez
 
D

Dennis Lee Bieber

BTW, you can download eggs and install them from files - so while
teaching easy_install how to deal with proxies (are these still used by
anyone - I thought that was in the 90ties... ) certainly would be good,
it isn't necessary.
Company firewall blocks practically anything that doesn't come down
from a web-browser...

I've never been able to figure out how to install a downloaded egg
-- the installer, even with the file in the same directory, still seems
to try to find a web copy and dies on the firewall.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
A

Aaron Watters

What have I missed?

Microsoft has a free download version of Visual Studio
which you can install in one go that has basically everything
you might want to cover in the first 2 or 3 programming
classes built in. Also, when it comes to making things easy
the magic "intellisense" in VS cannot be beat, and stricter
typing rules tend to keep'em out of trouble. I've seen
moderately skilled programmers get confused about list.append
versus list.extend -- it wouldn't happen in C#.

I would suggest that Python might be better for
more advanced classes like data structures
because Python cuts out all those declarations that get
in the way of understanding. For example you could implement
a binary tree in Python in 5 minutes of typing, providing
"just the facts, M'am", whereas even
with intellisense help it would take 15 minutes in C# and
the students would be totally lost in the details when
you were done.

It's also possible that once you break'em in a bit
beginner students would make better progress with more
advanced concepts by making use of the interactive
interpreter. I've taught java and C# where the students
freeze in abject fear when they confront their first
array -- Python lists are much less intimidating at
the interactive prompt. At the beginning, however, I would
agree that C# has some serious advantages. I don't
see anything wrong in teaching a bit of both, tho.

Students also like to learn languages which they can
find in the "help wanted" section very easily ;).

-- Aaron Watters

===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=perverse+zone
 

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

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top