Wednesday, May 27, 2020

Skills Inspiration from a Real Life Worst Case Survival Guide

I can't explain it: whenever I pick up big 'ol book on wilderness skills or survival I feel buzz of excitement. Perhaps it's the fixer in me that is eager to synthesize and deploy this new found knowledge. Or maybe I got a kick out of reading these types of book as a kid and this is just a burst of nostalgia. Whatever it is, I love me a survival manual.

Mind you, these texts are often limited in value. The textual descriptions, vague line art, and random pictures often leave a lot to be desired. Ultimately, there's no substitute for experience; even if that experience is in your backyard. Still, these manuals do serve one notable purpose: they offer inspiration for which skills one should investigate and master.

Kicking around on the web, I came across one of these references I hadn't seen before. AF Handbook 10-644 - Survival Evasion Resistance Escape (SERE). This is apparently the Air Force's manual for their SERE program; the course pilots takes to be prepared for ejecting over enemy territory.


The SERE course is legendary stuff and covers everything from basic wilderness survival to evading the enemy to dealing with be a prisoner of war. To even get a glimpse into this world is a treat.

The range of topics covered is impressive. From nuts and bolts of survival to higher level topics such as understanding weather and various types of insulation; from surviving an avalanche to making landfall in raft; the book tries to cover it all. 

Sprinkled throughout the text are accounts of soldiers who deployed  the documented techniques. Consider this tidbit from page 621.

Colonels John Dramesi, a USAF F-105 pilot shot down in April 1967, and Edwin Atterberry, a USAF RF-4C pilot shot down in August 1967, used a disguise as the main focus of their escape attempt from the “Hanoi Hilton”. They used a combination of ground iodine pills and redbrick dust to match the average skin color of the North Vietnamese. Sandals modeled after the shoes of the North Vietnamese peasant. They gathered bits of cloth and string and made white “surgical” masks to disguise facial features. Using thread pulled from towels and needles made of copper wire, they fixed their black prison clothes to look like peasant dress. Out of strips of rice-straw pulled from sleeping mats, the IP wove two conical hats. Originally they had camouflage nets made from three blankets with clumps of rice-straw from brooms sew on them, but were forced to turn them over to the rest of their cell mates, so they used mosquito netting with clumps woven into them. The IP also stole a burlap bag, two baskets, and a carrying pole as props to look like traveling peasants. The Colonels moved through the populated area of Cu Luc North Vietnam without raising suspicion, coming within a yard of policemen and others during their disguised evasion movement. They greeted those that walked with simple nods, while any locals who attempted to talk to them were ignored as the pair cong forward at a constant rate. While their disguised allowed them to get out Hanoi, unfortunately they did not travel far enough before going to a hold-up site and were subsequently captured.

The manual delivers mightily on the inspiration front. Below are 20 skills that I logged as worthy of future investigation and I'm sure I could find more.

If you're looking for a worst case survival guide, AF Handbook 10-644 is where it's at. Master the skills in there and you'll be ready for anything.

  1. Identifying and using 12 common medicinal plants. (page 87)
  2. Crafting an improvised sleeping bag. (page 199)
  3. Crafting improvised footwear, specifically the curiously named Hudson Bay Duffel Bag. (page 192)
  4. Using quartz or pyrite as a spark generator. (page 229)
  5. Using clouds for weather prediction. (page 101)
  6. Using sandstone and other found rocks as an improvised knife sharpener. (page 241)
  7. Learning two common hand sewing stitches. (page 253)
  8. Using the SODIS method of water purification. (page 293)
  9. Understanding improvised methods for determining your current latitude and longitude. (page 410)
  10. Navigating at night using stars. (page 415)
  11. Using an improvised trail marking scheme. (page 430)
  12. Crafting a field expedient oven for baking. (page 365)
  13. Using field expedient methods for preserving food. (page 367)
  14. Constructing an improvised raft. (page 500)
  15. Learning the evasion checklist. (page 530)
  16. Urban navigation: identifying navigational clues from landmarks and local history. (page 623)
  17. Urban navigation: determine direction from weather effects on buildings and infrastructure. (page 625)
  18. Preparing a personal survival kit. (page 278)
  19. Constructing an improvised backpack. (page 450)
  20. Learning basic rock climbing technique and holds. (page 462)

