Tuesday, October 21, 2014

Ancient Laptops and being a Heroic Boyfriend - Text Formatting inspired Stories

You might think a topic like text formatting would be pretty bland. Not so! I have not one, but two stories inspired by the topic. Allow me to share.

I can remember it vividly: I'm 13 years old and working away on my very own laptop. Specifically, a NEC PC-8500, with a whopping 64K (yes kilobytes!) of RAM. I'm typing up an essay for school in the WordStar word processor and having a heck of a time. Specifically, the paragraphs are all askew, with some lines being shorter than others. In the end, I'm left fighting with the computer trying to get the different lines to have somewhat equal length. What a pain.

Looking back, I was running into a fairly classic text formatting problem. Either WordStar had automatic word wrap and I was defeating it by hitting enter at the end of some lines, or it had a manual function to refill paragraphs that I didn't know how to operate. All I know is, this is one of my earliest memories of software appearing to be buggy, but actually performing as designed. Little did I know that I'd pretty much make this fight my life's work by becoming a programmer. Now, on a nearly daily basis I look at software and think "hmmm, it can't possibly be behaving that way...." And yet, it almost always is. And usually it's my fault!

Fast forward from middle school to college for the second story. I'm on Unix Talk with my long-distance girlfriend, and she starts telling me about the arduous task in front of her. She's manually re-formating a massive final lab report. It's taking her forever to adjust each line to the right length. I finally convince her to send me a copy. A minute or two later she receives it back, perfectly formatted. How'd I work this bit magic? Why thanks to the Unix fmt command.

You may be thinking, big deal, you formatted some text. Turns out, it was a big deal. That girlfriend is now my wife of almost 16 years. And when I started describing the story a few days ago, she immediately started mentioning details I'd forgotten. That little bit of unix-manship, is probably in the top 10 list of amazing things I've done for my wife. Never underestimate the power of the command line.

In honor of both those stories, I give you a Scheme implementation of fmt. Incidentally, this answers the first part of the Programming-Praxis Challenge, I've still got the second part to complete.

; http://programmingpraxis.com/2014/10/07/text-formatting/

(define (empty? str)
  (= (string-length str) 0))

(define (++ . args)
  (apply string-append
         (map 
           (lambda (any)
             (cond ((string? any) any)
                   ((number? any) (number->string any))
                   ((char? any) (string any))))
         args)))

(define (g options key . default)
  (cond ((assoc key options) => cdr)
        (else (if (null? default)
                  (error "Missing default: " key options)
                  (car default)))))
            
