Python as a first language for computer sciencist

classic Classic list List threaded Threaded
55 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Python as a first language for computer sciencist

Carlos Eduardo Sotelo Pinto
Hi people
i was making a researching about python for computer
science students as a first language, and it coul be
good in Peruvian Universities and Colleges, may you
have some experiences, or articles or ideas about it.
Coul you send me to my personal email address.
Also I propose to you to began a discussion about this
topic.

I think in my personal opinion, python could be better
for students, for one so imoprtant reazon: Python is
clearly and powerfull; and because of it, students
just think in solve problems and learning programming,
and the language could be an excellent easy learning
progamming tool. Also teachers can use the power of
python for making good problems for the students.

--
Atentamente:

*------------------------------------*  ,= ,-_-. =.
|Carlos E. Sotelo Pinto(KrLoS)       | ((_/)o o(\_))
|GNU/Linux User Registered # 379182  |  `-'(. .)`-'
|Tildes omitidas voluntariamente     |      \_/
*------------------------------------*
Bitacora de Vuelo <http://csotelop.blogsome.com/>
Sociedad Peruana de Computacion <http://www.spc.org.pe/>
Grupo de Usuarios GNU/Linux Arequipa <http://www.aqpglug.org.pe/>
Grupo de Usuarios Debian Arequipa <http://www.debianarequipa.org>
Grupo de Usuarios Debian Peru <http://www.debianperu.org/>
------------------------------------------------------------------------
La actitud del hacker:
Los hackers resuelven problemas y construyen cosas, y creen en la libertad y la ayuda voluntaria mutua. Para ser aceptado como hacker, deberás comportarte como si tuvieras esta actitud en tu interior. Y para comportarte como si tuvieras esta actitud, deberás creerte de verdad dicha actitud.

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/ 
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

John Zelle
Carlos,

I doubt that you'll get much disagreement on this list about Python
being an excellent first language choice. Hence, there is unlikely to be
  much of a "discussion." I wrote a paper titled "Python as a First
Language" back in 1998, you can find it at:
http://mcsp.wartburg.edu/zelle/python

Carlos Eduardo Sotelo Pinto wrote:

> Hi people
> i was making a researching about python for computer
> science students as a first language, and it coul be
> good in Peruvian Universities and Colleges, may you
> have some experiences, or articles or ideas about it.
> Coul you send me to my personal email address.
> Also I propose to you to began a discussion about this
> topic.
>
> I think in my personal opinion, python could be better
> for students, for one so imoprtant reazon: Python is
> clearly and powerfull; and because of it, students
> just think in solve problems and learning programming,
> and the language could be an excellent easy learning
> progamming tool. Also teachers can use the power of
> python for making good problems for the students.
>

Based on my actual experience, I can say that Python _is_ a much better
first language choice than C, C++, Java, or Visual Basic. It has most of
the advantages of Scheme, but with a smoother transition to more
traditional languages. More and more CS programs are discovering the joy
of teaching Python first. So far, I've not heard of any program that
tried Python and then went back to something like C++ or Java.

Incidentally, I think Python is a marvelous tool throughout the CS
curriculum. It's a language that gets out of your way so that you can
concentrate on fundamental concepts. I even use Python in my Op Systems
class, something I'm frequently told Python isn't good for. Not true.
Python is (arguably) the simplest vehicle that allows my students to
program directly with underlying Posix system calls. It's simpler than
doing systems programming in C or C++. To say nothing of trying to
access the OS in Java... While I would not try to write an OS in Python,
it sure is a lot easier for teaching _about_ them. That is, I am using
the programming as a learning tool, not trying to teach them how to
program an OS.

--John

--
John M. Zelle, Ph.D.             Wartburg College
Professor of Computer Science    Waverly, IA
[hidden email]          (319) 352-8360
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Brad Miller

On Oct 17, 2005, at 12:45 PM, John Zelle wrote:

Carlos,

I doubt that you'll get much disagreement on this list about Python 
being an excellent first language choice. Hence, there is unlikely to be 
  much of a "discussion." I wrote a paper titled "Python as a First 
Language" back in 1998, you can find it at:


Carlos,

John also has an excellent textbook:  Python Programming: An Introduction to Computer Science.  We are in our second year of using this book in our CS1 class and are very happy with it.  Because of its power and simplicity we have found that students enjoy the class and can do more interesting projects in their first course than they could with Java.  

For example my students are now (in week 7 of the semester) writing functions to enlarge images, smooth the enlarged images, and do edge detection on the images the image library is so simple that the students can really concentrate on the problem solving parts of the exercise.  For me these are great introductory exercises that get them using nested loops, simple conditionals, and functions.  I think the students have more fun and are more successful when they can see the results of their work visually.

We also use Python in our CS2 course which focuses on data structures, and one of our colleagues is using Python in his advanced data structures course this year.  The great thing about using Python in a data structures course is that there is almost a one-to-one mapping from pseudocode to Python.  So the students can really see the how the concepts get mapped to code without all the extra overhead that a language like Java imposes.

Of course we also teach and use Java but we don't introduce our students to Java until the third course in our introductory sequence.  The nice thing about holding off on Java until the third course is that the students now know enough computer science that we can work on bigger and more interesting problems while they are learning Java.  In addition I can now use Python to compare and contrast as I introduce new language concepts in Java.