Friday, May 22, 2020

Hiker in Training: Ellanor C Lawrence Park

I'm on a mission to get our 16 week old ready to tackle serious hikes. We've done the prep work and knocked out a short, but nearby trail. Next up was to pick a trail that was longer in distance and drive time.

Our go-to app for finding trails is All Trails. When Shira and I are shopping around for an adventure, we set the difficulty to medium or hard, and the distance to 7+ miles. This time, we looked around for easy trails that would be less than 5 miles. My gosh, there are so many options we'd never heard of!

The one we picked for this adventure was the loop at Ellanor C. Lawrence Park. This 3.8 mile hike is located in a park surrounded by suburbs. Yet, the vibe was that of a real walk in the woods. We caught glimpses of houses only a couple of times and the road noise was minimal.

The trail itself was in great condition and we zipped right through it, stopping only briefly for a snack.

In the age of COVID-19, we wanted solitude not only to enhance the hike but to avoid social distancing issues. At the entrance to the park there's a delightful pond which a few families were congregating around. We slipped by them and on to the trail and from there saw almost nobody else for the rest of the hike.

All in all, our little hiker did great. He endured the 35 minute car ride without an issue and enjoyed the walk in the woods. For our part, we enjoyed discovering a new bit of green space that's perfect for when we need an easy hike. And I even got to snap quiet a few pics of flowers. Ellanor C. Lawrence Park is a winner.

Hiker in Training: Gulf Branch Trail

To recap: I want to take our 16 week old for some serious hiking, but I realize we need to ease into this to avoid total parent and baby meltdown. Phase 1 was to figure out which carrier worked best for hiking. With that done, it was time to pick the first hike.

I wanted a 'real' trail to hike on, but I also wanted it a short drive away so that it was a minimal investment in time and it had be relatively short. Our solution: hike the Gulf Branch Trail which follows Gulf Branch. All told, we did 2 miles, which included 1.5 miles out and back on the Gulf Branch Trail and then another .5 miles of exploring because the little man was sleeping and we could get away with it.

Like Windy Run and other nearby offshoots of the Potomac Heritage Trail, the trail follows a stream down to the Potomac. Even though you're in the midst of Arlington, you feel like you're doing authentic backcountry hiking. We saw a couple of families along the way, but the trail really wasn't busy at all. Best of all, our little guy enjoyed the hike. He got to stare up at trees and have a little picnic at our turn around point.

If you're in Arlington, you're no doubt itching to get out and have an adventure during the COVID-19 lock down. Hiking the Gulf Branch Trail (and the neighboring runs) are an absolute no-brainer.

Hiker in Training: Pre Hikes

My strategy for planning an outdoor adventure could be summed up in two words: Overdo It. You know, jump in the car and drive 3 hours away, into awful weather, to hike a technically difficult trail that's not fully mapped out. Shira puts up with overdoing it, but our 16 week old, not so much. Heck, given how little we've spent in the car, we're not sure he could endure a long'ish car ride, not to mention a long'ish hike.

So I've been trying to be smart about this, and build up our little hiker's ability step by step.

Phase one has been through a series of walks in the neighborhood. The primary goal: figure out which carrier is most comfortable for him and us. The Moby carrier, while great in the winter and for general snuggling, has shined less once the sun is out. Not to mention, adjusting it on the fly is a real chore.

The Baby Bjorn is a sweet carrier, but our little one isn't so little any more, and we've seemed to have hit its maximum carrying capacity. I mean, I'm sure it technically carries heavier children, but I'm not sure how you do this and breathe at the same time.

Running low on options, I busted out the oddly named Fresh Shine Baby Hip Carrier and gave it go. I bought it 3 years ago when we had an especially zoftig baby placed with us. I thought surely it would be too big for our our little guy. In fact, he fit perfectly and the carrier has been a total winner.

