Friday, June 09, 2017

A Better Blurl: list posts by label, patch posts and other command line blogging goodness

I'm trying to avoid shaving the yak here, but having limited success.

The labels (or tags, as every other blogging platform calls them) on my blog are a mess and I'd like to clean this up. I can do this by hand, but the Blogger procedure for doing this is painfully clumsy to use. What I really want is a command line utility that lets me update labels in bulk. I can't seem to find such a utility, so I'll have to build my own. This isn't as hard as it sounds, as I've previously develoiped blurl, a lightweight Blogger command line tool.

blurl, however, lacked some key features to allow me to develop my label fixing utility. I've now addressed those shortcomings. The latest version of blur, which you can grab here has the following features added to it:

  • The tool now returns all results, not just the first page's worth. In the past, if you asked for a listing of posts, you got the last 30. Now, you'll get every single post on your blog.
  • The list function can optionally accept a label, which will narrow the results to just that label.
  • The tool can now run a search and return back all matching posts.
  • The tool now supports PATCH'ing, which allows you to update a post without having to re-specify every aspect of the post. For example, you can just change the title of a post and leave the content and labels unspecified and unmodified.

With these new changes in place, I should have no problem building my mass-label-changing utility. Stay tuned.

Here's a few examples of the new blurl functionality at work:

# Grant blurl access to my blog
$ blogger_auth -c blogbyben init
https://accounts.google.com/ServiceLogin?XXXXXXXXXXXXXXXXXXXXXXX
Code? XXX
Done

$ export BLURL_AUTH_CTX=blogbyben

# Find out the unique ID of my blog and store it
# in the environment for later commands to use.
$ blurl -a info  -u https://www.blogbyben.com/
12753102:Ben's Journal
$ export BLURL_BLOG_ID=12753102 

# Last 3 posts in 'reviews' (that's plural)
$ blurl -a list -l reviews | head -3 
2534412822419131921:Review: ASUS ZenWatch 3 - Top quality reviews, but a wait-and-see experience
8359106005748061573:Review: Personal: A Jack Reacher Novel
7209997068661197075:Review: The Boys in the Boat: Nine Americans and Their Epic Quest for Gold at the 1936 Berlin Olympics

# Last 3 posts in 'review' (that's singular)
$ blurl -a list -l review | head -3
5631052962590454401:Review: The Time Traveler's Wife
6292599222302015512:Review: A Partial History of Lost Causes
5153762744021255090:Review: Containment

# Move one post from 'review' to 'reviews'
$ blurl -a patch -i 5631052962590454401 -l 'reviews, recommendations'
http://www.blogbyben.com/2017/01/review-time-travelers-wife.html

# Confirm it worked
$ blurl -a list -l reviews | grep -i time
5631052962590454401:Review: The Time Traveler's Wife

$ blurl -a list -l review | grep -i Time
1390162071521669374:Review:  A Tale for the Time Being: A Novel
7280970208702975504:It's Summer Shoe Time -- Giving A New Minimalist Shoe A Chance
1389130645758623727:Review: Longitude: The True Story of a Lone Genius Who Solved the Greatest Scientific Problem of His Time
3086195861781100501:Review: 30 Things Every Woman Should Have and Should Know By The Time She's 30
7655086660726473861:Review: The Life and Times of the Thunderbolt Kid: A Memoir
1579868997134332395:Killing Time In Recovery

Wednesday, June 07, 2017

Review: ASUS ZenWatch 3 - Top quality reviews, but a wait-and-see experience

My roller coaster experience with the LG Style Smart Watch left me thinking I'd successfully acclimated to the world of modern smart watches. To recap: I started off hating the watch, as it failed to outperform my old stand by, the Pebble Classic. However, after a week of use I found that I was growing attached and could see the potential of the device. Ultimately, I decided that the battery life really was too poor to be acceptable, and so back to Best Buy the device went.

I purchased the LG Style because it was relatively low cost, and while plenty of reviews I'd read said to pass on it, I decided not to listen.

For my second time around, I though I'd give more credence to the reviews and ultimately opted to get an ASUS ZenWatch 3. It received plenty of positive reviews, and I figured with my LG Style experience behind me, it would be smooth sailing. Sure that leap from a dumb phone to a smart phone is painful, but usually going from one Android device to a new, higher praised mode, is a breeze. Oh, how I wish it were so.

I picked up the ZenWatch 3 and very quickly found myself both unimpressed and confused. Unimpressed because it was significantly heavier and chunkier than the LG Style, and it replaced the functional and elegant 'crown' with three ugly buttons. Yes, the watch contained a speaker, which meant that I could finally take calls on my wrist. But the quality of the phone experience from the test calls I made just gave me more reasons to be unimpressed.