Brad
--
Brad Miller, PhD
Assistant Professor
Luther College
jabber:  [hidden email]

Carlos Eduardo Sotelo Pinto wrote:

Hi people 
i was making a researching about python for computer
science students as a first language, and it coul be
good in Peruvian Universities and Colleges, may you
have some experiences, or articles or ideas about it.
Coul you send me to my personal email address.
Also I propose to you to began a discussion about this
topic.

I think in my personal opinion, python could be better
for students, for one so imoprtant reazon: Python is
clearly and powerfull; and because of it, students
just think in solve problems and learning programming,
and the language could be an excellent easy learning
progamming tool. Also teachers can use the power of
python for making good problems for the students.



Based on my actual experience, I can say that Python _is_ a much better 
first language choice than C, C++, Java, or Visual Basic. It has most of 
the advantages of Scheme, but with a smoother transition to more 
traditional languages. More and more CS programs are discovering the joy 
of teaching Python first. So far, I've not heard of any program that 
tried Python and then went back to something like C++ or Java.

Incidentally, I think Python is a marvelous tool throughout the CS 
curriculum. It's a language that gets out of your way so that you can 
concentrate on fundamental concepts. I even use Python in my Op Systems 
class, something I'm frequently told Python isn't good for. Not true. 
Python is (arguably) the simplest vehicle that allows my students to 
program directly with underlying Posix system calls. It's simpler than 
doing systems programming in C or C++. To say nothing of trying to 
access the OS in Java... While I would not try to write an OS in Python, 
it sure is a lot easier for teaching _about_ them. That is, I am using 
the programming as a learning tool, not trying to teach them how to 
program an OS.

--John

-- 
John M. Zelle, Ph.D.             Wartburg College
Professor of Computer Science    Waverly, IA
[hidden email]          (319) 352-8360
_______________________________________________
Edu-sig mailing list



_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig

PGP.sig (193 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Toby Donaldson
In reply to this post by Carlos Eduardo Sotelo Pinto
Python's a good choice of language when you want to talk about
"programming as computation" to people who don't have a lot of CS or
math background. It's also good for talking about algorithm
correctness. And I use it all the time as pseudocode and one-shot
scripts.

It's not so good for talking about "programming as exploiting your
computer", i.e. when it comes time to implement an algorithm
*efficiently*.

Toby

> On Oct 17, 2005, at 12:45 PM, John Zelle wrote:
>
> > Carlos,
> >
> > I doubt that you'll get much disagreement on this list about Python
> > being an excellent first language choice. Hence, there is unlikely
> > to be
> >   much of a "discussion." I wrote a paper titled "Python as a First
> > Language" back in 1998, you can find it at:
> > http://mcsp.wartburg.edu/zelle/python
> >
>
> Carlos,
>
> John also has an excellent textbook:  Python Programming: An
> Introduction to Computer Science.  We are in our second year of using
> this book in our CS1 class and are very happy with it.  Because of
> its power and simplicity we have found that students enjoy the class
> and can do more interesting projects in their first course than they
> could with Java.
>
> For example my students are now (in week 7 of the semester) writing
> functions to enlarge images, smooth the enlarged images, and do edge
> detection on the images the image library is so simple that the
> students can really concentrate on the problem solving parts of the
> exercise.  For me these are great introductory exercises that get
> them using nested loops, simple conditionals, and functions.  I think
> the students have more fun and are more successful when they can see
> the results of their work visually.
>
> We also use Python in our CS2 course which focuses on data
> structures, and one of our colleagues is using Python in his advanced
> data structures course this year.  The great thing about using Python
> in a data structures course is that there is almost a one-to-one
> mapping from pseudocode to Python.  So the students can really see
> the how the concepts get mapped to code without all the extra
> overhead that a language like Java imposes.
>
> Of course we also teach and use Java but we don't introduce our
> students to Java until the third course in our introductory
> sequence.  The nice thing about holding off on Java until the third
> course is that the students now know enough computer science that we
> can work on bigger and more interesting problems while they are
> learning Java.  In addition I can now use Python to compare and
> contrast as I introduce new language concepts in Java.
>
>
> Brad
> --
> Brad Miller, PhD
> Assistant Professor
> Luther College
> http://www.cs.luther.edu/~bmiller
> jabber:  [hidden email]
>
> > Carlos Eduardo Sotelo Pinto wrote:
> >
> >> Hi people
> >> i was making a researching about python for computer
> >> science students as a first language, and it coul be
> >> good in Peruvian Universities and Colleges, may you
> >> have some experiences, or articles or ideas about it.
> >> Coul you send me to my personal email address.
> >> Also I propose to you to began a discussion about this
> >> topic.
> >>
> >> I think in my personal opinion, python could be better
> >> for students, for one so imoprtant reazon: Python is
> >> clearly and powerfull; and because of it, students
> >> just think in solve problems and learning programming,
> >> and the language could be an excellent easy learning
> >> progamming tool. Also teachers can use the power of
> >> python for making good problems for the students.
> >>
> >>
> >
> > Based on my actual experience, I can say that Python _is_ a much
> > better
> > first language choice than C, C++, Java, or Visual Basic. It has
> > most of
> > the advantages of Scheme, but with a smoother transition to more
> > traditional languages. More and more CS programs are discovering
> > the joy
> > of teaching Python first. So far, I've not heard of any program that
> > tried Python and then went back to something like C++ or Java.
> >
> > Incidentally, I think Python is a marvelous tool throughout the CS
> > curriculum. It's a language that gets out of your way so that you can
> > concentrate on fundamental concepts. I even use Python in my Op
> > Systems
> > class, something I'm frequently told Python isn't good for. Not true.
> > Python is (arguably) the simplest vehicle that allows my students to
> > program directly with underlying Posix system calls. It's simpler than
> > doing systems programming in C or C++. To say nothing of trying to
> > access the OS in Java... While I would not try to write an OS in
> > Python,
> > it sure is a lot easier for teaching _about_ them. That is, I am using
> > the programming as a learning tool, not trying to teach them how to
> > program an OS.
> >
> > --John
> >
> > --
> > John M. Zelle, Ph.D.             Wartburg College
> > Professor of Computer Science    Waverly, IA
> > [hidden email]          (319) 352-8360
> > _______________________________________________
> > Edu-sig mailing list
> > [hidden email]
> > http://mail.python.org/mailman/listinfo/edu-sig
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mail.python.org/pipermail/edu-sig/attachments/20051017/a34c8dfd/attachment.htm
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: PGP.sig
> Type: application/pgp-signature
> Size: 186 bytes
> Desc: This is a digitally signed message part
> Url : http://mail.python.org/pipermail/edu-sig/attachments/20051017/a34c8dfd/PGP.pgp
>
> ------------------------------
>
> _______________________________________________
> Edu-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
> End of Edu-sig Digest, Vol 27, Issue 29
> ***************************************
>
>


--
Dr. Toby Donaldson
School of Computing Science
Simon Fraser University (Surrey)
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Kirby Urner
In reply to this post by John Zelle
> Incidentally, I think Python is a marvelous tool throughout the CS
> curriculum. It's a language that gets out of your way so that you can
> concentrate on fundamental concepts. I even use Python in my Op Systems
> class, something I'm frequently told Python isn't good for. Not true.
> Python is (arguably) the simplest vehicle that allows my students to
> program directly with underlying Posix system calls. It's simpler than
> doing systems programming in C or C++. To say nothing of trying to
> access the OS in Java... While I would not try to write an OS in Python,
> it sure is a lot easier for teaching _about_ them. That is, I am using
> the programming as a learning tool, not trying to teach them how to
> program an OS.
>
> --John

I echo John's sentiments.  

There's something very satisfying about being able to use Python bindings to
the SDL library (C++) to make a CD tray pop open, or make your animation go
full screen vs. in a window.  You can do these things with PyGame.[1]

Using win32all, you can get into the guts of Windows more specifically,
calling up Microsoft Foundation Classes (MFC) and defining COM objects.
These powers will only increase, plus become more standardized across
platforms, with the spread of .NET/Mono (this is a Linux-friendly
technology, is not just about Windows or Microsoft).[2]

Python lets you define a web server with just a few lines of code, as the
Standard Library includes one -- it'll even run your cgi scripts for ya.[3]
This is a wonderful resource for future web programmers, as they pursue a
gentle intro to server side programming.  Why start by tackling Apache's
httpd daemon head on, complete with mod-rewrite?

South America has already made significant contributions to Python world.
Facundo Batista of Argentina is one of the brains behind the new decimal
type [4] and Brazil is known for providing a lot of Plone and Zope
brilliance.[5]  

Lima could be a new Python capital (like Prague is for FoxPro people -- or
so they tell me).[6]

Kirby

[1] http://www.pygame.org/docs/ref/cdrom.html#CD.eject


[2] http://mail.python.org/pipermail/edu-sig/2005-October/005374.html (Chuck
re wide adoption of .NET and/or Mono)

[3] http://www.4dsolutions.net/ocn/geoquiz.html (mentions CGIHTTPServer)

[4]
http://pycon.blogspot.com/2005/03/david-ascher-and-facundo-batista-with.html
(picture of Facundo)

[5] http://www.tchezope.org/

[6] http://mybizmo.blogspot.com/2005/03/pycon-2005.html (re FoxPro)


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Doug Blank-3
In reply to this post by Toby Donaldson
On Mon, 2005-10-17 at 12:11 -0700, Toby Donaldson wrote:

[snip]

> [Python]'s not so good for talking about "programming as exploiting your
> computer", i.e. when it comes time to implement an algorithm
> *efficiently*.

I know what you mean, but I think that this point can be misinterpreted
by those that want to object to Python for the wrong reasons.

First, 99.9% of programming (or even computer science) isn't about
getting 100% efficiency out of the computer. We are happy not writing
programs in machine code to get the benefits of C, although there are
some efficiency trade-offs. We are happy to use objects as abstractions
in C++, even though there are even more efficiency trade-offs. We are
happy to use the high-level abstractions in Python, even though there
are even more efficiency trade-offs. Python is in good company with the
likes of Java and Scheme as far as being efficient.

Second, you still need to worry about exponential explosions when coding
in any language, but it is a question of what level you want to focus
on. Most programming is about the Big-O efficiency, not the constants
that C, C++, or Python add to the processing. That puts the science in
programming.

There *are* some legitimate concerns with using Python as the first
language, but I think that they actually have little to do with Python.
For example, you need to think about how this is going to impact the
other courses. If a graphics course assumes memory management, where are
they going to learn that? If you are moving from Java to Python, there
may not be any major concerns then.