The Fresh Shine's design has a seat to hold the baby, which puts nearly the full weight of the baby on your hips. This is the same strategy that's been employed by back-country backpacks for years and it works. The result is no back pain and a carrier that feels agile to move in. It's also lightweight and easy to take the baby in and out of. Though doing this is a two person job. We've had success carrying our little guy facing out and in, which gives us the option have him watch the trail or nap.

With the carrier figured out, it was time to plan a hike.

Friday, May 15, 2020

Giving Ionic's Capacitor a Dev Friendly Boost

I recently started a Capacitor based Ionic project. After years of working with Cordova, the framework initally felt jarring. However, with even a bit of use, I'm already buying into Capacitor's benefits. The Cordova approach of generating Android and iOS projects often worked great, but at times the approach showed itself to be quite fragile. Something would change in the iOS world and you'd be at the mercy of Cordova to update the build process to catch up with this. Not so with Capacitor, which embraces the notion of working directly on Android and iOS native projects.

I do however miss a number of nicities that Cordova offered. Take versioning. It seems obvious that there would be a central location where your project's version number was set and the iOS and Android apps pulled from this. And yet, this isn't the case with Capacitor. The thought of having to launch two different IDE's to manually change the app's version number seems like a recipe for disaster.

Speaking of launching IDE's, the thought of giving up command line building and running of apps is another step backwards.

Fortunately, with a bit of shell scripting the versionining and building challenge for Android can be addressed. Building from the command line on iOS is possible but it will take a bit more research befor I get it figured out. I added this functionality to my ionicassist command line tool. It's now possible to say:

  ionicassist android-cap
  ionicassist ios-cap

To push the version number found in capacitor.config.json to both Android and iOS and build and install the Android project from the command line. The source code for ionicassist is below. Most of the code is straightfoward, though dealing with the ridiculous Info.plist format took some work. xmlstarlet and jq both proved invaluable for this little project. 

#!/bin/bash

##
## Scrip to help with ionic dev
##

action=$1 ; shift
case $(uname) in 
  Darwin)
    PLATFORM_TOOLS=$HOME/Library/Android/sdk/platform-tools/
    APK_DEST="$HOME/Google Drive (ben@ideas2executables.com)/Clients/Uchi/APKs/"
    ;;
  
  CYGWIN_NT-10.0)
    PLATFORM_TOOLS=/d/tools/android/platform-tools/
    APK_DEST="/d/Google_Drive_i2x/Clients/Uchi/APKs/"
    ;;
esac

ADB=$PLATFORM_TOOLS/adb

