Sunday, October 06, 2013

A Quick Grandpa Visit

I'm typing this on our return flight from a super-fast trip to visit Rochester, NY. We were in town visiting my Grandpa, who was moved relatively recently into a hospice unit.


I fly away from Rochester with two renewed insights. First, it's remarkable the power music has over us. I turned on Pandora, entered in Frank Sinatra, and out started playing "My Town" (or is it "Our Town?" The one about Chicago.) My grandpa, who at the time was basically unresponsive, started moving to the beat and absolutely showed signs of recognition. As my Dad said, the effect is absolutely primal.

Second, I know it's a popular sentiment that we've got our salaries upside down in this world. All the money and fame we lavish on sports stars and entertainers should really be directed to teachers, policemen, and others who serve our society in essential and often under-appreciated ways. I'm now certain that at the top of the salary chart, the Brad Pitt level, belong hospice aids. The people who feed, dress, sit with and give love to those who are fading from this world are amazing to say the least. I simply don't have the words of praise to offer up that can do them justice. I'm in awe. Of course I learned this once before with the wonderful people who took care of my father-in-law at Benincasa, but it didn't hurt to be reminded.

Of course it's sad to see my grandfather in decline. My whole life he's had a spirit and presence that was larger than life. He exuded a warmth and calm that always left me feeling as though everything was going to be OK. In his later working years he owned a clock store and had mastered the skills needed to repair and refurbish clocks. I'd like to think that part of my debugging skills come from him, who no doubt had to be an expert in troubleshooting systems. Sure, they were analog versus my digital systems, but the principles were no doubt the same.

We didn't do a lot of talking this trip, but his spirit, even if dimmed, was absolutely still there.

Below are some random snapshots I took throughout the weekend.



(Captions coming soon. Use your imagination for now.)











Friday, October 04, 2013

Shutdown shenanigans: Trying to be on both sides of the issue

Here's what blows my mind about the the National Park Shutdown controversy: Republicans choose to shutdown the government. If I take then at their word, it's to save me from Obamacare. Fine.

And then they are outraged, Outraged I say!, that people are impacted by the shutdown. How dare WWII veterans be turned away from monuments?!

What did they think was going to happen when you shutdown the government? That nobody would feel it?

Even if the shutdown of these monuments is the the result of some overzealous bureaucrat, that's missing the point. Real people are really impacted by the decision to close the government, and I've got news for you, many of them have far worse repercussions than a ruined vacation.

You simply can't have both ways: priase a shutdown and then proclaim yourself the protector of those who you've impacted. And yet, that's exactly what some Republicans have done.

I've got two words for who think this shutdown is necessary: Own It.

Thursday, October 03, 2013

Teacher Night at the Spy Museum

My sister-in-law made me an offer I couldn't refuse tonight: did I want to tag along with her to the International Spy Museum's Educator Night Out? A museum filled with history and gadgets? How could I resist?! I'd been there years ago, but was overdue for another trip. I'm quite glad I went, as many of the exhibits seemed new to me. And like I said, I never grow tired of looking at miniature cameras, guns and other spy toys. I also forgot how hands on the museum is, giving you the chance to listen in on bugs and crawl through duct work.

Unexpected bonus: they had food and drink. Specifically the Teachertini. Want to make your own, here's the contents: Vodka, White Cranberry Juice, Triple Sec and Lime Juice.

All those teachers, and not one of them corrected my grammar or asked if I had a hall pass. Whew.

Really, it was a blast. Of course, I got photos.

Riding the elevator up to the top of the museum. With funky colored lights, you know this museum is going to be good!

Me, climbing out of the duct work. Apologies for showing some leg.

Like a Ninja! Don't forget my brother David's rule: when entering a room, make sure to clear the ceiling for Ninjas. That's how they get you!

Pigeon powered communication! The perfect hack for Ben; touching and sentimental for Maryn. It was perhaps the ideal exhibit.

You can't see it in this photograph, but this is Maryn successfully lying her butt off. She answered every question right to deceive the simulate security guard. David, good luck buddy. You're going to need it.

Maryn showing off her James Bond athletic skills!

Who's that bond like villain? We may never know.

How could I be in DC and not get the obligatory shutdown picture?

Cousin Andy's First Ethiopian Adventure

We went with cousin Andy and his parents out for dinner at our favorite Ethiopian restaurant last night. Andy's used to exotic cuisine, but still, this was his first try at Ethiopian.

He did great, enjoying all the food and especially the bread. Perhaps it helped that we were all eating like he usually does, sans silverware?

Wednesday, October 02, 2013

Altered Reality: Foxnews.com and the Government Shutdown

Yesterday, while chatting with my brother, he mentions to me: "you're not gong to be believe how they are positioning the shutdown on foxnews.com. Now it's a Government slimdown.

Amazing. Brilliant. Scary.

Shutdowns are bad. Slimdowns are good. You know, healthy. Who couldn't go for a slimdown now and then? So what if it involves sending 800,000 home without pay or keeping kids from getting cancer treatment.

Don't worry, Fox News is on the case for WWII veterans who want to visit their memorial. Kids being sent home from preschool or on food assistance, not so much.

Anyway, I just took a peek at foxnews.com:

It may be hard to see, so let me point out how they've fine tuned the message:

OBAMA ADMINISTRATION'S selective slimdown of government during the budget stalemate ...

That's right. This isn't just a slimdown, it's Obama's slimdown. Unhappy about the particular service being slimmed? It's now the the GOP's fault, it's Obama's. Obviously, he gets to choose what stays open and what closes, right?

Of course not. There's a specific law that governs what can remain open during a shutdown. Failing to follow the law would be a crime in and of itself.

You almost have to give Fox News credit for being so inventive.

You know, I'm almost OK with the notion of shutting down the government. It seems reckless, but maybe the issue at hand is so dire that it's a necessary fallback. Maybe in my lifetime I'll be on the other side, and there will be an issue I feel so strongly about that I'm willing to support such extreme actions.

But rewriting history, and casting this as some sort of a good thing, a healthy thing, that's just perverse. To me, this demonstrates a staggering lack of foresight and empathy. You've just sent hundreds of thousands of people home without a paycheck; is that even remotely fair? You've interrupted research and services that may not be visible to you, but are none the less essential. It's like saying, "well, I don't have cancer, so why do I care if cancer research halts?".

People have been saying all this far better than I. Two items worth your time: Government Shutdownpocalypse Live-blog: Day 1 and Jon Stewart destroys callous Fox News host: F*ck you for mocking the poor.

Tuesday, October 01, 2013

Twisted First Aid: Dealing with a sprained ankle on the trail

As I was jogging down Potomac Heritage Trail with Shira and Dawn, it occurred to me that the odds of one of us spraining and ankle on the rough terrain wasn't all that remote. Do enough of those runs with enough people, and eventually someone's going to be "man down" (as both Shira and Dawn refer to those injured while exercising).

I thought I should do a little preemptive research for field treatment of a twisted ankle. I found these resources especially helpful on the subject:

In my hiking and camping gear, I've started carrying an Ace bandage, which would help with a sprain or a number of other trail related injuries (pretty much anytime you need to apply pressure, which in first aid, is basically always). But for a run, an Ace bandage is kind of bulky. The above techniques uses athletic tape, which should be slightly more compact and just as versatile as an Ace bandage (though, in different ways).

My plan: pick up a roll or two tape, and use Shira as my guinea pig to practice some wrapping. How romantic, right?

Android Dev Tip: forcing a fresh install of an app from the command line

My usual recipe for installing and testing an app on an Android device is:

  make bin/SomeApp.apk ; adb.exe install -r bin/SomeApp.apk

The -r re-installs the app if necessary and keeps existing app data in place.

However, to test a new feature of an app I needed to start from scratch every time. Not too tricky, I just changed the recipe above to:

 make bin/SomeApp.apk; \
   adb.exe uninstall my.package.SomeApp ; \
   adb.exe install bin/SomeApp.apk