I think a good set of courses will include C, Python, Scheme, and
Java---and Python makes a good introduction. The question is how to fit
everything in together.

Good luck,

-Doug

PS - John's book looks like a winner!

> Toby
>
> > On Oct 17, 2005, at 12:45 PM, John Zelle wrote:
> >
> > > Carlos,
> > >
> > > I doubt that you'll get much disagreement on this list about Python
> > > being an excellent first language choice. Hence, there is unlikely
> > > to be
> > >   much of a "discussion." I wrote a paper titled "Python as a First
> > > Language" back in 1998, you can find it at:
> > > http://mcsp.wartburg.edu/zelle/python
> > >
> >
> > Carlos,
> >
> > John also has an excellent textbook:  Python Programming: An
> > Introduction to Computer Science.  We are in our second year of using
> > this book in our CS1 class and are very happy with it.  Because of
> > its power and simplicity we have found that students enjoy the class
> > and can do more interesting projects in their first course than they
> > could with Java.
> >
> > For example my students are now (in week 7 of the semester) writing
> > functions to enlarge images, smooth the enlarged images, and do edge
> > detection on the images the image library is so simple that the
> > students can really concentrate on the problem solving parts of the
> > exercise.  For me these are great introductory exercises that get
> > them using nested loops, simple conditionals, and functions.  I think
> > the students have more fun and are more successful when they can see
> > the results of their work visually.
> >
> > We also use Python in our CS2 course which focuses on data
> > structures, and one of our colleagues is using Python in his advanced
> > data structures course this year.  The great thing about using Python
> > in a data structures course is that there is almost a one-to-one
> > mapping from pseudocode to Python.  So the students can really see
> > the how the concepts get mapped to code without all the extra
> > overhead that a language like Java imposes.
> >
> > Of course we also teach and use Java but we don't introduce our
> > students to Java until the third course in our introductory
> > sequence.  The nice thing about holding off on Java until the third
> > course is that the students now know enough computer science that we
> > can work on bigger and more interesting problems while they are
> > learning Java.  In addition I can now use Python to compare and
> > contrast as I introduce new language concepts in Java.
> >
> >
> > Brad
> > --
> > Brad Miller, PhD
> > Assistant Professor
> > Luther College
> > http://www.cs.luther.edu/~bmiller
> > jabber:  [hidden email]
> >
> > > Carlos Eduardo Sotelo Pinto wrote:
> > >
> > >> Hi people
> > >> i was making a researching about python for computer
> > >> science students as a first language, and it coul be
> > >> good in Peruvian Universities and Colleges, may you
> > >> have some experiences, or articles or ideas about it.
> > >> Coul you send me to my personal email address.
> > >> Also I propose to you to began a discussion about this
> > >> topic.
> > >>
> > >> I think in my personal opinion, python could be better
> > >> for students, for one so imoprtant reazon: Python is
> > >> clearly and powerfull; and because of it, students
> > >> just think in solve problems and learning programming,
> > >> and the language could be an excellent easy learning
> > >> progamming tool. Also teachers can use the power of
> > >> python for making good problems for the students.
> > >>
> > >>
> > >
> > > Based on my actual experience, I can say that Python _is_ a much
> > > better
> > > first language choice than C, C++, Java, or Visual Basic. It has
> > > most of
> > > the advantages of Scheme, but with a smoother transition to more
> > > traditional languages. More and more CS programs are discovering
> > > the joy
> > > of teaching Python first. So far, I've not heard of any program that
> > > tried Python and then went back to something like C++ or Java.
> > >
> > > Incidentally, I think Python is a marvelous tool throughout the CS
> > > curriculum. It's a language that gets out of your way so that you can
> > > concentrate on fundamental concepts. I even use Python in my Op
> > > Systems
> > > class, something I'm frequently told Python isn't good for. Not true.
> > > Python is (arguably) the simplest vehicle that allows my students to
> > > program directly with underlying Posix system calls. It's simpler than
> > > doing systems programming in C or C++. To say nothing of trying to
> > > access the OS in Java... While I would not try to write an OS in
> > > Python,
> > > it sure is a lot easier for teaching _about_ them. That is, I am using
> > > the programming as a learning tool, not trying to teach them how to
> > > program an OS.
> > >
> > > --John
> > >
> > > --
> > > John M. Zelle, Ph.D.             Wartburg College
> > > Professor of Computer Science    Waverly, IA
> > > [hidden email]          (319) 352-8360
> > > _______________________________________________
> > > Edu-sig mailing list
> > > [hidden email]
> > > http://mail.python.org/mailman/listinfo/edu-sig
> > >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: http://mail.python.org/pipermail/edu-sig/attachments/20051017/a34c8dfd/attachment.htm
> > -------------- next part --------------
> > A non-text attachment was scrubbed...
> > Name: PGP.sig
> > Type: application/pgp-signature
> > Size: 186 bytes
> > Desc: This is a digitally signed message part
> > Url : http://mail.python.org/pipermail/edu-sig/attachments/20051017/a34c8dfd/PGP.pgp
> >
> > ------------------------------
> >
> > _______________________________________________
> > Edu-sig mailing list
> > [hidden email]
> > http://mail.python.org/mailman/listinfo/edu-sig
> >
> >
> > End of Edu-sig Digest, Vol 27, Issue 29
> > ***************************************
> >
> >
>
>
> --
> Dr. Toby Donaldson
> School of Computing Science
> Simon Fraser University (Surrey)
> _______________________________________________
> Edu-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/edu-sig
>
--
Douglas S. Blank       Computer Science
Assistant Professor    Bryn Mawr College
(610)526-6501          http://cs.brynmawr.edu/~dblank


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Beni Cherniavsky-2
In reply to this post by Brad Miller
On Mon, 2005-10-17 at 13:00 -0500, Brad Miller wrote:
> [...Luther College using Python for CS1, CS2 and data structures...]
>
> Of course we also teach and use Java but we don't introduce our
> students to Java until the third course in our introductory sequence.
> The nice thing about holding off on Java until the third course is
> that the students now know enough computer science that we can work on
> bigger and more interesting problems while they are learning Java.  In
> addition I can now use Python to compare and contrast as I introduce
> new language concepts in Java.

