Weekend Workbench

I am almost done with my Welsh and my Vikings. I only need now to put on a coat of matt varnish to finish them. Unfortunately, I need to wait until the weather warms up and the rains subside. Perhaps by then I may come to prefer their sheen.

While I wait for the weather to change, I have to organize the the parts to my row houses that I laser-cut a few weeks ago. The task is to take a pile of parts and organize them into baggies of parts for my friends to then assemble.
Update: Done. Nine houses with only 3 sets of the same missing part, which, luckily, is optional for construction.

Externalizable needs a serialVersionUID too.

Yesterday I learned that even if your Java class serializes via java.io.Externalizable, so giving the class complete control over the marshaling and unmarshaling of the data, you must still defined a serialVersionUID or Java will create one for you. As methods signatures are included in the calculation of serialVersionUID my newly added method caused the creation of a different version id and so, unexpectedly, the marshaled data on the wire was incompatible. To fix the problem I just needed to define serialVersionUID to be the calculated version prior to my addition of the method. Luckily, the log contained the version number I needed!

Laws for my children to learn sooner than later.

Parkinson's Law: Work fills the time allotted.

Gilmartin's Law: Time taken from work for play will be returned with time taken from play for work at the end of the project.

I need something pithier for Gilmartin's law. Suggestions will be well received.

Weekend Workbench

During the week I prepared the bases with sand glued and mounded around the figure's base. I then painted it. I first made the mistake of preparing with black and then painting with a too dark a green. God, they looked awful. So I asked Chris who is very talented with color for help and she picked out, from the colors I had on hand, Vallejo's 70.605 German Red Brown as a base color and Citadel's Elysian Green for the grass.

The brown was dabbed on with the side of the brush so as to leave some of the prior dark color. Then she dabbed on green in a few areas, again, with the side of the brush. Where there was too much green she dabbed on the brown very lightly. I really like the result.

Also on the workbench are some very small, rough cottages for my son's medieval castle diorama. We will see how far a little spackle, paint, and dried grass stalks will take us!

No stories worth retelling

I enjoy listening to The Moth, I highly recommended to all feeling people, except that I often become glum afterwards as I have no exciting stories to tell. Software development contains no stories worth retelling.

Weekend workbench

Weekend workbench. 8 Strathclyde Welsh, 1 Welsh mounted warlord, 1 "chubby" Welsh warlord, and 4 Jomsvikings. (The horses were painting a few weekends ago.) All figures are Gripping Beast metals.

Menus and vertical space

I have a dream that one day a webapp's drop-down & pop-up menu takes up the full vertical space available. [Old developer now hurriedly searching for reference within Inside Macintosh.]

Thunderplot

Thunderplot looks to be a useful tool for quick plots. I copied some log data from a terminal window and pasted it into Thunderplot. There was no need for an intermediate file. Thunderplot found columns of integer numbers. I then plotted two line graphs from two of the columns. Calculations on the columnar data is available.

And today it is priced at $2.

Hanging slashes

This week we updated our production Apache Tomcat installations to 8.0.15 (from 5.5.30). We don't need any of TC8's additional capabilities, but we do need an implementation with ongoing security updates. An unexpected difference between these versions is the handling of trailing slashes on URL paths. TC5 would send any requests that were not mapped to a specific servlet to the the ROOT servlet. For example, when the path "/A/B/" was presented to TC5 it would look for servlet A and, not finding it, send the traffic to ROOT. TC8 does not: It returns an HTTP 404 error.

I tried to solve the problem by coding a TC8 Valve to intercept the request, rewrite the URL without a trailing slash, and then have TC8 restart the request process. And all without losing any request content sent with, for example, a PUT request. I was able to intercept and rewrite the URL, but I never successfully got TC8 to restart the request. I was very close, but time ran out for further exploration. (I was also unsuccessful with a Filter implementation.)

Our services are fronted by haproxy and it does allow for URL rewriting. The following placed in a frontend or a backend definition will remove any trailing slashes in the URL's path:

acl has-trailing-slash path_end /
reqrep ^(HEAD\ )(.*?)(\/+)(\?.*?)?(\ HTTP\/1.[01]) \1\2\4\5 if has-trailing-slash
reqrep ^(GET\ )(.*?)(\/+)(\?.*?)?(\ HTTP\/1.[01]) \1\2\4\5 if has-trailing-slash
reqrep ^(PUT\ )(.*?)(\/+)(\?.*?)?(\ HTTP\/1.[01]) \1\2\4\5 if has-trailing-slash
reqrep ^(POST\ )(.*?)(\/+)(\?.*?)?(\ HTTP\/1.[01]) \1\2\4\5 if has-trailing-slash

