The Karma Project
Rationale
Anyone with a modern standards-compliant web browser and a text editor should be able to create learning activities that can be used by anyone with a computer. Sugar should not be a walled garden that only allows learning activities expressly designed for it and it alone but rather gives extra power and depth to learning activities. Karma uses a specialized vocabulary that features a number of specialized terms. Please refer to the Karma Dictionary early and often.
Status
Karma is a sub-project of Sugar Labs that is under active development as a part of a Google Summer of Code project. The latest examples can be seen at http://karma.sugarlabs.org. You can also check out the Karma Project blog for updates.
To try out the karma examples you need to have an html5-capable browser. The Browse activity within Sugar does not currently support html5. To try out karma within Sugar you need to install Surf and its webkit dependencies or run Firefox 3.5 from the command-line (yum install pywebkitgtk WebKit-gtk gnome-python2-gconf).
What Karma Is
- Karma is a simple framework to create simple interactive learning activities primarily for Sugar but also to be viewable through any web browser that supports html5
- Karma is used to create simple activities that run off-line w/out access to the Internet
- Karma is for web developers who want to contribute to Sugar using their current skills
- Karma is built on top of open web standards such as html5, javascript, and CSS.
- Karma is built to run on top of web browsers that support html5, particularly the canvas element.
- Karma is built around the concept of individual "lessons" and multiple lessons can be aggregated into a sugar activity
- Karma is the evolution of OLE Nepal's work on the EPaath suite of lessons in Nepal
- Karma is designed with pervasive and easy internationalizaton in mind and integration with moodle, particularly for monitoring student progress
- Karma is pedagogically agnostic. Pedagogical choices are left to the lesson author.
What Karma Isn't
- Karma is not meant to replace pyGTK as the dominant toolset for creating Sugar activities
- Karma is not a tool for creating activities with complex 3D graphics. Karma is a tool for creating activities with simple 2D graphics
- Karma is not meant as a basis for a WYSIWG programming environment like TurtleArt, EToys, or Logo
- Karma is not built to support browsers that do not support html5, such as Internet Explorer and Firefox < version 3.5
- Karma is not intended to teach programming to children though it could be used as such
Design Philosophy
A Karma lesson is composed of a valid html5 document, javascript code, and css stylesheets and optional assets such as images, audio, video and lesson plans. Karma should be very easy for inexperienced developers to understand and work with. Even non-programmers should be able to make visible changes by tweaking the code and liberal use of cut-and-paste. Complexities such as integration with pootle, local storage, and certain types of animation should be abstracted so that novice developers don't have to understand them in order to effectively use Karma. Karma strictly adheres to the Model-View-Controller Pattern and similarly to unobtrusive JavaScript. In essence. you should be able to substantially change the look and feel of a Karma lesson by modifying the CSS or you could translate the activity, without having to understand the JavaScript code.
Design Goals
- Unobtrusive JavaScript
- No globals
- No native objects extension
Technical Architecture
- Run-time - Karma will work with basic functionality on any W3C standards-compliant browser that supports HTML5 tags canvas and audio. This notably excludes Microsoft's Internet Explorer. Karma will be particularly tailored to work within Sugar's Browse activity. Longer-term we hope to extend Karma to take advantage of Sugar's collaboration features.
- Primary Programming language - Javascript (1.8.1) Karma depends heavily the javascript library jQuery, version 1.3.
- i18n -- Pervasive internationalization is a critical part of Karma
- Supported types of i18n
- Output of Native Digits
- Image switching per locale
- Regular text, though it is unclear how to support plural forms, grammar shifts, and gender
- Audio switching per locale
- Integration with pootle
- Supported types of i18n
- Utilities -- we primarily use narwhal for command-line scripting and jsdoc for documentation
- Journal, Telepathy Integration -- method to be determined, perhaps using html5's offline storage feature, some resources here and here
- Moodle Integration -- method to be determined
- Repo and Bundle layout
Conventions
- Anatomy of a Karma Lesson
- The Karma Dictionary
- Karma Specifications (early draft)
- Source Code stored in http://git.sugarlabs.org/projects/karma
- Working demos at http://karma.sugarlabs.org
- Project Documentation kept in the Sugar Labs wiki
- Coding conventions: Based in GNU standards
- Use camel-case for function names and variables
- Exception to above -- object constructors should start with a capital letter
- Set column-width to 79 characters (from Python standard practice)
- Whenever possible, use jslint and then teach the rest of us how
- Anything Doug Crockford advises in "JavaScript: The Good Parts"
- File naming conventions: lowercase letters, underscore instead of spaces (need to write more about it)
GSoC Project
Team
Felipe Lopez Toledo "SubZero" is creating a prototype for Karma as a Google Summer of Code project. Bryan Berry is serving as his mentor. Christoph Derndorfer is working on the draft specification.
To-Do
Project Requirements
- Create a single prototype activity which could be used as a template for sugarizing AJAX activities. The GSoC participant should not create her own activity but recreate an existing activity such as one of OLE Nepal's flash activities.
- This prototype should have the following features:
- Simple interactive animation and audio using html5 tags like <canvas> and <audio>
- An assessment section that stores results of student's progress and gives them suggestions on improvement. Assessment info should be persistent.
- Uses simple html for the activity lesson plan and teacher notes.
- Integrates with the Journal
- Navigation and Help elements, ideally reusing widgets from jQuery
- Some element of collaboration using Telepathy (This could be really hard, depending on the state of javascript bindings to dbus)
Meetings
- Regular meeting between Felpe and Bryan every Tuesday 0215 UTC at #sugar on irc.freenode.net
- General GSOC meeting for participants from Sugar every Tuesday 1400 UTC #sugar-meeting
Meeting Notes
- Karma:Meeting 12 May 2009
- Karma:Meeting 02 Jun 2009
- Karma:Meeting 09 Jun 2009
- Karma:Meeting 23 Jun 2009
- Karma:Meeting 30 Jun 2009
- Karma:Meeting 21 Jul 2009
- Karma:Meeting 4 Aug 2009
- Karma:Meeting 11 Aug 2009
- Karma:Meeting 18 Aug 2009
- Karma:Meeting 24 Aug 2009
- Karma:Meeting 08 Sep 2009
Roadmaps
Subzero's University Thesis
Deadline: February
Goals: i18n mechanism, animation support, several good examples, final paper done
- i18n mechanism: i18n on Karma Objects, inline html i18n, html2po tool
- animation support: fps support, KGraphics events support
These milestones are logged on Launchpad
0.1 "Osito"
Due September 11, 2009
- 1 Working example in "adding_up_to_10"
- cleaned up documentation with jsdocs api documentation and cleaned up README.txt
- integrate chakra and "adding_up_to_10" and knavbar
- adding_up_to_10 works on the XO
- Surf
- Browse
0.2 "Gatito"
Due October 21, 2009
This release is timed to coincide with Bryan's visit to Google HQ for the GSoC Mentor's Summit
- 3 working examples
- animation support with k.timeline
- basic SVG support
- basic i18n support for inline text
- narwhal utility scripts
- jsdocs
- lesson2po
- separate plugin for i18n, perhaps called k4a or karma-for-all
0.4 "nino"
Due 31 January 2010
This release will be for Subzero's senior thesis
- Full i18n support
- support for SVG and canvas animation
- fully functional "kpages"
- build scripts for chakra
- scripts that automate creating karma lessons as launchpad projects, like Quickly does
- At least 6 lessons ready that have been translated into 3 languages each
- Version 0.1 draft of karma specification done
1.0 "Muchacho"
This release may also be called "Karma 1000" and is a big wishlist
- Full moodle integration
- Offline storage and synchronization with moodle
- Integration with the Sugar Journal
- Integration with Telepathy on Sugar
Library
here lies a lot of links to resources specific to karma
UI
- Iphone Human Interface Guide http://developer.apple.com/iphone/library/documentation/userexperience/conceptual/mobilehig/MobileHIG.pdf
- Palm Pre interface guide http://developer.palm.com/images/palm/pdf/palm_webos_hi_guidelines.pdf
- 30 Usability Issues To Be Aware Of http://www.smashingmagazine.com/2007/10/09/30-usability-issues-to-be-aware-of/
- 10 Usability Nightmares You Should Be Aware Of http://www.smashingmagazine.com/2007/09/27/10-usability-nightmares-you-should-be-aware-of/
- "The Design of Everyday Things" book by Don Norman
- "Don't Make me think" by Steve Krug, guide to usability for web apps
HTML5
- http://www.smashingmagazine.com/2009/07/16/html5-and-the-future-of-the-web/
- http://www.w3.org/TR/html5-diff/ Differences between html4 and html5
General Web Design
- "Web Design in a Nutshell" from O'Reilly
- Apple "Web Page Development: Best Practices" http://developer.apple.com/internet/webcontent/bestwebdev.html
Canvas
- demos: http://html5demos.com/
- basics: http://dev.opera.com/articles/view/html-5-canvas-the-basics/
- painting web app: http://dev.opera.com/articles/view/html5-canvas-painting/
- mozilla canvas tutorial: https://developer.mozilla.org/en/Canvas_tutorial
- using canvas on webkit: http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/Canvas.html
- http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Javascript
- "Javascript: The Good Parts" book by Doug Crockford
- "jQuery in Action" book
- "Pro Javascript Techniques" by john resig
- All the tutorials at www.ejohn.org, esp.
Coding Tools and Conventions
- Venkman -- javascript debugger http://www.svendtofte.com/code/learning_venkman/
- Firebug --- http://www.getfirebug.com
- For emacs users -- nxhtml mode and magit.el for working w/ git