Do you tell them about Jython?  Do you have data on how they use Jython?
I guess that with such prior Python experience, they should be very
comfortable mixing the languages.


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Brad Miller
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Oct 18, 2005, at 2:57 PM, Beni Cherniavsky wrote:

> On Mon, 2005-10-17 at 13:00 -0500, Brad Miller wrote:
>
>> [...Luther College using Python for CS1, CS2 and data structures...]
>>
>> Of course we also teach and use Java but we don't introduce our
>> students to Java until the third course in our introductory sequence.
>> The nice thing about holding off on Java until the third course is
>> that the students now know enough computer science that we can  
>> work on
>> bigger and more interesting problems while they are learning  
>> Java.  In
>> addition I can now use Python to compare and contrast as I introduce
>> new language concepts in Java.
>>
>
> Do you tell them about Jython?  Do you have data on how they use  
> Jython?
> I guess that with such prior Python experience, they should be very
> comfortable mixing the languages.
>
>
I have not told them about Jython, mainly because my own impression  
was that Jython was not really going anywhere.  I tried a couple of  
simple graphics programs that didn't work....

After reading your message I went to www.jython.org and I still get  
mixed signals about whats happening.  Apparently there is a new alpha  
release of Jython 2.2, but the Wiki is broken, the developer blog  
comes up blank.  I don't see any plans about making Jython compatible  
with Python 2.4.x....

If it does turn out that Jython becomes a thriving, active version of  
Python then I think it would be very interesting to investigate.  
Have you used Jython?  What has been your experience?  Maybe others  
are more in the know about the future prospects of Jython?

Brad

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDVVumt6pClM1VKiYRAqgnAKCAJl03D7KerKOtmcj49cL5gLktegCeLhBv
QW3zaT33uIrpRH6TEUz/cPg=
=QF+q
-----END PGP SIGNATURE-----
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Beni Cherniavsky-2
On Tue, 2005-10-18 at 15:31 -0500, Brad Miller wrote:

> I have not told them about Jython, mainly because my own impression  
> was that Jython was not really going anywhere.  I tried a couple of  
> simple graphics programs that didn't work....
>
> After reading your message I went to www.jython.org and I still get  
> mixed signals about whats happening.  Apparently there is a new alpha  
> release of Jython 2.2, but the Wiki is broken, the developer blog  
> comes up blank.  I don't see any plans about making Jython compatible  
> with Python 2.4.x....
>
> If it does turn out that Jython becomes a thriving, active version of  
> Python then I think it would be very interesting to investigate.  
> Have you used Jython?  What has been your experience?  Maybe others  
> are more in the know about the future prospects of Jython?
>
I didn't use Jython myself (beyond checking that 2+3 works) for lack of
need.  Some months ago a co-worker asked me for advice on metaclasses in
Jython, which didn't work as they do inCPython 2.2+.  After meditating
on the code for 2-3 weeks, I came up with the right 2-line fix -- the
worst lines/time ratio [1] in my life I suppose -- but one of the more
enlightening [2].  During my study, that file was heavily updated to
implement new-style classes in Jython's CVS and the problem was fixed
independently :-).

[1] "if we wish to count lines of code, we should not regard them as
    "lines produced" but as "lines spent"" -- E.W.Dijksta
[2] Jython is quite mind-bending: turns out you can introspect the
    Jython implementation from the Jython prompt!  This is possible
    because Java has introspection and Jython transparently access it
    when doing things like dir().

I don't know what's up with the site not being updated, wiki and blog
down, etc...  The last I see is the alpha release in the blog's cache
<a href="http://216.239.59.104/search?q=cache%3Ahttp%3A%2F%2Fwww.ziclix.com%">http://216.239.59.104/search?q=cache%3Ahttp%3A%2F%2Fwww.ziclix.com%
2Fbzimmer%2F


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Arthur-27
In reply to this post by Brad Miller


> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
> Behalf Of Brad Miller
> I have not told them about Jython, mainly because my own impression
> was that Jython was not really going anywhere.  I tried a couple of
> simple graphics programs that didn't work....

Some evidence that Jython has some industrial strength in its present
incarnation would be the fact that it seems to be central to the development
process at Propylon:

http://www.propylon.com/

I was aware of this by following Sean McGrath's - the Propylon CTO - always
interesting writings digested at www.planetpython.com.

