Saturday, May 29, 2010

Conundrum

The idea of my Rasch-Itembank open-source project at java.net is to produce a large numeracy estimation item bank, which updates the estimated difficulty parameters in real time, as it is used. To work properly, the client needs to generate items from the item bank according to the latest item difficulty estimation.

The most reliable current working version of my Java Math Test client is a complete cheat. It has absolutely no connection with a database, it is ISP hosted, and it usually works first time, as long as the user has the JRE installed.

A second version, hosted by me, is a partial cheat. It connects to a database to record performance data, but it uses hard coded arrays of items, whose difficulty has been estimated from static data collected in the past. This version is less reliable for many reasons. I don't always have the server turned on, I don't always have the database turned on, and sometimes my IP address changes.

The conundrum is that to get improved estimates of item difficulty, the client needs to be used, and to be used a lot, it needs to be reliable. Using hard coded item arrays, if the connection to the database fails, session data is lost, but the client continues to function, so the user is not pissed off.

However, in this more reliable configuration, a key selling point - that item difficulty and student ability mutually interact in real time, to product the best possible estimates of both - becomes something of a deception.

I think the best compromise solution is to leave reliable versions on my web site, perhaps with the hard coded arrays updated from time to time as more data comes in, and to develop code for the true blue dinky dye version without actually deploying it until data connection reliability can be assured.

Friday, May 28, 2010

Structural Changes to the Repository

For a couple of reasons I have made some structural changes to my remote code store, or repository. First, if I want other people to contribute, I need to make it easy to understand what goes where. Secondly, I wanted to play around a bit more with subversion (svn) commands.

My first task was to create some new directories. When I read the book, it looked as if you used svn commands just like DOS or "shell" commands, and instead of them. So I tried:

svn add "my documents\code\100515\client"

without having first created the client subdirectory. But it didn't work. The wording given by the --help switch makes it clearer:

svn add --help
add: Put files and directories under version control, scheduling
them for addition to repository.
usage: add PATH...

In other words the add command brings a folder under the svn umbrella, but it cannot be used to create one.

Next I wanted to move some source files from the trunk to the new subdirectory. The command and the displayed results were as follows.

svn move "my documents\code\100515\AMJApp.java"
"my documents\code\100515\client\src"
A My Documents\Code\100515\Client\src\AMJApp.java
D My Documents\Code\100515\AMJApp.java

This time the svn command really did replace the equivalent DOS command. I repeated the process for all my source files.

I then committed the changes:

svn commit "my documents\code\100515" -m
"Added a preliminary directory structure"
Deleting My Documents\Code\100515\AMJApp.java
Adding My Documents\Code\100515\Client
Adding My Documents\Code\100515\Client\src
Adding My Documents\Code\100515\Client\src\AMJApp.java
Adding My Documents\Code\100515\Client\src\QAdd.java
Adding My Documents\Code\100515\Client\src\QDiv.java
Adding My Documents\Code\100515\Client\src\QMul.java
Adding My Documents\Code\100515\Client\src\QSub.java
Adding My Documents\Code\100515\Client\src\QTrack.java
Deleting My Documents\Code\100515\QAdd.java
Deleting My Documents\Code\100515\QDiv.java
Deleting My Documents\Code\100515\QMul.java
Deleting My Documents\Code\100515\QSub.java
Deleting My Documents\Code\100515\QTrack.java

Sunday, May 16, 2010

Updating Source Code

I think I was a little too cryptic in my blog entitled Posting Source Code. I referred back to it when I needed to update the source code on my project site, and found it fell short of being helpful.

I shall try to be a bit more explicit in describing how I checked out what was in the repository, and after making some changes, updated it.

When first using CollabNet Subversion I made the mistake of cluttering my home computer with the server. I am on a new machine now, and I took care to get the command-line client from the CollabNet Download page.

After installing the client, I was pleasantly surprised to observe that it ran happily from my Windows home directory. That is in stark contrast to Java, which requires paths to be set up by the user.

The command I needed to download my code into a working directory was

svn checkout URL [PATH] --USERNAME

where URL is location of my repository and PATH is the path to the local directory. My URL is:

https://java.net/projects/rasch-itembank/svn/rasch-itembank/trunk

and my local path for the day is:

"my documents\code\100515"

To edit the source code I use jEdit, and because this is an exercise in downloading from and uploading to a remote repository, I just add a few comments to each source file.

I was fiddling about with this overnight, so I used the update command to check for any other activity. This was an academic exercise, because I am currently the only user, but I wanted to work through the proper procedure. The syntax of the command is:

svn update [PATH]

In my case this translates as:

svn update "my documents\code\100515"

The response came back:

At revision 5

The absence of any user listing confirms that no one else has worked on the code in the repository.

Again following on with the procedure recommended in the book, I used the status command as follows:

svn status "my documents\code\100515"

And got the following list of modified files.

M My Documents\Code\100515\QDiv.java
M My Documents\Code\100515\QTrack.java
M My Documents\Code\100515\AMJApp.java
M My Documents\Code\100515\QAdd.java
M My Documents\Code\100515\QSub.java
M My Documents\Code\100515\QMul.java

I used the status command, with identical syntax, to display a full list of the changes I had made.

As there are currently no other users I could skip the conflict resolution steps, because the were no conflicts to resolve. I could therefore jump straight to the commit command as follows:

svn commit "my documents\code\100515" -m "Just added
a few comments to test the update procedure"

And got the following list of actions carried out.

Sending My Documents\Code\100515\AMJApp.java
Sending My Documents\Code\100515\QAdd.java
Sending My Documents\Code\100515\QDiv.java
Sending My Documents\Code\100515\QMul.java
Sending My Documents\Code\100515\QSub.java
Sending My Documents\Code\100515\QTrack.java
Transmitting file data ......
Committed revision 6.

Hopefully this is a clearer set of instructions than my last effort, so if I come back here in six months time, I'll actually understand what I've written.