Posted by: 2stepsback | October 31, 2006

A new idea in training: An API trainer program

A great idea for a software project would be to make a trainer software which would do the following:
After being installed, parse the source code of the standard libraries that ship with your programming language package and then generate the class structures (or variables) and make objective tests out of that generated information.
For example, in Java, it would parse the entire src.zip and get all class member information, method sigatures and variable names, just like javadoc does internally.
Then, these pieces of text are clubbed together by package. For each package, a separate trainer is made as follows:
e.g. Say, we take String.java, the class for String.
Now, among other methods it has the constructor method:
public String(byte bytes[], int offset, int length, String charsetName)
throws UnsupportedEncodingException
The trainer will, by turn, highlight each method and in this example, first show:

public String(byte bytes[], int offset, int length, String charsetName)
throws UnsupportedEncodingException

then

public String(byte bytes[], int offset, int length, String charsetName)
throws UnsupportedEncodingException

then

public String(byte bytes[], int offset, int length, String charsetName)
throws UnsupportedEncodingException

then

public String(byte bytes[], int offset, int length, String charsetName)
throws UnsupportedEncodingException

and finally,

public String(byte bytes[], int offset, int length, String charsetName)
throws UnsupportedEncodingException

Since the text is highlighted, it catches the eye of the trainee and he remembers it better.
Also, the display should be flash-like so that maximum impact is made. The highlighting of one argument at a time should be such that the highlighted part of the method signature should stand out prominently. For this, SVG(Apache Batik), SMIL, JGSL(https://jgsl.dev.java.net/) and Java 2D (in general) are good options.

Also, immediately after the training tests can be taken with a fill-in-the-blanks format.

For example:

public String(____________, int offset, int length, String charsetName)
throws UnsupportedEncodingException

public String(byte bytes[], ____________, int length, String charsetName)
throws UnsupportedEncodingException

public String(byte bytes[], int offset, ______________, String charsetName)
throws UnsupportedEncodingException

and so on
So, in summary, a good looking electronic flash card software will be a good tool to learn a new language in a fun way.
Riad Djemili has made a great program called jMemorize. He should be able to help out with the actual coding. 🙂

Advertisements

Categories

%d bloggers like this: