Coding Tutor

Jump to: navigation, search


Game developers often include a full-fledged tutorial in their strategy/adventure games where a background voice or some text statements guide the player inside the game scenario itself and help him/her learn the nuances of the game in-situ. The idea is to create something similar for students & children wishing to learn programming in a way they feel as if they are playing some game.


When students & children start to learn programming, they are exposed to a burgeoning plethora of IDEs and SDKs and other learning tools which teach them nothing on how to code. Often the documentation is hard to crack for the beginner and he needs to pour over books. Moreover when he does some mistakes, he gets convoluted error messages which he is unable to comprehend. Coding Tutor will act as a software teacher for such students on the XO platform and will make the chore of learning programming a fun task. Initially it will be a C/C++ & Python Tutor as these are the most common starting programming languages and will go on to add other tutorials in future stages as well.

Summary & Description

Coding Tutor is inspired by the Hackety Hack software which is a browser cum compiler for learning hacking in Ruby. It will be a self sustained tutorial environment having funky colored screens and a spoken + written tutorial which will teach and guide the user to code in an inalienable way. It will be using the GCC/G++ compiler and the Python Environment and will initially be a C/C++/Python Tutor. C/C++ will be there as system languages (base languages) and Python as the modern easy to use, friendly programming language!

There are various levels of learning which can be there in this tutor. The user starts learning from the basics and tries whatever is taught at the same time in the coding area. When he goes on to the advanced levels the complexity of the Tutor increases as well which provides the user different areas & modalities to work in. The interface and the tutorial techniques are so simple to use that even a child in his early teens can easily learn basic nuances of coding and enjoy the lively experience.

Hackety Hack was primarily intended towards Ruby programming and tutoring its ease to code web applications and stuff. Coding Tutor extends the idea for C/C++/Python Programming and includes a subtle addition in terms of describing to the user - "What went Wrong? How to avoid it!". It includes Speech Tutorials that help in larger interaction base and a heavily user oriented interface.

Coding Tutor will also be involving ideas implemented in the Pippy activity of XO, which is a very easy to learn Python Tutorial involving an Interpreter and code samples.

Use Case Scenario

Sample scenario in which the user works:-

  • The user logs in the software which determines his level from the last use and suggests the next sections to learn on.
  • User selects the section and the Tutor starts the interaction by a speech tutorial and suggests what the user should try and practice.
  • User codes in the coding area, Tutor intelligently reads the user’s code and suggests tricks, tips and improvements to provide positive motivation.
  • If there are mistakes in the code, the Tutor understands the error messages, highlights the erratic code and explains the error to the user in a simple and easy way which the user enjoys.
  • The speech interface makes the task even more fun as the user gets comments from the tutor as if he was learning directly from a teacher.
  • User can quit the program as and when he wishes as the tutor stores the state of his work and resumes on his next login.

Proposed Features

Speech Interactivity

The tutor interacts with the user by reading a tutorial text using a TTS Speech Synthesis software. It also comments on and explains the errors in the code by reading the compiler generated errors, and suggests improvements if the user commits common programming errors. The tutor can do so as it will not be made as an IDE but a tutorial software so, it will know what is intended in the section and what mistakes can be made.

Error Highlighter

The tutor will highlight the exact errors in the code (based on analysis of compiler generated errors and corresponding line numbers), generate a sound to inform user of his mistakes and explain the corrections if possible, to the user.


During the practice sessions, if the user faces some problems, he can ask for hints from the tutor. The tutor will be having certain predefined hints in its database which it can provide. It can also look for certain pitfalls and warn the user of them.

Multi-Language Support

The tutorial will incorporate facility of different languages based on the TTS used and translations available. The tutorials will be translated into different languages using Google Translator and can be reviewed by language experts in the community.

Network Sharing

The user can share his codes and creations with friends using Telepathy, Avahi & Mesh Networking and sustain a creative and fun learning environment. The teacher in classroom can also share good codes with children to enkindle them.

Quiz Sessions

The tutor can hold quiz sessions for the user after he passes certain sections of the tutorial and suggest expected thought processes to him/her to encourage him for further learning, after he completes the quiz. The Quiz can include certain section specific coding questions from database.

Technical Aspects

  • Test to Speech: Tutorials would be converted to voice using Speed Dispatcher which uses eSpeak as the library.
  • Graphics & UI: Glade and Sugar Graphics will be used for creating the UI and cool software environment.
  • Error understanding: GCC/G++ & Python compiler error messages will be read from the errors generated and using a previously created database will map the information with the user code (line nos.). Error highlighting will be embedded and the errors which are to be communicated to user via voice will be transferred to the TTS package.
  • Coding Area: Coding area will be a standard Text editor with embedded highlighting features for errors and comments from tutor. Unicode or Internationalization need not be used as the code is always in English language.
  • Database: The tutorial database, code database and error database will be standard data files which will be read by the program according to the expected use.
  • Networking: For the code sharing between teacher and children & children themselves, the use of Avahi, Telepathy and the Mesh Networking implementation of XO will be made use of.

Extensibility (Optional Features)

This project can be extended in future to include advanced learning tutorials and other features:-

  1. Networking Tutorials: Tutorials regarding networking can be included in future for advanced learners where the software will include corresponding facilities for IPC and Socket Programming. The exercises in these tutorials can be made very interactive as the user will learn the practical aspects of Networking. The XO Mesh Networking for demos will also be helpful in this scenario.
  2. Speech Recognition & Multi modality: Speech commands and requests by user can be included in future using Speech Recognition APIs, in order to have complete interactivity with the tutor.
  3. Developer's Kit: As pointed out by pscoe2, a developer's kit can be developed which will help the community members and developers to create different tutorials and sections and share them with others, in an easy and simple way.
  4. Other Languages: Other programming languages can also be added to the Coding Tutor as the project develops further. Community developers working in different languages can add tutorials based on their knowledge. It can also include tutorials for scripting languages.
  5. Bityi Project: The tutor can be embedded with the Bityi project to enable the student code in many different languages apart from coding in English. This will be done once the project is completed and ready to integrate.

These extensibility features can be worked on after the summer of code, when the project matures and help of OLPC Community developers will be required to accomplish this.


Following points illustrate some basic project realization schedule that will be followed:- Before the starting of the summer coding period, I am planning to be acquainted and adept at using all the features I will be using during the coding. I will create a software engineering structure of the application which will help me during the coding phase. Interacting with the Mentor at this stage will help a lot in getting the details correct.

  1. A basic skeleton of the program will be created with minimal UI and effects. The code editor will be incorporated and area for text form of tutorial will be kept aside.
  2. Compiler will be used internally in the program itself so, this stage will ensure that the code written in text area is compiled and the program is able to read error messages.
  3. TTS will be implemented in the tutorials section and the tests created will ensure its proper working.
  4. Tutorials will be created with the help of Books for Programming Languages and community members and integrated into the tutorials section. Quiz problems and common misconceptions and expected errors will be estimated and incorporated.
  5. Intra Computer tests for the program to ensure proper working and make the software free from found bugs.
  6. Networking will be implemented for sharing and tested using emulators or XOs from nearby mentors/developers.
  7. Final cosmetics on UI and environment will be done to make a lively atmosphere. Sounds and music will be added both as background score and beeps.

This is just a tentative schedule and not an exhaustive one, which can be developed only with proper guidelines and help of mentor.


Hackety Hack

Speech Synthesis

Screen Reader