Using a Samsung TV as an external monitor

Here's a weird bug. I connected my macbook pro to my Samsung widescreen TV - it was detected but I had to select 59.9 as the refresh rate (rather than then autodetected 60) otherwise the TV just sat there with a message that I was using an unsupported display setting. That's fine but how to do this in clamshell mode as macs seem not to share monitor settings between dual monitor mode and clamshell mode (or for that matter a mac mini connected to the same TV)?...

Asynchronous HTML and HTTP

This post is to remind me that the next time that I am asked to consider using AJAX on a project to actually have a more careful think about the project's design and user interaction requirements. If I take the time to look at what I really need to retrieve dynamically then will AHAH do a better job more simply than AJAX & DOM manipulation? Will it make my application easier to test?...

JUnit tests and the file system

Writing unit tests for classes that operate on files has always been a little weird. Every developer & their dog has their own way of either abstracting themselves from the file system (ala Spring’s Resource types) or by creating some sort of a file system sandbox that is cleaned up at the end of the test - after all we don’t want to litter temp directories with files that will never be used again, do we?...

Another example J2EE application

I've uploaded to GitHub (http://github.com/tomcz/pico-webapp/tree/master) the web application that I use to teach people about dependency injection (using PicoContainer), post-redirect-get browser interaction, RESTful URIs and strict template rendering (using StringTemplate). This application does not use Spring Framework by deliberate design - as soon as I introduce it to any teaching session I spend more time talking about Spring then talking about what I am usually there to accomplish. As usual, any comments, bugs or enhancement requests are very welcome....

How to resize iTunes on OSX

I've updated to a smaller macbook - unfortunately iTunes remembered its previous size. Usually you can go to the Window > Zoom menu bar option and resize a wayward mac application, but iTunes just turns itself into a little application - not quite what I wanted. However, if you hold Alt/Option key while you click on Window > Zoom in the menu bar, iTunes will resize itself to fit the available screen area....

Example J2EE application

I hate maven with an almost homicidal passion. It only works if your brain works like maven, for the rest of us in the real world its just a pain in the arse. But it does have one good idea - it provides a simple, out of the box way of creating a project structure (but so do rails, django and grails in a much better way). I've decided to publish my own example web application project/structure on GitHub - http://github....

JPasskeep is now on GitHub

I need to stop distributing JPasskeep source code as zip files - yuck. So for anyone who may be interested at what lurks under the cover of the pretty GUI the code is now available on GitHub - http://github.com/tomcz/jpasskeep/tree/master. Comments, suggestions, bugs, patches, forks, or pitch-forks are always welcome; even if sometimes ignored ;-)...

Django and multiple methods per url pattern

HTTP verbs are not used to determine the route to a view method by deliberate design in Django. Sometimes I find it useful to be able to specify different methods for the same url pattern - one per HTTP verb. The Django book contains an interesting example of how this can be done using the django.conf.urls.defaults.url method to separate POST from GET processing. I’ve extended the example to provide handling to cover the standard HTTP verbs....

S3DropBox 1.2 is now released

I love feedback ... including bugs (thanks Cam). The S3DropBox will now only permit the creation of a bucket when Amazon S3 returns a HTTP 404 status code in response to a HTTP HEAD request for the bucket prior to creation. The new version can now be downloaded from http://code.google.com/p/s3dropbox/....

JPasskeep Update

Just finished a new version of my long-running password keeper application. You can download the cross-platform version, the mac dmg image, and the source code. New changes include the ability to export entries to an encrypted HTML page (see my previous post on javascript cryptography) and bundling the cross-platform version as a single JAR file using one-jar. As usual this version does not rely on javax.crypto APIs to function so it should work wherever a JDK5 compatible VM can run....