ICT4D course 2013 - Sugar
-
Upload
christophe-gueret -
Category
Documents
-
view
448 -
download
0
description
Transcript of ICT4D course 2013 - Sugar
![Page 1: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/1.jpg)
ICT4DChristophe Guéret (@cgueret)
The Sugar environmenthttp://bit.ly/ICT4D-Sugar
![Page 2: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/2.jpg)
What to expect from this lecture
● Description of the education environment Sugar
● Explanation of the preparation of a teaching program
● Hands-on!
![Page 3: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/3.jpg)
![Page 4: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/4.jpg)
What is Sugar exactly ?
● Software for learning that promotes creativity, collaboration, reflection, and critical thinking
● The first learning interface based on both cognitive and social constructivism
![Page 5: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/5.jpg)
Constructivism ?
● Engaging the learner in design, problem solving, collaborative work, integration of technology and creativity, interdisciplinary work, decision making and learning outside the classroom
![Page 6: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/6.jpg)
Constructivism ?
● Project-based learning: a research topic, theme, issue or challenge that allows children to think critically, collaborate with peers, teachers and the community to express and form opinions
![Page 7: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/7.jpg)
Everyone is a teacher and a learner
![Page 8: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/8.jpg)
Regardless of age
![Page 9: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/9.jpg)
Evaluation
● Better factors to measure the impact are○ problem-solving ability,○ critical thinking,○ use of multiple sources of information,○ reflection and communication skills
using multiple media,○ team and individual work,○ and self development
![Page 10: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/10.jpg)
Activities
● A Sugar Activity combines the old concepts of “document” and “application” into a single object
● Activities can be easily shared between neighbouring computers
● Activity instanced are associated with the document they let the user work on
![Page 11: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/11.jpg)
Collaborative editing of text
![Page 12: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/12.jpg)
Designed for networks
![Page 13: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/13.jpg)
Easy sharing of activity
● One click
● Works in○ Mesh○ Infrastructure
● P2P learning
![Page 14: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/14.jpg)
Journal of activities
● Assessment tool
● Portfolio
● Index of content
![Page 15: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/15.jpg)
● Distribution = Fedora base with Sugar, Gnome, and some activities
● Get packaged Sugar on○ http://wiki.laptop.org/go/The_OLPC_Wiki
● Customize with OSBuilder○ http://wiki.laptop.org/go/OS_Builder
● Different set of modules○ Glucose : everything needed to run Sugar○ Fructose : "default" activities
Packaging Sugar
![Page 16: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/16.jpg)
Making new activities
![Page 17: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/17.jpg)
Let's try to code something
● Quizz game about country size
● Design of the activity○ Pick a random set of countries○ Ask the user to click on the biggest○ Score a point if the response is good○ Repeat onto proposing another set
![Page 18: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/18.jpg)
The final result
![Page 19: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/19.jpg)
● Stay as much as possible 100% Python○ Avoid external system call○ Avoid uncommon python libraries (save space)
● Code the application as a desktop software and then wrap it
● Use the toolkit GTK+ and the UI designer Glade
General best practices (1/2)
![Page 20: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/20.jpg)
General best practices (2/2)
● Suggested approach1. Design the interface2. Develop and test the desktop application3. Create the sugar activity and test on the PC4. Upload the code to Sugarlabs5. Package the activity6. Test on the XO7. Upload activity to Sugarlabs
● Use the documentation○ http://www.flossmanuals.net/make-your-own-sugar-
activities/ and http://wiki.sugarlabs.org/
![Page 21: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/21.jpg)
Warning !
● Sugar is switching from GTK+ 2 to GTK+ 3○ Some (big) changes in the API○ Documentation you find may be outdated
● Sugar uses Python 2 (no switch to Python 3 in the near future)
● The example that follows uses the new APIs and Python 2
![Page 22: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/22.jpg)
Step 1: create the interface
● Use the interface designer "Glade"
![Page 23: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/23.jpg)
Output from Glade
● Don't forget to assign usable names to the objects you will reference in the code
● The result is an XML description of the interface
● Save the file as "GUI.glade" and put it in your project directory
![Page 24: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/24.jpg)
Step 2: develop the application
● Create a file that contains the application code○ Place the result "Application.py" in your project
directory
● Create a file to instantiate the application as a desktop software○ Place the result "main.py" in your project directory
● Put the data "ranks.csv" in the project directory too
![Page 25: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/25.jpg)
How do we get the data ?
● Query http://dbpedia.org/sparql :
prefix dbprop: <http://dbpedia.org/property/>prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>prefix dbpedia-owl: <http://dbpedia.org/ontology/>prefix xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct ?name ?rank where { ?city a dbpedia-owl:Country . ?city rdfs:label ?name. ?city dbprop:areaRank ?rank . filter (lang(?name) = "en"). filter (datatype(?rank) = xsd:int).} order by ?name
![Page 26: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/26.jpg)
Test the application
● python2 main.py
![Page 27: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/27.jpg)
Step 3 : wrap in a Sugar activity
● Need to extend a class called "Activity"
● Implement the methods○ "__init__" to create the application (mandatory)○ "read_file" to read the Journal entry○ "write_file" to write to the Journal entry
● Create a directory "activity" with the icon of the activity and a metadata file
![Page 28: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/28.jpg)
Step 3 : wrap in a Sugar activity
● Add the following files to your directory○ setup.py : installation bundle (generic)○ Activity.py : contain the wrapping class○ activity/activity-icon.svg : icon○ activity/activity.info : metadata about the activity
![Page 29: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/29.jpg)
Step 3 : do some testing
● Install Sugar on your development system○ Packages for Debian, Fedora, Archlinux○ Use sugar-build http://sugarlabs.
org/~dnarvaez/sugar-docs/
● Link the activity to your installation○ python2 setup.py dev
![Page 30: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/30.jpg)
Testing on the emulator
● Launch "sugar-emulator" then click on icon
![Page 31: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/31.jpg)
Step 4 : upload code to sugarlabs
● git.sugarlabs.org
![Page 32: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/32.jpg)
Step 5 : package the activity
● Create the package○ python2 setup.py dist_xo
● Tag the current version of the source code○ git tag -m "Release 1" v1 HEAD○ git push --tags
● The result is a file "Quiz-1.xo" in the "dist" directory
![Page 33: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/33.jpg)
Step 6 : test on the XO
● Put the activity on a stick
● Place the stick on the XO and either○ Use the Journal browser to open the stick, browse to
the file, and execute the installer○ Open the terminal activity and execute
■ sudo -u olpc sugar-install-bundle Quiz-1.xo
● If you don't have an XO, test on SoaS○ http://wiki.sugarlabs.org/go/Sugar_on_a_Stick
![Page 34: ICT4D course 2013 - Sugar](https://reader034.fdocuments.net/reader034/viewer/2022051110/54bd4d284a7959537a8b45f8/html5/thumbnails/34.jpg)
Step 7 : upload to activities portal
● http://activities.sugarlabs.org