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 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

Thank you 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;"mailto:?subject="+encodeURI(subject)+"&body="+encodeURI(body),"_self");

Use the tool at 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 mailing list.

Wargames magazines

In the US the wargaming press is limited to three general audience magazines. Perhaps there are more, but I am unaware of them. They are

  • Wargames, Soldiers & Strategy
  • Wargames Illustrated
  • Miniature Wargames (with Battlegames)
Without a doubt your money is well spent on Wargames, Soldiers & Strategy. Its coverage of historical periods, rule sets, battle scenarios, available miniatures, and informative columnists is well rounded. And the Editor seems like a guy you would want a pint and a conversation with. I subscribe and will renew.

Wargames Illustrated was my first wargames magazine subscription. It continues to be a excellent source of inspiration, but its recent purchase by Battlefront Miniatures is clearly changing the weight of page counts from the broad hobby to Flames of War and WWII. I subscribe, but am considering not renewing.

I find Miniature Wargames interesting some of the time, but mostly I find the tone, as best I can describe it, as matronly. A nearby games store has back issues for several past years available and I have bought, read, and find these older issues and under a different Editor more appealing then the current issues. I will not subscribe.


SketchUp models and templates

In my posting Dimensions from photographs with perspective I noted that SketchUp is a tool that needs a trained user. Well, I stopped putting off training myself and within a few hours I was quite comfortable with the basics of it. I know enough now to be able to create a building similar to the one photographed in the previous posting, for example

The yellow roof is there to help me orientate myself when viewing the model in elevation only. I also only use parallel projection for all work in 3D.

With the model finished, I used the Flattery plugin to take each face of the model and lay it down on to the XY plane to create a printable template from which to construct the building in the real world. I also experimented with the Unfold plugin and the brilliant Pepakura Designer application, but for my needs Flattery was just right. (Note that Flattery does not yet work with SketchUp 2015.)

I assembled some parts of the building so as to understand first-hand some of the issues that arise from this process. The first issue is simply keeping track of the parts; I would like to be able to automatically number each face so that once flattened I have a reference to the 3D model in place. A consequence of this is that the template should be printed upside down so that the markings are on the back of the face and not on the front. Doing this also leads to the idea of applying the template to patterned materials. I should note that I am not interested in printing features onto the faces -- such as brickwork, shingles, window frames, ivy, or "rising damp" -- as these models will be enhanced with moulded windows, doors, and other dimensional findings, and then painted.

The template was printed on thin card stock and so material thickness was not an issue in assembling. However, the material I plan to be using -- for example, chipboard, plywood, and MDF -- does have thickness and so I am now learning how to incorporate this construction element into the SketchUp design. I found the videos "Sketchup and Laser Cutting: Making Teeth and Slots" (parts one & two) to be very helpful in getting started with adding dimension. (I am not interested in the interlocking teeth as my models will be glued.) The second video also shows how to flatten the model and to adjust the faces to account for material loss during laser-cutting.

Cats are evil creatures that break Ps on the keyboards with their kneading

Cats are evil creatures that break Ps on the keyboards with their kneading. A big thank you to HP for all their helpful product repair support pages.

High School freshman year is a blizzard of handouts, worksheets, and single pages of notes

High School freshman year is a blizzard of handouts, worksheets, and single pages of notes. None of which are dated. None of which use any system of ordering (e.g., "handout 21 of 97"). I am appalled that my children's teachers can not provide a comprehensive set of materials at the beginning of the year. (What have they been doing all Summer?) When there is no "text book" there are few means for the child to advance or review. When the "text book" is so fractured how can the child know what is missing? How can a parent help in such chaos? This really is no way to provide an education.

Dimensions from photographs with perspective

I needed to calculate the dimensions of some historical buildings for which I only had photographs. A WAG is acceptable as I am only making rough models of the buildings. However, I did want to know how to do it with more accuracy and so looked around for an answer. SketchUp has a facility to do this and it is remarkably easy to use. Unfortunately, the rest of SketchUp is not as it is a technical tool that expects a trained user. So I kept looking around and finally found a clear explanation of the algorithm to use.

The key to understanding the algorithm is that you make right angled triangles in a plane perpendicular to a known height. For the rest of the explanation I am going to quote the author and present his diagram:

"Starting from the corner C of the building, draw a horizontal line on the image plane. This line represents a horizontal line in space, parallel to the image plane and at the same distance (and so the same length scale) as the vertical edge of the building above C, so you can measure lengths along it. It intersects the line AB, along the other side of the building, at B. (B is not necessarily the opposite corner of the building; this particular perspective view just happens to have the corners drawn about the same distance from the central corner A.) Now triangle ABC, in space, is a right triangle (assuming the corner A of the building is a right angle). You know the length BC of the hypotenuse (by measuring with a ruler calibrated to the vertical edge C, as I've shown with the green 45-45-90 triangle--just coincidentally, this is about the same height as the building for this drawing) and the length AC of one leg, so you can find the true length AB of the other leg by AB2=BC2-AC2.

"All this assumes that your camera isn't imposing too much distortion on the image. It would probably be a good idea to test this (take a picture of an object of known dimensions at similar lens zoom settings and with similar perspective) to see if this provides accuracy sufficient for your purposes."

Found at Dimensions from photographs with perspective.