Tuesday, January 16, 2018

Good to the Bone: Orlando's Museum of Osteology

We started off our Orlando adventure with a trip to the Museum of Osteology, or the Bone Museum. Even as you're paying the entrance fee, you can't help but notice the massive skeleton of the killer whale (if memory serves) that peeks out the gallery and think: c'mon, is this for real? I mean, this is Orlando, a place that specializes in fake make believe. But, as the signs on the wall repeatedly mention: it's all real.

We made our way through the gallery and ooh'd and ahh'd at all the amazing skeletons on display. From massive rhinos to fragile looking bats, the museum had an impressive collection of all things vertebrate. The skeletons are grouped not only by animal type, but also into fun displays. One of the first displays shows a human riding a horse. I think we blew J.'s mind when we pointed out that both humans and horses both clearly have tail bones.

For my part, I have to say my favorite skeletons in the museum were the elephant skulls. Check out these examples:

I can totally get how'd you'd find one of these and think: whoo! uh-oh, I've stumbled on cyclops remains! Alas, what looks to be a socket for a big 'ol eye is actually the elephant's nasal cavity.

Another display I found fascinating was on the placement of eyes and the resulting field of vision. I believe the display compared a tiger and a gazelle. The tiger has vision not that far off from ours, but a gazelle's field of vision is massive. It's not hard to imagine how natural selection would work its magic to arrive at this distinction. The gazelle who can't see the tiger lurking nearby gets eaten. The gazelle with better vision lives another day and makes more baby gazelles. You can read more about this phenomena here.

On our way out of the museum we were chatting with one of the guides when he mentioned that the man who just walked by was the founder of the museum himself. Sure enough, it was Jay Villemarette. I asked Jay how he got into the bone business and he explained that he had found a skull in the woods when he was a 7 year old. Rather than recoiling in disgust, his parents encouraged him to ID it. And the rest, as they say, was history.

In many ways, this little museum reminded me of Treasure Museum in Ocean City Maryland that we visited last year. Both are small, authentic, outstanding collections in areas dominated by schlock. In both cases, we had a chance to chat with the founders and learned that a young boy's interest can turn into a life long passion.

One word of caution: The Smithsonian's Natural History Museum has The Bone Hall which has many of the same specimens on display as the Museum of Osteology. If you've been to the DC exhibit, then the Bone Museum is going be far less novel. On the other hand, if you've never see a large display of various creatures' skeletons side by side, then this is a must see. Oh, and you can consider the flesh eating beetles the icing on the cake. Enjoy!

Thursday, January 11, 2018

Monitoring the Monitors: Removing NaNs from rtl_power data and signal spike dection (Part 2 ½)

My first attempt at using rtl_power to capture motion detector signals was a bust. The data was riddled with NaN values, making it useless. Stumped for options, I dropped an e-mail to the author of this rtl_power article. His answer couldn't have been simpler: are you sure you're using the most up to date version of rtl_power?

I wasn't. As I had noted, to install rtl_power power on my Raspberry Pi I followed this transcript. It pulls the source for rtl_power as follows:

$ git clone git://git.osmocom.org/rtl-sdr.git

The latest version of the code, which fixes the NaN issue can be found here: https://github.com/keenerd/rtl-sdr.

I re-ran the build commands as suggested in the transcript (substituting the right git source URL) and found myself with a new version of rtl_power. A quick test showed that my NaN's were now gone!

Here's some test data:

I recaptured a short snapshot of motion detection data using rtl_power. The first set of data captures signals when there's no motion; the second set of data contains signals generated when I was tripping the motion detector. I did this by running commands like the following:

for i in `seq 1 3` ; 
  do rtl_power -f 344M:346M:20K -e 30 -i 1 > nomotion.$i.csv ;
  sleep 10;

I then wrote a quick PHP script to detect spikes in the data. My hope was that the 'nomotion' files would contain no spikes, while the 'motion' files did have spikes. Here's that script:

 * A PHP file for reading in a rtl_power CSV file and printing out any blips