(define (read-token port)
  (let loop ((buffer ""))
    (let ((c (peek-char port)))
      (cond ((eof-object? c)
             (if (empty? buffer)
                 (cons 'eof (read-char port))
                 (cons 'word buffer)))
            ((equal? c #\newline)
             (if (empty? buffer)
                 (cons 'newline (read-char port))
                 (cons 'word buffer)))
            ((equal? c #\space)
             (if (empty? buffer)
                 (begin (read-char port) (loop buffer))
                 (begin (read-char port) (cons 'word buffer))))
            (else
              (loop (++ buffer (read-char port))))))))

(define (output line port opts)
  (let* ((width (g opts 'width 60))
         (align (g opts 'align 'left))
         (delta (- width (string-length line))))
    (case align
      ((left) (display line port))
      ((right)
       (display (make-string delta #\space) port)
       (display line port))
      ((center)
       (display (make-string (floor (/ delta 2)) #\space) port)
       (display line port)))
    (newline port)))
    
(define (handle-word word buffer out width loop opts)
 (let ((line (if (empty? buffer) "" (++ buffer " "))))
   (if (> (string-length (++ line word)) width)
       (begin
         (output buffer out opts)
         (loop word))
       (begin
         (loop (++ line word))))))


(define (fmt in out opts)
  (call-with-input-file in
    (lambda (pin)
      (call-with-output-file out
        (lambda (pout)
          (format pin pout opts))))))

(define (format in out opts)
  (let ((width (g opts 'width 60)))
    (let loop ((buffer ""))
      (let ((next (read-token in)))
        (case (car next)
          ((eof) (output buffer out opts))
          ((word)
           (handle-word (cdr next) buffer out width loop opts))
          ((newline)
           (let ((peek (read-token in)))
             (case (car peek)
               ((newline)
                (output  buffer out opts)
                (newline out)
                (loop ""))
               ((eof) (output buffer out opts))
               ((word)
                (handle-word (cdr peek) buffer out width loop opts))
               (else (error "Unknown peek token:" peek)))))
          (else (error "Unknown token:" next)))))))

(define in "/sdcard/Documents/input.txt")
(define out  "/sdcard/Documents/output.txt")
(define opts '((width . 30)))

(define (range low high)
  (let loop ((i low) (result '()))
    (if (> i high) (reverse result)
        (loop (+ 1 i) (cons i result)))))

(define-macro (repeat qty . body)
  `(for-each 
    (lambda (i) ,@body) (range 1 ,qty)))

Monday, October 20, 2014

What I Learned on The Trail

This marker wasn't intended to report the distance to the nearest bathroom, as I assumed. But was used to report the distance to Washington City. Or as most of us know it, Washington, D.C.

This graffiti wasn't authored by a fan of poetry, as I assumed to be the case. Instead, it was authored by a fan of Dave Mathews.

I can't find any evidence on the web (so it must not be true, right?), but didn't doors stamped with the word 'Globe' appear on the back of school buses? (As say, built by the Sheller-Globe Corp). If so, why would a door end up in the woods, off of 4 Mile Run?

And here are a few more photos I've snapped within the last week or so. Some are from the C & O Canal, and some are from 4 Mile Run.

Why Macros Matter

Imagine you're a Senior Developer at Big Co and while reviewing Junior Programmer Jimmy's latest set of check-ins you see the following code repeated a handful of times:

  return '$' + 
         new BigDecimal(value).
          setScale(2, BigDecimal.ROUND_HALF_UP).
          toPlainString();

You pull Jimmy aside and explain that the above should really be packed into a function (or method) rather than being written out long hand. In other words, it should read:

  return Format.money(value);

You explain that by doing this Jimmy and the team will gain at least three benefits:

  1. Fewer Bugs. Not only is the function call above shorter, but there's no chance to accidentally forget part of it, or put an erroneous value in place (for example, pass 3 to setScale). And if there was a typo, such as Format.mony, you'd get a clear error message rather than just an oddly formatted value.
  2. Clearer Code. In the original version of the code, the reader has to think in terms of numeric and string operations. If the programmer wasn't familiar with BigDecimal, they might have to open up the docs to see how it's used. In the more compact form, the intention is clear: a value is being prepared for display to a human.
  3. Easier Maintenance. From a maintenance perspective, having the code wrapped up in a single location means that it can be fixed or improved upon with ease. Let's say negative values should be rendered with parenthesis around the value. Making this change to Format.money is trivial, do a find a replace throughout a massive code base, no so much.

Finally, you explain to Jimmy that if he ever finds himself copying and pasting code around alarm bells should sound in his head and he should make the appropriate abstraction.

As an aside, the above can be considered a procedural abstraction. Naturally, programmers love them (and for their sanity, need them!). So much so, in fact, that even if a language doesn't provide an official mechanism for creating procedural abstractions (assembly language perhaps? Old school BASIC?), a clever programmer will find a way to simulate them. Sure, this facility may depend on GOTO and global variables, and it may be fragile and error prone, but it will get the job done.

A few weeks later, Jimmy comes bursting into your office. He eagerly explains that he paid attention to what you suggested and has come across a abstraction that the team should adopt. If they do so, thousands of lines of code will be cleaned up. He goes to the whiteboard to explain. Rather than coding like so:

  private int foo;
  public int getFoo() {
    return foo;
  }
  public void setFoo(int _foo) {
    this.foo = _foo;
  }

The team should write:

  property(int, foo);

After all, he explains, you'll get the same 3 benefits as above, though on a larger scale because we use this pattern all over the place.

You're then left with the unfortunate task of explaining to Jimmy that while he's right, it's not so simple. Yes, they should create such an abstraction, but their language of choice (in this case, Java, Circa 2000) doesn't allow for this. That's because what's called for here is a syntatic abstraction rather than a procedural one. In fact, very few languages give you this capability.

Still, programmers are a clever bunch. Just like our Geek Forefathers and Foremothers who made do before reliable procedural abstraction, those lacking syntactic abstraction will find a way. In Java, for example, the above problem may be solved by using the Eclipse to generate the code. In PHP, you could simulate the above using property overloading. And when all else fails, you could run your source code through GNU m4. However, at the end of the day, these methods are all relatively fragile when compared to true syntactic abstractions.

And what language provides such a capability? Why, Scheme does, and the facility goes by the innocuous sounding name macros.

Learn Scheme. Learn Macros. Learn what you've been missing out on.

Thanks to Grant for helping motivate me to write this post.

Wednesday, October 15, 2014

Gotcha of the Day: Creating macros from within Gambit Scheme on Android

One of the most powerful features of Scheme is the ability to create macros. That is, along with the procedural abstractions most languages allow you to create, you can also create syntactical ones (I've got at least one blog post worth of stuff to say about this, so I dare you to ask me more!). While working on a Scheme Challenge on my cell phone, I wanted a quick way to repeat some code. Specifically, something along the lines of:

 (repeat 10
   (display (read-token in)))

(That is, I wanted to read and print the next 10 tokens from the input port in)

This is an easy enough macro to write in syntax-rules so I got to work. I quickly ran into an issue: define-syntax wasn't defined in the Gambit instance I was using. I tried a few other guesses and finally gave up, figuring I'd poke around the manual when I had a chance.

Sure enough, the manual had an explanation: define-macro is available by default, whereas define-syntax requires an add on module. While I'm no fan of define-macro, for my purposes it would work fine. I went ahead and put the following in ex1.scm, the file containing my answer to the exercise I was working on:

(define (range low high)
  (let loop ((i low) (result '()))
    (if (> i high)
        (reverse result)
        (loop (+ 1 i) (cons i result)))))
        
(define-macro (repeat qty . body)
  `(for-each (lambda (i) ,@body) (range 1 ,qty)))

I then ran my (lex) procedure from the REPL. To my surprise, the file loaded.

I then went to test my code:

(repeat 10 (display i) (newline))

To which the interpreter rudely responded:

*** ERROR IN (stdin)@2.2 -- Unbound variable: repeat

What the heck?

After a couple of more attempts I realized that I could use repeat within ex1.scm, but any attempt to use it from the REPL resulted in an unbound variable. When in doubt, read (or in my case, re-re-read) the manual. Which explains:

The scope of a local macro definition extends from the definition to the end of the body of the surrounding binding construct. Macros defined at the top level of a Scheme module are only visible in that module. To have access to the macro definitions contained in a file, that file must be included using the include special form. Macros which are visible from the REPL are also visible during the compilation of Scheme source files.

(Emphasis added by me)

I updated my (lex) procedure to be defined as:

 (define (lex)
  (include "/sdcard/Documents/ex1.scm"))

And what do you know, it worked! The REPL can now see and use the repeat macro.

In the future, I may mess around with loading the syntax-case facility into Gambit. This actually doesn't look like a particularly hard thing to do, I just know that when I attempted to load this file my phone churned on it for quite a while before returning an error. That makes me think this may be asking for a bit much from my Android. Regardless, define-macro gives me plenty of power, and I'm using it on a small enough scale that its unhygienic nature shouldn't do too much damage (famous last words, right?).

Finally, two other useful bits of info if you're playing around with the Gambit REPL on Android:

1) If you hit run next to the "Start REPL Server" example you can use a program like netcat to connect to the REPL for your laptop. This let me fiddle around with Gambit on my phone while using my laptop's keyboard and display. This is a classic trick, but one that never ceases to amaze me when I use it.

2) If you type ,? at the REPL prompt you'll gain access to a number of debugging commands. I haven't quite figured out the various "REPL levels" yet (that is, what's meant when you have an error and Gambit changes the prompt to 2>). But I now know I can jump to the top level by typing ,t.

Tuesday, October 14, 2014

The Running Shoes I Want vs. The Running Shoes I Need

My dream pair of running shoes are minimalist, ultralight, highly breathable and as long as I'm making demands, affordable. Thing is, I own these shoes and to be perfectly blunt, they're awful. Problem is, they deliver on the promise they make: running with them is like running barefoot. Running barefoot is great. That is until you land on a tiny sharp stone. You know, the kind that your buddy in Nikes doesn't even notice. Depending on the size and shape of the rock, the result is somewhere between painful and dangerous.

So while I still keep an eye out for times when I can run in my ultralights, I knew I needed a sturdier shoe for both road and trail running. Enter the Merrell Men's Ascend Glove running shoe. It promised to be a minimal running shoe that was also trail friendly.

The Merrell's arrived and didn't strike me as being particular 'minimal.' Sure, they seemed relatively lightweight, and they have the 0mm drop between the heal and toe going for them. But still, I was skeptical.

I've now taken them out on multiple runs, walks and even used them to climb Old Rag. Any concerns I have, have since evaporated. I'm officially impressed.

The Merrell's are comfortable to run in and the mesh top provides noticeable breathability. I suppose they aren't ultralight, but they're certainly far lighter than Shira's trail runners. Most importantly, the soles are protective enough to let me tackle any terrain I want. From a rocky path to the construction zone at the end of our street, I no longer have to feel like I'm running through a mine field while out for a jog. They Just Work.

In the end, the 'Ascend Glove' appears to be the right balance of lightweight and minimal construction that I want, and the protection and functionality that I need.

Monday, October 13, 2014

Taking a Bite Out of Rochester

This past weekend Shira and I visited family in Rochester. Sunday arrived and we weren't quite sure what activity would work for everyone. After a bit of research, Shira suggested the Annual Apple Tasting Tour, an event nobody in the family had ever heard of. The goal is to visit a bunch of apple farms in the area (specifically in Wayne County) and, well, taste the apples. We figured the scenery alone would be worth the trip. So, we all crammed in the car and off we went.

We ended up making it to two farms and a distillery (more on that in a minute). For once, Rochester weather cooperated, and we were treated to a perfect fall day. Slightly crisp but with lots of sunshine. The apples were quite tasty, and the foliage along the way was downright stunning. While the notion of heading off to Wayne County evoked images of trekking out in the wilderness, it was actually all of about a 25 minute drive. It continues to amaze me how little of the Rochester area I've seen, even though I grew up there (or perhaps, because I grew up there).

An unexpected find in the area was Apple County Spirits, a distillery that specializes in fruit based spirits. They offered tastings of various hard ciders as well as an Apple Vodka and a couple of other hard alcohol choices; one from apples and one from pears. My Mom, whose favorite drink is hard cider, was in heaven. And then there's this thought: when Passover rolls around, most hard alcohol is off the menu because it contains grain. But these varieties come from fruit! With the right certification, they could be the perfect Passover option. Not to mention, without grain, they are gluten free. Regardless, my parents and I quite enjoyed the distillery.

We made one other stop along the way, though this one wasn't on the Tasting Tour. We stopped by our childhood Buddy, Aaron's house, which happens to be just a couple of miles from the farms we were visiting. It was a huge treat getting to catch up with him, and I'm still trying to fully process the fact that not only does he have a 2 story former barn as a garage and a riding lawnmower, but he's got chickens in the backyard! He even gave us a dozen fresh eggs to drive home the point. I'm impressed!

All in all, everyone had a great time. Apples were tasted, alcohol was drunk and I got to take lots of photos. It was a perfect day!

View Photos

Wednesday, October 08, 2014

3 Trail Running Hacks: Duct-Tape, Doggies and Daylight

As long as I've got trail running on the brain, here's a few tips I've come across of late:

A Mini Blister Control Kit -

[A] couple weeks ago while enjoying some epic trail time with a good friend Matt. I rarely have blister issues but five miles into a 17 mile run I had created a whispering hot spot on the outer edge of my right heel. By mile seven, it was rather annoying. I tried various lacing adjustments, readjusted my socks, looked for a boulder positioned at the back of the shoe…nothing provided the continuous relief I was looking for.

After a brief regrouping at our vehicles, I dug through my run bag looking for some Body Glide or tape…nada. Fortunately, Matt dug though his center console and found an old tube of a lip therapy product. I gave it a try and rubbed a bit of the lubricant on the tender hot spot and my foot enjoyed the final 10 miles without any discomfort. Niiiiicccee!

From this experience, the author suggests a handy blister kit:

That would be a tube of lip therapy wrapped in a length of duct tape. Very clever. I carry athletic tape in my trail running kit, so I've got half the tip already implemented.

Read the whole article here: Trail Running Hack: Blister Control Kit

A Doggy Drinking Idea - I can't say that I've ever gone for a run with a pup before. But, I thought this tip was worth knowing and a mention regardless:

One trick I use is to take a clean doggie poop bag (weighs nothing to carry), make it into a dish-shape, and pour water into it, holding the bag in place while she drinks. I have also dug a small hole or indent in the ground, and placed the bag over that. The water pools in the hole, held in place by the bag, and she drinks from there. I can then cover the hole back up and move on.

Maybe this one is obvious to dog owners, but I was impressed. Read the whole article here: 12 Reasons Handheld Bottles Are Better Than Hydration Packs.

Use your GPS to tell you how much daylight you have remaining - I originally downloaded the Android App GPS Test, to well, test Shira's GPS. It turns out, however, that the app is useful for more than just getting diagnostic info about your device's GPS. Using nothing but the GPS on the phone, it can report heading, speed and altitude. And to my surprise, it also reports the sunrise and sunset:

Now, getting your cell phone to cough up sunrise and sunset time is pretty trivial. Just Google for it and you'll get an instant answer. But, GPS Test works its magic without requiring a network. And because I've got T-mobile, pretty much anytime I'm out in the woods, I expect to be without signal.

As long as I've got my phone, I've now got a good sense of how much daylight I've got left. Whether that will help me to actually turn around or not is another story altogether.

Tuesday, October 07, 2014

Miva Merchant for Code Geeks; Or how I fought against the default Miva dev model and sort of won

Miva Merchant? Let's Do it!

I've got a relatively new client who's current platform is MivaMerchant. While he's open to switching to a new platform, I'm hesitant to do so without a firm grasp of his business and what the pros/cons of Miva are. So for now, I need to become best buds with Miva.

Doing a few Google searches turned up MivaScript.com, which implies that Miva is, well, scriptable. And while the syntax appears to be on the clunky side (it's XML based, so that is to be expected), it does look relatively complete.

As I dove into my first few projects, I started to come up to speed on Miva. The video tutorials are well done, the admin tool quite complete, and template language (audaciously named Store Morph Technology aka SMT) looked promising.

But wait...

As I started to truly build out my projects I kept running into two questions: (1) where's the flat file interface for the templates, and (2) when do I get to start using MivaScript?

While the admin UI is nice and all (there's a basic version control system built in), it's hardly the ideal environment to work on large template files (which are a mix of HTML and special tags). Or put more bluntly, I want to use emacs to edit content, not a text area in Firefox. Surely I was missing something. Finally I broke down and filed a ticket on the topic. The tech rep said she'd call me to discuss; and sure enough she did. She explained to me that you *have* to use the admin UI, there is no file interface. Apparently, the Miva techs work by copying and pasting content into a text editor, making changes, and copying and pasting it back.

While the tech was very nice (and again, promptly called me), surely she must have just been misinformed. Miva can't expect professional programmers to build sophisticated stores by copying and pasting code. Can they? Even if I'm OK with all this copying and pasting, how am I supposed to use a real version control system or do an automated deployment, if all the source code needs to live in an HTML admin tool?

I took my quandary further up the Miva chain. (Which again, I give them credit for having as an option.) I finally spoke to a senior developer and he told me that the tech's understanding is correct. They are aware of the limitations of the admin UI, but it's the only way they currently support using Miva. I got the impression that future versions of the product may help address this issue.

OK, I'll learn to love the admin UI. My work around for now is to keep a version of the templates found in Miva in a local source repository. The content of the PROD page for example, is stored in: admin/Pages/PROD/Page.smt.

And it gets worse

Issue number (2), however, points to a potentially larger concern. After a bunch of research I learned that Miva Merchent itself is written in MivaScript< and while the templates themselves understand SMT tags, they don't process MivaScript. In other words, your typical MivaMerchant developer never writes or even encounters MivaScript. Fair enough. But how do they modularize code? That is, how do I void duplicating code in templates, and how do I keep my templates from growing out of control? Looking at the template language of choice, there didn't seem to be a way to include code. Without a basic include statement, how can I achieve any sort of modularity?

I ran these questions by the nice tech that called me. The short answer was, there is no way to do this. At the senior tech level, he mentioned something about setting up custom items that would appear in the UI as their own editable regions, and then I could include those items at will. This is somewhat promising, but that means embracing the the admin UI even more.

All this left me pretty disappointed with Miva. There simply had to be a way to make it more developer friendly.

A first attempt at a fix

If the standard set of tools weren't going to give me what I wanted, what about building out a custom extension or two? I make custom plugins in WordPress all the time, how hard could it be to do in Miva? This seemed promising, as extensions are written in MivaScript, so I'd get power of a full programming language instead of making do with an admin UI and the basic SMT language. Alas, after a few days of analyzing extensions (you can see lots of examples in the source for MivaMerchant provided here (and you'll need the compiler here), I finally had to throw in the towel. Between the fact that MivaScript is a language unto itself, and my lack of understanding of how MivaMerchant operates, I'm just not ready to create extensions for it. I had to surrender.

And the real fix

But still, I wasn't ready to give up on my dream of a move developer friendly Miva experience. And then I found the missing piece of the puzzle: the External File Pro v5+ module. This bad boy allows you to invoke a MivaScript function in an arbitrary file, and it places the result in an SMT file of your choice.

Let's take a specific example to see how this module can save the day. Suppose you want to customize your title tag depending your product name. You could head over to the PROD page and put in some code like this:

<mvt:if expr="l.all_settings:product:name EQ 'Iguana'>
  <title>Love Lizards! Buy an Iguana Today!</title>
</mvt:if>
<mvt:if expr="l.all_settings:product:name EQ 'Turtle'>
  <title>Totally Turtles! Buy an Turtle Today!</title>
</mvt:if>
...

But, that code is messy and hard to maintain. Ideally, it would live in its own function, in its own file. That's where External File Pro comes.

The first order of business is to buy and install the External File Pro v5+. Once you've enabled the module and associated it with the PROD page you're ready to get to work.

I created a MivaScript source file: /mm5/snippets/seo/title.mv. The path is totally arbitrary. I plan to organize all these includes as snippets, and this particular one is related to SEO. Hence the naming. Note, the source file is .mv. The actual MivaScript file looks something like this:

<MvComment>
  Generate our Page Title in a smart way. If we can make a better title than the default one, then
  go for it.
</MvComment>

<MvFUNCTION NAME = "ADS_External_File" PARAMETERS = "module var, item, all_settings var, settings var, ignored" STANDARDOUTPUTLEVEL = "text, html, compresswhitespace">
  <MvIF EXPR = "{ l.all_settings:product:name EQ 'Iguana' }">
    <MvEVAL EXPR = "{ '<title>' $ 'Love Lizards! Buy a ' $ l.all_settings:product:name . ' Today!' $ '</title>' }"/>
    <MvFUNCTIONRETURN />
  </MvIF>

  <MvIF EXPR = "{ l.all_settings:product:name EQ 'Turtle' }">
    <MvEVAL EXPR = "{ '<title>' $ 'Totally Turtles! Buy a ' $ l.all_settings:product:name . ' Today!' $ '</title>' }"/>
    <MvFUNCTIONRETURN />
  </MvIF>

  <MvEVAL EXPR = "{ '<title>' $  $ l.all_settings:product:name $ '! Buy one Today!' $ '</title>' }"/>
  <MvFUNCTIONRETURN />
</MvFUNCTION>

Notice that the function is named ADS_External_File. That's a requirement of the External File Pro plugin, and serves as the entry point to our snippet.

This file needs to be compiled to a .mvc file. I'm using a simple Makefile to accomplish this:

## Makefile for building our MivaScript function files

export PATH := /c/tools/miva/msc/BIN:$(PATH)
RM  = rm
MVC = mvc.exe  -B 'c:\tools\miva\msc\BUILTINS'
SNIPPETS = seo/title
SRCS     = $(addsuffix .mv, $(SNIPPETS)))
COMPILED = $(addsuffix .mvc, $(SNIPPETS))

all : $(COMPILED)

%.mvc : %.mv
 $(MVC) $<

clean :
 $(RM) -f $(COMPILED)

With the command:

  make ;  sitecopy -u dev.mysite.com

The snippet is compiled and pushed to the server.

Finally, in the PROD Page template I put in a call to the snippet:

  <mvt:item name="ads-extfile" param="function|/mm5/snippets/seo/title.mvc"/>

And I'm done.

Whoo!

I've now got the ability to create arbitrary functions in MivaScript and pull their contents into an a template. This gives me the modularity and maintainability I was after, and opens the door to streamlining development of complex functionality. Looks like Miva and I may indeed be best buds after all.

Monday, October 06, 2014

Challenge Finally Accepted - Climbing Old Rag

For years I'd considered dragging Shira out to one of Virginia's most challenging and beloved hikes: Old Rag Mountain, but my fear of heights always kept me from suggesting it. Shira solved this problem earlier in the week by saying she'd like to tackle it. Between that and my brother's assurance that I'd have no problems, the deal was sealed. We'd do Old Rag.

And we did!

Old Rag is essentially a 9 mile hike split into three parts. There's a slog up hill through switchbacks, and there's a long downhill that starts on steep trail and finishes with a couple miles on a gentle downhill road. And in between there's the Rock Scramble; it's this mile plus section that kept me away from the hike for so long.

How to describe the rock scramble? It's essentially a collection of obstacles that require you to shmoosh between, over and/or under various rock formations. For example, the first challenge you encounter is described as a "12 foot deep crack" that you have to slither into. You can see why I was wary of this hike. While some of the sections are ridiculously steep, they thankfully never triggered my heights fear. I think that's because the rocks were fairly sheltered, and one never quite feels like falling off a cliff is an option. One of the early rock scrambles does potentially have you going close to a ledge, but I opted to scoot on my tush under an overhanging rock, rather than stand up and face the drop off. Pride, for me anyway, was the first thing to go on this hike. There's definitely an instant sense of community on this hike. We helped random strangers, and random strangers helped us. There was no ego on the mountain, just a sense that we're all going to get this done.

Now that I've gotten through the rock scramble I can look back and say it was actually fun. There were a handful of times when I thought, "there's simply no way," and yet, we always found a path that worked. Having Shira and Dawn as cheerleaders made all the difference.

This truly is a unique hike, and the fact that it's less than 2 hours from DC makes it even more amazing.

If you're in good physical shape, then Just Do It! I promise you won't be disappointed. Just be prepared to spend 5+ hours on this project (the hike took us 5 and a half hours). That plus the drive time means this is a full day adventure. But, what an adventure it is!

View Photos

Trail and Road Running Kits, v2.0

There's a thread over at edcforums.com that I wanted to contribute to: Your EDC in the woods. I was thinking I'd post my Trail Running Kit (v1.0) as it's the minimum amount of gear I take into the woods (add a water bottle and some snacks, and I'm good for nearly all the hiking I do). However, it occurred to me that the photo there was a bit out of date. So here it is, an update to my running gear.

First off, I'm now using two belt packs for running. No, you'll be happy to know, they don't get worn at the same time. One is for road running and one is for trail running. The trail kit inspired me to carry a few essentials while road running, and to date both kits have come in handy on a number of occasions.

First, here's the trail kit:

This includes:

  • Keychain which includes: compass, Derma-safe razor blade, Photon X-Light, House Key, Pill container with a Bendryl and Migraine medication, Nitecore NWS10 whistle, safety-pin, USB thumb drive / Micro SD Card Holder / Micro SD Card, P-51 Can-opener with paper clip to keep it closed
  • Heatsheet mylar blanket
  • Athletic tape
  • KT Tape
  • Handkerchief
  • Bic Lighter
  • Galaxy S5 Android Phone

Note, the keychain is the standard one I carry around. I just drop it into the pack, and it gives me most of the outdoorsy stuff I could need. The tape has been useful on a number of occasions as has the hanky. The Bic Lighter is strictly a Boy Scout item; there's something about going into the woods that makes me think I should have a way to start a fire. The setup fits nicely in the Amphipod AirFlow Microstretch Belt pack, which stretches to fit everything. There's even room to squeeze in extra goodies, if need be.

The road running kit is similar but exchanges the emergency blanket and Bic Lighter with more city-friendly items:

  • Keychain (the same one as above)
  • Athletic tape
  • KT Tape
  • Handkerchief
  • $20 bill
  • Credit Card
  • Galaxy S5 Android Phone

I actually called up my credit card company and ordered a second card which lives permanently in this kit. They were glad to send me one, and I don't have to worry about forgetting to replace the one in my wallet. This kit is smaller and fits well in a waterproof SPIbelt.

When going on a run, I grab the appropriate kit for the terrain, and I've got all my bases covered.

LinkWithin

Related Posts with Thumbnails