Archive for the ‘Java’ Category

Math Challenges Done

Sunday, March 5th, 2006

Maths Challenges Progress GraphI finished the last of the mathschallenge.net math programming problems. Actually, it’s a temporary milestone since new problems are added every few weeks. At right is a graph of problems started per day with a LOESS smoother applied. The data are from the creation date of the program files, and the few problems that I solved without coding are not represented.

A lot of the problems involved combinatorical counting, so it helped that I had just been reading the excellent lecture notes from MIT’s Mathematics for Computer Science course.

JDBC Providers on BerliOS

Tuesday, February 21st, 2006

Søren Berg Glasius has created a JDBC Providers project on BerliOS, which is something like SourceForge. We’re working on making it easier to run the providers on different databases. It already supported MySQL, and he’s adding Sybase. The idea is to put all the SQL code in an external properties file. There is still some code/DB dependencies, which I’m not sure how to get rid of, such as a dependence on the rough DB schema.

JDBC Providers for JSPWiki 2.3.72

Sunday, January 29th, 2006

The WikiPageProvider interface for JSPWiki has changed again with version 2.3.72, so I’ve updated the JDBC providers which I sort of maintain. 2.3.72 is still in alpha, and I’m not familiar with the new authentication features, which may be limiting my testing. For instance, there’s now a call to move a page in the API, but I haven’t figured out how it’s surfaced on a wiki.

Checking Range Check Elimination, Part 2

Sunday, January 22nd, 2006

I’ve updated the article on the range check elimination optimization in Java. I added a case that provided a hint to the JIT which helps when the index is otherwise too complex for the JIT to realize that the range check can be eliminated.

Checking Range Check Elimination, Part 1

Sunday, January 15th, 2006

I’ve started an article of my investigations into the range check elimination optimization in Java. The optimization aims to reduce unnecessary array subscript index checking, but I haven’t found many details on when the JIT compiler will apply the optimization, and how much time it saves anyway. So far, my investigation explores simple cases, but at least it finds situations where the optimization is applied (index is loop counter) and situations where it isn’t applied (index is computed).

GNU Chess Bugs

Thursday, December 15th, 2005

After porting GNU Chess from C to Java a few months ago, I reported a few bugs and suspicious code to the GNU Chess mailing list. I’ve finally gotten around to making a bug write-up on this site.

Sudokit Evolving

Sunday, November 20th, 2005

Sudokit Screenshot


I’ve added some new solving techniques, a small puzzle database, and a rating system (not shown). I’ve also been doing some research, and discovered several other techniques I need to implement, though they are too esoteric to show up in the puzzles you would find in a newspaper. There is only one truly new technique since my last update: Owning Segment. The other new techniques are special-cases of existing ones. Owning Segment finds a 3-cell segment that must own a particular value and then removes that value from competing cells.

I cleaned up the solving code by making the solvers sort of pluggable, though I broke the step-and-highlight mode. I’d like to work on the display if I can get Swing to do what I want (component sizing seems to be tricky).