case "$action" in
  grab-apk)
    name=$(xmlstarlet sel -N x=http://www.w3.org/ns/widgets  -t -v '/x:widget/x:name' config.xml | sed 's/[^A-Za-z0-9_-]//g')
    version=$(xmlstarlet sel -N x=http://www.w3.org/ns/widgets  -t -v '/x:widget/@version' config.xml)
    cp -v platforms/android/app/build/outputs/apk/debug/app-debug.apk "$APK_DEST/$name-$version.apk"
    ;;

  grab-release-apk)
    name=$(xmlstarlet sel -N x=http://www.w3.org/ns/widgets  -t -v '/x:widget/x:name' config.xml | sed 's/[^A-Za-z0-9_-]//g')
    version=$(xmlstarlet sel -N x=http://www.w3.org/ns/widgets  -t -v '/x:widget/@version' config.xml)
    cp -v platforms/android/app/build/outputs/apk/release/app-release.apk "$APK_DEST/$name-$version.apk"
    ;;

  screencap)
    if [ -z "$1" ] ; then
      echo "Usage: $(basename $0) screencap {file}"
      exit
    else
      file=$1 ; shift
      $ADB shell screencap /sdcard/screen.png
      $ADB pull /sdcard/screen.png $file
    fi
    ;;


  screenrec)
    if [ -z "$1" -o -z "$2" ] ; then
      echo "Usage: $(basename $0) screencap {file} {duration}"
      exit
    else
      file=$1 ; shift
      duration=$1 ; shift
      $ADB shell screenrecord --verbose --time-limit $duration /sdcard/screen.mp4
      $ADB pull /sdcard/screen.mp4 $file
    fi
    ;;

  adb)
    exec $ADB "$@"
    ;;

  sync-cap)
    cap_conf=capacitor.config.json
    and_conf=android/app/build.gradle
    ios_conf=ios/App/App/Info.plist
    if [ -f "$cap_conf" ] ; then
      version_name=$(cat $cap_conf  | jq -r  .appVersion)
      version_code=$(cat $cap_conf  | jq -r  .appVersionCode)

      if [ -f "$and_conf" ] ; then
        mv $and_conf $and_conf.prev
        sed -e "s/versionCode .*/versionCode $version_code/"  \
            -e "s/versionName .*/versionName \"$version_name\"/" \
            < $and_conf.prev > $and_conf
        rm $and_conf.prev
      else 
        echo "Android: $and_conf not found, skipping"
      fi

      if [ -f "$ios_conf" ] ; then
        mv $ios_conf $ios_conf.prev
        xmlstarlet ed -u '/plist/dict/key[text() = "CFBundleShortVersionString"]/following-sibling::string[1]'  \
                   -v $version_name $ios_conf.prev > $ios_conf
        mv $ios_conf $ios_conf.prev
        xmlstarlet ed -u '/plist/dict/key[text() = "CFBundleVersion"]/following-sibling::string[1]'  \
                   -v $version_name $ios_conf.prev > $ios_conf
        rm $ios_conf.prev
      else 
        echo "iOS: $ios_conf missing, skipping"
      fi

    else 
      echo "$cap_conf not found. Giving up."
      exit
    fi
    ;;

  android-cap)
    cap_conf=capacitor.config.json
    if [ -f $cap_conf ] ; then
      app_pkg=$(cat $cap_conf  | jq -r  .appId)
      ionic cap copy
      ionicassist sync-cap
      cd android ; ./gradlew installDebug
      $ADB shell monkey -p $app_pkg 1
    else 
      echo "$cap_conf not found. Giving up";
    fi
    ;;

  ios-cap)
    ionic cap copy
    ionicassist sync-cap
    ionic cap open  ios
    ;;
  *)
    echo "Usage: $(basename $0) {grab-apk|grab-release-apk|screencap|adb|sync-cap|android-cap}"
    exit 1
    ;;
esac

Friday, May 01, 2020

Review: The Trumpet of the Swan

What feels like a lifetime ago, 10 year old J was visiting us and we had a few moments of downtime. I suggested we have some reading time and grabbed the first book nearby that I hadn't read: Trumpet of the Swan by E. B. White. We took turns reading a few chapters and by the 3rd chapter we were both hooked. J went home and finished reading the book within a week. It took me longer, but I eventually got through it.

--Spoiler Alert--

I'm of two minds about this story. On one hand, it's brilliant and inspiring. The book pulls no punches: Louis is disabled. He can't speak, and for a swan, speaking is nearly everything. Yet, Louis and his family don't let his circumstances dictate the outcome of his life. Through creativity and hard work, Louis accomplishes far more than a typical swan ever would. What a powerful example for a young person who may feel that their differences somehow makes them less.

As a person who thrives on being a fixer, this notion that no personal limitation can't be hacked is pretty much a core belief. So I can't help but applaud the book as it shows example after example of Louis creatively solving his problems.

On the other hand, I can't help but be bothered by how unrealistic the book is. And by unrealistic, I'm not referring to the suggestion that Louis is capable of such high level learning and reasoning. I'm fine with that; it's a story after all. But what I can't forgive is how White allows every undertaking Louis makes to be a success. Louis wants to learn to write, so he goes to school and learns to write. He wants to make money playing his trumpet, so he gets a job at a camp and makes money playing his trumpet.

Shame on White for only giving Louis one challenge to overcome and providing smooth sailing from there. How is that an example any child can learn from? Being a fixer means you're going to fail. A lot. Learning to pick yourself up and try again is what makes the process of self improvement even possible.

Overall, what the book lacks in authentic problem solving, it makes up for with a fun story and clever characters. This is definitely a book you'll want to read and discuss with your kids.