Posts

Showing posts from 2010

Rounding up the year

This blog was created to record my journey in learning Java. While that journey might not have completely reached its conclusion, it has certainly started to plateau. I posted 22 pages in the last four months of 2008, 66 in 2009, and just 11 in the whole of 2010. Most of my 2010 posts related to my psychometric project , which is another journey really, and I think is worthy of its own blog. If people run a search on "learning java" they probably won't be very interested in the ups and downs of my math project, but if they run a search on "Rasch" or "Scoring Rates", I'd like them to find me writing a blog focused on the topic, rather than rambling about the ins and outs of Java. I shall post a link to the new blog here when it begins (which might not be until some time in 2011), and keep any new posts in this blog more closely related to learning new tricks in java.

Checking the database

The code currently uploaded to my java project at covers only the front end of the application. I have not formalized the back end. It remains a collection of code scraps, which I use from time to time to check what is in the database, or less often to change what is in the database. I have not formalized it because I am currently the only user. In previous incarnations of the app I have incorporated data queries, with all sorts of filters and user customization, which no one has understood how to use. My current ad hoc query code is as follows: public class ItemdbQuery { public static void main(String args[]) throws ClassNotFoundException, SQLException { /** * These are shared variable declarations */ Connection connect = null; Statement stat = null; /** * This is the start of the main code. */ System.out.println("try connection"); try { // Load database driver Class.forName("org.apache.derby.jdbc.ClientDriver"); // Make connection String connn = &

MS Outlook Slow to Start

It is embarrassing, whatever ones business, if a client rings up for an appointment, and you have to keep them waiting for 30 or more seconds while MS Outlook cranks into action. It is especially embarrassing if the client is calling to ask you to build a new computer for them, which they hope will be quick and easy to use. My old excuse was that I was using a Dell Pentium III laptop, which for sentimental reasons I didn't have the heart to throw out. But I am now using a recently built system using a Pentium Core 2 Duo processor and 2 GB RAM to run Windows XP pro. So what is my excuse now? When I built the system I partitioned the hard drive and put an identical OS on both partitions. The idea was that the C drive would be my top copy, and the D drive would be for experimentation. But I was so paranoid about intalling anything on the C drive, the D drive became my de-facto working drive. And it is the D drive on which MS Outlook displays the flash screen for 30

Revisiting old code

When I first began this blog , I was pretty down on the official Java Tutorial on the Sun website . I was especially down on the Java Tutorial trail JDBC(TM) Database Access , which describes how to make a connection with a database. But a year later, I find myself scanning my own blog, which I thought comprised the finest pearls of clarity and wisdom, and I can't find any description, let alone a better description, of how to connect to a database without using a GUI app like NetBeans. There is an entry, entitled " Building a financial mini-app ", which describes an application of such a connection, but it is distinctly unhelpful to anyone wanting to build such a tool for themselves. Indeed I found it distinctly unhelpful even to me, trying to re-apply my own code. I shall therefore attempt to re-write the page in a slightly less cryptic fashion. This has nothing to do with my Rasch-Itembank project at java.net, but for me it is a useful exercise

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

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. T

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/p

Parameter Estimation

The Rasch book , and the Winsteps documentation, about which I have written at some length, are both essentially about parameter estimation. And one of the objectives I want to achieve with my java applet , is real time parameter estimation. I revisited the Rasch book, and spent some time trying to follow the argument, when really I should have just gone straight for a math text book . Rasch presents his mathematical argument as if it is new or somehow unique to the paradigm he is presenting; perhaps it was at the time, although by his own references to physics in the introduction I doubt it. Perhaps in those days it was conventional to present an argument in full, rather than simply refer the reader to one or more generics methods, and assume the reader has the ability to look them up. Certainly the book could have been a lot shorter, had he done so. At the end of the day there is no substitute for the Law of Large Numbers , which essentially states that when your sample becom

Probability Theory

Now that I've published some code, a risk arises that someone might read it, and thereby discover that the code does not really conform with my project description. I should really rewrite it as quickly as possible, to minimise the risk of discovery, but there is a theoretical matter I should like to address first. After writing my blog of 9 August 2009 , I thought I had stumbled across something worthy of more formal publication. So I contacted my doctoral supervisors at UWA , and some people at the Institute for Objective Measurement , but to cut a long story short nothing has happened. To be honest I was looking for help with the theory as much as a co-author. The probability theory was a bit out of my depth, so I was looking for someone who knew more about it. But apart from one pragmatic and generally expedient former supervisor, who offered to "help" (which really means proof read), because he felt sorry for me, I drew a blank. I guess I have this fantasy of

Posting Source Code

CollabNet Subversion turns out not to be quite so hard to learn as I expected. I had set out with a fundamental misconception, believing I needed to set up the server on my end as well. When I realised that Sun had already done all that work for me at their end, and that I simply had to use the client to post code on their server, and that I could edit the local files with whatever I wanted at my end, it all became much clearer to me. Furthermore, Sun even provided the URL for my project on their server together with the syntax for the checkout command. It was pretty easy to combine the URL in this example with the import command given in the book to post my source code in the project. I say pretty easy; there was a bit of fiddling around. The checkout command includes a local path to which files should be copied, and obviously that is not needed for the import (which term from my perspective really means export or post), and the -m switch/parameter needed to be

Going Open Source

I have decided to go open source. It has been my intention to do so for a long time, but I hesitated for several months, because I thought my more commercially minded friends would call me a fool. So I put some feelers out into the commercial world, and they were substantially ignored. With hindsight I should have followed my first instinct without hesitation, because the exercise has been a blow to my confidence. I am now launching myself into the open source community with a very dented ego and a low self esteem. To make it worse, going open source is not a simple exercise. You don't just say hello world this is my source code, share it with me. You have to master a technology called version control, and at first glance the learning curve looks as steep as embracing java itself. I feel is if I've started all over again, and this time, instead if having my head held high, my heart is in my boots. When I began this blog 18 months ago, I was full of optimism.