May 05, 2008

SwingHelper

One of the most common causes of sporadic bugs in swing applications is doing things on the wrong thread. Most common of these is when a thread that is not the Event Dispatch Thread does something that updates the gui. Its very easy to do accidentally as seemingly innocent operations done on a background thread can fire off event listeners and end up inside code it shouldn't as a result.

CheckThreadViolationRepaintManager from the SwingHelper project is a very useful class that can be easily plumbed into a Swing application to report any wayward threads getting into gui code.

Also from the same stable is the EventDispatchThreadHangMonitor which can report when the Event Dispatch Thread spends too long outside its main loop (which will result in a sluggish and unresponsive gui).

March 24, 2008

Wordpress Fail

So I was all fired up about migrating to wordpress, due to the rot this blog has suffered over time. (The category links have been broken for nearly 2 years now I think). I got as far as the following line in the (ahem) 5 minute install guide:

Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.

And now it all seems like way too much effort. I'm incredibly lazy when it comes to blog tools. Gone are the days when I would happily spend half a day tinkering with the tool prior to writing a 10 minute post. And I'm sick of blasted relational databases. A blog is just a bunch of text snippets with a few bits of metadata around the edges. Why not use a perfectly good filesystem for storing what is so easily represented as a bunch of files? It might even stand a chance of holding my attention long enough for me to finish installing it.

I really want to blog more, but I need the feedback of comments to help keep me going. Every time I've tried tinkering with movable type comments to allow me to turn them back on its been buried in spam within seconds, and I can't be bothered figuring out which magic combination of plugins, captchas, blacklists and runic inscriptions I need to make it work.

I'm off to find some incredibly tedious housework to do that might make farting about with MySql seem like a reward and a treat.