Wednesday, October 31, 2018

A Lightweight Urban Exploration Adventure - The Historic Capitol Stones

I'm a fan of Urban Exploration Lite. That is, exploring hidden infrastructure, but the kind without menacing no-trespassing signs that would make the whole endeavor a crime.

Case in point: The Historic Capitol Stones. Located within Rock Creek Park is a collection of massive stones that used to be part of the Capitol building. In 1958, when the Capitol was renovated, the stones were put in Rock Creek park and promptly forgotten.

I've known about the pile of stones for years, but was just recently able to venture out and explore them in person. They did not disappoint, many having interesting markings or flourishes.

The location of the stones is an open secret:

The government neither discourages nor encourages visitors. The path to the stones is unmarked, but well maintained. If you do go, be careful walking around, and be gentle on the stones.

The Stones are 200 yards down an unmarked trail that runs southeast from the Rock Creek Stables.

I spent about 15 minutes exploring the site, snapping ample pictures. I was alone the whole time and as promised, there were no signs suggesting the area was off-limits. It's actually impressive how pristine the site is, especially given how accessible it is.

As for finding the site, you can use the directions described above. As an additional hint, here's my running route that took me adjacent to the stones:

Learn about the stones. Learn About Urban Exploration. Now go, explore!

Tuesday, October 30, 2018

Just how much is this going to hurt? A Strategy for Interpreting Raw Trail Data

A casual glance at this hike shows that it crosses an awful lot of contour lines:

But what does that mean in terms of level of difficulty? Is this going to be an exhausting slog, or a casual ascent?

Zooming in, it's possible to use the contour lines to derive the starting and ending altitude:

Which turns out to be 640ft and 1,040ft respectively. Also, using Backcountry Navigator it's possible to measure the distance between the two points.

Using this data, I now know that if we tackle this hike we'll be gaining 400 feet of elevation in 2.2 miles. But I'm still left with the original question: is this going to be an exhausting slog, or a casual ascent?

To answer this question, I decided I needed a PHC, a Personal Hill Catalog. That is, the stats on a number of local hills I'm intimately familiar with, that I can use to help interpret raw trail data.

My first attempt to setting up a PHC involved going to the hills in question and using my phone to collect the relevant info. You can see my attempt at doing this here. The problem arose when I compared the stats on my phone with Shira's phone for one particular hill. The numbers were way off, which lead me to question how accurately my phone can measure altitude.

Fortunately, there is a far more reliable way to get the elevation data I was after. Arlington County publishes a series of online maps, one of which includes topography. It's possible to know, within 2 feet, the altitude of any point in Arlington.

Using the topography map for elevation and Google Maps to measure distance, I was able to create my Personal Hill Catalog:

This spreadsheet consists of three base values: low elevation, high elevation and distance measured in feet, and a number of derived values (such as distance in miles, or slope percentage).

With my catalog in place, I was now ready to answer the question at hand: just how brutal would this hike to the summit be?

The slope of a 400 foot ascent in 2.2 miles is about 3.4%, which is surprisingly close to the Glebe, from 26th st to Walter Reed hill. I've walked this hill countless times, and while it's noticeable, it has a more or less gentle feel to it. This tells me that despite the crossing of so many contour lines, we have a do-able hike in front of us, and not some monster. I won't be able to declare the catalog a success until I've verified my assumptions in the field, but I'm amazed at the promise it shows with only a handful of local hills.

Incidentally, comparing my GPS readings with the Arlington County Map values shows that my phone wasn't especially off. In most cases, there was just a few feet difference, not enough to influence the catalog. Verifying the accuracy of my phone's GPS has been yet another benefit of this little project.

Monday, October 29, 2018

Some All Ages Halloween Crafting Fun

Check out these sweet 'jack-o-lantern' mason jar luminaries we made last night:

There's never a shortage of project ideas on the web, but finding one that's: (a) relatively substantial, (b) works for a variety of ages and (c) doesn't require a run to the craft store is harder than it sounds. Even I was surprised to find that I had jars, tissue paper and generic Elmer's glue lying around to power this project.

