SlideShare a Scribd company logo
ICT4D
Christophe Guéret (@cgueret)
    The Sugar environment
    http://bit.ly/ICT4D-Sugar
What to expect from this lecture
● Description of the education environment
  Sugar

● Explanation of the preparation of a teaching
  program

● Hands-on!
ICT4D course 2013 - Sugar
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
Constructivism ?
      ● Engaging the learner in design,
        problem solving, collaborative
        work, integration of technology and
        creativity, interdisciplinary work,
        decision making and learning
        outside the classroom
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
Everyone is a teacher and a learner
Regardless of age
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
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
Collaborative editing of text
Designed for networks
Easy sharing of activity
                           ● One click

                           ● Works in
                             ○ Mesh
                             ○ Infrastructure


                           ● P2P learning
Journal of activities
                        ● Assessment
                          tool

                        ● Portfolio

                        ● Index of
                          content
Packaging Sugar
● 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
Making new activities
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
The final result
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
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
  ○ http://www.flossmanuals.net/make-your-own-sugar-
    activities/ and http://wiki.sugarlabs.org/
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
Step 1: create the interface
● Use the interface designer "Glade"
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
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
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
Test the application
● python2 main.py
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
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
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
Testing on the emulator
● Launch "sugar-emulator" then click on icon
Step 4 : upload code to sugarlabs
● git.sugarlabs.org
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
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
Step 7 : upload to activities portal
● http://activities.sugarlabs.org

More Related Content

PDF
Informal presentation about RES
ODP
Stop making tools! Nobody likes them anyway...
PDF
Digital archiving 3.0
PDF
2015 FOSS4G Track: Spatiotemporal Interface Development: Using Web Technologi...
PDF
2015 FOSS4G Track: Open Specifications for the Storage, Transport and Process...
PDF
2015 GIS in Colorado Track: Challenges Standardizing and Implementing Metadat...
PDF
Linked Open Citation Database (LOC-DB)
PDF
Global Open Source Development 2011-2014 Review and 2015 Forecast
Informal presentation about RES
Stop making tools! Nobody likes them anyway...
Digital archiving 3.0
2015 FOSS4G Track: Spatiotemporal Interface Development: Using Web Technologi...
2015 FOSS4G Track: Open Specifications for the Storage, Transport and Process...
2015 GIS in Colorado Track: Challenges Standardizing and Implementing Metadat...
Linked Open Citation Database (LOC-DB)
Global Open Source Development 2011-2014 Review and 2015 Forecast

What's hot (20)

PDF
Introduction of Open Source Job Board with Drupal CMS
PDF
The Semantic Web – A Vision Come True, or Giving Up the Great Plan?
PDF
Introduction to OpenRefine
PDF
20170501 Distributed Network of Digital Heritage Information
PDF
Nanopublications and Decentralized Publishing
KEY
How we can understand the world through open data
PDF
2015 FOSS4G Track: Integrating FOSS4G Into a Government Web-Editing Applicati...
PDF
Let your data shine... with OpenRefine
PPTX
Semantic web 101: Benefits for geologists
PDF
Is it a Package or a Wrapper? Designing, Documenting, and Distributing a Pyth...
PDF
Web at 25 - Ontos Linked Open Data
PPTX
TXDHC OpenRefine Training
PDF
2015 FOSS4G Track: Getting Started with FOSS4G: The Newbie’s Perspective by M...
PDF
Text analytics for Google Spreadsheets using Text Mining add-on
PDF
2015 FOSS4G Track: What is Free and Open Source Software for Geospatial Appli...
KEY
When Drupal meets OpenData
PDF
30° Nexa Lunch Seminar - Linked Data Platform vs real world
PDF
Tutorial on Web Scraping in Python
PDF
(Enterprise) Linked Data Platform a new standard to manage LOD
PDF
What is Web-scraping?
Introduction of Open Source Job Board with Drupal CMS
The Semantic Web – A Vision Come True, or Giving Up the Great Plan?
Introduction to OpenRefine
20170501 Distributed Network of Digital Heritage Information
Nanopublications and Decentralized Publishing
How we can understand the world through open data
2015 FOSS4G Track: Integrating FOSS4G Into a Government Web-Editing Applicati...
Let your data shine... with OpenRefine
Semantic web 101: Benefits for geologists
Is it a Package or a Wrapper? Designing, Documenting, and Distributing a Pyth...
Web at 25 - Ontos Linked Open Data
TXDHC OpenRefine Training
2015 FOSS4G Track: Getting Started with FOSS4G: The Newbie’s Perspective by M...
Text analytics for Google Spreadsheets using Text Mining add-on
2015 FOSS4G Track: What is Free and Open Source Software for Geospatial Appli...
When Drupal meets OpenData
30° Nexa Lunch Seminar - Linked Data Platform vs real world
Tutorial on Web Scraping in Python
(Enterprise) Linked Data Platform a new standard to manage LOD
What is Web-scraping?
Ad

Viewers also liked (6)

PDF
ICT4D course 2013 - OLPC deployments
PDF
ICT4D course 2013 - Low resources infrastructure
PPTX
Is data sharing the privilege of a few? Bringing Linked Data to those without...
ODP
The Entity Registry System: Collaborative Editing of Entity Data in Poorly Co...
PDF
The Entity Registry System (ERS)
PDF
Downscaling information systems for education
ICT4D course 2013 - OLPC deployments
ICT4D course 2013 - Low resources infrastructure
Is data sharing the privilege of a few? Bringing Linked Data to those without...
The Entity Registry System: Collaborative Editing of Entity Data in Poorly Co...
The Entity Registry System (ERS)
Downscaling information systems for education
Ad

