Live Programming with TamaroCards, Sharing Your Playground
by matthias.hauswirth@usi.ch
Dear all,
Hello from Lugano! We have some news :-)
TIDE – A TamaroCards IDE!
Some of you use physical TamaroCards to introduce students to programming in a tangible way. Some instead use images of TamaroCards in a drawing program (PowerPoint, a whiteboard, for yourself, or for students). We love the paper-based physical cards, especially in the very first lesson. However, in some contexts, using virtual cards may be preferrable. Thus, we brought in a wizard from France, Nathan, who quickly implemented a browser-based TamaroCards IDE during his summer internship!
We just deployed a preview release of TIDE on a page of the PyTamaro Web platform, so you can actually use it! Point your students there and let them drag, drop, and connect cards. Not only can they “click together” a program visually, but the program is live! Every card that produces a graphic, shows that graphic on its outgoing arrow. This is great for explaining how an expression evaluates, because you can see all its intermediate results. Any edit you make to the card “program” leads to an immediate update of the results. That is what “live programming” is all about.
This is cool, but there is a drawback! One pedagogical goal of using TamaroCards is that it allows *students* to perform the program execution themselves, by manually drawing the resulting graphics next to each card. By providing your students with TIDE, they now can delegate that educationally important task to TIDE. Instead of thinking about the computation, they will ask the “intelligent” computer to do the work for them.
(If that sounds bad to you, you might be in the right mood to read this provocative piece:)
https://svia-ssie-ssii.ch/interface/rueckschritt-in-der-schule-dank-gener...
So, use TIDE judiciously. (Judicious is our new favorite word since we introduced the “Judicious Documentation” system for Python.)
For a short intro to TIDE, check out Joey’s conference presentation:
https://www.youtube.com/watch?v=nA8PuAl-JE4
For a longer introduction, read our PAINT paper linked from the TIDE page:
https://pytamaro.si.usi.ch/tide
Share Your Playground with a Link
Some of you create your own material and deploy it to PyTamaro Web. Others just use the Playground as a zero-install Python environment.
Deploying your own content on PyTamaro Web is great because you can provide your students with tailored exercises that interleave explanations and code blocks, and you can provide “starter code” the students need to complete. Integrating content into the platform takes a bit of effort, but the resulting student experience can be worth it.
If you use the Playground, your students just get a single code cell on a page. But even this simple page provides the integrated judicious Python documentation and allows students to build up their own toolbox of functions over time. And even with the Playground you can provide your students with some starter code (e.g., some incomplete code with TODO comments)! How?
It’s extremely simple! Just share the URL!
The URL of the Playground page automatically updates when you edit code in your Playground. The URL always includes the code currently in the Playground! So, simply share the URL, and the students will get your code!
When students follow that link, they get to the Playground page and (if their own Playground is not empty) are asked whether they would like to replace the code they currently have in their Playground with your new code. Voilà!
Here is an example:
https://pytamaro.si.usi.ch/playground?code=cHJpbnQoNDIp
Open it, and you will receive the code “print(42)”. The code is encoded in the query string part of the URL, in the value of the “code” key (“cHJpbnQoNDIp”). This simply is the BASE64-encoding of “print(42)”.
Anyone can share their Playground! Not just you! You could ask your students to share their Playground link with you! This way you can collect a link from each student that you can quickly look at and run with a single click.
A Playground can contain a lot of code. This will lead to rather long URLs. Below are a few example links, with PyTamaro programs that produce Halloween-themed graphics. Because including a long URL* in an email may trigger SPAM filters, we used a link shortening service to include them here:
Candle – simple, but to be refactored:
https://chk.me/HmdK9ND
Skull – code begging for abstraction!
https://chk.me/E30AXqp
Spiderweb – nicer code, with functions you can reuse!
https://chk.me/dTkS2i7
Like we do here, you may similarly want to use a link shortener when providing longer Playground links to your students. But if you don’t like all that link sharing, feel free to ask us how to create your own material for PyTamaro Web. It takes a bit of work (mostly creating a Jupyter notebook and using git), but then you get to provide experiences like the following:
Luca’s «Build Your Own Language Model» Curriculum:
https://pytamaro.si.usi.ch/curricula/luce/language-model
The LuCE Yin Yang Activity:
https://pytamaro.si.usi.ch/activities/luce/yin-yang/en/v1
Happy Halloween! All the best from Lugano,
Matthias and the LuCE team
PS: You can find this and the previous message in our mailing list archive:
https://lists.usi.ch/mailman3/hyperkitty/list/luce-news@lists.usi.ch/
If you would like to unsubscribe from our list, or if you would like to update your email address, simply let me (Matthias.Hauswirth(a)usi.ch) know. You also can do it yourself here:
https://lists.usi.ch/mailman3/postorius/lists/luce-news.lists.usi.ch/
*) Note that there is a potential problem with using very long URLs, and that problem is not solved by using a link shortener: Web servers, proxies, firewalls, and even the students’ browsers all have some maximum URL length they support. If you use a Playground link that is longer than that (unknown) maximum length, that link will not work! (Shortening the link won’t help, because eventually the short link gets expanded into the long URL.)
1 month, 3 weeks