This project truly is fun for all ages, requiring little attention to detail to get excellent results. Both kids had no problem putting together their own lantern, and even I took a few minutes this morning to make one for myself. The variety of jar sizes and tissue paper colors only helped make the project more interesting.

Perhaps most importantly, I was exposed to the power of watered down Elmer's Glue. Who knew that this stuff was so useful?

If you're looking for a last minute, fun for everyone Halloween project, this is it.

Detailed instructions are found here: Easy Halloween Luminary - Great Jack O'Lantern DIY.

I'll never look at an empty jar of salsa quite the same way again...

Thursday, October 25, 2018

Bits of Bivalves, Millions of Years in the Making

I found this rock while hiking a few weeks ago and was curious enough about the markings to take some action.

I posted an image of it to /r/fossilid and asked the community what I was looking at.

Consensus was that yes, this was a fossil and the markings were most likely old shell bits:

Definitely looks like a shell bed to me. A bunch of bivalves have died and accumulated in this (mudstone?) bed. The significance of these is usually the way the shells have lined up, and the lack of other species in the rock despite the abundance of a certain type.

It may not be the fossil of an exotic dinosaur, but I'm still humbled to be holding the remains of life that's millions of years old.

It's also pretty remarkable that there's a community out there ready to identify the rock, plant or even 'thing' that you're curious about. Some the days, the Internet really does deliver on its promise of connecting people for the greater good.

Wednesday, October 24, 2018

DIY Electrolyte Drink Mix - The Why, How and Is It Worth It?

Dabbling in DIY health related recipes seems like, if you'll pardon the pun, a recipe for disaster. But I found Paul the Backpacker's approach to a DIY electrolyte drink mix to be compelling enough to risk making my own batch.

The Strategy

I encourage you watch his video on the topic, but here's my take on his strategy. First, electrolytes is a fancy term for a family of common minerals. The biggies are sodium, magnesium, potassium and calcium, though there are others.

Paul looked at the nutritional data for Nuun electrolyte tablets and noted how much sodium, magnesium and potassium are in one tablet. He then found cheap sources of these minerals and measured them out in small quantities to match a Nuun tablet. The resulting powder is ready to be added to water, and consumed like any other drink mix. Finally, carbs are added to the water help "pull the electrolytes through," letting your body easily absorb them.

This approach, based on an existing product rather than Internet Voodoo, is what motivated me to give it a try. I also did additional research, and found this peer reviewed paper to be especially interesting: Improved Marathon Performance by In-Race Nutritional Strategy Intervention. The paper underscores the importance of consuming calories at the same time you ingest the electrolytes, a concept I wasn't previously familiar with.

Let's Make a Batch

Paul's recommended sources of electrolytes include: Baking Soda for sodium, Epsom Salt for magnesium and Potassium Chloride for potassium. The first two ingredients I had lying around the house, the second one I special ordered off of Amazon. Though, I didn't have to: Potassium Chloride is marketed as salt substitute, and sure enough in the salt section at our local Giant I could buy Morton's Salt Substitute which is nothing more than Potassium Chloride.

To my surprise, when I inspected each of these products I found a precise explanation of their mineral content. For example, baking soda explicitly reports that 1/2 tsp contains 616mg of sodium. Again, no Internet Voodoo needed.

For a few bucks, I picked up a set of measuring spoons designed for small quantities. These allow for measurements as small as 1/64th of a teaspoon.

Rather than base my recipe on Nuun alone, I researched a variety of products:

It's interesting to see the variation among the different brands. I then worked out a table showing how many milligrams of each mineral per 1 teaspoon, half a teaspoon and so forth down to 1/64th of a teaspoon for each ingredient:

The recipe I ended up settling on was:

Sodium: 1/4 tsp + 1/32 tsp 347mg
Potassium: 1/32 tsp + 1/64 tsp 137mg
Magnesium: 1/16 tsp 31mg

For a source of calories, I opted to use 1 tablespoon of maltodextrin and 1 tablespoon of regular old table-sugar. This is 24g of carbs, or 100 about calories. Maltodextrin was a Paul recommendation, and research on the web and the above paper support it. Maltodextrin is fast digesting carbohydrate, so its energy is quickly available. Table sugar is for providing another source of carbs, and as I note below, for taste.