It is confirmed by the fact that their current opening for Software Engineer
lists Python/Jython experience first under Technical Requirements for the
position.

Art


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Mark Engelberg
In my mind, one important feature of a first programming language is
that it must provide meaningful error messages for every common error
a student might make.  Bugs that are easy to make and hard to track
down are a surefire way to turn kids off of programming.

Python falls short in this respect.  Consider this program:

def plus2(realNumber):
 raelNumber = realNumber+2
 return realNumber

The problem, of course, is that when you intended to assign a value to
a variable, you actually created a new one.  It is very bad that a
minor typo can really mess with the semantics of your code.  Similar
situations crop up when you intend to modify a global variable in one
of your functions, but forget (or are unaware of) the global keyword,
and end up creating a new local variable.  Also, this problem happens
all the time within objects, in which you try to assign a property,
but because you misspell the property, it just creates a new property
for the object.

Typed languages, of course, don't have this problem, because you have
to declare the types of everything you use, before you use them.  But
this is not the only way to solve this problem.  For example, Scheme,
as I recall, won't allow you to modify a variable (using set!) that
has not already been bound to some initial value (using let).

I think this is Python's greatest weakness as an educational language.
 In a lot of other ways, however, it is very nice.

--Mark
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

On Jython for education

Paul D. Fernhout
In reply to this post by Brad Miller
Brad Miller wrote:
> If it does turn out that Jython becomes a thriving, active version of  
> Python then I think it would be very interesting to investigate.  
> Have you used Jython?  What has been your experience?  Maybe others  
> are more in the know about the future prospects of Jython?

We're using Jython for a medium sized commercial project (using the latest
stuff from CVS) and it seems to be working quite well. However, whether it
is easy enough for learning is a different matter.

The value of Jython (to us) is in the ability to use Python syntax and
features and yet access a huge array of Java class libraries and then be
able to say to a client we are "using Java" without suffering through
endless braces and casts and type declarations and so on. (And
realistically, Java does provide a lot of enterprise level libraries, or
at least says it does.)

Personally, I prefer the Swing API to wxWindows (what I use under
CPython), however the cost of that is not being truly open source (Google
on "The Java Trap") if you use Sun's class libraries and JRE stuff and
also having a huge footprint in memory use (30MB+) whereas python +
wxWindows is much smaller (both memory and installation needs).

Of course that is slowly being balanced by the fact that if someone
already has a JRE (Java runtime environment) installed, which is more and
more common, all you need to give them is a 1.5MB or so Jython jar file.
Supposedly JRE 1.5 does a better job of sharing memory for common code
across all JRE users. And GNU classpath (free as in freedom Java
libraries)  is moving along.

As for Jython's support, it does have some active users, but obviously it
does not have the volume of posts to the mailing lists that Python has.
Also unlike the Python mailing list there have been quite a few unanswered
questions especially in the past (i.e. I sometimes Google on some Jython
issue and find someone else asked it but there was not a reply, whereas
Python rarely has that). However, many questions related to Jython in
terms of how to use widgets can instead be answered by looking at Java
forums for ideas. There really isn't that much Jython specific stuff (as
opposed to Java specific stuff) to know unless you are hacking the Jython
codebase, and that one of the beauties of Jython (for people comfortable
with Java). And despite the limited volume of the mailing list, except for
missing features of later Pythons, Jython 2.1 from a couple years back
seems to have a good reputation for stability. Due to the Python Software
Foundation's wisdom in funding work on Jython it is moving along towards
later Python compatibility and at least for a short time better supported.
I think that was an excellent choice by the PSF (and I say that seriously
as someone who had a rejected proposal [Delphi -> Python conversion];
investing in Jython was a better choice, and even I am now benefiting from
it). I think Jython will remain an excellent place to invest
Python-related money and effort -- it really does open Python up to a
broad spectrum of situations.

I think Jython could be made into an excellent educational environment
(including being usable in later web browsers linked to a late model JRE,
which would be a big deal for use in schools!) but it would take some
work. The biggest issue is that to use most common Swing classes in Jython
like JLabel and JTree and JList, you need to read and mentally translate
to Python syntax the Java documentation (sort of like how in wxWindows you
need to read the C documentation, but wxPython at least has a nice demo of
all widgets and Jython Swing does not). This is quite a bit of a hurdle,
though not that bad for an experienced or motivated programmer, especially
if you already know Java. That issue might be solved by just making better
documentation of Swing for Jython (though who would want to maintain is,
if it wasn't generated automatically?). [There are also some Jython idioms
which make the code smaller than straight Java to Jython translation by
dropping all the typecasts and type declarations which are not obvious at
the start.] Or alternatively, one could just make special educational
classes for novices which would be like training wheels (think 2D turtle,
etc.) until kids could start using Swing. There are two Jython related
IDEs now for eclipse, so perhaps one of them could be modified for
education use as well (though Eclipse has its own learning curve).

And for learning, as in another post in this thread, some issues like the
ease of making typos might need to be addressed somehow. Smalltalk,
another flexible system designed for kids, requires local variable
declarations as names to prevent typos (which I like, personally, as
opposed to mandatory type declarations) and warns you when you save code
that uses an undefined function (actually,undefined  "selector" of a
method, in Smalltalk jargon). Given the source is there, it might be
possible to add this requirement somehow to Jython, but that would break
some Python compatibility? I would not mind this typo problem so much if
Jython, like most Smalltalk, allowed you to easily modify running code in
the debugger. So, that would be another approach to making the type
problem less of a bother -- adding better support for modifying code while
running (and I have made some experiments in that direction). However, for
small learning programs, rerunning the code from scratch (especially under
JRE 1.5 with quicker subsequent startup) might not be such a big deal.

