Dirt

I was making a 3' × 4' board for our Saga game next month and I wanted most of it to be dirt terrain. So I searched for what people use for "dirt." Well, it turns out people do not seem to use actual dirt. Really!? Well, being a rebel, I choose to. I dug up some clay from the yard, baked it for an hour at 450 F so as to dry it and kill the bacteria, and then sieved it on to the board coated with near full strength wood glue. It worked out well. (I then sort of ruined it with coats of clear acrylic unevenly applied. Damn.) So, my question is, why don't people use actual dirt for dirt terrain?

Guidelines for presenting a document for discussion

The following guidelines are for presenting a document for discussion. They seem obvious, but it seems they are not in common practice in public policy fields, esp. the South Kingstown School District.
Revision number
What revision number is the document? The number should be (mostly) consecutive -- 1, 2, 3, etc -- but, when not, at least increasing. If an established document is being changed then consider using the software version system. Revision number must be in the footer of every page.
Revision date
When was the revision finalized? Use YYYY-MM-DD date format so as to avoid international date ambiguity. (Is "10/2/12" Oct 2, 2012 or Feb 10, 2012, or Feb 12, 2010.) Revision date must be in the footer of every page.
Revision history
Summarize how the document changed with each revision. The revision history is usually located in the front matter and presented as a table of revision number, revision date, revision authors, and revision summary columns.
Page numbers
What page am I looking at and how many pages are there in total? Page number and page count must be in the footer of every page.
Line numbers
Use line numbers to give the discussants a means to directly reference a portion of the sentence or the paragraph for discussion. Line numbers appear in the left margin of every page. Line numbers are consecutive across the whole document (and not just per page). It is common to only show every 5th or 10th line number. ¶ With online documents there are no fixed lines so use numbered paragraphs.
Changebars
When content is changed change bars allow the reviewer to focus only on the changed content. With a long document, or one that has had intense discussion, not having to reread the whole document aids in moving along the document to completion. Change bars are usually placed in the left margin, but either is fine.
Table of contents
For a long document a table of contents, especially an annotated table of contents, is a guide to quickly understanding the overall structure of the document's content. A good table of contents can substitute for an executive summary.
Also of interest:
  • The International harmonized stage codes is a rather sophistated encoding of ISO's document development process. I just use WORKING (not yet draft), DRAFT (not yet final), FINAL.

Context and orientation for the draft strategic plan for 2015-2020

It was good to see so many parents at last night's School Committee meeting. Most were there to address the changes to the home schooling policy or in support of the dual language immersion program. Unusually, the chair (Maureen Cotter) asked that the parents addressing the policy change speak during that period of the agenda. I was not able to stay for that discussion: I really hope that all the parents were allowed to speak as as long as they needed.

The earlier part of the meeting was a first reading of the district's 2015-2020 strategic plan [1]. It is interesting to compare this plan with the 2010-2015 plan [2]. There no cohesion between the two. It is as if they were prepared for two different school districts.

During public comments I did ask for context to be added to the plan: What were the 2010-2015 goals achieved and goals unachieved? What are directions are we continuing in and what directions are we changing? I was heartened to hear Scott Mueller and Jonathan Daly-LaBelle​ reiterate this need. I was less hearted to hear Superintendent Stringfellow's defensiveness that this had already been covered in their retreats. She may have been speaking but clearly there was little communication. I have asked for the records from the July 21 retreat.

The draft strategic plan is a document for discussion, but its form does not aid that. I always find it bothersome when presented with a document for discussion that's content is not referenceable. Mr Mueller, nor any other Committee member, should have to fumble around to orient others to a specific part of the document. In a followup letter I noted that numbering lines or paragraphs is a feature of Microsoft Word and Microsoft Word is part of the $21,422.40 licensing fees authorized at the same meeting. Sigh.

[1] http://www.boarddocs.com/ri/soki/Board.nsf/files/A3ZRDX5D71B3/$file/StrategicPlanDraftNov2015.pdf

[2] http://www.skschools.net/Documents/SKSD%20Strategic%20Plan10-15.pdf

How are branches being used? A visualization

I really like the terminal for visualizations. There is something in its restrictions that gives it the right balance of detail for rough visualizations. The fixed width font, the ASCII character set, the small overall grid, etc, all help. I wanted to see how our developers are using branches over the last 180 days. This script gets the branches log and outputs a chart for days that had checkins by each developer. Note that a day without checkins by anyone will have no column in the chart.

The code is
#!/bin/bash

date1=$(date -v -180d +'%Y-%m-%d')
date2=$(date -v -1d +'%Y-%m-%d')
svn='svn+ssh://.../branches'

svn log --revision {$date1}:{$date2} $svn | perl -e '
  my %D = (); # dates
  my %U = (); # users
  while( <> ) {
    if ( /\| (.*?) \| (\d\d\d\d-\d\d-\d\d) / ) {
      my $u = $1;
      my $d = $2;
      $D{$d} ||= {};
      $D{$d}->{$u} += 1;
      $U{$u} = 1;
    }
  }
  my @d = sort keys %D;
  my ( $l ) = reverse sort map { length($_); } @d; # max length
  for my $u ( sort keys %U ) {
    printf( "%*s %s | ", -$l, $u, $d[0] );
    for my $d ( @d ) {
      print $D{$d}->{$u} ? "*" : "-";
    }
    printf( " | %s\n", $d[$#d] );
  }
'

# END
Update: A failing of this script is that it only shows days with activity. Days without activity by any developer will be missing from the timeline. I replaced this script with this one
#!/usr/bin/perl -w

use strict;
use DateTime;

my $svn_url='svn+ssh://.../branches';

my $stop = DateTime->today();
my $start = $stop->clone()->subtract( days => shift @ARGV || 90 );

my %W = (); # week days
my %D = (); # dates
my %U = (); # users

# initialize the dates and the weekdays hashs with days between the start and stop dates
for ( my $next = $start->clone(); $next->compare($stop) <= 0; $next->add( days => 1) ) {
 my $F = $next->strftime('%Y-%m-%d');
 $D{$F} = {};
 $W{$F} = $next->day_of_week();
}

# collect the svn usage data
if ( open( IN, "svn log --revision \{$start\}:\{$stop\} $svn_url |" ) ) { 
 while( <IN> ) {
  if ( /\| (.*?) \| (\d\d\d\d-\d\d-\d\d) / ) {
   my $u = $1;
   my $d = $2;
   if ( defined $D{$d} ) {
    $D{$d}->{$u} += 1;
    $U{$u} = 1;
   }
  }
 }
 close(IN);
}

my @d = sort keys %D;
my ( $l ) = reverse sort { $a <=> $b } map { length($_); } keys %U; # max user length

# output the chart
for my $u ( sort keys %U ) {
 printf( "%*s %s | ", -$l, $u, $d[0] );
 for my $d ( @d ) {
  print $D{$d}->{$u} ? "*" : "-";
 }
 printf( " | %s\n", $d[$#d] );
}

# output the line of mondays
printf( "%*s %*s | ", -$l, "", length($d[0]), "" );
for my $d ( @d ) {
 print $W{$d} == 1 ? "M" : " ";
}
printf( " |\n" );

# END

Ignorance

Sometimes you wonder how you didn't know something for so long. In this case, it is using a conditional expression in conjunction with a for loop.

perl -e '$mx = $_ > $mx ? $_ : $mx for ( 1, 6, 2, 3, 5, 4 ); print "$mx\n"'

Early morning interesting readings 2015-11-03

Early morning interesting readings: