Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

New Python Computer Science text book

Python Programming: An Introduction to Computer Science is a new Computer Science text book designed for use in introduction to programming classes, written by John Zelle, who’s Teaching with Python page . Kirby Urner recently posted a mostly positive review of the book to the Python Edu-SIG mailing list, which sparked an interesting discussion about Python’s place in the CS curriculum.

Unsurprisingly, the one thing that isn’t disputed on the Python Edu-SIG list is that Python is a superb first language for CS students. As I’ve mentioned before, I’m convinced that the reason so many of my fellow students seem to actively dislike programming is that they’re introduction to it was via Java, a language that enforces a mentality of battling the compiler more than one of straight problem solving. Hopefully now that text books are beginning to appear Python will be considered more seriously by computer science departments around the world.

This is New Python Computer Science text book by Simon Willison, posted on 13th December 2003.

View blog reactions

Next: Grouping table data by header

Previous: Static content generation

12 comments

  1. Unfortunately, I think it will take more than this to see Python used as an introductory language for CS students, no matter how much sense it may make. Firstly, Universities are big, unwieldy places, and changing the curriculum itself could take a while, but more importantly the mindset of the staff needs changing. I don't know what it's like over in British Universities, but my experiences here in Australian ones have shown that the Java mindset has pretty much taken over the whole of the staff.

    Java is used in every University that I've looked at the CS syllabus for, for every CS subject unless specifically stated otherwise. It's not something I can see changing anytime soon, either. Far be it from me to suggest inappropriate behaviour in Universities, but it strikes me as odd that every single place would adopt Java as a primary language. Look at the real world. How many people program with Java there? A clear minority. It's one of a bevy of client-side languages, and I've yet to see a successful "mainstream" client side Java project.

    One of the jobs of the University should be to help students get ready for employment in the outside world... and if the only language any ever emphasises is Java, then obviously language diversity isn't something particularly valued, and neither is getting experience in languages that you're more likely to end up using. Now if that's the case, I can't see a way that would easily persuade them to use Python as an introductory language to get students into CS.

    *Shrug* I have been called a cynicist before, though.

    Lach - 13th December 2003 03:40 - #

  2. Lach:

    I disagree with:

    One of the jobs of the University should be to help students get ready for employment in the outside world...

    The job of a computer science course is to teach computer science. The function of a programming language in the curriculum is not to teach a programming language, but to teach the method of programming.

    Oh, and I know I'll look petty for this, but I object to words like 'cynicist'. People seem to extend words past their usual boundaries (my wife said 'prideful' earlier- em, that would be 'proud').

    The word of course is 'cynic'. Unless you were intentionally misspelling, in which case I look like an ass.

    Aaron Brady - 13th December 2003 15:48 - #

  3. Aaron, I believe that's one of the functions of a University, however I believe that it's also important to prepare students for employment. Hence work experience such as Simon is embarking upon at the moment. That said, maybe we'll have to agree to disagree here.

    Oh, and cynic, thanks. I had a vague inkling that cynicist was wrong, but couldn't think of the right word. While I'm on corrections, that should have been, in my first comment, a bevy of server-side languages.

    Lach - 14th December 2003 01:43 - #

  4. Hopefully now that text books are beginning to appear Python will be considered more seriously by computer science departments around the world.

    That is one necessary pre-requisite for getting a Pythonic CS curriculum. But it isn't the only pre-requisite nor is it the most important one.

    There are a wide range of CS programs out there. First are those that simply exist to train the next wave of programmers. For them, they will want to learn Java, because their future employers are looking for Java programmers. Some of the lesser schools in this set use or used to use VB as a teaching language. In a few years, they may switch to C#. Trying to get these kinds of schools to switch is a fool's errand, because they don't delve deeply into the field, and their language of instruction is determined by economic factors in the industry. Perhaps after 10-20% of entry level programming jobs are in Python, these schools will switch.

    Next, there's the set of CS programs that actually try to teach CS. Python is a good introductory language, but not very good with advanced material. Python is a pretty bad match for compiler theory, concurrent programming, operating systems, data structures, algorithms, and other such material. Thankfully, those programs tend to be multi-lingual, but you can still get pretty far with a Java-only curriculum. Reducing the number of languages of instruction seriously reduces the stress and strain on the students, and increases the amount of real material professors can teach in one term. (My class in concurrent programming was slowed down because the prof. had to teach a C/Pascal-like language called SR, plus the course material on concurrency. No one uses SR out of the classroom, and being able to teach concurrency in Java is a *huge* benefit.)

    Finally, there are the programs like the ones you find at Rice, MIT, Utah, and Stanford. They focus on Scheme as a language of instruction to teach basic concepts. Once you've mastered the basic concepts in the field, switching between languages is really just a matter of learning syntax. Python offers a lot to someone who has that background, but Python is not sufficient to get someone to that level.

    ziggy - 14th December 2003 20:08 - #

  5. My experience of languages in CS course is a little varied: GCSE level (high-school -> 16) was all BASIC (and some assembly) A-Level (16-18) was Turbo Pascal ;) University in Glasgow they start everyone on Ada, I think because it is well structured, and a good 'teaching' language. After 2 years of Ada, only then do you get to move on to C, C++ and Java, which I think is a better progression - starting in Java seems a litte mental. Python is a bit tricker to fit into the system, for a number of reasons (probably all mentioned above) but is a very easy language to learn. I can imagine it would be immensely frustrating to learn Python and then move to C/C++/Java because it would feel like you are achieving very little.......

    Ben Thorp - 15th December 2003 09:39 - #

  6. I agree with Simon (unsurprisingly, since we're on the same course and have to deal with people who still can't program) ... the most important thing in the first place is to get people to understand what they are trying to achieve and also what they are doing when they program. Many of the Java classes presented to my year were little more than "copy this code and watch what happens". Now, this method of instruction has its place, but it should not be the only way given to learn to program.

    Meri - 15th December 2003 15:30 - #

  7. Meri,
    I find that in my course the same sort of thing happens. We're not, exactly, given code to just copy and paste, instead we do a bunch of exercises each week, which code is posted for afterwards, but I still find a lot of people who just don't understand how to begin writing any of their programs, even by the end of SD2. I think, really, classes need to be divided up by competency, so slower people get the help they need, and don't drag others down with them.

    Lach - 16th December 2003 00:52 - #

  8. I was taught C as my first year programming lab language at UMIST four years ago now (although they have now moved onto Java). I'm very grateful to have learnt C 'properly' but it did cause a lot of people confusion. They have now moved onto Java and honestly I'm not sure which one I would have preferred to have been taught - there are a lot of opportunities in Java programming now (most software is custom software). I was later taught C++ but didn't really 'get' OO until one night I had an assignment to write something in various languages and I chose Smalltalk. In the end I found Python through Zope (after spending a long time looking for an understandable PHP content management system) and have been happy ever since.

    Still I guess I'll find out what the real job market is like soon and see if I can find a job with Python or whether I'll have to use some other horrendous language to pay the bills...

    Laurence Rowe - 16th December 2003 18:19 - #

  9. this is my ADDRESS 112 power line off ajiboye crescent orile agege lagos state Nigeria

    Daramola Alaba - 3rd January 2004 16:29 - #

  10. Dear Sir l will be very happy if you could send me list of computer science text books,though my mail. Thank you EKOW AGGRE-FYNN

    EKOW AGGREY-FYNN - 9th September 2004 17:02 - #

  11. Dear sir, i'm a new student that just want to go into computer science courses and wants to know more about the coures and the list of books to read on,i just love the ways things is been done in your place plseas tell me more about computer science and the syllabus on how to start reading on it, plseas if it's possible to send me some books i will very greatful,also plseas how many part is compter science divded into and were will i start from. i will be very greatful if my reply is granted and also if you have the opptunitity to send the books to me i wll be soo happy this is my address No 38, Hawley street lafiaji Lagos, Nigeria Thanks. Racheal Dade

    Racheal Dade - 9th March 2006 12:07 - #

  12. i need a programming text book for my studies. please , kindly send one for me.

    ubaka paul - 5th May 2006 18:35 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/12/13/pythonComputerScience

A django site