As an aside, I was posting against Java (in favor of Smalltalk) in the
newsgroups when Java came out, as I thought it was marketing hype and
unneeded. And it was. But now, eight years or so later, Sun and cohorts
finally have a lot of the bugs out (and have added so many features from
Smalltalk like Swing and hot spot technology), so, given you can use all
that stuff from Python with Jython, it isn't that bad a platform anymore
(ignoring "The JavaTrap" license issue).

--Paul Fernhout
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Kirby Urner
In reply to this post by Mark Engelberg
> Python falls short in this respect.  Consider this program:
>
> def plus2(realNumber):
>  raelNumber = realNumber+2
>  return realNumber
>

IDLE 1.1      
>>> def plus2(realNumber):
 raelNumber = realNumber+2
 return realNumber


>>> gimme = plus2(10)
>>> gimme
10

I seem to recall some external module that's paw through code looking for
potential problems of this kind.  

Technically speaking, there's no mistake here.  The coder created a local
variable that went out of scope.  He could always say "I meant to do that."

Kirby


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Kirby Urner
In reply to this post by Mark Engelberg
> Python falls short in this respect.  Consider this program:
>
> def plus2(realNumber):
>  raelNumber = realNumber+2
>  return realNumber
>

IDLE 1.1      
>>> def plus2(realNumber):
 raelNumber = realNumber+2
 return realNumber


>>> gimme = plus2(10)
>>> gimme
10

I seem to recall some external module that's paw through code looking for
potential problems of this kind.  

Technically speaking, there's no mistake here.  The coder created a local
variable that went out of scope.  He could always say "I meant to do that."

Kirby


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Kirby Urner-3
In reply to this post by Brad Miller
> I have not told them about Jython, mainly because my own impression
> was that Jython was not really going anywhere.  I tried a couple of
> simple graphics programs that didn't work....
>

Re Jython etc., in a pure CS context we don't have to care if the language
is dead, e.g. Algol might still be nit-picked, to learn more about
compilers, and we might do a unit on FORTRAN (which is still used BTW, on
fancy Crays doing highly optimized linear algebra 24/7 -- I've had beers
with some of those guys).

Conway did a good talk on dead languages @ OSCON 2005, and their ongoing
utility as play-things, toyz, e.g. you can learn a lot from C++. :-D [1]

The supervising faculty member at the school where I'm teaching has asked me
to mix a lot of GIS/GPS into my Python, which I'm happy to do (having taught
Python to ESRI product users, spent time milling about the various
booths).[2]

I'll be opening with Google Earth, with Stellarium and Celestia for context.
Part of the storyline:  Google uses Python a lot, internally (true fact!),
and these two astronomy programs well illustrate the state of the art when
it comes to open source (quality code really does bubble up in the bazaar,
not just in cathedrals).

Kirby

[1] http://worldgame.blogspot.com/2005/08/oscon-day-2-wanderers.html (see
last paragraph for mention of the dead languages talk, which included many
slogans in Latin, in which Damian is expert.

[2] http://mybizmo.blogspot.com/2005/03/python-for-gis-experts.html


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Mark Engelberg
In reply to this post by Mark Engelberg
On 10/19/05, Kirby Urner <[hidden email]> wrote:
> Technically speaking, there's no mistake here.  The coder created a local
> variable that went out of scope.  He could always say "I meant to do that."

Well, that's the point.  Python doesn't recognize it as a mistake.
Clearly, in my example, the programmer intended to assign a new value
to an existing variable, rather than create a new variable.  Some
languages make a distinction between these two concepts, so the
language can flag this as an error.  Python doesn't make a
distinction, and therefore, a beginner programmer (and sometimes even
an advanced programmer) can create a semantic bug through a syntactic
mistake, and have an extraordinarily difficult time tracking down the
error.

This is not a desirable trait in a "first programming language" for
teaching computer science.

--Mark

P.S.  For what it's worth, Python is the language I choose to use on a
daily basis, because I mainly write short programs to analyze various
puzzles I'm working on.  It's a great tool for fast and practical
programming.  But I think it would be very hard to write a bug-free
large-scale project in Python.  (Granted, it's hard to write a
bug-free large-scale project in any language, but Python lacks the
facilities for verifying even the rudiments of correctness without
extensive run-time testing).  I'm undecided about how useful Python
would be as an educational tool.  Seems like it has some pros and
cons.  Since the pros have already been talked about, I thought it was
worth bringing up one of the major cons that I perceive.
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Guido van Rossum
On 10/19/05, Mark Engelberg <[hidden email]> wrote:
> This is not a desirable trait in a "first programming language" for
> teaching computer science.

There are many desirable and undesirable traits for "first programming
languages'. I doubt you'll find a language without undesirable traits.
Is this undesirable trait so bad that it removes Python from the
competition? Many people here seem think it doesn't.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Rodrigo Dias Arruda Senra
In reply to this post by Mark Engelberg