Here's a couple of packets I put together of this recipe, using tea bags for scale.

Field Testig

I've tested this mixture on a few runs and it seems effective. Though, admittedly I haven't used it enough times to know if it's the powder or the placebo effect that's providing real value.

This approach to electrolytes has a lot going for it. From a cost perspective, it's ridiculously cheap. DripDrop powder is great stuff, but at $25/box, it has a 'special occasion' feel to it.

The real value of this experiment for me has been demystifying electrolytes. Rather than depend on labels and product claims, I've come to understand this topic at a more fundamental level. And with this understanding comes control. I can use my new knowledge to tweak the above recipe, use these ingredients in interesting ways, or find alternative sources for electrolytes altogether. For example, getting potassium on the morning of a hike may be as simple as sprinkling some salt substitute on my oatmeal, or better yet mixing in sunflower seeds.

So the powder is cheap, takes only a few minutes to prepare and opens your eyes to an important nutritional landscape. What's the catch?

Taste. Without adding sugar or tea, the water spiked with these minerals taste like pool water. Not undrinkable, but hardly pleasant. Put this in a plastic bottle in hot conditions and it tastes worse. Add sugar and let a green tea packet soak in it and it tastes like sugared-tea-pool-water. More drinkable, but hardly pleasant.

Perhaps with experimentation, I can arrive at a better tasting formula. For now, I have a healthy respect for companies that produce electrolytes and make it actually drinkable.

Even with the subpar taste, I'd encourage you to experiment with this approach to electrolytes. It's too important a topic to leave to product labels and Internet Voodoo.

Monday, October 22, 2018

Adventures in ratpoison keymaps - Caps Lock, Windows Key and Retraining My Brain

I can't imagine there are ton of ratpoison users out there, but for the benefit of anyone who does discover the greatest all of Linux Window Managers, here's some thoughts on my latest config.

For years, I operated ratpoison with the Caps Lock key set to the Hyper-L key, and Hyper-L set as the primary Escape key:

;; ~/.xmodmap
;; Turn Caps Lock into the Hyper_L key
keycode      66 = Hyper_L

# .ratpoisonrc
escape Hyper_L

This put the easy-to-hit Caps Lock key to good use.

Lately, however, I've been on a mission to turn Caps Lock into a clone of the Escape key. I have this setup on Windows, Mac and my Android device. When I'd fire up Linux, I found myself hitting Caps Lock when I wanted Escape. Except, Caps Lock was already allocated. This past week, I re-arranged things so that ratpoison no longer uses the Caps Lock key as the primary Escape directive. Here's my current config.

First off, I'm using .xmodmap to turn Caps Lock into the Escape key, not the Hyper_L key:

!! Turn Caps Lock into Hyper
clear      lock 
clear   control
clear      mod1
clear      mod2
clear      mod3
clear      mod4
clear      mod5
keycode      66 = Escape  ;; CHANGED
add     control = Control_L Control_R
add        mod1 = Alt_L Alt_R Meta_L
add        mod2 = Num_Lock
add        mod3 = Hyper_L
add        mod4 = Super_L Super_R
add        mod5 = Mode_switch ISO_Level3_Shift

Next, I've setup ratpoison to use Hyper_L, which is the Windows key, as the primary Escape command:

## Thanks to xmodmap, this is my windows key
escape Super_L

##  ___ - bindings
definekey root Up exec chvolume 2%+
definekey root Down exec chvolume 2%-
definekey root Left exec chbrightness dim
definekey root Right exec chbrightness bright
definekey root e exec rpwin goto emacs
definekey root g exec snipit
definekey root z exec xtext ts

I then defined a new keymap, something I'd yet to do previously in ratpoison:

## Make   execute
## what's on the 'custom' keymap
newkmap custom
definekey root Escape readkey custom

To use that keymap, I setup Escape on the root keymap to invoke the readkey command using the custom keymap. In other words, ratpoison listens for a key and when it hears Escape it invokes readkey, which in turn, listens for a new key stroke. This allows you to have arbitrarily nested keystrokes, and is a brilliant way to handle key definitions.

