Application Program: Test of ability with arithmetic
Here is an idea for an application program for the laptop. As well as being a useful application program to have available, hopefully the development of this application program will be an important opportunity to gain valuable experience is the development of applications for the laptop, covering such topics as design, documentation, localization and finding out whether a team of enthusiasts from around the globe can put together an application which will be of practical usefulness to the project.
Please join in and edit this page so that the development of the application program can gradually proceed by utilizing the knowledge and skills of many people.
How do we start?
Is the best way to write the documentation first, in English? If all strings are included in English then maybe people who do not have English as their native language yet who know English will choose to translate the strings into their native language. Hopefully the availability of those strings in various langauges will help a programmer who knows the linux system and has sufficient knowledge of the laptop to produce an application program which will run on the laptop in a variety of languages. How would that be done? Would the strings be built in to the application program or would they be in an external file? Building strings into the program would make the program more self-contained yet putting the strings in a file would mean that localization to another language would be more straightforward. Is it best to start with, say, a Spanish version or a Portuguese version with the strings built in to the program as a first stage with the strings in an external file being a second stage, or should the attempt be made to go straightaway to an application program where the strings are in an external file? What is the best way to localize an application program on the linux platform?
An attempt to produce the documentation
Here is an attempt at the documentation.
Application Program: Test of ability with arithmetic
This program provides a child with the opportunity to test his or her ability to perform basic arithmetical calculations using pen and paper and then enter his or her answer into the computer and receive feedback. The program starts by asking how many digits should the numbers use. The program then generates questions at random within that constraint. The program compares the answer provided by the child with the correct answer which it has computed. Feedback is either that the answer entered is correct or the correct answer is provided. Please note that the program does not state Incorrect or Wrong.
NEEDS MORE IN THE SECTION ABOVE.
How should the program be terminated? Should it be for a fixed number of questions? How is the way to choose whether to have addition, subtraction, multiplication, division questions or a mixture of addition and subtraction questions or a mixture of all four types of question? What strings are needed for that choice to be made?
The following strings are needed. In each case NN refers to numbers expressed using digits. These numbers could vary from one digit to many digits.
How many digits should the numbers use?
Please key your answer into the computer and then press the enter key.
Please add NN to NN and then enter your answer into the computer and then press the enter key.
Please subtract NN from NN and then enter your answer into the computer and then press the enter key.
Please multiply NN by NN and then enter your answer into the computer and then press the enter key.
Please divide NN by NN and then enter your answer into the computer and then press the enter key.
The answer which you entered is correct.
The correct answer is NN.
As well the text strings mentioned above, the foloowing string is needed. It would be convenient for this to be the first string in the list, as that could become the practice for other application programs as well.
0123456789
The program could start by extracting the Unicode code points of ten individual digits to be used in the display. The same Unicode code points could be used for interpreting user responses as numbers. For some languages, such as Spanish and Portuguese the string could be localized as 0123456789 just as used for English: however, for languages written in other than the Latin script, the string may well be different from 0123456789 for localization in that script.
As the program has division it might be a good idea to have a second string which consists of the decimal point, also including various other characters which might possibly be localized.
First attempt at defining that string.
+-*/=.
The . in the above string is for use as a decimal point in numbers, not as a full stop at the end of a sentence. Thus localization is needed for use in producing a number such as 3.5 as the correct answer to the following request.
Please divide 7 by 2 and then enter your answer into the computer and then press the enter key.
Localization into various languages
The OLPC project includes India as a launch country.
English is one of the official languages of India. Into which languages does the program need to be localized for use in India?
List of Strings in English
0123456789
+-*/=.
How many digits should the numbers use?
Please key your answer into the computer and then press the enter key.
Please add NN to NN and then enter your answer into the computer and then press the enter key.
Please subtract NN from NN and then enter your answer into the computer and then press the enter key.
Please multiply NN by NN and then enter your answer into the computer and then press the enter key.
Please divide NN by NN and then enter your answer into the computer and then press the enter key.
The answer which you entered is correct.
The correct answer is NN.
These headings are just added to start. People who participate are welcome to add additional sections
Chinese
0123456789
+-*/=.
数字应当使用几位数码?
请将你的答案输入电脑,然后按enter键。
请计算 NN 加上 NN ,并将答案输入电脑,然后按enter键。
请计算 NN 减去 NN ,并将答案输入电脑,然后按enter键。
请计算 NN 乘以 NN ,并将答案输入电脑,然后按enter键。
请计算 NN 除以 NN ,并将答案输入电脑,然后按enter键。
你输入的答案正确。
正确的答案是 NN。
English
Esperanto
Ethiopian Languages
Please see OLPC Ethiopia for a list of Ethiopian languages. Should the languages used in Ethiopia be grouped as subsections within an Ethiopian Languages section or should each language have a section of its own?
The case of India probably apply to Ethiopia too. Amharic being the official language and depending on the interest the other languages generate. Grouping helps to apply common characteristics.
Amharic
Arabic
من فضلك سنتركز على العامية المصرية قبل العربية الفصحى او اي لهجة اخرة
Indian Languages
Lao
Nigerian Languages
Polish
0123456789
+-*/=.
Ile cyfr mają mieć liczby, których będziemy używać?
Wpisz swoją odpowiedź do komputera, a następnie wciśnij klawisz enter.
Dodaj NN do NN, wpisz wynik do komputera i wciśnij klawisz enter.
Odejmij NN od NN, wpisz wynik do komputera i wciśnij klawisz enter.
Pomnóż NN przez NN, wpisz wynik do komputera i wciśnij klawisz enter.
Podziel NN przez NN, wpisz wynik do komputera i wciśnij klawisz enter.
Twoja odpowiedź jest prawidłowa.
Prawidłowa odpowiedź to NN.
Portuguese
0123456789
+-*/=.
Quantos algarismos os números têm?
Digite sua resposta e depois aperte a tecla enter.
Adicione NN a NN, digite o resultado e depois aperte a tecla enter.
Subtraia NN de NN, digite o resultado e depois aperte a tecla enter.
Multiplique NN por NN, digite o resultado e depois aperte a tecla enter.
Divida NN por NN, digite o resultado e aperte a tecla enter.
Seu resultado está correto.
O resultado correto é NN.
Spanish
0123456789
+-*/=.
¿Cuántos dígitos deberían utilizar los números?
Por favor, teclea tu respuesta en el ordenador y pulsa la tecla INTRO.
Por favor, suma NN a NN y después introduce tu respuesta en el ordenador y pulsa la tecla INTRO.
Por favor, resta NN de NN y después introduce tu respuesta en el ordenador y pulsa la tecla INTRO.
Por favor, multiplica NN por NN y después introduce tu respuesta en el ordenador y pulsa la tecla INTRO.
Por favor, divide NN entre NN y después introduce tu respuesta en el ordenador y pulsa la tecla INTRO.
La respuesta que has introducido es correcta.
La respuesta correcta es NN.
Thai
Design of the program
Here is an attempt to produce the design of the program in a sort of pseudocode with notes. Please join in and edit this attempt so that hopefully we can get a good design.
Clear the screen.
Read in the file containing the strings. At present that is 10 lines of text in the format that the strings are being localized into various languages in the Localization into various languages section of this wiki page. In that section the presence of a number in denoted as NN. Yet how should the strings be encoded in the localization file?
For example, the string of which the English version is as follows.
Please add NN to NN and then enter your answer into the computer and then press the enter key.
Will that translate into all languages as three parts, part 1 NN part 2 NN part 3 if one considers that each part could potentially be empty? If so, should that sentence be in the localization file as one string with what is NN in the Localization into various languages section replaced by a | character? The sentence above would be represented as follows in the file.
Please add | to | and then enter your answer into the computer and then press the enter key.
Another possibility would be to break the string into three lines, though that could potentially produce problems if a langauge into which the strings were localized had part 3 as empty. So maybe the use of the vertical bar as a delimiter would be the best way.
However, there may perhaps be in existence standard ways of expressing such information. Does anyone know the situation about that please?
Break the first string into 10 individual characters so as to produce 10 individual characters in an indexed array. If the 10 characters are the same as 0123456789 then a flag DIGITS_AS_ENGLISH is set as true, otherwise it is set as false.
Break the second string into 6 individual characters so as to produce 6 individual characters in an indexed array.
MORE NEEDED HERE
Coding the program
Newsflash: 18 May 2006 0724Z
There is a discussion about the Python programming language in the Software_Ideas_-_Education page, in the section about Java not being available.
It is being asked as to whether Python is the programming language which would be used to implement this application program for the laptop.
How does one start to code the program on the linux platform for use on the laptop?
For example, if one had been coding this program ten years ago on a PC running DOS or Windows one could have used Borland Turbo Pascal 4 or 5 and programmed the application in the Pascal programming language and then produced an executable .exe file, a stand-alone .exe file to run on a PC. (I am not meaning Turbo Pascal for Windows, just ordinary Turbo Pascal.) Or one could have used Borland Turbo C and produced a stand-alone .exe file. It would not be apparent to the end user of the application program as to which source language had been used to program the application.
What are the options for carrying out the task on the linux platform?
Indeed, does it need to be done on the linux platform? Could it be done on a Windows PC? That question may show a total lack of knowledge of the linux platform and what it does, but that is the situation for me and maybe for some others who would like to learn. Is a laptop application a .exe file and if so is it the same as a .exe file on a Windows PC or is a .exe file a DOS concept linked to the Microsoft way of doing things?
Indeed, does the laptop use the same machine code instruction set as a PC?
Hopefully there will be enthusiasm to produce this application program. It may never get deployed to the laptops, though hopefully it will be. However, a lot of people could gain a lot of experience by participating in producing this application program.
I am not involved in this project, but maybe I can help:
On Linux, we have many types of executable files, both binary and text. The most common are files in ELF format. It is binary format that supports dynamic linked libraries. It works under i386 architecture, I don't know how about other archotectures. These files can be generated by many compilers avaiable for free, for example: gcc - free c/c++ compiler, fpc - free pascal compiler (it is compatibile with tp and (except vlc components) with delphi), f77 - fortran compiler (is somebody still using that ?), gnat - ada compiler, and many more. If you know how to code in Turbo Pascal for DOS, you can write simple text-mode applications for Linux without special training and compile it with fpc on Windows to test if you haven't got Linux.
Apropos .exe files: Every file on linux, can have executable attribute, just like files on Windows has read-only and archive attributes. File extension doesn't matter in linux, many files hasn't any extensions. The file is executable when it has executable attribute set, and system knows how to execute it. But I think that if you take source code to authors of OLPC's Linux distribution, they will be glad.
Sorry for my english.
Thank you for the information.
> I am not involved in this project, but maybe I can help:
Actually this project originated in the community rather than from the management and it is just a matter of people joining in if they wish. So, there is no formal level of being "involved", it is just a page in the wiki to which people can add things if they so choose. Hopefully in time the project will produce a finished program and provide good experience for people who participate and for people who read the page.
Testing the program
Certification of the program
In order to ensure that this application program has provenance of being of an acceptable level of quality it would be good if the program could pass an assessment made by the management of the One Laptop per Child project. There could be a procedure through which an application program which is purported to be ready for publication and deployment must satisfactorily pass in order for it to become of OLPC Quality Application Program certificated status.
That procedure could be specified in an OLPC Quality Application Program Procedure page. At present, ideas for such a procedure could be put forward in the OLPC Quality Application Program Procedure Ideas page.
Publishing the program
If this program can achieve the certificated status of being an OLPC Quality Application Program (if such a status becomes instituted as an available goal) then it could be published in the OLPC webspace in a part of the webspace from which all OLPC Quality Application Programs could be obtained.
Deploying the program
The program would become deployed by people obtaining copies from the OLPC webspace. In this manner the deployment of the program would be decided by local people on the basis of their local needs.
Verifying the program
If open source software is to be used there should be a way to verify that programs have not been tampered with. Eventually one child will get a version that intentionally or unintentionally reports the correct answer every time, does not grade accurately, or allows them to cheat in some way. There needs to be a way to prove that a program is origional especially if it could be used for testing purposes. Open source is good, but atsome point people will take advantage of it. I know I would have.
- This is indeed a difficult problem. It is a problem not only for this program but for many programs. Here is an idea for a possible solution. Comments on whether it is feasible are invited. Would it be possible for there to be a special, variant, version of the laptop, say moulded in a colour different from the laptops issued to the children, which is read-only of files, with files being obtainable only over the internet and then only from one particular webspace? This special, variant, version is herein termed a "provenance laptop". The system software for such a provenance laptop could be in read-only memory. Thus, if the idea is feasible, a child could obtain files from a provenance laptop with confidence. The provenance laptop might, from time to time, need to be transported several miles to a place where files could be obtained from the internet. However, the availability of a provenance laptop facility in a rural school where there is no direct connection to the internet could be a good second best to having a direct internet connection. The provenance laptop could be used to select which files are obtained from the one particular webspace. The one particular webspace could either be a special webspace run by the government of the country where the laptop is deployed or a special webspace of the OLPC project run by the OLPC management under secure conditions, depending upon the policy choice of the government of the particular country.