Similar to ICT4D course 2013 - Sugar (20)

PDF
Open Source Tools for Libraries
PPTX
What is the price of open source
PDF
Use open source software to develop ideas at work
PDF
Software Freedom and Open Source Community
PDF
Teaching Open Source In The University
PDF
Everyone wants (someone else) to do it: writing documentation for open source...
PDF
Open Chemistry, JupyterLab and data: Reproducible quantum chemistry
PDF
Open source, What | Why | How
PPTX
Makerspace @uncg libraries presentation for LIS688 (june 2014)
PDF
How to use online office suites and data storage to protect your privacy
PDF
Ottawa Drupalcamp 2024 Keynote: Chart Your Drupal Journey
PDF
OSDC 2012 | Devops and Open Source by Kris Buytaert
PDF
OSDC 2012 | Devops and Open Source by Kris Buyaert
PDF
PloneSocial Roadmap PLOG2013
PDF
Running Moodle for High Concurrent Users
PDF
Drupal and the semantic web - SemTechBiz 2012
PDF
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
PPTX
Dynatech presentation for TSI Career Day
PDF
Gsoc2012 checklist
PDF
Introduction to building wireframes
Open Source Tools for Libraries
What is the price of open source
Use open source software to develop ideas at work
Software Freedom and Open Source Community
Teaching Open Source In The University
Everyone wants (someone else) to do it: writing documentation for open source...
Open Chemistry, JupyterLab and data: Reproducible quantum chemistry
Open source, What | Why | How
Makerspace @uncg libraries presentation for LIS688 (june 2014)
How to use online office suites and data storage to protect your privacy
Ottawa Drupalcamp 2024 Keynote: Chart Your Drupal Journey
OSDC 2012 | Devops and Open Source by Kris Buytaert
OSDC 2012 | Devops and Open Source by Kris Buyaert
PloneSocial Roadmap PLOG2013
Running Moodle for High Concurrent Users
Drupal and the semantic web - SemTechBiz 2012
Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
Dynatech presentation for TSI Career Day
Gsoc2012 checklist
Introduction to building wireframes

More from Christophe Guéret (20)

PDF
HHAI June 2022 - KGs and Hybrid Intelligence
ODP
Introduction about WorldWideSemanticWeb.org for the workshop "Making it Matter"
PDF
Let's downscale the semantic web !
PDF
Your next data viz gear should be a Wii-U
PDF
Linking knowledge spaces
ODP
The data behind the HuisKluis
PDF
The road towards a Web-based data ecosystem
PDF
Linked Open Data for Digital Humanities
PDF
Exposing the data from NARCIS with VIVO
PDF
Clarifier le sens de vos données publiques avec le Web de données
ODP
Embedding young learners into the information society
PDF
Is linked data something for me?
ODP
Decentralised entity registry “WikiReg”
ODP
Evolutionary and Swarm Computing for scaling up the Semantic Web
PDF
Decentralised Open Data for World Citizens
PDF
Assessing Linked Data Mappings using Network Measures
ODP
Finding and consuming (Linked) Open Data
PDF
Exploring Linked Data content through network analysis
PDF
An Evolutionary Perspective on Approximate RDF Query Answering
PDF
SemanticXO: connecting the XO with the World’s largest information network
HHAI June 2022 - KGs and Hybrid Intelligence
Introduction about WorldWideSemanticWeb.org for the workshop "Making it Matter"
Let's downscale the semantic web !
Your next data viz gear should be a Wii-U
Linking knowledge spaces
The data behind the HuisKluis
The road towards a Web-based data ecosystem
Linked Open Data for Digital Humanities
Exposing the data from NARCIS with VIVO
Clarifier le sens de vos données publiques avec le Web de données
Embedding young learners into the information society
Is linked data something for me?
Decentralised entity registry “WikiReg”
Evolutionary and Swarm Computing for scaling up the Semantic Web
Decentralised Open Data for World Citizens
Assessing Linked Data Mappings using Network Measures
Finding and consuming (Linked) Open Data
Exploring Linked Data content through network analysis
An Evolutionary Perspective on Approximate RDF Query Answering
SemanticXO: connecting the XO with the World’s largest information network

ICT4D course 2013 - Sugar

  • 1. ICT4D Christophe Guéret (@cgueret) The Sugar environment http://bit.ly/ICT4D-Sugar
  • 2. What to expect from this lecture ● Description of the education environment Sugar ● Explanation of the preparation of a teaching program ● Hands-on!
  • 4. 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
  • 5. Constructivism ? ● Engaging the learner in design, problem solving, collaborative work, integration of technology and creativity, interdisciplinary work, decision making and learning outside the classroom
  • 6. 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
  • 7. Everyone is a teacher and a learner
  • 9. 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
  • 10. 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
  • 13. Easy sharing of activity ● One click ● Works in ○ Mesh ○ Infrastructure ● P2P learning
  • 14. Journal of activities ● Assessment tool ● Portfolio ● Index of content
  • 15. Packaging Sugar ● 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
  • 17. 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
  • 19. 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
  • 20. 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 ○ http://www.flossmanuals.net/make-your-own-sugar- activities/ and http://wiki.sugarlabs.org/
  • 21. 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
  • 22. Step 1: create the interface ● Use the interface designer "Glade"
  • 23. 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
  • 24. 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
  • 25. 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
  • 26. Test the application ● python2 main.py
  • 27. 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
  • 28. 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
  • 29. 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
  • 30. Testing on the emulator ● Launch "sugar-emulator" then click on icon
  • 31. Step 4 : upload code to sugarlabs ● git.sugarlabs.org
  • 32. 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
  • 33. 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
  • 34. Step 7 : upload to activities portal ● http://activities.sugarlabs.org