To avoid clashing with existing ratpoison commands, I setup the majority of my custom keys to hang off of this new keymap:

##   ___ - Bindings
definekey custom j exec rpwin restore J
definekey custom k exec rpwin restore K
definekey custom l exec rpwin restore L
definekey custom h  exec rpwin restore H
definekey custom J exec rpwin capture J
definekey custom K exec rpwin capture K
definekey custom L exec rpwin capture L
definekey custom H exec rpwin capture H
definekey custom p exec mkpass | xclip -selection clipboard
definekey custom o exec rpwin goto Gimp

unbind K
bind j nextscreen
bind k prevscreen

Using this config, I now have to press Windows Key - Caps Lock - j to return to the 'j' window configuration. And training my brain to hit the extra key stroke has taken a bit of practice. But in another week or two, this should be second nature.

I've now turned Caps Lock into Escape on all my computers and learned a clever protocol for handling nested key strokes. I'm telling you, ratpoison is the ultimate Linux Window Manager. Try, you'll see.

Friday, October 19, 2018

The Mountains Called. I Answered. A Little.

Getting to run trails in the desert has been a real treat. What runs have lacked in length, they've made up for in interesting terrain. The climbs haven't been easy, but the vistas at the top easily make up for the effort. Wildlife encounters have been sparse: just a road-runner and what appeared to be an itty-bitty hummingbird. But it's the plants, with their nasty collection of thorns, that have really been out to get me.

Happy Trails indeed!

Tuesday, October 16, 2018

Gotcha of the Day: A Quick and Dirty Approach to Comparing Apache Web App Running Times

For the last couple of days I've been troubleshooting a customer's server. I ended up firing up a replacement server and found myself wanting to compare the two. One simple approach I've used in the past to do this is to add a new Apache log configured to capture timing information. Adding this to Apache is easy, just add the following to the relevant virtual hosts:

CustomLog logs/ssl_timing_log "%{ms}T:%U:%a"  # « Added this custom log
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log

With this configuration in place, Apache now generates ssl_timing_log which has this shape:


The leading number is the number of seconds it took to generate the page (hopefully 0!).

I collected up this timing data on both the old and new servers and then analyzed the data with this quick and dirty PHP script:

$fd = fopen($argv[1], "r");

