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.
+-*/=.
Localization into various languages
List of Strings in English
01234567890
+-*/=.
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
English
Esperanto
Lao
Portuguese
Spanish
Coding the program
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.