Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

ICT4D course 2013 - Sugar


Published on

  • Be the first to comment

  • Be the first to like this

ICT4D course 2013 - Sugar

  1. 1. ICT4DChristophe Guéret (@cgueret) The Sugar environment
  2. 2. What to expect from this lecture● Description of the education environment Sugar● Explanation of the preparation of a teaching program● Hands-on!
  3. 3. 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
  4. 4. Constructivism ? ● Engaging the learner in design, problem solving, collaborative work, integration of technology and creativity, interdisciplinary work, decision making and learning outside the classroom
  5. 5. 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
  6. 6. Everyone is a teacher and a learner
  7. 7. Regardless of age
  8. 8. 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
  9. 9. 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
  10. 10. Collaborative editing of text
  11. 11. Designed for networks
  12. 12. Easy sharing of activity ● One click ● Works in ○ Mesh ○ Infrastructure ● P2P learning
  13. 13. Journal of activities ● Assessment tool ● Portfolio ● Index of content
  14. 14. Packaging Sugar● Distribution = Fedora base with Sugar, Gnome, and some activities● Get packaged Sugar on ○● Customize with OSBuilder ○● Different set of modules ○ Glucose : everything needed to run Sugar ○ Fructose : "default" activities
  15. 15. Making new activities
  16. 16. Lets 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
  17. 17. The final result
  18. 18. General best practices (1/2)● 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
  19. 19. General best practices (2/2)● Suggested approach 1. Design the interface 2. Develop and test the desktop application 3. Create the sugar activity and test on the PC 4. Upload the code to Sugarlabs 5. Package the activity 6. Test on the XO 7. Upload activity to Sugarlabs● Use the documentation ○ activities/ and
  20. 20. 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
  21. 21. Step 1: create the interface● Use the interface designer "Glade"
  22. 22. Output from Glade● Dont 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 "" and put it in your project directory
  23. 23. Step 2: develop the application● Create a file that contains the application code ○ Place the result "" in your project directory● Create a file to instantiate the application as a desktop software ○ Place the result "" in your project directory● Put the data "ranks.csv" in the project directory too
  24. 24. How do we get the data ?● Query : prefix dbprop: <> prefix rdfs: <> prefix dbpedia-owl: <> prefix xsd: <> 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
  25. 25. Test the application● python2
  26. 26. 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
  27. 27. Step 3 : wrap in a Sugar activity● Add the following files to your directory ○ : installation bundle (generic) ○ : contain the wrapping class ○ activity/activity-icon.svg : icon ○ activity/ : metadata about the activity
  28. 28. 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 dev
  29. 29. Testing on the emulator● Launch "sugar-emulator" then click on icon
  30. 30. Step 4 : upload code to sugarlabs●
  31. 31. Step 5 : package the activity● Create the package ○ python2 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
  32. 32. 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 dont have an XO, test on SoaS ○
  33. 33. Step 7 : upload to activities portal●