$min = [];
$max = [];
$avg = [];
$cnt = [];
while($line = fgets($fd)) {
  $line = trim($line);
  if(!preg_match('/^[0-9]/', $line)) {
  list($t, $u, $i) = explode(":", $line);
  $min[$u] = min(g($min, $u, $t), $t);
  $max[$u] = max(g($max, $u, $t), $t);
  $avg[$u] = isset($avg[$u]) ? ($avg[$u] + $t) / 2 : $t;
  $cnt[$u] = g($cnt, $u, 0) + 1;

uasort($cnt, function($a, $b) {
  return $b - $a;

$i = 0;
foreach($cnt as $u => $t) {
  echo sprintf("%-80s %0.2f - %0.2f - %0.2f | %d\n", $u, $min[$u], $avg[$u], $max[$u], $cnt[$u]);

  if($i > 50) {

function g($a, $i, $d = false) {
  return isset($a[$i]) ? $a[$i] : $d;

Here's a sample, yet masked, run of the script:

$ sudo php analyze_timing_log.php /var/log/httpd/ssl_timing_log
/                                                                       0.00 - 0.00 - 1.00 | 3777
/xxxxxxxxxx/                                                                     0.00 - 2.00 - 11.00 | 889
/xxxxxxxx/xxxxxxxx/                                                              0.00 - 0.26 - 2.00 | 673
/xx-xxxxxxx/xxxxxxx/xxxxxxxxxxx/xxx/xxxxxxxxx/                        0.00 - 0.00 - 0.00 | 363
/xxxxxxxx/xxxxxx/                                                                0.00 - 0.00 - 0.00 | 359

The values shown are min, average, max and request count for a given path. The paths are sorted with the most frequently accessed pages at the top.

The results of this testing gave me confidence in the new server. This timing_log hack may be crude, but it runs anywhere Apache does and makes for command-line friendly data sets. It just works.

Monday, October 15, 2018

Bringing a Bic Lighter Back from the Dead

I found not one, but three discarded lighters while running yesterday. I picked one up, planning to convert it to a handy Spark Lite fire-starter knock-off. Rather than grab a needle nose pliers and other tools, I decided to see if I could do the conversion using whatever items I had on my keychain. My thinking: if I ever needed to turn an empty Bic Lighter into a sparker in the field, I probably wouldn't have the benefit of a toolbox to rummage around in.

I used a P-51 can-opener to gently pry the metal cover off. From there, I used no tools, just gentle pressure to unsnap the rest of the components. The tricky part was getting the tiny flint back into the spring-loaded chamber. I managed to launch both the spring and flint into the air, and spent most of the the build time on my hands and knees looking for these fly-away parts. I used my keychain tweezers to help set the flint back in place.

For just a couple of bucks, it's hard to imagine a more glorious piece of gear than the Bic Lighter. Even out of fuel, it still has much utility to offer.

Sunday, October 14, 2018

Hiking Frankling Mountain State Park - Sunset Loop Trail

Yesterday we completed a delightful hike through Franklin Mountain State Park. We attempted to follow the Sunset Loop Trail but wandered off it a couple of times. The desert landscape was truly gorgeous, and the generous cloud-cover meant that we never suffered under the heat of the sun.

We saw almost no wildlife (unless you count trail runners as wildlife), just a few birds and a few bugs. Comparing one of those bugs to this infographic tells me that we may have found an Arizona Bark Scorpion. He was hiding under a random rock I picked up to inspect. I assumed he was a harmless baby, but the web tells me otherwise. Apparently Bark Scorpions are the most dangerous scorpion in the US, and the venom is quite poisonous. So yeah, be careful which rocks you pick up while in the park.

Here's a few tips that I'd wish we had known about the Sunset Loop Trail before starting it:

  • While the trail does connect the Lower and Upper Sunset Trails, it starts on the Bike Loop trail. To begin the hike, head North West from the parking lot to find the Bike Loop Trail.
  • I missed that the trail incorporates Bike Loop and started us off by taking a trail down from the Overlook near the parking lot area. That trail took us to Lower Sunset Trail, it's just not what the hike calls for. We were able to re-join the recommended hike by following the Lower Sunset Trail North.
  • Nearly all the trail junctions lack usable signage. Most contain no signs, some contained numbers that didn't mean anything to us. There's also no blazes or trail markings to be found. So do be careful that you don't wander off trail.
  • Despite being named the Sunset Loop trail, the route leaves the Lower Sunset Trail and heads off into territory that the map shows no trail for. We found trails to follow out there, but they required Shira keep an extra close eye on the GPS to make sure we were on course.
  • The Upper Sunset trail is appropriately named, as it takes you up onto a ridge. This makes the last mile or so of the hike physically more challenging than all the previous miles. The views from the Upper Sunset trail are well worth the effort. The trail never gets especially technical and my fear of heights never kicked in.
  • The route is marked as Hard, and I'm not entirely sure it deserves that rating. The lack of blazes and the fact that the route leaves established trails does make this one trickier to follow. And the Upper Sunset Trail will get your heart pounding while climbing onto the ridge. But there was nothing technical or terrifying about this hike, and it wasn't especially long.

All in all, it's a great hike and was a terrific way to soak up some desert rays!

Thursday, October 11, 2018

A Travel Photography Checklist

Inspired by my Digital Packing Checklist, I decided to make a similar one for photo gear.

Deliberately walking through this checklist, I've found I can sidestep a number of photography traps. From the annoyance of DSLR pictures with incorrect timestamps, to the agony of capturing important photos with the quality setting set to low, to a smattering of issues in between, this list has me covered.

I'm careful to review this list for each camera I'm bringing, though obviously some steps don't apply to some devices.

  • Clean lenses and look for damage.
  • Consider replacing UV filters used to protect lenses.
  • Insure batteries are fully charged, and noted as such.
  • Insure the date and time is properly set.
  • Set the timezone where you'll be shooting pictures. Insure the daylight saving option is correctly set.
  • Review photo quality setting, insure the highest quality setting is selected.
  • Review the age of SD cards and consider replacing them.
  • Purge SD cards of old photos.
  • Purge backup areas of old backups.
  • Run your photo backup procedure, insuring all cards are backed up.
  • Check cloud backup settings to insure 'Original' photos are being saved. Review Roaming and Upload over Cellular options.

Happy shooting!

Wednesday, October 10, 2018

Courage, Bravery and Life Before GPS

I'm making my way through Phantom Warriors, a series of stories about Long Range Reconnaissance Patrols that operated during the Vietnam War. It's hard to overstate how remarkable these stories are. Take your most riveting, white knuckle adventure movie, add it to the most courageous, brave and skilled characters you can imagine, and you still won't match the tales in this book. It's that good.

One observation I've had while reading this book is how modern a war Vietnam was. The soldiers have relatively reliable communication systems, air support from helicopters and fighter jets, on-demand artillery and plenty of on-person fire power. One obviously lacking piece of tech: GPS. While in the field, soldiers had to depend on map, compass and protractor for their navigational needs.

Under ideal circumstances, this meant navigating thick jungle for days without established routes. But these soldiers never operated under ideal circumstances. Walking in a straight path was a recipe for being ambushed, so they followed strategies to randomized their path. To avoid discovery, they avoided well known trails. The consequences of getting it wrong could be deadly; from a missed landing zone to calling in artillery fire on your own position. And all of this navigation needed to be completed under massive stress. It's one thing to subtract two angles in a classroom, it's altogether a different prospect when someone is shooting at you.

Like I said, these guys had mad skills.

Inspired by the living history community's philosophy that hands on activities are the best way to understand the past, I downloaded FM 3-25.26, the Army Land Navigation Manual, grabbed a few paper maps and started playing around. What better way to appreciate the challenge of map and compass navigation than to try it out?

Here's a few take-aways from this experiment:

Margin notes are key. In classic bureaucratic style, FM 3-25.26 lists 23 different pieces of information that are contained in the margins of a military map. Can you think of anything more mundane? Yet, to my surprise the physical maps I'd grabbed off the shelf had many of these same pieces of information. And more importantly, many of the notes were quite useful. I'd never stopped to consider them, writing off much of the text as fine-print legalese.

Latitude and longitude math is painful. One of the table top exercises I went through was deriving coordinates from a position on a map and finding a position on a map given a set of coordinates. I did this using the Monongahela National Forest map, which is marked off in 0°7'30" intervals. I found myself needing to answer questions like: What's 5/11ths of 0°7'30"? The answer: write some code to find out.

I grabbed my cell phone and coded up a quick Scheme library to work with degrees, minutes and seconds (DMS). You can find the code for the library here. Here's an example of me using this code to derive coordinates that are 5cm above, and 3.75cm to the left of a particular point on the map:

 (let* ((grid-size (dms->sec '(0 7 30)))

        (lat (sec->dms (+ (dms->sec '(38 52 30))
                          (* grid-size (/ 5 11)))))

        (lng (sec->dms (+ (dms->sec '(79 37 30))
                         (* grid-size (/ 3.75 8.5))))))

   (string-append (dms->string lat "N") ", "
                  (dms->string lng "W"))))

While this exercise is simple math (it's all based on proportions), I found every possible way to screw it up. Which leads me to my next point.

The UTM grid is awesome. After futzing with latitude and longitude, I quickly came to appreciate the value of the UTM grid. Being able to work in meters, rather than DMS values, is such a win. The Military Grid Reference System, which sits on top of the UTM, is also quite clever. I love the notion that you can lop-off digits from a series of coordinates to give a rougher, yet still valid, description of a location.

As I've poked around maps, I've also come to appreciate that UTM Grid isn't the only game in town. The USGS Virginia Map, for example, notes the presence of the Virginia and Maryland Coordinate System which is marked off in 100,000 foot increments. This tidbit is in that fine print I'd normally gloss over.

My little experiments may expose a bit of the how these soldiers were able to accomplish their task, but the fact that they did it so routinely, and under such difficult circumstances only underscores their remarkable skill and courage.

Next up: I need to get out into the field and try some of these techniques. Preferably without someone shooting at me.