Thursday, January 29, 2009

Python cheat sheet

If you are learning a programming language it's often useful to have a cheat sheet with a concise list of key information. You can find many on the Web for Python, but I think that the Python Refcard done by Michael Goerz is one of the best.
'It contains: variable types (numbers, sequences, sets, strings and regular expressions), basic syntax, object orientation and modules, exception handling, system interaction, input/output, standard library"
It is intended to be printed on one piece of paper (double sided) and is formatted for A4, but Adobe manages to shrink it to print on letter size paper and the source is available in ODT, if you want to fiddle with it.

We might consider creating one or more one-page cheat sheets for use in CMSC 201 next Fall.

Wednesday, January 28, 2009

Club ShowMeDo videos on learning Python

Club Showmedo videos on learning Python

The showMeDo site has a series of short screencast videos on learning Python. Access to most of these required a $60/year subscription fee, however.
"Are you learning Python? To keep the site running clean and ad-free we've started Club ShowMeDo. The club will allow you access to some special videos we're making to pass on programming skills we consider important to the development and enjoyment of Free Open Source Software (FOSS).

The focus at the moment is on developing with the Python programming language, one of the backbones of the FOSS movement with a huge number of included and third-party libraries."
I'm not sure how effective these screencasts are, but we might experiment with the idea for teaching cmsc201. Screen casts with narration are easy to do and could be a good way to augment lectures. We could have the instructors and TAs produce some and might accumulate a good collection over the years. These could be shared with colleagues at other Universities.

Crunchy frog python tutorials

Crunchy is a Python system that "formats and delivers html-written Python tutorials inside a browser window, adding interactive elements and snazzy navigation." The name, crunchy, is a Monty Python reference.

Once you have downloaded and installed crunchy on your local computer, you can view HTML pages that have special crunchy-tags that will interact with crunchy and Python. One of the most useful features is that you can embed a Python interpreter window in your HTML presentation. If you are using this as an instructor, you can immediately demonstrate Python concepts from your browser. If you are a student, you can do this and then explore variations on your own.

Security is one potential issue with crunchy. Since an HTML file can invoke python from the browser, you need to trust its source. The authors have clearly thought about this and put in place various mechanisms to help. But, AFAIK, Python does not have a "sandbox" mechanism like Java's, so some risk remains.

If we want to use crunchy for teaching and have students install crunchy on their own computers, we'll have to look carefully at the security issues to ensure we understand and minimize the risk.

If you want to learn more about crunchy, the best way is to install it and view the crunchy tutorial that comes with it.