[Edu-sig] Python as a first language for computer sciencist
Douglas S. Blank
dblank at brynmawr.edu
Tue Oct 18 19:44:48 CEST 2005
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: bnmnetp at jabber.org
> >
> > > 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
> > > john.zelle at wartburg.edu (319) 352-8360
> > > _______________________________________________
> > > Edu-sig mailing list
> > > Edu-sig at python.org
> > > 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
> > Edu-sig at python.org
> > 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
> Edu-sig at python.org
> 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
More information about the Edu-sig
mailing list