And then there was the confusion. While there were similarities between Style and the ZenWatch, I found myself befuddled by the ASUS's user experience. I thought I had figured out how to navigate an Android Wear device, but now I wasn't so sure. Just the simple act of managing apps was totally different between the two devices. So much so, that I had turn to Google for help on this basic operation.

Ultimately, I owe my friend Nick a big thank you for clearing up my confusion. The ZenWatch 3 comes with Android Wear 1.5, while LG Style had Android Wear 2.0 on it. I may have upgraded hardware, but I took a step backward in the world of software. I assumed that with the rave reviews on the ZenWatch 3 that it must have had the latest watch OS. Apparently, not true. From poking around on the web, I'm told that the ZenWatch 3 will get an upgrade to Android Wear 2.0 any day now.

Part of me wanted to ditch the ZenWatch 3 and go back to svelte Style. However, the ZenWatch 3's battery does appear to significantly outperform the Style. And while the buttons are ugly, they are convenient. At some point, the software upgrade should come through, and I'll be all set in that department. Ultimately, I've decided to stick with the ZenWatch. I'm hoping it's upgraded hardware will pay off in the long run.

I am, however, refusing to learn Android Wear 1.5 in a degree of detail. Once I get AW 2.0, I'll get back to focusing on figuring out clever ways to use the watch. For now, I'm just digitally treading water; using what works and leaving well enough alone.

Should you run out and buy a ZenWatch 3? Uh, give me a few more months on that question. For now, your guess is as good as mine.

Tuesday, June 06, 2017

Weekly Discoveries

Last week I was out on Wednesday and Thursday, which meant that I came back to quite the inbox on Friday. The solution: bagpipe music, obviously. That eventually led me to this song from the movie Black Hawk Down. Great movie, and great tune.

Morgxn's Home is a well done video that captures the both the pain of not fitting in and the joy of finding like minds. It's a solid tune, too.

You know the old story of the two space suit wearing strangers on the street? Well you will after you watch Andrew McMahon in the Wilderness's So Close. I suppose it's sort of related to Morgxn's Home (both in theme and embracing dance), but it's quite bit less intense. Dance off, anyone?

And truly lighten things up, check out Emily Vaughn's MOOD. Next time life's trying to drag me down, I'm so blasting this tune.

Listen to all the discoveries here:

Monday, June 05, 2017

Location Based Notifications; Or Letting the wife know you're going to be late in the coolest possible way

I still get lots of mileage out of my Report Location Tasker Action I setup nearly 4 years ago. I use it to let Shira know where I'm at when I'm running late on a jog. Sometimes, I put the action in a loop and send her my location every few minutes. At other times, I'll be more selective and use my smartwatch to notify her of my location when I'm at a light or the like.

It occurred to me that I could automate some of this based on my location. That is, when I was getting close to my final destination I could kick off a report so Shira knew I was on my way. Thanks to AutoLocation, which allows you to setup a geofence and then react to it, setting this up in Tasker was a breeze.

I setup the follow three actions: Tripwire Center, Tripwire Arm and Tripwire Trigger:

These three actions form a sort of simple state machine. At the start of my run I kick off Tripwire Center which grabs the current latitude and longitude and updates the specially named geofence Tripwire to be centered around it. It sets this geofence to have a 400 meter radius, or about 1/4 of a mile. Time will tell if this is too large or too small. Finally, the action turns on the Tripwire Arm profile.

Assuming my run is longer than 1/4 of mile, at some point I'll step outside of the geofence. At this point, the Tripwire Arm profile will be triggered and the corresponding action run. This action turns on the Tripwire Trigger profile which awaits my return and also shuts down the Tripwire Arm profile so it's not triggered again.

Finally, as I'm making my way back to my start point I'll eventually cross back into the geofence and the Tripwire Trigger profile will be invoked. This is where the magic happens, as I invoke the Report Location Task here.

I'm going to have log a few runs with this action before I can tell if it's useful. But I'm excited to be putting AutoLocation and geofences to use.

Friday, June 02, 2017

Review: Personal: A Jack Reacher Novel

After reading (and thoroughly enjoying!) a real book, I didn't mind indulging in the guilty pleasure of listening to a Jack Reacher audio book. I've listened to Reacher before, so I knew I was setting myself up for a heady mix of detective work and ass kicking. In many respects, Personal, delivered on this. However, it fell down in a couple of areas, too.

First of all, the book seemed to drag on. I listened to nearly 13 hours of audio, to tell a story which seems like it could have been told in half that time. I guess it's Lee Child's style to relish every detail, and generally not have his characters be in any hurry. Which I sort of enjoy, too. But at some point, come on, not every bit of dialog needs to be so verbose.

