Wednesday, May 24, 2017

The surprisingly simple path to a foot powered emacs

I finally got around to soldering the components that power my USB foot pedal:

While it's hardly a polished build, it's currently working quite well. I've found that it's an essential accessory for navigating macOS. To be able to jump from monitor to monitor without moving my fingers from the home row is a joy.

On the Windows side of things, I'd planned to use the pedal to enhance emacs. There were two barriers to this: first, I needed a good key stroke related problem to solve. I've been using emacs for so long that even inefficient key-strokes feel right. The second challenge was figuring out how to integrate the pedal into emacs's keymaps and such. I imagined having to wade through thousands of lines of elisp to figure out an esoteric solution.

Turns out, I was way overthinking things. This article explained more than I needed to know about emacs key handling. It was this snippet that ultimately paved the way for a trivial implementation:

In order to actually bind a key you must first tell Emacs what key you intend to use. Unfortunately there’s more than one way of representing keys in Emacs: as a string, or as a vector. We won’t concern ourselves with either, as we will use a handy macro built in to Emacs called kbd.

The kbd macro translates a human-readable key into a format Emacs can understand.

I had previously coded the foot pedal to send F8 whenever it was pressed. I hesitantly popped into the *scratch* buffer and evaluated the following:

(global-set-key (kbd "<f8>") 'goto-line)

I pressed the foot pedal and emacs prompted me for a line to jump to.

OK, fair enough. But surely setting the foot pedal up to act as a sort of prefix key would require some elisp-fu. After invoking global-unset-key on F8 I tried the following:

(global-set-key (kbd "<f8> r") 'rgrep)
(global-set-key (kbd "<f8> g") 'goto-line)

I pushed the pedal down and typed the letter 'r'. And just like that, emacs asked me what I wanted to search for. I tried the same with pushing the pedal followed by g. That worked to.

Apparently kbd and global-set-key just do the right thing. So much for having to read mountains of elisp code.

I was then left with my initial challenge: how did I actually want to use the pedal to be efficient? For now, I've decided that any command I regularly type M-x, I'll bind to the pedal plus another key. As you can guess, M-x rgrep and M-x goto-line are two common examples of this. I'll definitely be on the lookout for more interesting challenges to solve, but at least it's a start.

Have any suggestions for how I can get put the foot pedal to use? Please drop me a comment below.

Tuesday, May 23, 2017

Capturing the Light-Show Next Door

Last week we had a sweet electrical storm where I managed to grab a few interesting shots of the lightning. For once, we weren't camping *and* I had my camera handy. The results aren't National Geographic worthy, but they're a good first attempt at capturing lightening pics with a smart phone.

These animations are from frames extracted from movies shot with my LG G6. I used VLC to set general bookmarks in the video. I then returned to those bookmarks and used the frame-step command to move frame-by-frame through the videos. Finally, I used the 'snapshot' function built into VLC to take a snapshot of the individual frames. I created the animations themselves by using Google Photo's Create Animation option. I found that selecting fewer frames ultimately gave me better animations.

Next time I'll grab my tripod so the results can be steadier. I'll also shoot in manual mode and fix the exposure to something more sane.

Monday, May 22, 2017

A Whirlwind Mohonk Adventure

Shira and I just spent an absolutely delightful fun filled family weekend at Monhonk Mountain House. Mohonk apparently has a reputation as being an amazing location, with terrific food and services. They delivered on all fronts.

While we only had a weekend to spend there, we still squeezed in every possible activity we could. As soon as we arrived we checked out the stables and made our way over to the pedal boats. I had Tzipora and Chana in my boat, which made for an optimal crew. Chana is tall enough to help me pedal, while Tzipora was eager to play the role of navigator and manned the rudder. Shira was a little less lucky, as Dovid tried pedaling with his arms since he couldn't quite reach and Gavriella just wanted to touch the water. Mohonk sits on a glacial lake which was dramatically carved out of a rock. We explored various nooks and crannies, but alas, found no buried treasure.

We started Saturday morning by taking Dovid and Chana up through the Labyrtinth, a rock scramble that's on par with both the Billy Goat Trail and Old Rag. We climbed up various ladders, down through crevices and generally balanced precariously on rocks. My fear of heights would have probably kicked in, had I not been solely focused on moving the kids along. They had a blast and never once got remotely nervous.

After the hike, it was time for a bit of pony riding. All four kids took a turn riding horses, and had a blast doing so. From there, it was on to fishing and boating in the lake. Dovid landed the only fish of the day, keeping his fishing streak going. And finally, we hit the pool, where all the kids had a blast splashing around. In the evening, we did one last bit of fishing and hiking, before heading off to a scrumptious gourmet dinner.

Before we knew it, it was Sunday and time to plan our return trip home. After breakfast we had a rousing game of chess, and ultimately called it a draw. And just like that, it was time to get back in the car and head to DC.

What our weekend adventure lacked in duration, it made up with in quality. The quality of people, the place, the food, the views and the activities. I couldn't ask for a more fun packed weekend.

Friday, May 19, 2017

You got scratches on your car? I got a guy for that.

A few weeks ago I answered the question can I squeeze Shira's RDX into that narrow spot? with a painfully loud scraping noise. In other words, no.

Shira, like the calm, loving, rational wife that she is, didn't yell at me or buy a new car, but instead arranged to have Saint Auto Paint come by and fix my oops.

Richard couldn't have been nicer, more knowledgeable or more helpful. He presented us with our options: we could try to get away with buffing and paint, or we could do the full panel replacement. Ultimately, we decided to go the buffing and painting route. Here's a before shot:

And here's an after shot:

While the results aren't flawless, I'm quite happy with results, as well as price tag it took to get there. I love that Richard came to us, and he was so easy to work with.

Thursday, May 18, 2017

The Graduate, and Infinite Shrimp

Hurray, Forrest is a graduate! We're so proud of you! Welcome to the real world, my friend.

And check out these eating skills by Spencer! We're proud of you too.

I played it pretty cool at dinner last night, but when I was informed that Forrest is old enough to drink, that's when I lost. Good lord I'm old. What a blessing it has been to watch all 4 boys turn into 4 young men.

Wednesday, May 17, 2017

Weekly Discoveries - Epic Beards, Distopian Tunes and a Week in the Sonoran Desert

If you're one to believe in the correlation between epic beards and epic music, then have I got an artist for you: Ben Caplan. There's a lot passion there, and yes, I'm referring to both the music and his beard.

I'm not exactly sure what the deal is with Brother Ali's Never Learn. I think it might be Islamic rock, or something. Regardless, it's got impressive visuals, a solid beat and the most modest video dancers you'll ever see (who also bring the skills).

Underflow is my favorite tune from last week. The video is a bit whacky, and the first 50 seconds or so of music weren't anything special. But after the first listening, I was hooked.

Through the Valley by Shawn James & The Shapeshifters is eerie and gritty stuff. However, it apparently it was popularized by a video game that's far eerie and grittier. It's the perfect selection for the distopian video series you're working on. .

I enjoy a good video field report, especially on days when I'm working and would love to be outside playing. It's worth pairing two unlikely videos together: Tom Mcelroy's Week in the Sonoran Desert and HarleyWood23's Summer Get Home Bag Test.

Both are examples of individuals hitting the great outdoors to test a bit of improvised camping. Tom Mcelroy is a professional, and his video show cases what happens when everything goes right. In fact, you nearly want to dismiss his videos because everything goes so well; that's just not real life. And HarleyWood23 is a YouTuber who, among things, reviews knives and guns. He attempted to spend one night out in the woods, and ended up having to call it quits. The contrast between the two experiences couldn't be more stark. In the end, HarleyWood23's video is worth watching just to appreciate that it's easy to yap on about how effortless camping is, and when reality doesn't always bear this out. While he made some rookie mistakes, good on him for reporting his failures and actually getting out there and trying.

Watch all the videos here:

Tuesday, May 16, 2017

Creepy, Crawly and a Welcome Distraction

A few nights ago, on a walk, Shira noticed quite a few of these guys on the sidewalk:

Apparently, they are cicadas which have recently emerged from the ground. Cicadas are a pretty big deal around here, coming out on a 13 or 17 year schedule and being quite the DC phenomena. Two notable features: they're loud:

Even if you see no evidence of cicadas, they might make themselves known to you by their deafening songs. “These are among Mother Nature’s loudest creatures,” Raupp said. “The decibels can range upward of 85 to perhaps more than 100 decibels.”

That’s similar to a rock concert or jet airplane flying overhead.

And, they're edible:

After 17 years underground, Brood II cicadas are slowly emerging from North Carolina to Connecticut. Eventually, billions of cicadas will noisily make their presence known along the East Coast, rising from the earth to “sing, mate and die.”

While plenty of people express disgust over the beady-eyed bugs, others take a more creative approach. One way to make use of the swarm: eat ‘em. After all, cicadas are a low-fat, high-protein snack, says National Geographic.

Here's 10 recipes to get you started. Alas, Cicadas aren't Kosher, so I won't be joining you in your snack.

Apparently, this is an off year brood, so it lacks the shock and awe of the regularly scheduled broods. But still, in an area that's so political attuned, it's nice to have something else making noise around here, rather than the latest Trump controversy.

Monday, May 15, 2017

Review: The Boys in the Boat: Nine Americans and Their Epic Quest for Gold at the 1936 Berlin Olympics

The Boys in The Boat: Nine Americans and Their Epic Quest for Gold at the 1936 Berlin Olympics, by Daniel Brown, is a truly remarkable and enjoyable book. It manages to educate the novice about the nuances, challenges and joys of the sport of crew, it puts the reader right in the boat with some of the greatest practitioners of the sport, and most surprisingly, it sheds light on both the great depression and the rise of Nazis in Germany.

While jogging along the Potomac, I'll often see the local crew teams practicing. I've never gave them a whole lot of thought, other than to wonder what must it be like to play a sport where you don't actually see your goal. After reading 'Boys in the Boat,' I certainly have a fresh appreciation for the teams I see splashing around in the Potomac. Nearly all sports are going to be grueling in some way, and nearly all sports are going to reach a level of poetry when practiced at the highest levels. So in that respect, crew isn't unique. But Brown still manages to educate us landlubbers to the point that we can appreciate what these youth are trying to accomplish, and just how small the margin of error for success is.

I really did find my pulse quickening as I read the accounts of our hero's races. I found myself urging them on to win, though I'm not sure how much effect this may have actually had on their chances. Either way, it's a testament to Brown's writing that I can already announce that if this book is ever made into a movie (and surely it will be), the book will be far better than the silver screen edition.

Had the book just been about a remarkable crew team, that would have been enough. But it's about so much more. I've had my share of education of both the great depression as well as the horrors of the Holocaust. Yet, Brown managed to connect me with these events in a novel way and I walked away with fresh insights. I found the descriptions of the thoroughness of the Nazi propaganda machine to be especially chilling, as if torn from the pages of a dystopian novel. In a way, it gave me hope for our country: we're quick to call tyranny on our government and toss around the word 'Nazi', yet compared to actual Nazi's our government is acting like a bunch of school children.

The book is definitely worth your time: it's a well written underdog story, with a nice dose of history. What's not to like?

A huge thanks to my Mother-in-Law who read and enjoyed the book, and I thought I would, too. Great minds think alike!

Sunday, May 14, 2017

Review: LG Style Watch

My journey, years ago, from dumb-phone to smart-phone was a smooth one. I transitioned from my Sidekick device to the famed G1 (the very first Android phone), and was more than willing to overlook Android 1.0's rough edges.

Not all new smart phone owners found this switch so effortless. When some die-hard flip phone users are forced to embrace a smart-phone, the results can be ugly. In many respects, this is exactly what I went through when I transitioned from my Pebble Classic to a shiny new LG Style smart watch.

The first 24 hours with the LG were downright painful. Like that dumb phone user, I pined for my basic, yet functional UI and apps that my Pebble Classic delivered. My LG had plenty of sexy apps, but none seemed to do what I needed them to.

And what's up with this idea of managing apps via Google Play *on the watch* itself? Why would I opt to search for and install apps on a tiny UI, when the Pebble Classic method using the phone was so much simpler.

And don't even get me started on battery life. By noon of the first day, the LG Style's battery was basically dead. What good is a watch that can't make it through a day of use?

Sure, the LG had some neat tricks, like the 'Remote Shutter' app; but those were all just gimmicks. My flip-phone esque Pebble got the job done, and did so with no battery wasting flare.

So yeah, it was a rough 24 hours.

By day two, however, I'd officially decided to give the LG a chance. It would mean learning a totally new user experience, with unfamiliar swipes and presses, but I was in.

As the week went on, I found myself enjoying the watch more and more. The physical 'crown' protruding from the right side turned out to be surprisingly usable. And best of all, AutoWear, which adds Tasker integration to the watch, was quite functional.

I still got tripped over the nuances of the UI, but I was starting to see how Android Wear was going to ultimately make for a far superior watch experience than my beloved Pebble.

After a week of being an LG Style watch user, here's my take on the device.


  • Android Wear 2, while initially confusing, does show quite a bit of promise.
  • The watch is compact and doesn't feel like I'm lugging around some clunky piece of technology.
  • It's got AutoWear, Tasker support. Whoo!
  • With a bit of searching, I've been able to find equivalent apps that I ran on my Pebble
  • With the Pebble I appreciated that I could spool any information I wanted to my wrist, but this information was essentially textual. LG Style lets me kick this up a notch by sending photos and other visual content to my watch. For example, I was trivially able to create an AndroidWear action that snapped a photo and sent said photo to my watch.


  • Battery life. I'm back to functioning like the early days of Android where I'd have to disable WiFi and turn down brightness on my device just to eek out precious moments of battery life. Even with these measures, I've found that I still need to recharge the device throughout the day. The devices does charge quickly, but still, this is silly and not practical.
  • I'm not at all impressed by the choice of round display. Yes, I suppose this makes the device look like an old timey watch, but who cares? I'll take extra screen real estate and functionality over what appears to me to be pure style decision.
  • The LG Style is missing a few key on board sensors, including GPS, compass and NFC. I'm not sure how critical these are. I know that I enjoyed using the Pebble's compass, as it was handy to have a compass right on my wrist. Part of me thinks that if I'm going to invest in a smart watch, I might as well get one that's more tricked out.
  • I wish I could dispense with the charging cradle. Having a smart watch that I could charge with a bare USB cord would be great for travel and other times when I want to charge on the go. I'm sure, however, that there would be a size penalty to offer this, so while I don't like the cradle I appreciate that for now, it's part of the deal.

Ultimately, the battery life is a deal breaker for me. So back to Best Buy the LG Style goes. But I'm psyched to pick up a Zen Watch 3 in its place. Hopefully now that I've gotten my feet wet with Android Wear, I can skip the 24 hours of crankiness.

Thursday, May 11, 2017

Life at the Sea

I'm thoroughly enjoying my little working adventure out here in Monterey, California. The views, flora and fauna along the beach are truly amazing. On the animal side of things, I've seen quite a few harbor seals, many of them fairly close up. Just be thankful I have no way to capture, and relay their smell. Heck, I even saw a california squirrel and what may be western bluebirds. The plants are even more interesting, with many of seemingly torn right from the pages a Dr. Seuss book. I'm not even sure where to begin with identifying many of them.

Good times!


Related Posts with Thumbnails