[ Mark Engelberg ]:
> P.S.  For what it's worth, Python is the language I choose to use on a
> daily basis, because I mainly write short programs to analyze various
> puzzles I'm working on.  It's a great tool for fast and practical
> programming.

Indeed.

> But I think it would be very hard to write a bug-free
> large-scale project in Python.

I beg to differ. I have been doing that for the last 5 years in Python.
But our definitions of "large-scale" might be different ;o)
Moreover, any large-scale project becomes "less large" (in KLOC)
when ported to Python.
Last but not least, I' ve **never** seen a bug-free large-scale project
in any language.

> (Granted, it's hard to write a bug-free large-scale project in any  
> language,

I truly believe that is an understatement.

> but Python lacks the facilities for verifying even the rudiments of  
> correctness without extensive run-time testing).

Wouldn' t you agree that even statically-compiled languages also need
extensive run-time testing in order to verify its correctness ?

>   I'm undecided about how useful Python would be as an educational  
> tool.

I, amongst others,  have given a speech in the last Europython  
(Sweden 2005)
about that. IMHO, Python allows the students to feel successful  
during the
learning process. They can concentrate on problems, algorithms and  
logic, instead of struggling with a tool most of the time.

Python (==any language) should never be the only educational tool.
Nevertheless, Python is definetely useful in any context I can think of.

best regards,
Senra

Rodrigo Senra
______________
rsenra @ acm.org
http://rodrigo.senra.nom.br




_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Arthur-27
In reply to this post by Mark Engelberg
Mark writes -
 
> This is not a desirable trait in a "first programming language" for
> teaching computer science.

Because we need to teach the programmers early on that they are not
responsible for their mistakes? It's the tool's fault.

Not sure why that line of reasoning gets to me the way it does.

Although the point you raise certainly gets enough attention - for example a
recent 140 message thread on python-list.

And certainly I am not criticizing for laying it on the table here.

In fact on such a thread a few months ago, I got upset with Alex Martelli
for roughly bashing someone who was pressing this point. (and let him know
so)

But you should realize how strongly some folks who understand Python deeply
feel about the issue.

No declarations.

Alex goes a step further, feeling that "global" in Python is a serious wart
because it is itself a declaration.

Being the easy going guy that I am ;), I am usually OK with Python as it
happens to be, and usually get a little confused (and upset) when I am
informed (by the defenders of the faith, no less) that I am being
complacent, and that things need to change - again.

At this point, most of the things that I would think would be most difficult
to understand about Python - for someone coming to it fresh - would be the
artifacts of transitions and changes. i.e. new style and old style classes,
list comprehension vs generator comprehensions, div old vs div new,
@property, and I am sure many others that don't come to me off the top of my
head.  All theses changes are understandable, standalone.  But sometimes I
do feel that the people who want them, are greedy for them.  And like to
sell them as freebies. No change is a freebie at this stage.

Art  



_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python as a first language for computer sciencist

Brad Miller
In reply to this post by Mark Engelberg
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Oct 19, 2005, at 3:07 PM, Mark Engelberg wrote:

> On 10/19/05, Kirby Urner <[hidden email]> wrote:
>
>> Technically speaking, there's no mistake here.  The coder created  
>> a local
>> variable that went out of scope.  He could always say "I meant to  
>> do that."
>>
>
> Well, that's the point.  Python doesn't recognize it as a mistake.
> Clearly, in my example, the programmer intended to assign a new value
> to an existing variable, rather than create a new variable.  Some
> languages make a distinction between these two concepts, so the
> language can flag this as an error.  Python doesn't make a
> distinction, and therefore, a beginner programmer (and sometimes even
> an advanced programmer) can create a semantic bug through a syntactic
> mistake, and have an extraordinarily difficult time tracking down the
> error.
>
> This is not a desirable trait in a "first programming language" for
> teaching computer science.
>
Mark,

I understand that you see this as a risk, and as a downside to using  
Python.  However, I rarely see these kinds of errors in the programs  
that my students are writing in CS1 and CS2.  As you point out below,  
Python is a good tool for writing short programs that are focused on  
problem solving.  Well, those are the kinds of programs that  
students write in CS1.  Learning to program Large scale  bug free  
systems is an important part of the curriculum, but I would argue  
that students need to walk before they can run in this regard.

I'm curious to hear from others that use Python for introductory  
computer science.  How often do these 'semantic bugs'  crop up for  
your students?

Brad

> --Mark
>
> P.S.  For what it's worth, Python is the language I choose to use on a
> daily basis, because I mainly write short programs to analyze various
> puzzles I'm working on.  It's a great tool for fast and practical
> programming.  But I think it would be very hard to write a bug-free
> large-scale project in Python.  (Granted, it's hard to write a
> bug-free large-scale project in any language, but Python lacks the
> facilities for verifying even the rudiments of correctness without
> extensive run-time testing).  I'm undecided about how useful Python
> would be as an educational tool.  Seems like it has some pros and
> cons.  Since the pros have already been talked about, I thought it was
> worth bringing up one of the major cons that I perceive.
> _______________________________________________
> Edu-sig mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/edu-sig
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDVrUYt6pClM1VKiYRAld3AJ97HNc8wcFsI7sEMJDmS0HDkNbPLwCggWEY
SZt3LuW5gBSnjawPTy/nowY=
=uZLU
-----END PGP SIGNATURE-----
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
123