Pages:  1 2 3 4 5
Why you should love checked exceptions
  Created - 2013/07/06 14:18:25+0000

This week at work I encountered a NullPointerException caused by returning a null value. The return value was not tested and when it was used it threw a NullPointerException. This of course had to happen in patch of bad exception handling. First the bad exception handling. This is what I had to work around first. A method was throwing a couple of checked exceptions with no shared super class before Exception. Some programmer decided to say that it threw Exceptions and the calling method happily caught e... read more

How work cascades
  Created - 2013/06/23 10:08:32+0000

It started when I noticed that the detached signatures of the RDF documents were not correctly linked. There was an extra '/' at the start of the path. I recognized this problem immediately as a mistake in the XML file. The host is described in the XML file as an entity ending with a '/'. The path following on from this also included a '/' so I thought I would taken 10 minutes to fix and release it. Easy, releasing it would be the hardest part. I then noticed that there was dupli... read more

Deflate and IE
  Created - 2013/03/29 21:00:36+0000

When I recently added support for the deflate content encoding I broke my website in IE. The static content became unreadable in IE. It turns out that IE only accepts raw deflate data without a wrapper. This means that within the code for compression I need to match on the User-Agent header. Any IE browser requesting deflate receives the raw deflate encoding and any other browser requesting deflate receives the wrapped deflate encoding. The deflate wrapper is defined in RFC 1950 and the deflate com... read more

AuDAO and building my website
  Created - 2013/03/16 12:01:30+0000

I use a tool called AuDAO to generate the Data Access Objects, Data Transfer Object and SQL. These are generated from an XML description of the tables. I found it very useful and it is a convenient way to access a database from Java. That said it isn't suited for high volume websites, I was unable to find out any information on optimizing performance. The data objects map directly onto the tables generated by the SQL. Much of the functionality provided by databases and SQL is made unavailable because of ... read more

Stick it in the Manifest
  Created - 2013/02/18 22:42:03+0000

Recently at work I came across a Great Idea or at least a very good practice for Java developers. I was gathering information on the use of open source software at work, which no one had kept track of before. This meant that the libraries, versions and license information was unknown. Sometimes this was simple enough. The JAR files would start with the library name and had the version appended to them. The licenses could be looked up online. Sometimes it wasn't straight forward. The version wasn't appended... read more