Wednesday, May 21, 2014

Le monde de Reeborg: finalement en français!

J'ai finalement complété la traduction de la nouvelle version du monde de Reeborg en français. Les tutoriels pour débutant, que ce soit pour Python ou pour Javascript ne sont cependant pas encore traduits.

Si la version française vous intéresse, svp contactez-moi par courriel (ou laissez un commentaire sur ce billet) pour me le laisser savoir et que je puisse mieux juger du besoin de traduction des tutoriels.

Thursday, May 15, 2014

Eating your own dog food

When I created rur-ple, my intention was to use it to teach my pre-teens computer programming.  When it was working reasonably well, and after having written a few lessons, I showed it to my daughter who quickly went through the material I had prepared and concluded that it was too easy/boring.  She essentially decided then that programming was not for her.

Fast forward 10 years.  She had to do some programming as part of her university program and found out that she really enjoyed it.  She is currently more than 1000 km away, working in a lab where she has to program in Python, which she is essentially just learning.  She had a question for me, emailed me some code when I got the idea of using Reeborg's world's editor and the embedded TogetherJS from Mozilla so that we could share a screen, while talking using Skype.  

It worked very well. :-)   However, I found that, while the fixed-size editor was big enough for the tutorials I wrote, it was too limiting when trying to work collaboratively on "real life" code.  The same could be said for the output area ("Reeborg's Diary"). Nothing like "eating your own dog food" to find its limitations.    So, after a couple of hours of tinkering with javascript/jquery/css, I finally got a reasonably working setup for remote collaboration/help on Python 3 code (using Brython) or Javascript or CoffeeScript or .... (more languages to come eventually).


The only limitation that we found is having the TogetherJS chat window in a fixed position. If it could easily be moved (on a per-user basis), it would make it even more useful.

Tuesday, May 13, 2014

Python tutorial for beginners.

The first draft of my Python tutorial for beginners is now live.  The previous link is for the tutorials; the actual code needs to be entered in Reeborg's World.  There is also a Javascript version of the tutorial.

Tuesday, April 29, 2014

Collaborate on Reeborg's World using Mozilla's TogetherJS

If you go to http://reeborg.ca/world.html and click on "Start TogetherJS" at the top, you can get a URL to share with others.  This hopefully will be found useful by teachers who can help their students remotely.

Note that the exact location of the Start TogetherJS button may change in the near future.  Thanks to Ian Bicking and others at Mozilla for creating this amazing tool.

Feedback is welcome! ;-)


Reeborg's world: more options to share

RUR-PLE's primary goal was to create a very easy path for people that wanted to learn programming.  The original version still had a significant hurdle to jump over for absolute beginners.  They had to 1) download and install Python; 2) download and install wxPython; 3) download and unzip the files for RUR-PLE's distribution.  This is probably considered to be trivial by the reader of this blog ... but it was not so for the users (some of whom were young children ... or their parents!)  So, it really required to have someone nearby with some computer savyy and, since it required to install programs, some teachers could not use it without jumping through additional hoops to have it installed on the school computers.

As more users joined in, some volunteered to create "one-click" install files (.exe, .dmg, etc) for various systems.  These were made available on Google code; however, since new downloads can not be added (due, I understand, to how this service was abused by some other "projects"), this means that yet a new home (after the original sourceforge site) would have to be found for updates.  Furthermore, this does not solve the issue of installing software on school's computers.

These various facts were the main impetus behind my desire to create a web version as something with the absolute lowest barrier to entry.  To my mind, this means no creation of user accounts.   With no user accounts, there is nothing saved on the server.  Still, it is useful for people learning to program to be able to save their results.  So, I implemented:

  • An automatic save of a program state when it's run successfully.  This includes the code in the "library".  It also saves the "world" that was selected, as well as the programming language (Python, Javascript of CoffeeScript). This way, when a user returns to the page, it restarts from where it was left off.   However, this uses localStorage which is appropriate only when everything is done from a single browser.
  • For students that may want to work on the school computer and at home, I implemented a way to save to files (hello USB keys...); this can be either the world selected (which the student can edit) or the program or the content of the library, each saved separately.
I thought this was going to be enough until I got an email from the Samsung folks behind the Junior Software Academy initiative.  As I mentioned in a previous blog, they created a book based on rur-ple.  They now would like students to take part in a mini programming contest and wanted to be able to have the students show their results.  This works fine if rur-ple is installed on the computer they have ... but a web based solution was thought to be more interesting. So, I implemented a permalink utility which enables one to save the complete state (programming language, world definition, code in editor and library) and share this as a url.  Here is a silly example.  

One more thing I would like to do is to implement a collaborative mode using Mozilla's TogetherJS.  However, this will require quite a bit more coding, based on what I saw in an earlier attempt, just after TogetherJS was announced. 

Monday, April 14, 2014

Reeborg knows multiple programming languages

I wish I were in Montreal to visit my daughter, eat some delicious Saint-Sauveur bagels for breakfast, a good La Banquise poutine and some Montreal Smoked Meat for lunch... and, of course, attend Pycon.  Alas....

In the meantime, a quick update: Reeborg now knows Python, Javascript and CoffeeScript.  The old tutorials are gone as Reeborg's World has seen too many changes.  I now am in the process of writing the following tutorials, all using Reeborg's world as the test environment

  1. A quick introduction to Python (for people that know programming in another language)
  2. A quick introduction to Javascript (same as above)
  3. A quick introduction to CoffeeScript (same as above)
  4. An introduction to programming using Python, for absolute beginners
  5. An introduction to programming using Javascript, for absolute beginners
  6. An introduction to Object-Oriented Programming concepts using Python
  7. An introduction to Object-Oriented Programming concepts using Javascript
Note that I have two "versions" of Javascript, one that uses JSHint to enforce good programming practices (and runs the code with "use strict"; option) and one that is the normal permissive Javascript.

If anyone knows of any other transpilers written in Javascript that can convert code client-side from language X into Javascript (like Brython does for Python, or CoffeeScript does naturally), I would be interested in adding them as additional options.

Thursday, March 13, 2014

Reeborg news

People reading this blog may be familiar with rur-ple (https://code.google.com/p/rur-ple/), a Karel-the-robot clone using Python that I wrote.  The robot's name in my version is Reeborg, hence the title of this post.

Since the last version was produced in 2009, rur-ple had been downloaded more than 11,000 times.  Since people that download it do not need to contact me to do so, it is only through serependity that I find out where it is used.  By doing some searches on the web, including videos on youtube, I found out that it has been used by elementary school children in Austria, high school children in the U.S. and by university students in the U.S. and Latin America as a tool to introduce Python.

Recently, Samsung contacted me and asked my permission (!) to produce a book based on rur-ple. They distributed free copies of this book yesterday to approximately 1000 Korean students.  

So what you say?....

I am happy to announce that a test-version of "Reeborg's world" is now available online as a tool to learn Python.  Like the desktop version (rur-ple) I wrote, it is free to use and does not require registration.

The first version of Reeborg's world was produced to teach Javascript; it is the default version available from http://reeborg.ca.    It includes some 98 lessons (available in both English and French); the English version can be found directly at http://reeborg.ca/learn_js.html

I'm working on an "improved" version which can be found at http://reeborg.ca/learn_js_dev.html 
Following some comments by early adopters, the UI of this version is improved slightly and more changes are planned, including a graphical world builder, new images for the robot, the option to import from file and save to file  programs and worlds, etc.  I am also thinking of adding a collaborative option using https://togetherjs.com/.

This time, I will probably include a page on the site where I will ask teachers that use it to communicate with me to let me know in what context they use it, and keep track of it on a "wall of fame".

The proof-of-concept Python version, which is probably of greater interest for readers of this blog, can be found at http://reeborg.ca/learn_py_test.html It is based on the "improved" version and uses Brython  to translate the Python code into Javascript, which can then be executed using eval(), like the Javascript version does.  I do not plan to do more work on it (including adapting the lessons to teach Python instead of Javascript) until I have nailed down the "improved" Javascript version.

If you want to quickly try the Python version to see what it can do, after dismissing the "contents window", I suggest you select (from the drop down menu showing "Alone" by default) the world "Tokens 1" and run the following program:

move()
take()
move()
put()
move()

I welcome any comments & suggestions about Reeborg's world; please feel free to email me directly.