However, it may not be obvious your package name was (for me, using Adobe AIR, it wasn't).

Using adb that's easy to find, too. Just run:

   adb.exe shell "pm list packages" |grep -i someapp

This will spit out something like: package:my.package.SomeApp. Strip off "package:" at the start of the line, and you've got your full package name.

This does make me wonder what other tricks adb.exe shell, and the command line Package Manager (pm) may offer. But that's the topic for another blog post, another day.

Gotcha of the Day: Windows 8 refuses to install Nexus 7 Drivers

Every time I plug my Nexus 7 into my laptop to do development, I cringe knowing that I most almost certainly have 45 minutes of driver and cable wrestling ahead of me.

And so it was this morning. I plugged in my Nexus 7 and didn't hear the right set of chirps. When I ran adb.exe devices I saw that no devices were found.

I didn't panic. Being a good little Windows user, I opened up Control Panel » Device Manager and was greeted by the Yellow Exclamation Mark of the Death:

Still, I didn't panic. For the 100th time, I went ahead and installed the Google USB Driver. The process has gotten quite a bit simpler. You can download just the driver here, rather than downloading all of Eclipse and an SDK Manager, just so you can then install the driver.

Regardless, all was going smoothly. I unpacked the driver and using Device Manager was able to browse to the correct directory to update the driver. That's where things went South. Rather than installing the driver I just downloaded and hearing the sweet sound of Angels Singing (aka: the USB chirps associated with a known device) I was shown this screen:

What the heck? This screen popped up immediately, it's like Windows wasn't even trying to install the drivers.

I then tried all the usual things: rebooted my laptop, rebooted the tablet, uninstalled and re-installed the Nexus 7 device from Device Manager. I even downloaded all of Eclipse and grabbed the USB driver using that mechanism. I Googled for everything I could think of. Nothing.

Finally, I thought I found a clue. Within the device event details I saw that the device ID recognized was USB\VID_18D1&PID_D002:

Yet, within android_winsub.inf there's the following block:


[Google.NTamd64]

;Google Nexus One
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E12&MI_01

;Google Nexus S
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E21
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E22&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E23
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E24&MI_01

;Google Nexus 7
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E42&MI_01
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E44&MI_01

No wonder the driver wasn't being recognized, the device was reporting itself with PID D002 and the closest device on file was PID 0D02.

A typo perhaps?

I mucked a bit with the inf file, which actually got Windows to attempt to install the driver. But then it complained about a hash value being off, which makes sense as my edits were almost certainly not Kosher.

Finally, I went back to the device and fiddled around further. After navigating the menus for the 900th time, I noticed that under Settings » Storage there was an additional menu option at the top of the page (that skinny little menu handle that Google is loving, and me not so much). I clicked it, and then selectd USB computer connection.

I then realized that both MTP and PTP were unselected.

For the heck of it, I clicked "connect as" Media Device (MTP).

Doing so caused one of those sweet USB chirps to occur. I switched back to the Device Manager and my unknown Nexus 7 device was gone, instead I had a new section for Android Device:

And that did, all my problems were solved.

I can't even begin to describe how unimpressed I am by this. But, I'm glad it's fixed. And I'm sure next time I plug in the device, I'll have a whole new challenge to deal with.

Monday, September 30, 2013

Wisdom From A Scribe

Yitzchak the computer programmer and sacred scribe had this to say about some Torah repair work he was doing:

The maftir readings for all Jewish holidays occur in Parshat Pinchas. Most established congregations have at least two Torah scrolls, one for the regular reading and one for the special readings when a second scroll is required. Naturally this second scroll is constantly being rolled to Pinchas and then moved around within the parasha. This leads to the section where Pinchas occurs wearing out a lot faster than the rest of the scroll. This week over sukkot, I noticed several damaged letters and even some whole words rubbed out in or around the maftir reading. Apparently this is very common in scrolls only ever used for maftir. In fact, the original yeriot of that section were replaced years ago and this is the second round of fading.

What's this all mean?

Imagine you have a sacred text, hand written on special parchment. And imagine this text is written without vowels or punctuation, so that when you unroll the scroll, you see blocks and blocks of consonants. Now, imagine, you need to turn a special point in the scroll a few times a year to read from a specific portion of the text. If you've got more than one Torah, it's awfully tempting to just set it in the right spot and leave it alone. That way, you don't have to worry about navigating your way around the scroll, and you won't accidentally damage it in the process.

But, as Yitzchak explains, this good intention actually does harm. You end up wearing out that one part of scroll at a faster rate.

In other words: even something as sacred and seemingly fragile as the Torah, Use It or Lose It.

Another programming myth: if you don't code when you're a kid, you'll never be a pro

For some reason, this Wired story really got me into a tizzy: Forget Foreign Languages and Music. Teach Our Kids to Code. The thesis of the article is that you really can't start teaching kids to code young enough. And heck, rather than teaching them to say, Mandarin, in kindergarten, why not teach them how to program? Both are languages, right?

My first thought was back to my senior year of high school. I took my one and only AP course: AP Computer Science. In it, I learned Pascal (on a Mac no less, had I taken the class a year or two earlier, I would have been learning on a mainframe!). I hardly mastered the world of programming (scoring a whopping 2 out of 5 on the AP, the score you get for basically signing your name to the test), but it was enough to teach me I had a genuine interest in the subject, and to give me the skills to do well enough in CS 113, my first CS course at University at Buffalo. And from there, as they say, the rest was history.

At the same time I was learning For loops in Pascal, I was in my 5th (!) year of German class. As far as I can recall, despite years of instruction, I still had a sub-kindergarten level of German at this point. If I think back, I can still remember the teacher imploring us to learn the Die Der Das Chart, whatever the heck that was.

All this is a fancy way of saying, a programming language and a foreign language are not related in the least. The former, even for all it's initial confusing nomenclature (classes, instances, recursion, etc.) is amazingly tidy compared to the exception and massive-amounts-to-memorize nature of the latter. In other words, it's smart to teach Mandarin to kids when they can just absorb it. That's simply not necessary for learning to program.

I'm absolutely a big believer that programming is really problem solving, and that these skills should be learned by all. But the thought of having a 7 year old program Frogger seems silly; better he should be outside *playing* frogger, than inside coding it. Yes, young kids should experience age-appropriate versions of programming concepts like debugging, building abstractions and modularization. But most importantly, they should be working on that often neglected programming skill: using your imagination.

Now, by the time a kid a teenager, there's no excuse for them not to be coding. The recipe seems simple: for every N hours of game playing time, you should have M hours of coding time. Within a summer, any teenager can master all the skills he or she will need to know if this is a field they want to pursue.

Perhaps what annoys me most about this article is the potential formulation of another programming myth: like violin or Mandarin, if you don't start when you're 5, forget about it. You'll never be a pro. Like the persistent myth that programming requires math (What math? Most programs contain no more math than adding or subtracting 1 to a number), this isn't helping anyone.

Finally Putting an Etrog To Use

For years I've been talking about putting the etrog that I use during the holiday of Sukkot to good use. Finally, thanks mostly to lots of effort by Shira, I was able to do this.

While there are a number of recommended uses for an etrog (including an easy recipe for etrog salt) I was hoping I could twist Shira's arm into making me pie. And to her credit, she did.

This morning for breakfast, I was able to enjoy our Etrog Meringue Pie. Yum!

Along with making the pie, I also salvaged the seeds to see if I could get them to grow. I'm sure I did this all wrong, and I have very low expectations. But who knows, maybe one of the three cups of dirt on our window sill will sprout? For a far more touching tale on the topic of etrog seeds, check out this story.

As proof that all this happened, here are a few photos our little project session last night. If nothing else, I've got more ideas than ever for next year!

The before photo:

Hurray, etrog zest!

Seeds. I'm sure decimated my squeezing what little juice is in an etrog out of it:

Seeds in dirt. Yeah, no way this is going to work.

But who cares, cause we've got pie!!!

Wednesday, September 25, 2013

Half a Do It & Carry It Solution

Carryology has a relatively new category of posts known as: Do It & Carry It, where they suggest small DIY projects for carrying your stuff. For example: combine rope & a towel to make a self contained beach backpack.

It's a clever idea, especially on a site where many of the slickest items are on the costly side.

Anyway, I've got half a Do It & Carry It solution worked out, so I thought I'd share. Maybe someone can suggest an easy to finish it off?

First, a little background. It's just about Fall, which means it's almost time to pack in the cargo shorts and bust out the jeans. This means that I'll have a lot less space to cram all the junk useful tools I usually carry in my pockets. On the bright side, though, it's almost jacket weather. And with jackets, comes pockets!

But what about the in between weather: where a jacket is probably overkill, but shorts are out?

Well, here's a possible solution:

1. Start off by collecting your non-essentials. In this case, I've got a Buff, Altoids Tin filled with goodies, a Bic lighter and a moncular (which I naturally left home on this day).

2. Stash all the stuff in the pockets:

3. Fold the jacket:

4. Roll the jacket:

5. Now things get hazy. In the photo below, I used a couple of reflective bike-pant-holder-thingies to secure the jacket. That's handy if you're outdoors, but not so handy if you don't want to call lots of attention to yourself. And then it needs some sort of strap, so you can actually carry it.

So, how could this be made useful?

Tuesday, September 24, 2013

Bringing PHP Templates to MojoMotor

Recently, one of my clients added a site that leverages MojoMotor (MM) to the list of assets that I now help maintain and improve. MM has an almost Perch like philosophy about being a CMS: it's all about being as lightweight as possible. And to the credit folks behind MM, they have managed to put together a lean system.

MM uses a sort of tag based markup language to power its templates. While handy for simple tasks, I vastly prefer using PHP as a template language, rather than something ad hoc. Luckily, MojoMotor is easily extendable and in about 40 lines of code, I had a full PHP based template engine running within MojoMotor.

Now, a MM layout can contain code like:

 <html>
   <head>
     {mojo:snippet:apply path="assets/js" src="foo.js"}
     ...

Which invokes snippets/assets/js.php and sets $src to the value foo.js. Within that file, I may have:

<?
  /*
   * Render a javascript include
   */
  $xcache = calculate_our_cache_busting_value();
  $should_mini = should_mini_files();
  $src = $should_mini ? "/assets/mini/$src" : "/assets/full/$src";
?>
<script src="<?= $src ?>?xcache=<?=$xcache?>"
           type="text/javascript">

Using this tiny function, it's possible to invoke one snippet (PHP template) from within another, making for easy abstractions.

To implement this in MM, I created the following directory structure:

system/mojomotor/third_party/snippet/index.html   (an empty file)
system/mojomotor/third_party/snippet/libraries/
system/mojomotor/third_party/snippet/libraries/snippet.php

Inside of snippet.php is this hunk of PHP code:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/* CHANGE ME: At the top level of the source tree.  */
define('SNIPPET_BASE_DIR', dirname(__FILE__) . '/../../../../../snippets');

/**
 * Snippets are small chunks of HTML code that are
 * imported and evaluated on the fly.
 */
class Snippet {

  public function apply($template_data) {
    $_path = $template_data['parameters']['path'];
    unset($template_data['parameters']['path']);

    if(!$_path) {
      return "Snippet error: no path param";
    }
    if(!file_exists(SNIPPET_BASE_DIR . "/$_path.php")) {
      return "Snippet error: not found: $_path";
    }

    $body = $template_data['tag_contents'];  
    extract($template_data['parameters']);

    ob_start();
    require(SNIPPET_BASE_DIR . "/$_path.php");
    $content = ob_get_clean();

    return $content;
  }
}
?>

I'm sure there are optimizations to made (add caching of snippets, perhaps?), but as a quick and easy way to add a lot of power (and abstraction) to your templates, this approach is hard to beat.

Monday, September 23, 2013

Signs of Fall

On a walk today, I couldn't help but notice this tree with beautiful red foliage:

Trees, so handy for telling the seasons.

Two Northern VA Birding Resources

I was poking around the Kenilworth Aquatic Gardens website, trying to plan a visit, when I found that they offer two seemingly useful PDFs: Common Kenilworth Aquatic Birds and a Bird Relative Abundance Checklist.

In other words, one document helps you name what you think you saw, and the other document helps you confirm it by telling you how likely (or unlikely) your find is.

Field guides can be tricky: too exhaustive, and you can't find what you're looking for; too terse, and they aren't useful. The 6 page Common Birds list looks like it falls neatly between these two extremes.

Review: Instant, The Story of Polaroid

Instant, The Story of Polaroid, is one of those fun books that seems to encourage you to play Monday Morning Quarterback with a well known brand. In this case, Instant neatly lays out the rise and fall and partial-rise again of the iconic Polaroid company. All the key parts of the story are there: you've got the Harvard drop-out genius founder, the Aha! moment, the technical and aesthetic marvel of a product, the mis-steps in the later years and of course, the ultimate downfall (though not quite, Polaroid still putters along to this day).

Prior to picking up this book, I had two memories of Polaroid. First, my Grandpa had an SX-70, a truly revolutionary and remarkable camera. Of course, I didn't know it at the time, but as a kid watching it spit out prints was absolute magic. Second, I can recall our family owning a big, plastic, boxy Polaroid when I was much older. It too spat out prints, though they weren't great quality and they were awfully expensive. I naturally assumed that's what Polaroid was all about: you traded quality and cost for instant gratification.

After reading this book though, I now realize this only a small part of the story. Polaroid made cameras and film beloved by all sort of photographers and artists, including well known artists like Ansel Adams and Andy Warhol. They made large format cameras, super high sensitivity film and yes, cheap-low-quality cameras for kids. All in all, far more depth than I ever gave them credit for.

But enough about the facts, let's do a little hindsight preaching!

Prior to reading this book, I would have probably gone on and on about how both Kodak and Polaroid missed the digital revolution. See, I'd explain, they mixed up their goals and their methods.

A goal is what the brand is ultimately trying to accomplish: Kodak wanted to make photography accessible to all; Polaroid wanted to deliver instant images.

The method is how you accomplish said goal: for both Kodak and Polaroid, this was a combination of camera and film.

Goals are timeless. If you want to get from New York to Los Angeles, your goals are to do it quickly, safely and cheaply. Methods, on the other hand, change. Depending on the year, you might go across the country by wagon train, railway or airplane. Who knows, maybe one day we'll be beaming ourselves to the West Coast.

The problem, I assumed, was that both Kodak and Polaroid confused goals and methods. More specifically, they latched on to the method (film!) and forgot about the goal (making photography accessible). Digital arrived, print died, and while the goals of both companies were still relevant, they were too focused on film to react.

While I think this more or less describes Kodak, it doesn't actually capture what happened with Polaroid.

See, Polaroid's goal wasn't anything particularly abstract. In fact, it was simple: they wanted to allow photographers have instant prints.

And here's the thing, even with all the digital devices in the world, that goal is still a legitimate one. If I handed a kid an instant print from my cell phone camera, they would be just as wide-eyed today as I was when my grandpa handed me a print from his SX-70.

In other words, Kodak needed to somehow morph from a film company to a digital company. Polaroid, on the other handed, just needed to stay Polaroid. Their method may have changed from using film, to using some other printing technique, but logically speaking, there was no need for them to morph into a digital company.

Sure, Polaroid would have had to shrink as company as demand for digital exploded and film was rightfully killed off. But, they would no doubt have received a resurgence (which they have) as people re-learned the power of a tangible photograph.

Put another way, Polaroid wasn't agile or disciplined enough to weather the storm that was digital, even though it alone shouldn't have hurt them.

I suppose the lesson is simple: know what your goals and methods are; hold tight to the former and be constantly in search of replacing the latter.

Hindsight sure is 20/20, right?

As for the book: if you're a photographer, techie or business owner, it's worthy read.

Sunday, September 22, 2013

A sign of the times

What do you make if these signs? Lawyers at work, or are people really that "creative?"

Wednesday, September 18, 2013

Quick Feet

If only this roach was a little slower, I'd have had an easier time capturing a photo of him. Alas, this was the best I could do; a shot of him scurrying away from me.

Review: Longitude: The True Story of a Lone Genius Who Solved the Greatest Scientific Problem of His Time

Years ago, I noticed the thin volume: Longitude: The True Story of a Lone Genius Who Solved the Greatest Scientific Problem of His Time on my Dad's desk. It looked intriguing, yet I ignored it.

Then I visited Greenwich, England where a docent at the museum heartily recommended the very same book. I continued to ignore it.

Finally, my friend Dawn recommended the very same book, even going so far to let me borrow her copy.

Needless to say, I finally read and enjoyed the book. It held up to all the recommendations.

The book has a simple premise: finding your latitude on Earth in the 1700's wasn't that tricky. Calculating your longitude, on the other hand, was dang near impossible. If one could tackle the problem of deriving one's longitude, then navigating the globe becomes a whole lot easier. And once you can navigate, you can do things like exploring, conquering and shopping with ease.

This all made sense to me. I expected, therefore, that figuring out a method of calculating longitude would be the surprising part of the book. In fact, it wasn't. Even in the 1700's scientists and explorers knew *how* to calculate longitude: you simple compared the time of day at your current location compared with that of the current time of the port you left. From there, you did a little math, and poof, you had longitude. Imagine that, somehow the math geeks of the 1700's figured out a way to use *time* to calculate *location*.

While my visit to Greenwich so many years ago left me with the distinct impression that one calculates longitude using time, I'd never had a clear idea how it was done. In the first chapter of this book however, the author explained it, and to my utter joy, I understood. In many respects, using time to calculate longitude is one of those terrific hacks that everyone should understand and appreciate.

OK, the calculation of longitude wasn't the tricky. So what does that leave? Well, calculating the current time isn't particularly very hard (wait until the sun is directly overhead, bam! you just found noon), either. That leaves only part of the equation: figuring out what time it is back in port.

Easy, set a clock before you leave, glance at it when you want to know what time it is. What could be easier? While clocks certainly existed in the 1700's, they weren't nearly reliable or durable enough to put on a ship and remain accurate. And here's the part that blew my mind: the leading scientists of the day assumed that clocks would *never* be that reliable or durable. In fact, they assumed that it would be easier to calculate longitude from the moons of Jupiter than it would be to expect a clock to reliably keep time.

The story of Longitude, then becomes a pursuit to create perhaps the ultimate clock.

In defense of the scientists of the day, it was probably like looking at ENIAC and trying to imagine Google Glass; not an easy proposition.

It shows that not only do we take technology for granted, but we take the rate of technological advance for granted as well. Of course when I was in college 1Gig was a huge hard drive, and now 1,000 Gigs is considered standard; I'd be silly not to expect that. As the hero of our story shows, that just wasn't always the case.

My only gripe with the book is that now it makes me long to go back to Greenwich where I can properly examine the clocks that originally solved the Longitude problem.

Oh, and one other thought: I'll never take a watch for granted again. Even the $8.00 Timex was once the stuff of pure fantasy.

Tuesday, September 17, 2013

DC Around Sunset

The sun is setting earlier these days, which means that about the time I'm heading out for a run all of DC is bathed in the light of a perfect sunset. While running across the Key Bridge, how could I not stop and snap a few photos?

Here's the best of the lot.

Perfect day for some soaring

Is it possible those two large birds circling above me, apparently with white heads and tails, were bald eagles? It has, happened before in the Arlington area. Unfortunately, all I was able to capture with my camera phone was two dots circling above:

And here's another large bird circling the Air Force memorial. Can't even imagine what this guy is:

As expected, they've got the flags at half staff for the victims of the Navy Yard shooting:

Truly a gorgeous day out. Probably one of our few Fall days before we start kvetching about it being too cold.

Monday, September 16, 2013

Arlington Shelter In Place Order

Shira just called to tell me about the Active Shooter in the DC Navy Yard.

A few moments later, I thought I heard a loudspeaker from outside. I cautiously opened my door and this is what heard:

The message:

Attention...all personnel are directed to shelter in place at this time...go to the nearest building and remain inside until the all clear has been announced...

I can't tell where the loudspeaker is positioned, so it might not be intended for the general population. Maybe I'm hearing a message from the nearby Fort Meyer or the Pentagon.

Either way, very spooky.

Update: with no special activity and no Arlington alert message, this was almost certainly a notification meant for Fort Meyer, the nearby base. Like I said, very spooky, but apparently, nothing to be alarmed about.

Pretty Smile, Nice Legs

Here's a snapshot of Shira in front of the waterfall at the end of Windy Run:

And here's a photo of some creepy crawly thing, also near the waterfall:

Review: The Guerrilla Factory: The making of Special Forces Offices, the Green Berets

I admit it, I picked up The Guerrilla Factory: The Making of Special Forces Officers, the Green Berets for some simple arm chair adventure reading. As a member of an elite unit, surely the author would have some incredible stories to share. And he didn't disappoint. The majority of the book is about the trailing Tony Schwalm, the author, went through to become a Green Beret. Indeed, we're talking grueling and exhausting training, the kind of stuff that makes me tired just reading about it. While Schwalm should have every right to brag, I found that he had a certain humility one might not expect. He admits to making and learning from his mistakes, which removes any preachiness from the book and replaces it with even more respect.

Along with training stories, you get to hear about Schwalm's and the Green Berete's involvement in Operation Uphold Democracy. Taking place in 1994, this mission should have been familiar to me, but wasn't. I was glad to get a first person perspective of the action, which from Schwalm's retelling, was a mostly positive one. Even with a poorly defined mission, the troops were able to provide stability for Haiti, doing far more good than harm while there.

The overarching theme of Guerrilla Factory is that teams like the Green Berets offer a unique way of fighting bad guys. Sure, you've got your traditional fighting force with tanks and bombers, and they'll gladly level everything in sight. And yeah, you've got your commando units that will swoop in and wipe out a single target (think Seal Team 6 and OBL) with lethal precision, but there are times when neither of those approaches work well. The Green Berets and other special forces take an altogether different approach: they partner with rebels on the ground, teach them how to fight, and fight along side them. This method of fighting a war has some serious advantages (the indigenous people are doing the heavy lifting, fewer Americans are involved in far off conflicts, you're less likely to lose the respect of the locals if the locals are doing the fighting) and disadvantages (the process is slow by political standards, there's risk that you could be arming the wrong rebel group), but most importantly it should be a tool in the toolbox.

According to Schwalm, the war in Afghanistan started off using this special forces style approach and was successful. It was only when more traditional soldiers were brought in that things got messy and progress was slowed. I don't have enough information to know if what he's saying here is true, but he certainly brings up a fresh (for me) perspective on Afghanistan.

If you're looking for a definitive book on military strategy for history, you should probably look elsewhere. If you're looking for a fun read with excellent stories and a unique perspective on fighting battles, this is the book for you.

Thursday, September 12, 2013

Two Classic Basketball Stories You Should Know

I'm one of those rare breeds: an American male who doesn't follow football, baseball or basketball. Actually, I don't have any sports team preferences. Sure, I enjoy going to just about any live sporting event, but the thought of watching one on TV? No thank you. I far more prefer to watch the commercials, than the actual Super Bowl.

But I do love me a good sports story. I can always depend on my brother Dave to filter out just the best, and pass them along. Recently he shared two classics with me: Magic & Bird - A Courtship of Rivals and The Dream Team. Both are basketball related and both are probably well known to you. But if you're not familiar with these stories (I was slightly with the latter, and not at all with the former), these documentaries are well worth your time.

It's sports at its best: riveting, heartwarming and inspirational.

Watch: Magic & Bird

Watch: The Dream Team

If you've got a favorite sports story, I'd love to hear it.

Wednesday, September 11, 2013

Perfect Moments

It's that time of year again, when Jews spend hours in temple working on a spiritual tune-up for the soul. It's the perfect time for self reflection. Once concept that I've been rolling around in my head is that of the importance of cherishing special moments as they come. That is, rather than trying to work-work-work to make things perfect, and be disappointed when the stars never align, assume that things never will be perfect. Instead, when those precious moments come, grab them, enjoy them, and know that they will pass.

What can I say, I've got a lot of time to think.

Anyway, along comes a Moth Podcast which explains all this far better than I can. So here it is: Perfect Moments by Brian Finkelstein. You can listen to it on the web by clicking here. It's riveting and definitely worth your time.

So enjoy those moments, they come and go in a flash.

Wheezing on Wilson, Running Routes that start in the Clarendon

Shira (and of late, I!) goes to NOVA MMA, a gym located in Clarendon (and down the street from WoW). Whenever I can, I'll go with her to the gym, and run while she works out. Because of the proximity to DC, I've found that the area has some terrific runs. I was on one of those tonight, and I thought it would be worthwhile sharing them.

My plan is to add to this post as I record the routes I regularly take. They all start and end from the same point in Clarendon. If you find yourself in that area, and want to go for a run, maybe these will be inspirational.

More to come as I map more routes...

Tuesday, September 10, 2013

Coming in for a landing

My friend Dawn tells me that Stand Up Paddling (what the folks are doing in the above photo) isn't as hard as it looks (to me). I remarked that it must take serious courage to do it on the Potomac, but she assures me the boards are stable.

I guess I'll have to give it a try and find out.

Can't Quite Explain These Pictures

1. While walking past the the construction that's been going on for months (and has included some pretty dramatic demolition), I came across this time lapse camera hanging around:

I've never noticed a camera in the area before, so I'm wondering why install one now? They've demolished part of the bridge and put up a new one; seems a little late to add in a timelapse camera. Or maybe it was there all along and I hadn't ever noticed it?

2. I'm running up this short connector trail that leads from Rock Creek Trail to the Dumbarton House and I notice this tree crammed full of rocks.

I can't imagine this trail gets much traffic. So what's up with someone spending the time to do this?

Any explanations for either of these?

Monday, September 09, 2013

emacs function: humanifying URLs

Sometimes I need to share a long URL in an e-mail or document with the purpose of making it clear, rather than making it clickable. When I need to do this, I'll rewrite the URL by add newlines and whitespace to ? and & characters and URL-decode parameter values. That turns this:

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCwQFjAA&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEditor_war&ei=k9ktUuz2Kvaj4APCmoGIBw&usg=AFQjCNGrgP7q1TYCPmuQnkgcfMIJKpFHOg&sig2=a6GUXFARKXj6r1JyiNkQ8w&bvm=bv.51773540,d.dmg

Into this:

http://www.google.com/url?
  sa=t&
  rct=j&
  q=&
  esrc=s&
  source=web&
  cd=1&
  cad=rja&
  ved=0CCwQFjAA&
  url=http://en.wikipedia.org/wiki/Editor_war&
  ei=k9ktUuz2Kvaj4APCmoGIBw&
  usg=AFQjCNGrgP7q1TYCPmuQnkgcfMIJKpFHOg&
  sig2=a6GUXFARKXj6r1JyiNkQ8w&
  bvm=bv.51773540,d.dmg

This format makes discussing or catching issues with individual URL parameters much easier.

For years I've used a created-on-the-fly emacs macro to help speed up the above conversion. And while I love keyboard macros I was many years overdue in turning this into an elisp function. Last week I finally corrected this oversight. Here's the code:

(defun url-humanify ()
  "Take the URL at point and make it human readable."
  (interactive)
  (let* ((area (bounds-of-thing-at-point 'url))
         (num-params  (count-occurances-in-region "&" (car area) (cdr area)))
         (i 0))
    (beginning-of-thing 'url)
    (when (search-forward "?" (cdr area) t nil)
      (insert "\n  ")
      (while (< i num-params)
        (search-forward "&" nil t nil)
        (insert "\n  ")
        (save-excursion
          (previous-line)
          (beginning-of-line)
          (let ((start (search-forward "="))
                (end (search-forward "&")))
            (url-decode-region start end)))
        (setq i (+ i 1))))))

(defun url-decode-region (start end)
  "Replace a region with the same contents, only URL decoded."
  (interactive "r")
  (let ((text (url-unhex-string (buffer-substring start end))))
    (delete-region start end)
    (insert text)))

(defun count-occurances-in-region (needle start end)
  (save-excursion
    (let ((found 0))
      (goto-char start)
      (while (search-forward needle end t nil)
        (setq found (+ found 1)))
      found)))

(The usual disclaimers apply: url-humanify is not the most efficient elisp implementation, but it should reliably work. That (set i (+ i 1)) code shows I was thinking PHP instead of lisp; but so be it. At least I depend on thing-at-point to do the URL parsing. Oh, and I've included url-decode-region as a bonus. It's another function I use all the time.)

Now, whenever I have an ugly URL, I just need to execute M-x url-humanify and it all becomes clear.

Hope this saves you some typing.

Update: D'oh - forgot to include the count-occurances-in-region. As @anonymous pointed out, I should probably be using count-matches.

Sunday, September 08, 2013

Precious cargo deposited as our adventure comes to an end

I just flew into Boston, and boy are my arms tired! Actually, my everything is tired. That's because Shira and I have just safely deposited our nephew and two nieces into their Mom's arms / mini-van. It's official, our adventure has been a success! And what an adventure it's been.

Since last Tuesday, when we picked up the kids, we've been raspberry and apple picking, to shul 3 times, watched kids do countless laps around our downstairs and even put on a puppet show. I went to bed every night exhausted, and luckily, so did the kids.

The children really were terrific. Generally, they ate, napped, behaved and slept better than I could have hoped.

Tzipora may only be 2.5 but she showed terrific analytical skills picking just the red raspberries and leaving the green ones alone to continue to grow. She did eat quite a few that didn't make it into her bucket. Dovid, 4.5, is train obsessed. After reading him my favorite kids book, "The Little Engine That Could," a few times, he was able to sit with it and go through it himself, pretty much accurately reciting the text from each page. Chana, also 4.5, demonstrated terrific dexterity helping Shira prepare challah by painting on the egg glaze and helping to set the table.

Over the week, the kids fell in love with Shel Silverstein's poetry, requesting their favorites at bedtime. Most of the poetry seems borderline inappropriate for kids, but that's probably what makes it so much fun. At this age, the kids are such sponges, so as you share a poem once, they want to hear it again and again (especially if it's one about a guy who forgets to put on his pants).

On the first evening, as a sort of experiment, I told the kids that if they finished everything on their plates and helped clean up, they could pick out a sticker. They could then apply the sticker to a hastily created chart I put together. Immediately, they wanted to know what happened once they filled up the chart. Not quite sure what to say, I announced that if they did manage to fill up the chart, they'd get a treasure. Chana's eyes lit up and jumped and down yelling, "TREASURE!" Shira turned to me, and nudged me, you better think of some treasure by Sunday.

By Friday night it was pretty clear that the kids were going to fill up all 10 bubbles I had drawn with crayon. We were going to need some treasure. I mentioned the quandary to my brother and sister-in-law who were over for dinner on Friday night, and without asking, they totally saved the day. Saturday afternoon they dropped off a bag little toys and games for the kids, it was the absolute perfect treasure.

Shira even played along, and on Saturday night, after the kids ate their whole dinner and cleaned up, and we applied the last sticker to the chart we went searching for treasure. And where did Shira hide it? In our treasure chest, of course. That is, she stashed the goodies in the chest we have in our front hall. The kids were overjoyed, and I could breathe a sigh of relief knowing that I hadn't gotten their hopes up only to dash them.

So now it's time to get our lives back together. I'll be getting up tomorrow when the alarm says so, not when I hear the pitter-patter of little feet. I already miss them, but like all good adventures, it had to come to an end. If you ask me, I say it's time to start planning our next one!




View Photos

Tuesday, September 03, 2013

The Mystery of the Empty Stroller

Today we headed back to the airport, stroller in hand, but this time it was filled!

After spending a day ooohing and ahhhing over our new baby niece in Boston, we executed the second stage of our plan. We scooped up the older kids and brought them back to DC. We love traveling with our Maclaren stroller so much (it's lightweight, sturdy and goes through an airport x-ray scanner with room to spare), that we brought it along to use for the return trip. As usual, it worked great.

All three kids did great in both the airport and on the plane itself. Dovid loved looking out the window, Chana held it together even though she kept on announcing that she was afraid of heights, and Tzipora was just zonked out (guess that children's Drammamine does work wonders). Nobody got air sick, or caused a riot on the plane.

The kids will be with us until Sunday, at which point we'll fly them back home and make one final trip ourselves to collapse back in DC.

One thing I can promise: it's going to be a memorable rest of the week!

View Photos

And Then There Were 4!

As you probably guessed, we are now in Boston. And we've now met our new niece, Gavriella Esther in person. She's sooooooo precious, and is an absolute angel, only making the occasional squawking noises when she's hungry or needs a change.

I've got about 900 photos to go through, but here are a few as proof that we are in fact here.

But we won't be here for long. That's a whole other story though, so stay tuned.