Random programming things I'd want to remember

Friday, July 30, 2010

Item loader

In order to fill the data into the ItemTester, I will write another application, ItemLoader. Here are the requrements:

The program, ItemLoader, is an application that helps create the database of question/answer pairs for ItemTester.

Functional Requirements.

The program will:

1. allow the user to enter question/answer pairs one-by-one (also requiring topic(s) for an item).

2. allow the user to process a batch file in a predefined format.

3. check the new words against the database to make sure this question/answer pair does not already exist.


The format for the batch file:

Question///Answer///tag1;tag2;tag3

3. write out the user's input into the XML file.

A new app

I decided to write an application to learn new foreign words. The app will be pretty simple -- it will offer you a word and four choices of what it can be, you have to choose the right answer. In order to do things right, I want to start with the Requirements Document. This will be my contract and I will stick to it.

Functional Requirements

The application must help the user train to learn new words. The interface should offer the user a question and four possible answers. The user must choose one of the four answers, if he/she gets it right, the application updates the number-correct field. Once the user is consistently right, the word is shown less and less.

The application will:
1. read the question/answer pairs from storage, load them into the memory.

2. distinguish the question/answer pairs by topics. A question/answer pair may belong to multiple topics.

3. offer the user the choice of topics. A user can choose one or more topics to practice.

4. keep track of the percentage of the correct answers, incrementing/decrementing on each answer on the word.

5. ask user what is the threshold after which he/she does not want to see the word anymore.

6. offer a "refresher" mode for those words whose number-correct ratio is above the threshold.

7. offer the user a choice of four answers, one of which is correct, and the other three are the answers for items belonging to the same topic.

8. shuffle the positions of the possible answers. If the topic has less than 4 items total, the application must select other wrong answers from any other topics.



Database requirements:

XML file will suffice.

Other requirements:

The program must be initially implemented in Windows forms using LINQ. The program's functionality must be abstracted such that it is easy to migrate it to an ASP.Net application.

The program will be written in .Net, C#.

The program must be easy to use.