Random programming things I'd want to remember

Sunday, October 31, 2010

Programming for MS Office -- side note

So one interesting thing I discovered while programming for MS Office. If the user's version of the office suite does not match yours, make sure you download and reference the correct Office dll. The Office dll's are called IPA, that stands for the "Primary Interop Assembly." Office 2010 PIA is not out yet.

Let's say you are programming for Office 2007. Download (google and get from microsoft.com) and install the Office 2007 PIA. You have to have the Office suite installed on that computer as well. Once installed, go into the project references and find the proper dll, and use it in the project. The client will also have to have the PIAs installed to get your project to work.

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:


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.

Sunday, January 17, 2010

My resolutions for 2010

1. Program one substantial application using a functional language
2. Read 10 programming books:
- Real World Haskell
- Functional programming tutorial
- Pragmatic programmer
- Code Complete
- Microsoft TDD book
- Structure and Interpretation of computer programs
- Review Joe Celko's SQL for Smarties
- Read Joe Celko's SQL Puzzles & Answers
+ others (at least two).
3. Learn basic Japanese
4. Enrich my cooking skills
5. Work out at least 2 times a week
6. Find an interesting job