"There are, too, elves in Mirkwood!"

When walking Milo yesterday he and I passed several boys (16 ish) playing tennis. They were your usual generic white suburban kids talking tough to one up each other. We continued our walk. On the way back we pass them again and overheard one retelling a recent conversation:

Him: There are, too, elves in Mirkwood!

Other: No there arn't. Only Rivendale has elves.

Him: Well, of course Rivendale has Elves you dumb ass. We are discussing Mirkwood!

Luckily, they did not see me and Milo grinning.

Bruce Sterling at Webstock '13

We live in the time of "dark euphoria." "The Web had users. The Stacks have livestock." Other deep insights. And, if you are at all concerned about where LOLcats are taking us then keep listening after the 25 min mark.

Webstock '13: Bruce Sterling - What a feeling! from Webstock on Vimeo.

Update: A old friend says that what is being said are less deep insights and more genre's tropes. His presentation of these ideas was new to me, however.

A system for mounting my miniatures

I finally have a comfortable system for mounting my miniatures while painting them. I have tried mounting with sticky gums, but this leave a residue and/or can be a bugger to get off. I have tried glueing with PVA, but adhesion is too weak and ended with models flying off into the grass as I spray primed them. I have tried using hot glue, but adhesion is too strong and ended with several broken legs while detaching the models.

In the end I settled on using 3M's 1/2" Double Sided Mounting Tape Squares and soda bottle caps. The squares are right sized, precut, many (90 per pack), cheap, and hold the model firmly.

Here are my current steps to mounting and priming.

Awesome worktable


This portable worktable and instructions on building it are awesome. I don't need it, but want to build it anyway.

More at Maker Station.

Installing Java 6 on OS X Mavericks, again.

I needed to have Java 1.6 run on OS X 1.9, Mavericks. I had written about this before in Installing Java 6 on OS X Mavericks, but I was not confident with the solution. Today I decided to install Apple's Java 1.6 and see what happened. Would I have have to rebuild my whole machine? No. Nothing bad happened and so far so good. So, to install Java 1.6 do the following:

Download and install Java 1.6 from http://support.apple.com/kb/dl1572 and install.

Set Java 1.6 as your default using

/usr/libexec/java_home -v 1.6
For more information on java_home see superuser.com.

I need to use NetBeans 7.3.1 (newer versions require Java 1.7) which is downloaded from https://netbeans.org/downloads/7.3.1.

To ensure that NetBeans runs using Java 1.6 edit the configuration file /Applications/NetBeans/NetBeans 7.3.1.app/Contents/Resources/NetBeans/etc/netbeans.conf -- which is actually a bash script! -- and define the netbeans_jdkhome environment variable

netbeans_jdkhome=$(/usr/libexec/java_home -v 1.6)

And that is it. You now have Java 6 and Java 7 on your Mac. If you want Java 1.6 to be the default for you always then add the following to your rc script

export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)

15,000 unorganized photos

I have some 15,000 photos that are unorganized. In part, this is because of the rapid changes in both camera and computers used. Thankfully, they are backed up. So, a second step is organizing them is to group them by year and month. I don't think I need day, but that might change. Most of the photos have encoded within them the date and time they were taken. To organize them I just need this data and a means to associate them. The following Perl script does this by using the Image::MetaData::JPEG module, dated directories, and symbolic links.

Usage:

find ~/Dropbox -type f \( -iname '*.jpeg' -o -iname '*.jpg' \) \
| perl organize.pl ./PICTURES 2>/dev/null >./PICTURES.sh

Once the PICTURES.sh script has been made it can be run using

bash -xe PICTURES.sh 2>&1 >PICTURES.log

The Perl script organize.pl is

#!/usr/bin/perl -w

use strict;
use Image::MetaData::JPEG;

my $root = shift @ARGV;
die "root is not a directory" unless defined $root && -d $root;

my $count = 10000;

my %mkdirs = ();

while ( my $file = <> ) {
  chomp $file;

  my $dir = "unusable";

  my $image = new Image::MetaData::JPEG($file);
  if ( defined $image ) {
    my $metadata = $image->get_Exif_data('IMAGE_DATA', 'TEXTUAL');
    if ( exists  $metadata->{DateTimeOriginal} && $metadata->{DateTimeOriginal}->[0] =~ /^(\d\d\d\d):(\d\d)/ ) {
      $dir = "$1/$2";            
    }
    else {
      $dir = "undated";
    }
  }

  unless ( exists $mkdirs{$dir} ) {
    print "mkdir -p $root/$dir\n";
    $mkdirs{$dir} = 1;
  }

  my $efile = $file; $efile =~ s/([^a-zA-Z0-9_\.\/])/\\$1/g;
  print "ln -s $efile $root/$dir/$count.jpg\n";

  $count += 1;
}

And why is this the second step? Because removing duplicates is the first.

Update: I did use this to organize my photographs held in DropBox. I replaced the symbolic link command with a move command. DropBox just moved the files and not, as I was worried about, re-upload the whole collection. Thank you DropBox engineering.