JBoss and IIS 7

I have spent some quality time today with moving a web application from a temporary development environment (Windows 2003 x86, IIS 6) to a production server (Windows 2008 R2 x64, IIS 7). The IIS-JBoss integration on the development servers has been set up based on mod_jk and worked without causing and troubles. However, reproducing the setup in the new environment was failing miserably. The first impression I am getting from IIS is that even logging is a science for itself, so it was even hard to determine why.

Luckily a forum post finally pointed me in the direction of Application Request Routing (ARR) module for IIS 7 as an alternative solution. Performance might be still a subject to be determined, but the installation and configuration is worlds cleaner compared to the mod_jk version.

Citing Web Pages with BibTeX

When writing reports I frequently want to include references to web pages of organizations and alike into the bibliography. Unfortunately BibTeX does not have a proper entry type for web pages up to date, but there is a whole selection of workarounds. I finally settled for using the natbib package with @MISC entries. Overall I made the following adjustments to my documents:

Including the natbib package and the unsrtnat bibliography style.
[code lang=”latex”]
\usepackage[numbers]{natbib}

\bibliographystyle{unsrtnat}
[/code]

Example for a @MISC entry:

[code lang=”bibtex”]
@MISC{Medicare2011,
author = {{Centers for Medicare and Medicaid Services}},
title = {{EHR Incentive Programs}},
month = aug,
year = {2011},
url = {www.cms.gov/EHRIncentivePrograms}
}
[/code]

Setting the reference with \cite{Medicare2011} finally yields this result:
Citation
Note that natbib allows you a wide variety of citation styles via the \citet and \citep commands, but for simple number references and a display of the URL field in @MISC entries the above will do just fine.

Essential Software Architecture

Essential Software Architecture

Computer science is a field in which you often enough get nervous about about picking up a five year old book because it might be already outdated. Well, either I am behind on the topic or Ian Gorton‘s work is aging pretty well so far; a nice to-the-point cover-to-cover read that might not teach you a world of new technologies, but certainly helps with sorting the ideas about software architectures and architects you might have floating around in your head. In addition to that, it puts concepts such as Web Service, SOAs, MDAs, and Semantic Web nicely into perspective without being afraid to point out where they can’t hold up to marketing promises. I will be looking into getting a copy for my bookshelf.

[UPDATE]

It appears that a 2011 2nd edition has been published in May.

Political Correctness

Some true PC gems I came across in my current project:

  1. A car accident should be refered to as crash since accidents are something that is out of our control and can’t be mitigated.
  2. The police is nowadays not dealing with suspects, rather with persons of interest.
  3. Damaged roads, complicated intersections, construction sites and other locations that are identified as car crash hot spots, are obviously sites with promise.

I hope this helps you all on our way into a brighter future.

Ignoring Input to a Text Field with jQuery

The other day I was trying to use an input field for display only: the user would select couple of elements from an overlay box and, once their selection was completed, be presented with a generated output in the input field. This should be for overview purposes only and the user should not be able to type manually into the field; a scenario much like the one covered by the jQuery Datepicker. My first reflex of setting the fields disabled attribute unfortunately did not work well since inputs with disabled=”disabled” will not only drop the onClick event but, even worse, be ignored for the submission of the surrounding form. However, it turns out that there is a jQuery one-liner for the problem:

[code lang=”javascript”]
$(‘#month_range’).keypress(function(event){event.preventDefault();});
[/code]

This will essentially ignore any key events on the month_range input field. Be aware though that it will as always just protect the user a bit from themselves and not in any way relieve you from validating the input (just try to c&p something into the field…).

I Will Do It By Hand One More Time

If you catch yourself saying this about a task for the third time, it is time to write a script for it. My contribution for today: when I want to process a large amount of photos my workflow usually starts with sorting through the contents of my SD cards and deleting the pictures with which I am not happy. If you are working on a rather dated computer as mine, having the corresponding RAW files in the same folder will cause you a headache with most picture viewers, especially when you try to flip through the files quickly. Moving them to a separate folder, however, will make you do the work twice. The following PurgeRaw script fixes this problem:

[code lang=”perl”]
#!/usr/bin/perl -w
use strict;

print “Searching for RAW files without matching JPG preview…\n”;

my @jpgs = glob(“*.jpg *.JPG”);
@jpgs or die “There are no preview JPGs in this directory.”;

my @raws = glob(“NEF/*.NEF RAW/*.NEF”);
@raws or die “There are no RAWs we could purge.”;

foreach (@jpgs) {
$_ =~ s/\..*//;
}

my @toDelete;
my $raw;
foreach (@raws) {
$raw = $_;
$_ =~ s/\..*//;
$_ =~ s/^.*\///;
if(!($_ ~~ @jpgs)){
push(@toDelete, $raw);
}
}

if(@toDelete){
print “Looks like we should delte the following RAW files:\n”;
foreach(@toDelete){print $_ . “\n”;}

print “Proceed with deleting? (Y/N): “;
my $answer = ;
chomp($answer);

if($answer eq “Y”){
print “Deleting…”;
foreach my $file ( @toDelete ) {
unlink $file or warn “Could not delete $file: $!”;
}
}
elsif($answer eq “N”){
print “Aborting without deleting anything.”;
}
else{
print “Wrong input – aborting without deleting anything.”;
}
}
else{
print “Did not find any RAW files eligible to be deleted.”
}
[/code]

This is obviously far from being anything sophisticated, but it does the job. If needed, you can grab the code from my github repository, that is also where I will add the next scripts when I catch myself counting to three again.

Google Health Retires

Google just announced the forthcoming end of their personally controlled health care record Google Health due to lack of widespread adoption. We have been working with the service since its launch in 2008 and used it as a back-end for various projects (most recently for a medication reconciliation tool tied to the SMART platform). Google Health was offering a very decent user interface, a fair amount of API support and some really good interfacing ideas; I hate to see this one go.

[UPDATE] You might deduct how important the project was in the end from the fact that it was not even worth a shutdown announcement for itself.

Cloud Computing and Software as Service in BMI

I gave the following presentation during a set of BMI related talks; it covers the cornerstones of cloud computing development and explores potential application fields in BMI.

It was created using Prezi, a neat little tool that allows you to break out of the power point cage. I am not entirely familiar with it (you will see some fairly uninspired slide clones in there), but the response of the audience was overall very positive, so I would recommend it.

Establishing a Ground Truth

A typical problem when benchmarking a clinical system is establishing a ground truth. Let us assume a clinical support system that supports a physician in interpreting radiology images (e.g., by recognizing tumors). The only intuitive method we have to evaluate the performance of the system is to test it on a set of labeled images, or in other words, through asking questions we already know the answers to. However, creating this ground truth will require us to rely on an analysis through the very process we attempt to improve, namely the “manual” analysis by a physician.

The scenario can be frequently observed wherever we try to recognize patterns. Another example is research oriented extracting of knowledge from patient records, where we would attempt to recognize adverse drug effects or develop best practices. A note might be indicating the negative impact on the patients health, although it is not recognized as such be the medical expert that is the referee for the benchmark due complexity, illegibility or counterintuitive nature.

There are methods to damp the effect, such as increasing the number and competence of the referees or implementing a round of reconsideration of results (e.g., the physicians can be confronted another time with images that have been recorded as false positives during the automated tumor detection), but those methods are often expensive and time consuming or, in the worst case, just not available.

Therefore we have to keep in mind that when dealing with a highly complicated and often intuition driven field such as medicine we have to constantly account for possible human errors, and that there is always the possibility that we have our job well enough to outperform the quality of the human decision. Or to coin it less optimistically: sometimes even great results can become a problem.