I could forgive Child on this, as who wants to rush through a book you're enjoying? But my second critique is harder for me to let go. I just can't get over his choice of attaching a CIA officer to Reacher who turns out to be a timid, drug stealing damsel in distress. I understand the device of using a character Reacher has to educate, which in turn, educates his readers. But why make it a 28 year old woman, who comes off as a naive child? I'm not saying every member of the CIA is a trained killing machine, but at 28 years old you should have enough sense to think, hey: I've never done any field work in my life, maybe I shouldn't make some off-book mission my first try. Or, hey, it would be far less anxiety inducing to tell my employer that I'm on anxiety medication, rather than steal it and attempt to conceal it from an organization who's main purpose in life is to uncover secrets.

I'm not sure why I'm so offended by the arrangement, it just seemed sloppy and to play on an outdated sexist attitude.

Other than that, the book was solid Reacher. As usual, Child's has manage to construct the biggest, baddest and meanest characters ever, and Reacher is able to confidently wipe the floor with them. Ultimately, it was a fun read and I just hope that Child conjures up better characters next time.

Weekly Discoveries

I find that putting on a long Chillstep Mix is a great way to, well, chill out, when my TODO list feels extra full. This mix provided a much needed hour of mental relaxation last week.

Chris Janson has a couple of well known country songs, but last week I found myself listening to a few albums of his and realized he's got more range than the local radio stations would have you believe. Of all the tunes I listened to, I think my favorite was Take it to the bank.

I wish I could say that I discovered Bill by Exuma because of my eclectic and nuanced taste in music. Alas, I found it because it's the closest version I could find to a song that plays behind a Jeep Commercial. I think the ads are well done, and even though you hear just a few seconds of audio, the song was worth searching out. It's only a minor detail that the Jeep Commercial has seemingly done a 180° with the lyrics and the meaning. The song is supposed to be droning on about how Baal will be your downfall, not the Jeep versioning that sings about being free. Whatever. Just enjoy the tune.

If I was young and feeling like I didn't fit in, I'd want to listen to K.I.D.'s Errors.

On the non video side of things, I give you Rpelton1's Survival Necklace. What I liked about the video was how thoroughly he researched the gear for his project. I'm more a shove all the crap in my pockets and a bag versus a wear it around your neck kind of guy. But still, it's worth a watch if you're a gear aficionado.

View all the videos here:

Tuesday, May 30, 2017

Name that Plant: Yummy Berries with a 5 Point Crown

Identifying a edible plants and trees can at times be quite tricky. And other times, it's trivial. Take yesterday, for example. I was jogging through North Arlington when I noticed a Mom and her little ones noshing on the berries of a small tree. All it took was a few seconds of my time and a casual "what ya' eating?" to discover a new, delicious, wild edible. The Mom in question explained to me that they were Serviceberry's. I grabbed one off the tree a took a bite: wow, they were delicious!

I'd vaguely heard of serviceberrys, but it never occurred to me that they might be local to my area.

After exchanging a few other pleasantries, I continued on my run. About a minute later it hit me: you idiot, you should have snapped a few photos of this mysterious fruit bearing tree.

For the rest of my run, I kept my eye out for what I thought my be Serviceberry's and found at least two promising stands. Here's a photo of each of them:

According to the Wild Edibles App, serviceberrys are relatively easy to identify because they have a 5 pointed crown at their base. Apparently there are no poisonous berries with this feature. Also, the Wild Edible's app only knows 'Juneberries' which are perhaps a more widely known name than Serviceberrys, but they are ultimately the same thing.

It boggles my mind that I've run by these delicious berries dozens of times. They would be the perfect trail nibble, easily as tasty as raspberries or blueberries.

I'm sure there's a good reason why we don't find Servieberrys in the store. Maybe they are hard to cultivate on a large scale? Or maybe the berries don't stay fresh long enough for transport. All I know is, taste isn't the reason why.

Next time you pass a tree with berries take a closer look: do the berries have a 5 pointed crown? Then you may have just hit the jackpot. Take your time to fully identify the tree or bush, and then enjoy!

Friday, May 26, 2017

Thoughts on the LG G6 Camera - Love Manual Mode, Hate The Startup Lag

After nearly two months with an LG G6, here's what I can tell you about the camera:

Pros

Manual mode shows a lot of promise. By default, you can leave all settings as automated and then quickly tweak settings in a controlled way. There's even a little histogram shown for those who want to get especially technical. It's worth noting that you don't have to switch to manual mode to gain both exposure and focus control, as you can lock both of these in automatic mode by long-pressing on an area of the screen. Doing so will give you a screen like this one:

However, manual mode lets you work in terms of ISO and shutter speed, and completely control focus. Along with this, you get Focus peaking. This feature alone makes manual mode worth using. When focus peaking is on, a green halo surrounds the in-focus content of the picture. For example:

