Saturday, July 16, 2005

Wireless Networking and Walls

One problem with having too much PC junk lying around is finding somewhere to plug it in. One piece of hardware I have had a problem finding a home for is my Linux server. It's only a small desktop PC that normally runs headless but it still produces too much noise to put anywhere in the house. However we do have an outhouse (old outside toilet) which has mains power in it. So my first plan was to connect to the the PC to the wireless network we have at home. I had a spare wireless card which I installed in the PC and then tried to get a signal. I could sometimes see the acess point but I couldn't manage to get a reliable connection no matter how I positioned the antenna. Moving the access point was also not an option because it is an intergrated access point and ADS router and I don't have a phone socket in a better position. Then I had the idea to look at powerline networking (networking over mains), commonly known as homeplug and discovered that they have now come down to acceptable price (20 pounds per adaptor). After a little bit of research I opted for a pair of Acer Homeplug Adaptors from eBuyer. When they arrived I plugged them in they it just work, so now I happily have a reliable network connection between all my PCs.

Friday, July 15, 2005

del.icio.us and Bodington

The current trend in the Bodington community is to try and incorporate preexisting services into Bodington rather than building the extra functionality into Bodington. The hope with this design is that these services can then be interchanged at a later date without too much disruption to the VLE. I have a little bit of experience in this area from the work I did on the Ramble Project which looked at intergration of blogs into a VLE. In Ramble an external blog server was used to provide most of the functionality and then a little bit of code was written for the VLE to allow them to work together. One tool that I think has the possibility for intergration is in the area of social bookmarking. The service leader in this area at the moment is del.icio.us which provides the user with the ability to bookmark URLs and access previous bookmarks from any internet connected PC. My idea is provide the ability for users of Bodington to be able to create a "Social Bookmark Resource" which uses del.icio.us to store all of the data behind the scenes. The way I would do this is del.icio.us uses the concept of tagging where every URL that is bookmarked is tagged with one or more keywords that the user decides are related to the content of the page. So I might tag the URL http://www.crockford.com/javascript/ with the tags javascript, programming & web. Now although most of the tags people use are common there is nothing stopping me from creating a unique tag and this is how I would build the intergration with Bodington. When someone decides to create a "Social Bookmark Resource" in Bodington it has a id associated with it and this combined with the web address provides a unique tag. For example if I create a resource in Bodington at http://test.bodington.org/bodington/site/myfloor/bookmarks and this resource gets the ID of 342234 then any bookmarks that want to be added to this resource should be tagged with 342234@test.bodington.org del.icio.us then provides an API through which queries can be made and using this Bodington can ask del.icio.us for all the bookmarks that are tagged with 342234@test.bodington.org and these can then be rendered within Bodington. This means users who are already using del.icio.us can contribute through thier existing accounts and have the entries they add also show in thier own bookmarks.

Wednesday, June 29, 2005

Bodington as an Institutional VLE

Open source software for elearning mentions that Bodington isn't scalable as one of the reasons for not deploying it at Manchester Metropolitan University. While it may have some issues scalability doesn't seem to be one that we hit here at Oxford University where is deployed as an institutional VLE.

Tuesday, June 21, 2005

Technorati

After Paul mentioned Technorati to me at work I though I had better have a look. So now I have signed up and have a Technorati Profile. The link is to to prove to Technorati that I do actually own this blog. With Bodington having such a unique name it makes a technorati feed nice and easy. If you ever have a chance of naming a product, pick something that doesn't get many google hits, it will make marketing on the net easier and the domain name cheaper.

Sunday, June 19, 2005

Java 1.5, Ant 1.6 and rmic

I've just been compiling Bodington on Java 1.5 and I noticed that the rmic task was always running. After a bit of googling I came across a post on an ant developers blog which explained what was going wrong and led me to the bug report. I've committed a fix to WebLearn HEAD and will probably push this fix across to Bodington HEAD next week.

Saturday, June 18, 2005

Java DatabaseMetaData.getDriver()

In common with other parts of the Bodington system the mapping of Java objects onto a relational database (O/R mapping) is done by some custom code[1]. This code needs to know which database product it is connecting to so that it can work correctly (JDBC API and SQL are almost there but not quite). Now normally this is done by looking at the JDBC class name and setting the flags accordingly ("org.postgresql.Driver" is the PostgreSQL driver). When Bodington is making the JDBC connection itself this is not a problem as it knows the driver class. However I have recently been allowing it to use a JNDI database connection pool supplied from Tomcat. Now when you get your pooled connection from Tomcat you don't know what database product you are connected to. I was hoping that I would be able to do something like:
connection.getMetaData().getDriver();
which would return me the class that is being used as the driver from which I could work out how to configure the database mapping. But no, this call doesn't exist. I can find out the display name of the driver, the version, but not the class. This means that if you are using JNDI to get your database connection you will have to tell Bodington the flavour of database it is connecting to which is unneccessary configuration as you have already given this information to Tomcat and just leads to situations where you are connecting to PostgreSQL but Bodington is configured to talk to Oracle. [1] - The reason for this is that it was written a long time (around 1999) before product like Hibernate and iBatis became the established way of doing this.

Friday, June 17, 2005

java.lang.String

String text = "1234";
text.substring(4).startsWith("5"); // is false but works.
text.charAt(4) == '5'; // NullPointerException
I came across this suttle difference in the String class when chasing a bug in Bodington where we were getting a NullPointerException exception from attempts to split up a URL (don't ask). I'd guess that the charAt is faster (substring creates a new string object) but unless your software is doing 1000s of tests like this it probably doesn't matter.