if(count($argv) != 2) {
  echo "Usage: php -f {$argv[0]} data.csv\n";

$last_snap      = array();
$data_col_start = 6;
$blip_threshold = 6;
$fd             = fopen($argv[1], "r");

while($row = fgetcsv($fd)) {
  $row = array_map('trim', $row);

  for($col_i = $data_col_start; $col_i < count($row); $col_i++) {
    $bin  = $col_i - $data_col_start;
    $freq = number_format(($row[2] + ($row[4] * $bin)) / 1000000, 4);
    $level = $row[$col_i];

    if(isset($last_snap[$freq])) {
      $diff = abs($last_snap[$freq] - $level);
      if($diff > $blip_threshold) {
        echo "$freq:$bin:$diff:$level\n";

    $last_snap[$freq] = $level;

Notice the value above for blip_threshold. This is an arbitrary value and one that I arrived at through experimentation. My thinking is that there's naturally noise in the system, so even when the motion detectors aren't sending messages, there's going to be some spikes.

And here's the output of running the PHP code against some sample files:

$ php -f ../find_blips.php nomotion.1.csv  # whoo! No spikes detected!
$ php -f ../find_blips.php motion.1.csv

Will you look at that?! I'm detecting spikes in the motion data, and can filter out noise in the nomotion data. I've got to say, this is really promising.

Up next is to refine this and map spikes to specific monitor detector behavior.

A huge thanks keenerd for making all of this possible!

Wednesday, January 10, 2018

makePad v1.0 - A content-creation only device

Our nieces and nephew know that when they hang with us, they're going to have epic adventures. They also know they aren't going to get a lot of screen time. I'm sure they're tired of hearing the refrain: you can have iPad time anytime, but we have limited Uncle and Aunt time. And while there's a time and place for joyfully and mindlessly consuming content, we often strive for more active play than what the kids' devices can deliver.

This last visit there was a moment when the kids were all done with their homework and they were getting some iPad time. There three of them sat, passively attached to the screens in front of them. Had the living room been on fire, I doubt they'd have noticed. It was then that I had a spark of an idea: what if they had a device that only allowed them to create content?. A so called makePad.

By being a separate device, the kids wouldn't be tempted to get stuck in the consume only mindset. Instead of looking at tech as a brain sucking nemesis, it would be put in its rightful place as helpful tool.

Given how cheap tablets are, I quickly imagined having a whole stack of makePads ready to lend to the various kids who find themselves in our orbit. I mentally cycled through the following options in about 2 minutes:

It'll be awesome! I'll build a device from scratch using micronctrollers! Wait, that's crazy, I'll never get that project done. Oh I know, I'll buy a Fire tablet. Those are super cheap and reputable. But wait, they're built around consuming content, will I really be able to re-shape the device as I see it? I know, I'll get a cheap knock off Android tablet from eBay. If it's Android, I can do anything I want with it.

While there are many cheap Android tablets out there, I did realize that they aren't without limitations. RAM, camera quality and other stats begin to degrade when you're targeting the cheapest option.

I ended up switching gears and rather than focusing on tablets, I looked at Android phones. Here, too, I found a whole class of cheap phones that showed promise. In the end, for makePad v1.0 I settled on using a Blue 4.0 Advanced phone.

Using the BLU feels like stepping back in time. The screen is tiny and there's lag when launching a new app. But, it's also completely functional, with a 5 megapixel camera and screen resolution that matches the Kindle Fire. I've already got plans to use this phone for root experimentation and I may pick up another to use as a warm-backup ready to save day should my LG G6 go south. Heck, the phone comes with a case and screen protector. Does the phone really compare to my $800 LG? Of course not. But when you factor in the $40 price tag, you see that the BLU 4.0 Advance truly rocks.

When it comes to content creation, my guess is that the larger screen of a tablet would have been ideal. However, the smaller footprint of the phone does have its advantages. I could see our nieces and nephew toting their devices everywhere. Also, every 6~8 year old kid I know already has a tablet; but rarely do they have a phone. I'm hoping that will be a selling point.

Of course, hardware is only half the equation. To be an effective device, it has be powered by useful software.

First off, I wanted to install a custom launcher. While I can't remove YouTube and Google Chrome from the device (not to mention Google Play and the Dialer), I know that a good launcher will let you hide them. The most promising launcher I found was the oddly named Business Taxi Shell. This launcher has two modes: a simple UI to launch selected apps, and an admin side where you can use the phone normally and control what apps are visible. The problem with this and other launchers that specialize in locking down devices is cost. The Business Taxi Shell is $10, that's a quarter of what I paid for the phone, and a bit too steep for this stage of the project.

Instead of using a formally locked down launcher, I went with Apex Launcher. This launcher lets you hide apps and customize the experience so it's fairly bare bones. A clever kid will no doubt figure out how to unlock things and get to the good stuff, but if they can do that, they deserve to watch a few YouTube videos. And then I'll buy a truly locked down launcher.

As for the actual apps, I decided to focus on quality over quantity. I figure a few smartly selected apps would be better than an ad-filled, junk experience. The apps ended up getting clustered into four categories.

First, there's photography. Besides making the camera app readily available, I also installed PicSay Pro. I've used PicSay for years, and it's an easy way to add goofy stuff (think hats and mustaches) to photos, as well as more abstract photo editing. I purchased the pro version to avoid having ads get in the way. Finally, I added Google Photos to the main screen, which is helpful for sharing, a topic I'll mention below.

Next up, I tried to come up with some drawing apps. This area is a bit trickier because I don't have any goto apps for this genre. I installed Sketchbook by Autodesk which looked like a very legit sketching app. I also installed BitMoji on the phone, which allows you to quickly make a digital version of your own likeness. These apps both seem high quality, but I won't be shocked if I end up swapping them out.

Another obvious content creation outlet is audio. I made the built in voice recorder app available, and installed Walk Band. For $0.99 I was able to turn off ads in Walk Band which was totally worth it. I have only cursory experience with Walk Band, but so far I'm impressed. You can mess around with virtual instruments as well as setup tracks in a sequencer. Most importantly, it allows you to record your work.

And finally, I added support for sharing content. What good is making stuff if you can't share it with others? I setup the e-mail address that powers the phone to have myself and Shira as contacts, so any pictures or other works of art can be easily shared via GMail. I also setup makepad.blogspot.com, so kids could publish content to the web. This is obviously something that needs to be done with care, but I think learning the lesson of what gets shared publicly, privately and not at all, is a critical lesson.

So now I've got makePad v1.0 in my hand. What will my nieces and nephew have to say about this gadget? Will they see through my efforts to suck fun out of their devices? Will they have the device hacked and be watching My Little Pony in a matter of minutes? Or will they make something great? I've got no idea, but I'm sure looking forward to finding out.

Have any suggestions for content creation friendly apps? I'd love to hear them in the comments.

Tuesday, January 09, 2018

Monitoring the Monitors: Setting up a Raspberry Pi, and Tripping over rtl_power data (Part 2)

Last week I had success monitoring my alarm system's motion detectors and door sensors. This week I'd hoped to take the ad hoc detection capability and make it something more formal.

First off, I needed to improve the platform I was using. Detecting signals using my cell phone is fun, but not practical. I really wanted a small, always on device, that could sniff the data out. My raspberry pi seemed like the ideal candidate to fill this role.

I found this transcript which walks through the complete process of setting up RTL command line tools on a pi. To my great delight, every command in the transcript worked. The result was SDR enabled Raspberry Pi.

I figured the best chance I'd have at scripting behavior based on FM signals was to leverage rtl_power. I went ahead and kicked off the following command on the pi:

$ rtl_power -f 344M:346M:200K -e 30 -i 1 > motion.1.csv

If my understanding of the command line options are correct, I'm asking rtl_power to scan 344Mhz to 346Mhz and put the collected data in 200Khz buckets. I know I'm looking or burp of activity in that range. I'm running this process for 30 seconds and have the integration time set to 1 second.

Everything went smoothly, until I looked at the data itself. Consider one run where my front hall's motion detector was dormant, and one where it was active:

As you can see, there's a large number of nan values. Which means...uh, I have no idea what this means. Obviously, I need to figure out what's going on with those nans, and figure out if there's a way to avoid them. Perhaps I'm using the wrong tool altogether? At least I have an SDR capability Raspberry Pi setup, I can imagine using that in all sorts of ways going forward.

If you see where my logic went off the rails, or have a suggestion for how I can get this working, I'm all ears! Please share in the comments.

Friday, January 05, 2018

Weekly Discoveries - Closing Out 2017 Edition

The last couple of weeks have been a fitting anniversary to the Weekly Discoveries project I started at the beginning of 2017. A year ago I found myself frustrated that I was listing to the same (mostly popular) tunes over and over again. I was also shocked that when I did some digging I could find a whole slew of artists I'd never heard of before that made music that was really appealing.

Take Barns County's Fire for example. Here's a toe tapping tune from an artist I'd never heard of, even after spending a year looking for new talent.

And then there's videos like Terraform by Novo Amor & Ed Tullett that are visually stunning and contain music that I'm not even sure how to categorize. I just know that when I heard the song, I had stop what I was doing and listen.

This year I also found myself gaining a more thorough appreciation for many artists that have one or two overplayed songs on the radio. I've come to appreciate that many of the best songs from say, The Lumineers or Vance Joy never make it to the radio. This last week I was definitely feeling some love for Passenger, who with ever song I hear from his new album, reminds me that he's anything but a one hit wonder.

And then there's the whole world of mixes, which string together a dozen plus songs. This may not sound especially creative, but give Klangnomad's Son of Spring and you'll see what a creative and well thought out mix can do. It's an hour's worth of music which leaves me thinking the whole is greater than the sum of the parts. So put those headphones on and prepare to get one heck of an hour of programming time logged.

I tried to focus this last year on music, but ever once in a while I'd come across a skills or humorous video that just had to be captured for posterity. In this vein, I give you: Bitcoin: What it is and How does it work?. I can't emphasize enough how this is 3 minutes and 6 seconds of perfection. Just watch it.

OK, enough talk. Let's listen! Weekly Discoveries 2017-12-17 and 2017-12-24:

Thursday, January 04, 2018

From Snapshot to Blog Idea in 1 Press

My strategy of using a spreadsheet to track blog topics has been working well. I get quite a bit of use out of a Tasker action that adds to this spreadsheet from Android's Share button. This allows me to queue up the idea with minimal effort.

One shortcoming in this approach is that it doesn't work with files. For example, if I snap a photo and press the 'Share' button a local path to the file is stored in the spreadsheet, which is not useful.

Adding the functionality to detect a file and turn it into a URL turned out be straightforward:

All it took was a new conditional to detect if a file was provided (IsSet? %asfile1), then a call to the 3Shrink Action. Around this call is some simple variable handling.

Let's say I wanted to write an exposé on how less than an inch of snow shut down the local government. I could grab my phone, snap a picture of the paltry snow in our backyard and share that to the spreadsheet. Here's how it would look in the Ideas spreadsheet:

What that entry lacks in clarity it makes up in convenience. I'm all about grabbing ideas, no matter how fleeting.

Up next: setting up a waterproof speaker/microphone so I can record ideas right from the shower. OK, that may be going a bit to far. Or maybe not?

Wednesday, January 03, 2018

Monitoring the Monitors: Using SDR to snoop on my wireless alarm system (Part 1)

This talk on decoding wireless tire pressure monitors got me thinking: what other wireless electronics could I snoop on? I've done this in the past with our neighborhood utility boxes, but that was little more than running a program someone else wrote. The tire pressure decoding work is remarkable in that an individual managed to turn wireless noise into useful data. Even if you're not a radio hacker, the talk is worth your time, just to see how seemingly dark systems can be illuminated given the right know-how.

I racked my brain for a good wireless device to poke around and then it hit me: what about my alarm system? I don't know much in the way of technical details of our system, but I do know it's wireless. Which should mean that each alarm component is sending bursts of radio traffic to one central receiver. I doubted that I could decode the bursts of traffic, but if I could monitor them, that could be useful.

First things first, I popped the cover off of one our motion detectors and grabbed a photo:

I jotted down every number I could see (which I also scrubbed from the above photo) and started Google. In a few minutes I found a technical installation guide, and from there I found an FCC ID. Using this FCC ID, I found more details about the device, most of which meant nothing to me. But the FCC page did include one critical bit of info: the wireless motion detector broadcast at 345Mhz.

This isn't exactly a surprise, nor is it top secret. If you look at the 345Mhz spectrum, you'll see tons of devices that utilize it. From motion detectors to an Active Fall Detection Pendant. If I knew my radio devices better, I could have almost certainly skipped the above exercise and just assumed that my alarm peripherals operate at or near 345Mhz.

Armed with this information, I fired up SDR Touch and tuned it to 345Mhz. I started the recording when I was out of range from all motion detectors. I then walked into view of the detector. And what do you know, there was a burp of radio activity. I repeated this a few times and then did the same with opening and closing our front door (which has a door sensor on it):

The red boxes in the waterfall above correspond to me triggering the motion detector, while the orange boxes correspond to the front door.

I was delighted to see that my assumption was correct. The alarm devices do sit there quietly and transmit when they are triggered. This is definitely information I can use.

While this is interesting and all, it's not very useful. What I really need is a way of programmatically extracting this radio data and turning it into a stream of relevant data ("Door Triggered" or "Motion #2 Triggered"). That's the next challenge to tackle. Stay tuned.

Tuesday, January 02, 2018

When Software Does Good

Below is a video of one of my clients talking about the American Sign Language educational site he runs. One of the many things I love about my job (besides the pants-optional dress code), is getting to help folks change the world. In this case, I may not be the one teaching the parent to help understand their child, or allowing communities to more deeply connect--that's Paul's gift. But I'm proud to do my part to give him the tools so he can work his magic.

View the video

Well that worked: adventures in unscrewing stubborn valve caps

The tire pressure alert on my car was screaming at me about both my front tires. They were at 27psi when they should have been at 35psi. After a short drive where I willed them re-inflate, I decided I better not risk it and headed to a nearby 7-11 that I hoped would have a working air machine.

As luck would have it, not only was the machine functional, but it was an upgraded version of most compressors in that you could dial in your desired tire pressure. And as an additional bonus, the machine took a credit card, which saved me a trip to the counter to get quarters.

Before starting up the machine I had one last task to do: remove the valve caps on all four tires. I figured better to get this out of the way first, then fumble with them while the timer on the air is counting down.

I go to unscrew the first valve cap. It's stuck. I try harder. No luck. I try one in back. It's sticky, but I manage to get it. I try the other side in back, and while sticky, I can get it off. The front two wheels however are far more stubborn. Curse my pitiful finger strength!

Of all the crap valuable tools I carry, one thing I don't have on me is a pliers. So applying brute force that way was out of the question. Surely I wouldn't have to resign myself to defeat all because of a couple of frozen valve caps?

Then I had an idea. One item I do keep in my bag is a SWAT-T tourniquet which is nothing bug a glorified piece of elastic band. I wondered: what if used the rubbery surface of the SWAT-T to give me extra grip on the value cap. Would that give me the advantage I need to get the job done?

And what do you know, it worked. I got the valve caps off, filled up my tires and didn't have to make an extra trip back home. Victory was mine!

So along with being a tourniquet, pressure bandage and water balloon launcher, you can also jar/nob removal assistance tool to the SWAT-T feature set. Who knew?

Update: Thanks to my Dad who reminded me that my low tire pressure is most likely due to the especially frigid temps around here, and when it warms up, I'm going to end up needing to bleed off some air. Still, discussions like this one make me feel like less of an idiot, considering that low air pressure is more likely to cause problems (including hydroplaning).

Saturday, December 30, 2017

Four Days of Fun with Four Amazing Kids from Boston

What a whirlwind week it's been! It all started Sunday night when the 4 Boston Kids arrived (thanks to their nanny for escorting them on the plane!).

Our first full day of play was Monday, Christmas. We didn't have a whole lot of options for open indoor activities. Even the traditional Chinese meal was out, as DC no longer has a Kosher Chinese restaurant. One classic choice in the area is to visit the Botanic Gardens which are open every day of the year. Not only are the gardens open, but there's a holiday train display as well as models of DC monuments and sites to oggle. Everybody found something to enjoy there. The kids relished seeing the Thomas themed trains in the model train display, and enjoyed playing 'eye spy' with a series of stamp-stations. I enjoyed the impressive craftsmanship of the models and loved being among the plants. And Shira was happy we weren't out in the bitter cold trying to hike.

After the gardens we made our way to a good friend's house for a Christmas celebration. Our friends' two kids got along with the Boston Four quite well. At one point I peeked in on the kids playing in the basement and saw a full-scale nerf / sword battle going on. Alas, I had to be a responsible adult and return to the table, but they looked to be having a grand time! Don't feel too bad for me, as an adult I had nearly unlimited access to the delicious Christmas cookies that were served for desert. So tasty! As if the day of fun weren't enough, the toys that the kids got in a gift exchange were the icing on the cake.

Monday night was the only near catastrophe of the trip. No, we didn't need to go to the ER with a child. Instead it was Shira's sanity on the line. At one point after dinner, Shira noticed that our newly painted kitchen wall was smeared with a unknown red food. Her first thought was baked beans, which we had had that night. None of the children volunteered to explain how the wall had gotten "painted." Shira put the kids to bed with a thinly veiled threat that a new kitchen might be necessary. I busted out a Mr. Clean Magic Eraser. In a few minutes, I had the wall back to spotlessly clean. I'm not sure what they put in that magic eraser, but I think it saved my marriage, my kitchen, my bank account and possibly 4 children. If you have kids, it is a must have.

Tuesday morning Shira and I intended to work, while the nanny had the kids do homework. I worked exactly 14 minutes that day, so yeah, my plan of logging a few hours of work was laughable. Instead, I spent time giving the kids breafast and reading with the girls. By mid morning Shira was home and it was time to head out. We settled on the Udvar Hazy Air and Space Museum for the day's activity. While the kids liked all the planes (Dovid was quite impressed with the SR-71 Blackbird), and of course, the shuttle, I think they were a little disappointed with the lack of hands-on activities. Dovid kept wanting to know when we'd get to go *inside* the planes (uh, sorry Dovid, that's not how it works). They all enjoyed going up in the tower and watching the planes land at nearby Dulles Airport.

Wednesday was a truly adventurous day. We hit the road with some friends and visited Skyline Caverns. The original plan was to do Luray Caverns. I'd been there before and recalled that they were essentially the same temperature underground all year. That seemed like the perfect way to spend a freezing cold day. Ultimately, we opted for Skyline over Luray because (a) we'd never been there before, (b) the presence of anthrodite and (c) it was 30 minutes closer than Luray. It turned out to be an excellent choice.

Before leaving the house, the kids asked for flashlights, which if you're descending into a cave seems like a reasonable request. I ended giving each of them a light up necklace with a keychain light attached. This turned out to be a good recipe, as the kids could play with their lights during the tour without bothering other participants.

For about the first half of the Skyline Caverns tour it definitely felt like Luray's little brother. Yes, the rock formations are amazing, but they aren't at the scale of Luray's. But then you enter the section of the cave with anthrodite deposits. Wow. I'd never seen anything like that before. This cave definitely stands on its own as a truly unique and must see location, and being closer to DC definitely gives it bonus points if you have younger kids to keep occupied in the car.

After visiting the cave and talking with the kids, it became clear what their highlight was. Was it the amazing flowstone or breathtaking anthrodite crystals? Nope, it was this fun fact:

[Skyline caverns] is home of the Valentine beetle which is believed to be only found in these caverns. According to our tour guide, the Valentine Beetle lacks optic nerves so it is completely blind. Seven beetles were found by scientists, but when they were exposed to outside light and temperatures, all seven beetles died; none has been found ever since. The Valentine Beetle is now believed to be extinct. The said beetles are now on exhibit at the Smithsonian in Washington, D.C.

Or as our tour guide put it, on the same day scientists discovered a new species, they also caused it to go extinct. Oops. Yeah, the kids just loved this story.

Thursday was supposed to be another partial work day for me. But yeah, this time I didn't even log 14 minutes of work. Who has time to work when there are four fun kids to play with (and feed and help with their homework). Tzipora drove a hard bargain with me: in exchange for me listening to her read English and Hebrew, she'd get to show me the Brave story on her iPad. And so she did. It was apparently a short summary of the movie, which now I'm really interested in seeing.

Thursday afternoon we went to a production of Charlotte's Web at Imagination Stage. I have to admit, I had pretty low expectations. We had kids ranging from 8 to 4 years old, so I wasn't sure it was going to hold everyone's attention. On top of that, the tickets weren't particularly cheap, so even if it was good, would it be that good? As soon as the lights went down and the play began, I knew this was going work. The play held the kids rapt attention. The music, the humor, the costumes; it all worked to make a great show. The kids had seen the movie, so they went in knowing the plot, still, they truly enjoyed it.

For my part, I thoroughly enjoyed it as well. I'm sure we read Charlotte's web in school or something, as I know part of the story. But I realized as the show was finishing up, I didn't know how it ended. What a powerful and profound story. I can see why it's such a classic. I also enjoyed the technical nature of the show, with nearly all the actors playing multiple rows to perfection.

Of course we all loved watching the aerial acrobatics performed by 'Charlotte.' It's amazing what the actress managed to accomplish using nothing but one long piece of fabric, remarkable strength and I'm going to guess, tons of practice.

Thursday night we celebrated Tzipora's 7th birthday a couple of days early. She was in charge of designing and decorating her birthday cupcakes, which she did to perfection. She selected yellow frosting with sprinkles in the shape of a 7. When asked, she explained that yellow was her fourth favorite color. Who has a fourth favorite color? (Shira was out of blue food coloring, which is how we arrived at yellow).

Throughout this trip we had a new challenge to deal with, helping Dovid managing his Type I diabetes. By 'we' I firmly mean Shira. After a lesson from the nanny, Shira took over finger-sticking and shot-giving responsibilities. She also carefully architected Dovid's meals to smooth out his sugar levels as much as possible. I'm convinced that for Shira it was one long video game, with the glucose monitor relentlessly keeping score. All throughout the day and night Shira kept an eye on that number, practically willing it to behave. I naturally helped by mostly staying out of the way, and having restful sleep when she couldn't (yeah, I'm not sure how that helped, but I did it anyway). Dovid is such a trooper when it comes to his new diabetes routine. He's just rolling with the whole thing so well. Of course, it's not all bad, he did get a couple of chocolate chip cookies before bed one night because he was trending low.

All in all, it was a truly fun and adventurous week for all. The kids are already talking about summer time. As for me, I'm going to need a couple days to recover before I can start planning our next adventure.

Selected photos below. Full album for Mom and Grandmas found here.

Tuesday, December 26, 2017

The Four Things Keeping Us Busy This Week

For the next 55 hours or so, we've got the 4 Boston Kids in town. Today we hit the Air and Space museum. Yesterday we did the holiday train exhibit at the National Botanic Gardens and chilled with a friend. Tomorrow the adventure continues!

Way more pics and stories coming soon!

Friday, December 22, 2017

Weekly Discoveries of Biblical Proportions

Last week I tripped over The Sound You Need's YouTube channel and found a whole bunch of funky new tunes to enjoy. My favorite, however, has to be Wolf Country by Durante. Wolf Country is proof that you can overlay a biblical sermon on a beat and get a sweet track. Well done Durante.

I'm also really digging Old Man Canyon's Wiser. Though I have to admit that I was a surprised that more of their music didn't resonate with me. But hey, maybe it'll do it for you?

Rock out to all the tunes here:

Thursday, December 21, 2017

Three Tasty Treats - A Honey and Two Teas

At the end of October I added the zest of my Etrog from Sukkot to honey and plopped it on the window sill. For nearly a month, every morning I flipped the container over, in attempt to fully infuse the honey. I then strained the honey into a fresh container:

And the result was: honey with a hint of etrog. It worked! Seriously, the honey definitely took on the distinct flavor of an etrog. I suppose to anyone who's done infusing before this is probably obvious. But to a newbie, I'm really surprised how well it worked.

I also tried infusing some basil and mint into honey, and that worked as well (though I'm not sure how badly I need basil tasting honey).

Of all the experiments I've done with etrogs this one has been the most successful. It was easy to do and the results were tasty. As a bonus, unlike say etrog liqueur, it's quite practical.

I'm a sucker for crazy interesting sounding teas. I keep an eye out for them when I travel, which explains why I've got anise, cactus and even oregano (yes, oregano) tea in my cabinet. Sure, most of the flavors end up being an acquired taste, but that doesn't stop me from continuing my search. A friend who was traveling to Jordan embraced my tea challenge and sent me a variety of boxes. One of the stand out selections was this guy:

First off, I love that the only bit of English on the top of the box is the directive to not add sugar. One has to ask, what exactly happens if you add sugar?

Fortunately, half the box is English so it was trivial to figure out what the flavor of the tea was. Any guesses?

It's Cumin and Lemon. Yes, cumin. Sniffing a tea bag was like sniffing a teaspoon of cumin you're about to add to that chili recipe. I have to admit, I didn't have high hopes for this tea.

I boiled some water, dropped in a tea bag and let it sit for 3 minutes. And then I took a sip.

Whoa! I can honestly say, this tasted unlike any tea I'd ever had. The flavor that came immediately to mind was that of chicken soup. The strong cumin flavor from the dry tea was gone, but it was replaced by a salty, savory flavor. I was sure that the ingredients included chicken stock, but no, it's just cumin, citric acid and salt. I'd never seen tea with salt in it, but the salt content was small enough that the box claims there's 0 grams of sodium present:

I'm not exactly sure what pairs best with cumin tea, but I'm thinking that it would be especially tasty on a chilly night while camping.

Naturally, I had to google Cumin Tea to see what others had to say about this drink. And what do you know, it's a cure-all food. From weight loss, to reducing stress, to killing intestinal worms, cumin tea does it all. I can't guarantee any of the health benefits, but I can promise you a unique tea drinking experience.

Another stand out tea from my friend's trip to Jordan was this guy:

So that picture didn't mean much to me. But at least I think it's safe to add sugar. Flipping the box over, the English name didn't exactly clear things up. It's called Zhourat Shamia. The ingredient list did look promising:

It isn't often one gets to drink Lemon Flowers, Marshmallow Flowers and Damask Roses. I brewed up a cup of tea and took a sip. It was far milder than the cumin and lemon, but still unique. And most importantly, quite delicious. I think what makes it work for me is the green tea base with the flavors of the flowers kicking things up a notch. I want to love herbal teas, but most of them just don't do it for me. Give me a good o'l cup of black Lipton, thank you very much. But Zhourat was tea'y enough, that I could really enjoy the additional favors.

A quick search on the web showed me that I wasn't the only discoverer of Zhourat tea. Yulia had a similar experience, though she made her discovery by actually moving to Lebanon. Me, I just had to have a friend visit Jordan.

A search for Zhourat tea turned up another oddity, mainly an article in NIH's pubmed database. The scientific paper in question reports that a number cultures have recipes for Zhourat tea, but thanks to the research conducted, they confirmed that all variants have enough in common to justify the medical claims that go with the drink. Look at that, another super health food to add to the checklist.

Next time I'm at a truly authentic middle eastern restaurant I'll have to keep an eye out for Zhourat tea. And you should too. This is a winner.

Wednesday, December 20, 2017

Helping bash and tinyscheme get along | Friendlier command line execution of scheme code

I was looking for a cleaner way to manage SDR Touch radio frequencies and I thought I'd give Scheme S-expressions a go.

I quickly arrived at this 'format':

  (166.9 "DC Police?")
  (166.7 "Dc Police?"))

  (462 "FRS Low")
  (467 "FRS High")
  (457.5 "Marine1")
  (467.5 "Marine2")
  (467.7 "Marine3"))

  (457.5250 "Bridge Ops")
  (457.5500 "Engineering")
  (457.5750 "???"))

Because I programmed the solution in Scheme, turning this basic set of S-expressions into the required mess of XML was straightforward. You can find the solution here. I have to say, it was a real delight using S-Expressions to solve this one. XML, JSON and raw text all jumped out at me as options, but in this case, S-Expressions were the clear way to go.

I coded this solution on my Android device using Termux, emacs and Tinyscheme.

While the solution worked great under emacs' interactive scheme mode, I decided I wanted the ability to run the conversion command from a bash prompt. While tinyscheme has some basic command line handling, it was lacking a few details, such as the ability to get the script's working directory. This may seem like an obscure requirement, but with this value I'm able to reliably (load ...) files without worrying about running the script from a specific directory.

To make tinyscheme more command line friendly, I created tsexec, a small script below that kicks off tinyscheme with a number of helpful functions predefined. These include:

(cmd-arg0) - returns the name of scheme script that is currently executing.

(cmd-args) - returns the list of command line arguments passed to the currently executing script.

(cmd-dir . path) - when invoked with no arguments, returns the directory the currently executing script lives in. When an argument is provided, the value is prefixed with the source script's directory.

Using these functions I'm was able to write a command line friendly version of my scheme code to generate XML.

(load (cmd-dir "utils.scm"))  ;; utils.scm is now imported in a location independent way

(define (make-presets frequency-file xml-file)
  (with-output-to-file xml-file
    (lambda ()
      (with-data-from-file frequency-file
       (lambda (data)
  (show "<?xml version='1.0' encoding='UTF-8'?>")
  (show "<sdr_presets version='1'>")
  (for-each (lambda (category)
       (show "<category id='" (gen-id) "' name='" (car category) "'>")
       (for-each (lambda (preset)
     (show "<preset id='" (gen-id) "' ")
     (show "        name='" (cadr preset) "' ")
     (show "        freq='" (freqval (car preset)) "' ")
     (show "        centfreq='" (freqval (car preset)) "' ")
     (show "        offset='0'")
     (show "        order='" (gen-id) "' ")
     (show "        filter='10508' ")
     (show "        dem='1' ")
     (show "/>"))
          (cdr category))
       (show "</category>"))
  (show "</sdr_presets>"))))))

;; Simple argument handling below
 ((= 1 (length (cmd-args)))
  (make-presets (car (cmd-args)) "SDRTouchPresets.xml"))
 ((= 2 (length (cmd-args)))
  (make-presets (car (cmd-args)) (cadr (cmd-args))))
  (show "Need to provide frequency and output file to continue.")))

Here's a few screenshots of me running this code:

Termux has a handy add-on that allows you to invoke shell scripts from your phone's home screen. I'm thinking tsexec may be an ideal way to connect up this short-cut ability to tinyscheme.

Finally, here's the source code for tsexec. Enjoy!


## Execute a tinyscheme script. Setup various functions that can
## be used to access command line args and such

if [ ! -f "$1" ] ; then
    echo "Refusing to run non-existant script [$1]"
    exit 1

CMD_DIR=$(pwd)/$(dirname $1)
CMD_ARG0=$(basename $1)

for arg in "$@" ; do
  CMD_ARGS="$CMD_ARGS \"$arg\""

if [ ! -f "$CMD_MAIN" ] ; then
    echo "Failed to derive CMD_DIR, guessed: $CMD_DIR"
    exit 2

wrapper() {
  cat <<EOF
;; Autogenerated scheme wrapper script
(define (cmd-arg0) 

(define (cmd-dir . path)
  (if (null? path)
      (string-append "$CMD_DIR/" (car path))))

(define (cmd-args)
  (list $CMD_ARGS))

(load "$CMD_MAIN")

wrapper > $HOME/.ts.$$
tinyscheme $HOME/.ts.$$
rm $HOME/.ts.$$

Tuesday, December 19, 2017

Behold! The Custom Made Tactical Yoga Mat Carrier

I'm not exactly sure how my original request went down, or how I got so lucky to receive this. I must have seen the pretty and functional yoga mat bag that Dawn made for Shira and remarked that I needed a manly version. And thus was born the Tactical Yoga Mat Carrier 2000™:

Features include:

  • Fits longer style yoga mats perfectly
  • Two generous pockets for holding keys, phone or workout nutrition
  • Authentic Woodland camouflage to help maintain maximum testosterone levels while attending a beginner's Yoga class
  • Two inch wide strap for the ultimate in comfortable carrying
  • Quick release buckle to decrease the odds of a catastrophic failure while accessing mat
  • NATO approved MOLLE Webbing attachment points to allow for easy accessory expansion
  • Discrete button attachment point allows for low profile carry of badges and other sensitive material
  • Earth Friendly, as it's made from authentic upcycled military materials*

Seriously, this bag rocks! And after having dabbled with a sewing project or two, I'm even more amazed at the flawless craftsmanship. So well done, Dawn!

*Thanks Grant for donating one of your old uniform shirts to the effort. You rock!

Monday, December 18, 2017

Insulin Calculations for the Lazy and Math phobic

In another week we'll have our Boston Nieces and Nephews in town. This will be our first solo trip with Dovid since he was diagnosed with Type I diabetes. In the notes my Sister-in-Law passed us regarding his care, she included a worksheet on how to calculate how much insulin he gets. Naturally, I converted those manual instructions into a Google Sheet.

If you find yourself in a situation where you need to caculate insulin dosage, perhaps it will be useful? If so, make a copy of the sheet here and plugin in the appropriate values under the 'Settings' section.

Happy Carb Counting!

Disclaimer: Dammit Jim, I'm a computer programmer, not a doctor! So yeah, don't use the above sheet without first carefully verifying it.

Wednesday, December 13, 2017

Overrun Inbox? Not today. Bulk Gmail Management from the Command Line

Every so often an errant program (often powered by cron) will flood my inbox with messages. I use Google to manage my e-mail, so this isn't typically a difficult problem to solve. I run a search like this:

label:inbox subject:(cron /usr/local/bin/badscript)

While Google only shows me the first hundred messages there's an option to select all messages, even those not visible. I click this option, hit the archive button, and bam! my inbox is back to usable.

There's a catch to this: the 'select all' option does not exist in Google's Mail app. This means that if I find myself with a overrun inbox and I'm away from a desktop computer, I'm out of luck.

This happened to me after my last vacation. I found myself on an airplane with the chance to respond to e-mail, but an inbox so overwhelmed with cruft that navigating it was painful. While I made do in that scenario, I promised myself I'd come back to this problem and solve it for good. Here's that solution.

I give you: gmail_tool. gmail_tool is inspired by youtube_tool, a command line program for managing YouTube playlists, but with an emphasis on Gmail. In the same way youtube_tool is a curl command line wrapper around Google's YouTube API, gmail_tool connects up curl and the Gmail API.

Here's some examples of it in use:

# Get a list of all messages from John that talk about Linux
# Note that the -q option takes in any valid search that works
# inside of the GMail Search Box. This is powerful stuff.
$ gmail_tool -a list -q "from:john subject:(linux)" 

# Google wants label changes to reference IDs, so get this list of IDs
$ gmail_tool -a labels  | head 
Label_11:designer request
Label_3:foo stuff

# Remove a message from my inbox 
$ gmail_tool -a update -i 1604fdca6faf6497  -r INBOX

# Loop through all messages that meet some search criteria,
# file them under a label and remove them from the inbox.
# The -p insures that all pages of the results will be retrieved,
# not just the first page.
./gmail_tool -p -a list -q 'label:inbox subject:(cron update-foo)' | \
   sed 's/:.*//' | \
  while read id ; do gmail_tool -a update -i $id -l Label_9 -r INBOX ; done

That last recipe is the one I need to rescue my inbox from an exploding script.

I can't tell you how psyched I am to add this tool to my toolbox. I'm actually looking forward to the next time I SPAM myself by accident. There's nothing quite like that feeling of kicking off a single command that replaces tedious work.

You can grab the scripts that power the above here. Feel free to use and customize them as you see fit.

Tuesday, December 12, 2017

Good Friends, Good Hiking and an Epic Simcha

Man, what a weekend.

It started with a delicious lunch with my college buddy Jen in NYC. She works in Times Square, and after lunch, we took a stroll through the surrounding streets. I've been to the area a number of times now, but I still stand in amazement at the diversity and energy in the area.

After lunch, we made our way to White Plains, NY, where we would be celebrating Ariella's Bat Mitzvah! This was a momentous occasion for us, as this was the Bat Mitzvah of the daughter of Shira's oldest friend. Literally, oldest friend (they've known each other since they were born). Shabbat Morning, Ariella just killed it. She lead services, read from the Torah and did a masterful job with her Haftarah. Services were held at Bet Am Shalom, a Reconstructionist shul. I can't recall ever having attended a Reconstructionist service, and I have to admit I was expecting it to be wildly different from the Conservative shul I attend. Instead, I found that the services were nearly an exact match.

Ariella and Keith, both of whom spoke about the weekly Torah portion, had an additional challenge to deal with. Mainly that the topic of the reading was the story of Tamar. As Keith deftly put it, the story of Tamar has less in common with the folksy bible stories you may recall, and more in common with Game of Thrones (and I don't even watch Game of Thrones). Both of them found powerful lessons in this R-rated story.

The Rabbi who conducted Ariella's Bat Miztvah, not only officiated at Becky and Keith's wedding, but officiated at Becky's Bat Mitzvah. With all four grandparents in attendance, and with a set of great grandparents there, one couldn't help but be amazed at the connections on display in front of us. Truly, l'dor v'dor.

Saturday night, we tore up the dance floor and partied as best as a bunch of old folks could (though, can you really call yourself old when Ariella's great-grandparents, who have been married for *74 years* were in attendance?). Mostly we couldn't stop being amazed how the itty bitty bundle of joy we still remember had turned into the young woman in front of us, dancing with her friends. The night, like the service earlier in the day, was just perfect.

As I told Becky, if we ever get a foster placement that needs a Bar/Bat Miztvah planned, our first phone call is going to be to her. What an amazing job she did!

Sunday morning, the responsible thing to do would have been to pack up and head home. But thanks to a friendly salesman at Westchester Road Runner, I had got my hands on a map of the Rockefeller State Park Preserve. The trails were just too enticing not to explore. And so with a couple of inches of snow on the ground, we made our way through this winter wonderland. Sure, it was 35°F, but the perfect snow covered scenery more than made up for the chill in the air.

After a couple of hours of hiking, it was time to call it a trip. I definitely feel like there's more to explore at the Preserve, so I'll be lobbying to get back if we find ourselves in the area.


Related Posts with Thumbnails