In the above photo, the 'H' key is clearly in focus. Consider this cicada pic:

With my Galaxy Note 5, I took plenty of pictures like this where the wrong part of the subject was in focus.

Another feature of manual mode that I like is that it's sticky. If you set some exposure parameters, then closing and re-opening the camera saves them. This bit me in the above photograph, as I had previously set the color temperature manually, forgot about this, and snapped away without thinking. Using Google Photo's filters I was able to sort of recover from this oops.

It might seem safer to have the settings reset every time you load the camera, but that would mean you're constantly having to re-apply your settings. No thank you. If you've got a particular exposure dialed in, clicking the AE-L button will reset things to the camera's best guess. And switching between auto and manual focus and color balance is a button press away.

The other big pro for me has been the dual back camera lenses. Yes, the wide angle lens has a bit of distortion associated with it, but I think that can be used for effect. Consider these two snapshots:

The distortion adds a bit of character to the photo, which I'm happy with. Had I intended to actually publish these photos, I would have taken the time to stage things even more. But you get the idea.

At some point, someone will add a telephoto lens to the mix and I'll be truly happy.

Finally, the quality of the camera seems top notch. I'm able to grab snapshots that I'm happy with from all three lenses, which is essential.

Cons

Due to the last contract I had with T-mobile, I had to give up my Galaxy Note 5 when I got the LG G6. That means that I can't verify my biggest complaint about the LG G6's camera: startup lag. My Galaxy Note 5 seemed to be nearly instant on, letting me snap a photo of what I was seeing. Gone were the painful days of point-and-shoot cameras where you have to wait an excruciating few seconds for the camera to ready itself. It's the difference between capturing the smile of a bride as she walks down the isle, and capturing the back of her head.

While the LG G6 is far faster than any point and shoot camera I've owned, I've still found myself having moments of frustration as I wait for the camera to open, focus and allow me to snap a picture.

This is all very unscientific, and it may have to do with a multitude of outside factors. Perhaps my phone processor happens to be busy, or maybe it's a problem in low light. I just know that I've never felt that a previous generation of phone camera was better than the newest generation; but I find myself having that thought about the Galaxy Note 5.

The only other complaint I have about the LG G6's camera comes from my interacting with the LG V20 for a few days. The V20 has a gimmicky feature where you can snap a single photo that captures all three lenses at once. Here's an example:

Is this effect cheesy? Sure. But it's fun and let's you tell a story in one snapshot. The camera does offer a 'pop out' mode which does something similar, but not quite. Perhaps the bigger question is: why not make all the modes available on the LG V20 on the LG G6?

If anyone from LG is paying attention, please fix the lag issue--I'll survive without my gimmicky multi shot mode.

If your primary goal is to shoot pictures should you buy an LG G6? I'm not sure. The lag issue seems serious to me. On the other hand, if it's the phone you end up with, rejoice - it's awesome and takes mighty fine pics.

Thursday, May 25, 2017

Weekly Discoveries

Mahalia's Begin Again opens with a lyrical tribute to the challenges of romance in the digital age. Here's her opening verse:

You left a like on my picture
So does that mean you’re flirting with me?
You put something cryptic on Twitter
But I don’t know if I should quote or retweet
I’ve noticed you’re checking my Insta more than often
But, I know you don’t follow me
I see that you follow my sister
Oh is that just so you can pree?

Hmmm, the text doesn't do her justice. Just listen to the song.

And speaking of opening lines, I love Jade Jackson's Finish Line, which opens:

I don't care about things
because they don't care about me

Trust me, it sounds much more impressive when it's crooned out to a country beat.

If you're looking for a Father's Day Theme Song, I've got your answer: Sean Rowe's, I'll Follow Your Trail. Sean continues to support my hypothesis that an epic beard can lead to epic music. At first I thought I'd never heard a voice quite like Sean's, but then someone in the comments reminded me of the Crash Test Dummies. Indeed, they're a good match.

Here's a suggestion: Don't Be Racist.

I love the simple elegance of PJ's, This Is What It Looks Like. It's a positive and powerful song, all while being relatively understated. It pairs well with The Chapters', Moving, which is also a tune about not quite fitting in.

Dame D.o.l.l.a.'s, Bigger Than Us takes an alternative approach, and just hits you over the head with messages of hope and peace. Part of me wonders if the video is so over the top it's almost exploitative. I'm probably just being too sensitive, and should enjoy the song for what it is, a very listenable little jam with a happy message.

I don't exactly know what the deal is with The Beastie Boy's Fight For Your Right (Revisited). But I do know that it has a crazy number of well known actors and actresses that appear in it. You have to watch this little masterpiece to believe it.

View all the videos here:

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.