One could replace the 4 rewrite rules with just one that handles all the HTTP methods but I chose not to: The leading 2 characters are enough to quickly select the right rule.

"We have certain work to do for our bread..."

John Ruskin, Seven Lamps of Architecture:

We have certain work to do for our bread, and that is to be done strenuously; other work to do for our delight, and that is to be done heartily: neither is to be done by halves nor shifts, but with a will; and what is not worth this effort is not to be done at all.

Thanks to http://www.everymac.com/

Thank you http://www.everymac.com/ for the information and instructions for replacing my 2010 Mac Mini's hard disk.

Copy & Cite Bookmarklet

I don't know why it is such a hard task to create a browser extension for copy & cite. Since none work to my liking, here is a simple bookmarklet. (This posting is mostly so I don't loose the code.)
var selection = "";
var ranges = window.getSelection();
if ( ranges.rangeCount > 0 ) {
   for ( var i = 0; i < ranges.rangeCount; i++ ) {
      if ( i > 0 ) {
          selection += "\n\n";
      }
      selection += ranges.getRangeAt(i);
   }
}
else {   
   var titles = document.getElementsByTagName("title");
   if ( titles.length > 0 ) {
      selection = titles[0].textContent;
   }
}
var subject = "FYI:" + selection.substr(0,50) + (selection.length > 50 ? "..." : "");
var body = selection + "\n\n" +window.location.href;
window.open("mailto:?subject="+encodeURI(subject)+"&body="+encodeURI(body),"_self");

Use the tool at http://mrcoles.com/bookmarklet/ to create your own bookmarklet.

$2.50 per row house

The machine rental and materials costs make each row house cost about $2.50 each. AS220 charges $25 for a 2 hour block of lab time. The 1/16" chipboard is $7 for 25 sheets. Each row house takes 2 sheets of chipboard and about 10 mins to setup and cut. Therefore, $25 / 120 min * 10 min + $7 / 25 sheets * 2 = $2.64. (These costs do not include the incidental costs of shipping, parking, a Cafe Tobe from Coffee Exchange, etc.)

If we add the cost of my time then they are priceless!

Assembled row house

I made the time to finally assemble the laser cut row house. Here are two photos of the assembled building. I think it is a little out of scale for 15mm, but am hopeful it will be useful.

I learned much in assembling these buildings.

  • I need to increase the laser power a small amount so as to ensure that each edge is cut all the way through.
  • The 1/16" chipboard is a good material choice, but like all cardboard it tends to warp. To mitigate this, I will add internal structure the next time. More specifically, a hollow rectangular plate around the inside, top of the walls.
  • The method of creating stone work around the windows is too fussy. The next time I will cut it out from 1/32" card and glue around the window opening.
  • A better method of aligning the floors is needed. The improvised teeth I cut work, but are ugly.
  • I improvised a number of jigs to aid assembling the house. I will include these to be cut alongside the house parts the next time.

If anyone wants the row house patterns send me an email.

Finally, charred edges!

Many thanks to Shawn Wallace who helped me complete my introduction to using AS220 Lab's Epilog laser cutter this afternoon. I was able to cut 8 building of two different designs on 12" square, 1/16" thick chipboard. Next step is to assemble them to see how accurate mine and SketchUp's measurements are. To be fair, however, the conversion pipeline between the SketchUp drawing on my MacBook and final output to the cutter is very long -- SketchUp to PDF to iDraw to PDF to Corel Draw to Epilog driver to Epilog hardware.

Too Fat Lardies' "Talking Tactics"

For the WWII gaming novice like myself Richard Clark of Too Fat Lardies is writing a serialized tactics tutorial "Talking Tactics." Well worth reading. Currently there are seven parts

  1. Introduction
  2. The patrol phase
  3. Deploying for the attacker
  4. Deploying for the defender
  5. Fire & Movement
  6. Resource placement
  7. Fish & Chips

I will update this posting as more parts are published.

Update: The Lardies have assembled all the postings into a single PDF document. The document is available in the files area of their Yahoo.com mailing list.