Code
This page will eventually grow into a collection of OLPC-related code snippets and hints. Not all code snippets or tips are appropriate for this Wiki. If they are general ideas that are not specific to the OLPC system or to education, then they should go to general code snippet sites, such as Activestate's Python Cookbook for Python.
(Also see Sugar Code Snippets on the main laptop.org wiki.)
Snippets
To be made available (community contribution encouraged). Some examples of the things we'd like to see:
- A template for a Sugar application
- An example of how to add D-BUS support to an app
- A database module that arranges data on disk to gain maximum advantage from JFFS2 compression
Tips
- If your application needs a local SQL database, don't embed a custom one; use SQLite which we already ship on the laptop
- For Javascript, remove all code that detects browsers.
- Make sure that your app will continue to function when there is no network access.
- If your app must use network RPC then provide a server to run on localhost
- Make sure that your app functions with the small screen of the OLPC
