Programming for Children
description
Transcript of Programming for Children
![Page 1: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/1.jpg)
Programming for Children
Edward Mokurai Cherlin Earth Treasury
October 28, 2007
![Page 2: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/2.jpg)
Author
Edward Mokurai Cherlin
גרשון בן יסעף Эдуард Георгеевич Черлын 장영구 / 張永久 法雲默雷 / धर्म�र्म�घशब्दगर्ज�
![Page 3: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/3.jpg)
Experience
Mathematician Peace Corps, Korea Buddhist training,
Japan, US, UK Self-taught, Computer
Science High-tech market
researcher
Free Software development
Senior Tech Writer Simputer Evangelist MBA Student, Presidio
SOM Founder, Earth Treasury
![Page 4: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/4.jpg)
The Children's Cat's Laptop
![Page 5: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/5.jpg)
Origins
Inspired by Simputer from Bangalore MIT Asian Media Lab MIT $100 Laptop project Spun off as non-profit, One Laptop Per Child Funding from Google, Red Hat, eBay, others Design help from MIT, Google, Red Hat, AMD,
Quanta, Free Software community, others
![Page 6: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/6.jpg)
One Laptop Per Child
Education program, not laptop program Designed to meet stringent requirements of
poor children Not dependent on electric system Usable by illiterates No moving parts Extremely rugged, extremely green
![Page 7: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/7.jpg)
What We Need
For each language Text-to-speech Speech recognition Content For each standard school subject
Domain-specific software; the tools of the trade Free textbooks integrated with software
![Page 8: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/8.jpg)
Content
Schools not on Internet will have local copy of Wikipedia in English and local languages.
Children's books Literature and History Math and Science Selection of other freely licensed materials
![Page 9: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/9.jpg)
Extra Content
Earth Treasury proposes to link schools with laptops, and teach the children how to go into business together.
Genuine Free Market Economics, and how to get it
Business skills Dealing with governments Trade law etc.
![Page 10: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/10.jpg)
Hardware
No moving parts; flash storage 3 USB 2, sound, SD card slot Screen rotates to tablet mode Camera built in; microscope attachment Wireless mesh networking Daylight readable screen, 1200 x 900 Extremely low power
![Page 11: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/11.jpg)
Software
Red Hat Fedora Rawhide 7 Linux Sugar User Interface Activities designed for children Smalltalk, Python, Perl, Forth, other languages SCIM (Smart Common Input Method) Pango and Cairo (Unicode screen and printer
rendering)
![Page 12: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/12.jpg)
Marketing
Quanta requires orders for 5 million units to start manufacturing at $188
$1 profit per unit for OLPC Minimum order, 2006: 1 million units @ $189 Minimum order, 2Q 2007: ¼ million units Minimum order, 4Q 2007: 100 @ $299 Someday, retail.
![Page 13: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/13.jpg)
Hot Prospects
Argentina Brazil Cambodia Ethiopia Libya Mexico
Nigeria Peru Rwanda Thailand Uruguay
![Page 14: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/14.jpg)
Initial Languages
Amharic አማርኛ
Arabic عربي Cambodian ភាសាខ្�រ English French Français Hausa 8َه8ْو:َس
Igbo Kinyarwanda Portuguese Portuguesa Spanish Español
Castellano Thai ภาษาไทย Yorùbá
![Page 15: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/15.jpg)
Linux Localization
Done by any language community Provided to whole community at no cost More languages than Macintosh or
Windows Almost all software has separate .po file
of string data Documentation in man, info, help files
![Page 16: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/16.jpg)
XO Programming Languages
Squeak dialect of Smalltalk provided in UI as eToys
Squeak includes Logo capabilities Python used to create UI and apps Perl for scripting Forth for low-level programming Other languages can be installed:
LISP/Scheme, APL, C, C++, etc.
![Page 17: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/17.jpg)
Open FirmWare
Forth programming language Equivalent of BIOS; created at Sun Press game key while booting, then Esc
(top left) At ok prompt, you can type test-all to test
all of the hardware interfaces More information at
http://wiki.laptop.org/go/Open_Firmware
![Page 18: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/18.jpg)
Sugar UI
![Page 19: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/19.jpg)
XO Collaboration
![Page 20: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/20.jpg)
Activities, Not Apps
Packaged as resource bundle Full screen Sharable Instance per file Instant resume
![Page 21: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/21.jpg)
Building Sugar Activities
http://wiki.laptop.org/go/Sugar Install Sugar on Linux, Mac, or Windows Read the human interaction guidelines Get an overview of the architecture Check out the code snippets library Understanding Sugar code organization Write your own activity
![Page 22: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/22.jpg)
Human Interaction Guidelines
Users are young, inexperienced, international 256M RAM, no swap; write efficient code. Make everything simple and discoverable. Security is vital for the children. Adapt to different screen modes, network
states. Children must be able to recover from errors
easily.
![Page 23: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/23.jpg)
Architecture
See http://wiki.laptop.org/go/API Resources include:
Third-party applications Python scripts Libraries
![Page 24: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/24.jpg)
Code Snippets Library
Icons Toolbar Files Images Audio Processes Garbage collection
![Page 25: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/25.jpg)
Code Organization
Launch Sugar, Start Sugar shell, Initialize Libraries, services, and utilities Network Manager User ID and colors Main loop Shutdown http://wiki.laptop.org/go/Understanding_sugar_code
![Page 26: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/26.jpg)
Write Activity
This is normal Python programming, with some Sugar-specific startup and shutdown.
Keep human interface guidelines in mind. Use resources provided as needed. No code bloat.
![Page 27: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/27.jpg)
HelloWorldActivity.py
from sugar.activity import activity import logging import sys, os import gtk class HelloWorldActivity(activity.Activity): def hello(self, widget, data=None): logging.info('Hello World') def __init__(self, handle): print "running activity init", handle activity.Activity.__init__(self, handle) print "activity running"
# Creates the Toolbox.toolbox = activity.ActivityToolbox(self)self.set_toolbox(toolbox)toolbox.show() # Creates a new button with the label "Hello World".self.button = gtk.Button("Hello World")self.button.connect("clicked", self.hello, None)self.set_canvas(self.button) # Display this newly created widget.self.button.show() print "AT END OF THE CLASS"
![Page 28: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/28.jpg)
Sugarizing Non-Python Apps
Very small amount of interface code required to run within Sugar.
See eToys source code for example. Full Sugarizing requires support for
sharing, other Sugar capabilities
![Page 29: Programming for Children](https://reader035.fdocuments.in/reader035/viewer/2022081603/56814781550346895db4b3a4/html5/thumbnails/29.jpg)
References
OLPC http://laptop.org/ OLPC Wiki http://wiki.laptop.org/ On the Wiki, search for Sugar, eToys,
Activities, OFW, Software, Hardware, or any other topic of interest
XO Live CD: http://wiki.laptop.org/go/LiveCd
Earth Treasury http://wiki.laptop.org/go/Earth_Treasury