Wednesday, April 30, 2014

Gotcha of the Day: ffmpeg converted flv file won't play in Windows Media Player

I'm using ffmpeg to convert flv files to avi files. The goal is to generate videos that any old version of Windows Media Player can play back.

I was using the command:

  ffmpeg -i foo.flv -codec:v mpeg4 -flags:v +qscale \
    -global_quality:v 0 -codec:a libmp3lame \
    foo.avi

And while the video played fine on my machine and using VLC, there were some Windows computers where Windows Media Player would kick back a useless error message, and refused to play the file video.

My first thought was that the codec was to blame. Using ffprobe I was able to find out the codec:

 $ ffprobe foo.avi
 ffprobe version N-62756-g2cf5143 Copyright (c) 2007-2014 the FFmpeg developers
 ...many lines trimmed...
 Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 320x230 [SAR 1:1 DAR 32:23], 1k tbr, 1k tbn, 1k tbc
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p, 64 kb/s

But alas, I had videos encoded with FMP4 that played back fine on the same computers that were choking on this newly generated video.

For the heck of it, I ran a file against the generated avi file:

foo.avi: RIFF (little-endian) data, AVI320 230 >30 fps, video: FFMpeg MPEG-4, audio: MPEG-1 Layer 3 (mono, 44100 Hz)

Whoa, that >30 fps is suspicious.

A quick check of the ffmpeg docs told me about -r:

‘-r[:stream_specifier] fps (input/output,per-stream)`
Set frame rate (Hz value, fraction or abbreviation).

As an input option, ignore any timestamps stored in the file and instead generate timestamps assuming constant frame rate fps.

As an output option, duplicate or drop input frames to achieve constant output frame rate fps.

This looked promising!

Indeed, I ran the exact same command as above but added -r 30 and now file reports:

foo.avi:  RIFF (little-endian) data, AVI320 230 30.00 fps, video: FFMpeg MPEG-4, audio: MPEG-1 Layer 3 (mono, 44100 Hz)

And best of all, Windows Media Player plays the file just fine.

Turns out, you can figure out the frame rate using the following ffmpeg command:

ffprobe foo.avi -show_entries stream=time_base -select_streams v -of compact=nk=1:p=0 

And I had the frame rate set to 1/1000, instead of 1/30. Ooops.

Tuesday, April 29, 2014

Graden Variety Trash, or Priceless Civil War Find?

So I'm digging around by the side of my house and I find this metallic disc covered in dirt:

It's almost certainly trash, right? I found it relatively close to the gas meter, so I'm thinking it's a corroded metal tag that at one point was used on the seal of the meter (like this, but in metal).

Thing is, it so reminds me of old coins I've seen behind glass cases in museums (except, there you can usually tell it's a coin you're dealing with. Though not always). Could this be pocket change from a Civil War soldier?

As you can tell, it's the same size as a dime. However, a dime isn't attracted to a magnet, and this guy is. So perhaps it's just an old, crusty, Candian dime?

It looks like there's a handful of things I can do to try to clean him up. I suppose it doesn't hurt to drop this sucker in vinegar and wait.

Perhaps though, the mystery is just left alone. As Grandpa would say, why ruin a good story with the truth?

Gardening 3.0: Think like a Guerrilla

What do with the backyard? This it the question I mull over from year to year. Do I just surrender and call in a professional landscaper? Or maybe I go full Urban-Homesteader, and Square Foot this sucker from top to bottom? Or perhaps I take my Brother David's advice an do a sort of Airbnb arrangement where I partner with some master gardener that's stuck in an apartment complex (I'll bring the dirt, they bring the skills)? I'm always looking for ideas.

A few weeks ago while browsing our local library, I came across Guerrilla Gardening: A Manualfesto and couldn't resist picking it up. For one thing, Guerrilla Gardening has Seed Bombs and Seed Money. And for another, I was thinking it might give me some ideas. After all, Guerrilla Gardening is about bringing beauty and utility to neglected spaces and that pretty much describes our backyard.

The book, as the title suggests, is part advocacy and part how-to guide. It makes extensive use of sidebar items, which I found distracting at first (exactly where am I supposed to be reading?). But with a little time, I've grown to enjoy the book. I love the entrepreneurial spirit that it promotes. You can have the beauty you want in your community today (or, at least you can plant it today) and you don't have to seek anyone's permission.

And then on page 70 I came across a sidebar item that rocked my world:

CAREFREE GUERRILLA GARDEN SEED PACK
"Simply break the soil a bit and then toss the seeds":

It then went on to list 32 low effort seeds (which I'll list below).

Think of all the reasons to embrace this list! For one thing, what could be more remarkable than starting with a seed and ending up with a plant? (Versus starting with a healthy seedling from Home Depot and ending up with a dead seedling some time later.) Scalability is overrated, so the notion of planting a couple of seeds and having success and going from there really appeals to me (there's also another term for this approach: debugging). Most of the plants in the 'seed pack' are edible, which means that depending on my audience I can drop phrases like Edible Landscaping or Secret Survival Garden. And if nothing else, I could say I'm working on my Guerrilla Gardening skills. Even my fascination with cramming stuff in my pockets is helped by this list: I could carry a few seeds in a in spy capsule and be ready to spread life and beauty anytime. It's also worth noting that many seeds on this list are recommended for kids because they are so easy to grow.

I suppose you could ask the question: are any of these seeds worth growing? I mean, planting a seed to see it sprout is nice, but is there more to it? And here's the thing, nearly ever seed on the list has at least one web page on the web extolling its value. Take Borage. I'd never heard of it, but here's just one article listing its benefits:

Borage is more than an easy-growing ornamental that brings in pollinators and pest predators. The younger leaves and flowers can be used in salads. The flowers are particularly tasty added to iced water or tea, used fresh or frozen into ice cubes. The flower and leaves have a slight cucumber taste but with a splash of honey (though it's worth noting that pregnant and nursing women are advised not to consume borage because of health risks to them and their children).

Borage flowers were made into candies in the Middle Ages in Europe, where the plant grows wild around the Mediterranean. They are still used as decorations on pastries or desserts. A tea of borage was considered as a mood enhancer, leading to its reputation as a sedative.

These days mixologists add the flowers as colorful highlights to gin-based martinis, inspired perhaps by the liquor Pimm’s No. 1, which lists borage as one of its flavors.

And that's just Borage. I'm telling you, every plant on this list has a similarly glowing review. And that's actually not surprising because *all* plants are interesting to someone. They either have looks, utility or a history that's worth knowing and appreciating. This list is no different.

So I was sold on the list. I was a little surprised, however, that I couldn't find any of these seeds at the seed display in Home Depot. No matter, I did a little searching online and found JohnnySeeds.com had quite a number of them. I placed my order, which included: Nasturtium, Fava Beans, Borage, Cosmos, Sunflower, Amaranthus, Marigold and Lupine and late last week the packets arrived:

Over this weekend, I picked a few spots (with Shira supervising) and dropped in various seeds. I wet the ground, and now we play the waiting game.

What's going to happen? Nothing? Probably. Will I just manage to embolden the weeds? More likely. But what if something does grow. What if I will have managed to embrace that principle in Guerrilla Gardening that suggests there's value in even bringing a little beauty to a space. Who knows. Like any good experiment, I'll learn something.

Oh, and does anyone have the name of a landscaper they love?




Carefree Guerrilla Garden Seed Pack

  1. Fava Beans
  2. Vetch
  3. Clover
  4. Alfalfa
  5. Lupines
  6. Borage
  7. Black nightshade
  8. Ground cherry
  9. Cayenne pepper
  10. Dandelion
  11. Sunflower
  12. Cosmos
  13. Wild Lettuce
  14. Margiold
  15. Shasta daisy
  16. Sow thistle
  17. Curly dock
  18. Sheep sorrel
  19. Shepherd's-purse
  20. Smartweed
  21. Milkweed
  22. Cockleburg
  23. Lamb's quarters
  24. Mustard
  25. Stinging nettle
  26. Goldenrod
  27. Burdock
  28. Nasturtium
  29. Amaranth
  30. Flax
  31. Rye
  32. Plantain

Via: Jamie Jobb. The Complete Book of Community Gardening. Morrow, 1979, p156.

Monday, April 28, 2014

Kenilworth Aquatic Gardens

For years I've been nagging Shira about visiting Kenilworth Aquatic Gardens, and this last weekend, we finally made it there. We rode our bikes, which was a little over 24 miles round trip and contained some wonderful stretches of trail.

The gardens consist of a series of ponds, a hiking trail (which we didn't do) and a boardwalk. Apparently, the plants that live in the ponds bloom around June or July, so on the surface, it didn't look like much was going on. However, we ended up seeing quite a bit of wildlife and views really are amazing. As for specifics, we saw a Great Egreg, a few Blue Herons, a big 'ol hawk, two different types of lizards, a chilaxing frog and a Black Rat Snake. And turtles (or tortoises?). Lots and lots of turtles. From too-cute baby turtles, to two large snapping turtles that were either fighting or mating (just like in humans, to the untrained eye it's hard to tell the difference).

I left really impressed. Sure, the boardwalk isn't quite as exotic as say strolling through the Florida Everglades, but when you consider the proximity to DC, it's definitely a winner. In many respects, it's like Theodore Roosevelt Island: potentially easy to dismiss, but truly a wonderful place to explore with kids and a nature lover's oasis so close to home.

Shira was in charge of capturing photos. I'm looking forward to going back with my DSLR where I can document each and every turtle from each and every angle.

Saturday, April 26, 2014

Who am I? Snake Edition

Shira and I saw this guy sunning himself while we were walking through Kenilworth Aquatic Gardens.

Any idea what type of snake he (or she) is?

Update: the consensus on Facebook is that this guy is a Black Rat Snake.

Friday, April 25, 2014

Grow!

Ever since I watched this YouTube video I decided that I needed to grow an avocado tree. I mean heck, I've already dissected one, why not grow one?

After a week of growth this is how he's doing:

Not much sign of life; but no mold either. Still, I've got hope that there's an angel working overtime to make this project a success.

Let It Shine

Ramblings About My New Phone - Samsung Galaxy S5

The first 24 hours of owning the Galaxy S5 I spent in curmudgeon mode: Feh!  What does this device do that my Galaxy S3 didn't do?

But, after a week or so with device, I've really warmed up to it. In fact, I'd say I'm actually quite impressed.

Here's a random'ish list of things I've noticed about the device. Most of them, as you'll see, are pretty dang positive.

1.  Improved Bluetooth Keyboard Support. When I plugged in my Bluetooth Keyboard, it Just Worked.  The onscreen keyboard was hidden, and gone is the annoying behavior of setting the Samsung Keyboard as the default when BT disconnects.  I'll have more to say on this capability soon, I hope.

2.  I'm liking the new main button layout, where the Menu Key is replaced with the Show All Apps key.  I did have an app or two that depending on the menu key, and it took only a Google Search or two to learn that if you hold down (long press) the Show All Apps key, you get the menu key functionality back.

3. The pedometer is a nifty feature. The heart rate monitor, not so much.  Maybe my Brother David is right: the heart rate monitor may be useful for demonstrating remote medical care capabilities (think: heart patient who needs to report in on his heart rate activity daily).  The pedometer is just plain fun.

4. The camera has some interesting possibilities. Gone is the explicit macro mode, which is probably a good thing as accidentally leaving that set could make normal photos blurry.  The near/far focus feature is relatively cool as well.  All in all, plenty to play with here.

5. The Ultra Power Saving Mode, if it really delivers, is to me one of the coolest features on the phone. There are times when I've longed for my Mom's old school flip phone because, gosh darn it, the battery lasts forever. And now I can have essentially this capability.  I'm telling you,  in the right context, this is a game changer.

6. It really does work in the shower!  Yep, this baby's water proofness held up in my test.  The only catch is that I found the damp screen wasn't really usable.  Though, voice activicated functionality did work, even with the sound of the water in the background.  I'm thinking this water-proofness won't necessarily replace the plastic sleeve I've used in the past to capture underwater photos, but it certainly provides a nice level of protection.

7.  I was thinking the little plastic USB cover was going to be a real annoyance. But, within a day or so, I've gotten used to peeling it off and plugging it back in.

8.  Mutli-window support seems enhanced compared to my Galaxy S3.  Between the memo app, Chrome and Juice SSH all being multi-window friendly, I'm finding that I'm now able to setup truly useful window arrangements, and save them for quick access later.  As a nice bonus, when I open up a link from Hangouts or the message app, I get a split window between it and the browser.  It's still not perfect functionality, but I can see that it's definitely headed in the right direction.  It's certainly far more practical than it was on my S3.

9.  The fingerprint reader is actually useful.  I'm using it to unlock my screen and I find it more convenient than a PIN, and more secure than swipe.  I'm sure the technology can be defeated, but so can my PIN and swipe given enough time.

10.  I've always dedicated one screen of the Home Screen to folders filled with apps.  And I can still do this. However, you can now also create folders within the App Drawer. Mind blown. It took me longer than I'd like to admit to figure out that there were two different kinds of folders and how they can both be maintained. For now, I'm shying away from using folders in my App Drawer.

11. The "Increase Touch Sensitivity Option," while to me not quite as slick as the Ultra Battery Saving Mode, is still remarkably useful.  And it does work: I was able to use regular old gloves to navigate my phone.  They say a pencil works on the screen as a stylus, though I haven't had the courage yet to try this.

12.  I've seen some claims that the battery life on the S5 is supposed to stellar.  I've yet to run a real test, but I'm thinking I'll still have little problem draining this battery in far less than day with heavy use.  I just know that that I'm at 66% of battery usage now, and I feel like my phone has only been unplugged for a few hours, if that.  I'm not ready to give up portable battery yet.

Bottom line: the S5 is a phone that's easy to rag on, yet it delivers. In fact, it's probably one of the few phones that's actually able to exceed its hype, that is, if you count Bloggers kvetching that there's nothing innovative on the phone as hype.

Thursday, April 24, 2014

Catching Some Rays

Kitestring: A Safety-net for Your Cell Phone and Inspiration for the Entrepreneur

My Sister-in-Law sent me this link: This New App Could've Prevented My Friend's Rape. The 'app' in question is Kitestring, a website designed for personal safety.

I've got a few quibbles with the article: (1) It's not obvious to me how this, or any app could have prevented the rape the story describes. And (2), the 'app' isn't an app at all, but a website and SMS based service. So yeah, don't bother searching Google Play or iTunes, you won't find anything there related to site in question.

Still, the article gets points for mentioning the service. I like Kitestring as both utility as well as a case study for entrepreneurs.

The service is quite simple: you report that you're starting a trip of a certain duration. At the end of the trip, the system checks in with you. If you send the system your check-in word, you're all clear. If you don't respond, or send the system your duress code, your emergency contacts are notified. The entire webapp consists of one page where you can set your various 'words', maintain your emergency contact list and customize the message to go out.

The system would work well for those walking home late at night, heading out on a trail for a trail, or even when stopping for gas in a shady neighborhood. I could see using it before heading out on an epic hike or monster bicycling trip. It would provide an automatic backup in case I got lost or delayed. I could even imagine parents using this as a sort of pop-quiz for their kids: they setup a trip on their behalf, and if they don't check in, they get a phone call and tracked down.

The system doesn't do anything fancy with the user's GPS or have extensive options. But I think that's a good thing. The simplicity means that it works, and you'll use it.

As an idea guy / programmer, I'm always going on and on with folks about how they can turn their big-huge-awesome idea into something that they can start building today. I have no idea who's behind Kitestring, and I have no idea what their philosophy actually is, but on the surface it completely matches up to what I tell my customers.

I can see the pitch: let's revolutionize personal security! Let's make it app based, location based and fault tolerant. Let's use a heart rate sensors to detect if the person really is in duress. Let's use the camera to snap a picture of the assailant. Let's integrate this in with 911 so the police can be seamlessly dispatched. Let's develop an advanced algorithm to detect false alarms from true crises. And I say terrific! Let's do it all! But let's start with version 1.0.

Version 1.0 needs to be small (it'll cost you less, be faster to build and more importantly, lower risk) but mighty. It needs to capture the very essence of the idea without having any extraneous features. Ideally, it could be used in a number of contexts, allowing people to re-purpose the system in ways the creators never thought possible. It needs to deliver true value, and pique users interest so that they'll give you feedback on what to develop next. And it needs to be something you can start on today without anyone's permission.

I believe Kitestring has nailed these essentials. Is it perfect? Of course not. But they appeared to have hit all the above points. If you're looking for inspiration for building out your idea, they'd be a good place to start.

Wednesday, April 23, 2014

Life's Little (Not Kosher for Passover) Treasures

That's real Tater-Tots and real ketchup (read: corn syrup based) - yum!

Both of these were off limits until last night at 8:40'ish pm. I'm still at the "oh, look, it's not Passover anymore" stage of eating. In another day or two, this will be gone and I'll stop blogging my lunch. Maybe.

Review: The Dark River and The Golden City

I have a literary habit I'm not especially proud of: sometimes, when I read book one of a series that I especially enjoy, I'll explicitly stop there. Dune. The Hunger Games. The Traveler. These are all books that pulled me and left me thoroughly impressed. At some level I wanted to keep that feeling of surprise and discovery that comes with a truly enjoyable book and that's often lacking in later books in the series.

On a whim, decided I to side step this rule started listening to book two of the Forth Realm trilogy. I had read and was smitten with book one, The Traveler, so I entered into book two, Dark River, with high hopes. Of course, being a trilogy, the second book ends on a fairly low note. Not to worry, I was able to immediately rent and listen to book three, The Golden City.

In many respects, these are both solid books. At their best, they blend cultural and historical references in clever ways. The notion that religious prophets are travelers, or how free runners naturally abhor The Vast Machine are quite inventive. I think it's also important to remember that while a number of the plot elements have become part of our cultural discussion (NSA spying on the web? Person of Interest), back when these books were written that simply wasn't so. I still like nearly all the characters, and find the whole relationship between Harlequins and Travelers to be fascinating. I'd buy Sparro's Way of the Sword in a minute and I'm ready to add a stick of chalk to my EDC so I can leave harlequin lute's on sidewalks and such.

But, there's no way these books can touch the original.

The book is obviously a pro-privacy manifesto, which I'm OK with. It pushes me to appreciate a perspective that's easily ignored. Yet, after two more books of preaching, the message become a bit tiresome. But worse than that, I found that there were just too many convenient plot twists that made the story feel sort of cheap. Perhaps I would have preferred a narrower scope of a story in exchange for a bit more realism (ignore the fact that I just used the word realism in a book that espouses the ability to jump between realms of reality).

Or maybe, my original hypothesis holds: what made the book so enjoyable was a sense of discovery and freshness that just can't be maintained through three books. I don't know. I do know that I'd recommend the first book, and not the latter ones.

I do give the author credit though, he is quite creative. Apparently, he's managed to keep his identity a secret and he's promoted this idea that you can be him. That is, he's encouraging folks to talk about his books, and claim to have his identity. A bit of a publicity stunt, but a fun one at that.

Sunday, April 20, 2014

Truth in Advertising - Passover edition





In their defense, these Vanilla Flavored Vegetable Fat Mini Bars are quite tasty. Seriously, this is our third or fourth year buying them, and they always surprise me as to how good they are. (Guess copious amounts of vegetable fat will make anything taste good.)

Hope you're enjoying the last few days of Passover.

Friday, April 18, 2014

Quote of the Day

What happened to my thinking mallet?
-Brendan

Overheard while on a call with a customer today.

Review: Empire Antarctica: Ice, Silence, and Emperor Penguins

In many respects, Empire Antarctica: Ice, Silence, and Emperor Penguins by Gavin Francis is the opposite of Headhunters on my Doorstep, another travel book I started reading at the same time.

Empire takes place in the frigid Antarctic while Headhunters has the author sweating it out in the South Seas. Empire has a more serious and introspective feel, while Headhunters is all about the laughs and introduces you to a number of characters on the islands.

But really, both books are about a journey where the author needs to face some pretty serious challenges. And that made Empire a page turner. Try as I might, I just can't imagine the cold and dark of an Antarctic winter. But Francis tries his best to take me there.

Like Headhunters, Empire goes off on wonderful tangents to give us a history of the area. There are well known stories such as the Shackleton expedition which I could hear told over and over again, as well as some more esoteric journeys I'd never heard of. And of course, there's plenty of description of the wild life (or lack there of) which also makes for interesting and inspirational reading.

All in all, the book is a wonderful travelogue. And what it lacks in side splitting humor it makes up for in genuinely good writing.

Thursday, April 17, 2014

Passover Seders 2014 - After Action Report

We had two wonderful Passover Seders this year. Following in my Father's tradition, both David and I came prepared with a number of items to discuss (it's part Seder, part small group study - what can I say, my Dad's a professor). Here's a few items we covered and links to learn more. In no particular order:

Why was Rabbi Akiva's Seder different from all other Seders? - an interesting political take on the Seder we read about during the Seder (whoa, it's an infinite loop of Seders!).

The Malbim Hagaddah - this is a wonderful take on explaining how the Haggadah is structured. It poses a number of thorny, yet important questions, and then deftly answers them. Really insightful stuff. I especially liked the explanation about the need to recite the Passover story, versus just making sure you recall it (or are wise enough to have mastered it). The idea being that the Seder isn't about ourselves, but about forming a chain of remembrance. So great, you know the story, but if you fail to pass it on, it will end with you.

A D’rash on “I Will Harden Pharaoh’s Heart - we had a short discussion about the ramifications of Pharaoh having his free will taken away during the Passover story. The D'Rash covers a number of well known explanations and finishes with this powerful bit of prose:

So here were all these questions running through my mind as I stood in awe and wonder before Rameses II’s statues in the desert in Abu Simble. How much more so must have been the awe and wonder of the ancient Egyptians as they looked up at these statues believing they stood before the god-Pharaoh?

Since the people believed he was a god, his powers must have been unlimited. Pharaoh could loose the bound and bind the loose. This being the case, God wanted to prove that Pharaoh was not a god but a human being, just like his people. If he were truly a god and omnipotent, then he could loosen his heart which God had hardened. But if he were unable to do so, he was not a god and the Egyptians would know that the Lord is God.

Passover Seders During the Civil War - Reading through a number of letters describing improvised Civil War Seders was both amusing and powerful. I learned too that Lincoln was assassinated on the 5th day of Passover, and the Jews observed it as a day of mourning.

I found David's explanation that the verse "Let all who are hungry, come and eat ..." could be interpreted to as a call to those around the table to give the Seder their full and undivided attention to be a moving one.

I thoroughly enjoyed our impromptu discussion of the "Pour out thy wrath ..." set of verses. One take away was this: the Haggadah has us take on many perspectives (the rich free man who doesn't pour his own wine and reclines while eating, the poor slave who takes a bit of bread and keeps the majority of it for later, etc.). To sandwich in the perspective of one who's crying out for G-d's help and vengeance during the joyful songs of Hallel seems both appropriate and meaningful. All those different angles make for a more complete Seder experience. With that context, the verses no longer seem so out of place and jarring.

For the first time, Shira made chicken soup from scratch with her usual batch of home made mazto balls. It was outstanding. So outstanding, that after the soup course I couldn't possible eat another bite. But of course, I did (I had her Pineapple Chicken, Shepherd's pie, Cauliflower Muffins and 3 home made deserts to eat).

I had a vague notion of starting a new tradition this year. Maryn and I enjoy an Arts and Crafts Shabbat when possible, so I was curious if we could do something a little crafty during the Seder. My reasoning: why limit the telling of our story to just words? Maryn ran with the idea and produced some amazing results. Check out what she did with the limited supplies I provided:

You've got: Pharaoh, baby Moses in a basket, the Ten Commandments, a burning bush, 3 of the plagues (hail, frogs and locusts), Moses parting the sea and a Seder plate with a cup of win in the center! I don't know how she's going to top herself next year!

All in all, it was a wonderful time. And such a joy to be at my Brother and Sister-in-Law's first Seder as a married couple.

Monday, April 14, 2014

DC in Bloom

Apparently every flowering plant and tree in the DC area has chosen this last week to explode with color. It's astounding. I can't walk anywhere without pulling out my cell phone to snap a few pictures. The biggest surprise was Theodore Roosevelt Island. Large swaths of the island are covered with a bright yellow wild flower; it's like out of a movie set or something. Truly gorgeous.

By the way, these are my first set of pictures from my new Galaxy S5. The camera does a number of new tricks which I've still got to learn. The image quality seems to be at least as good as the S3, if not noticeably better. Gone are the days when I'd take out my new cell phone, snap some pictures, and think "oh well, maybe my next cell phone camera will be usable." Nope, I've got to give credit to phone manufactures, they've really started packing their devices with very usable cameras.

Sunday, April 13, 2014

Chicken soup



Some assembly still required.

Shira is cooking, I'm cleaning, and overall nobody is panicking. Passover is just about here.

Gulp.

Friday, April 11, 2014

Handy Outdoor Skill: Gadgetless and Almost Gadgetless Weather Prediction

Exploriment shared a handy infographic explaining how to predict the weather by observation alone. I've reprinted the graphic below. I heartily agree with him: whether it's the weather, navigation or anything else in nature, there's real value in being able to make sense of your surroundings rather than just depending on a device.

Plus, I think there's real power in knowing the names of what we encounter outdoors; be it plants, animals, rocks or clouds. When you can name it, you can understand it and appreciate it.

As long as we're on the topic of weather prediction, it's probably worth reading The Art of Manliness' take on the topic. They cover a number of same techniques the graphic below does, but also mentions the power of using a barometer for weather prediction.

And where on Earth are you going to find a barometer while hiking in the woods? Perhaps in your pocket. It turns out that the Samsung Galaxy S3 and S5 have a pressure sensor built in. Using an app like WeatherSignal you can access it. Here's a screen grab of our current barometric pressure:

I have no idea how accurate the sensor is, but it sure makes for some interesting possibilities.

Here's the graphic:

View Full Size

Via: Exploriment

Count With Me - Omer Learning 2014

Passover is fast approaching, which means that Counting the Omer isn't far behind. For the last few years, our shul has been running an online program to help make this Mitzvah both easier and more meaningful. Here's the blurb:

Counting of the Omer can’t get any better than this! 49 bits of Jewish Wisdom in 49 Tweets for the 49 days of Counting the Omer!

Join us in marking the coming of Shavuot with a daily dose of Jewish Wisdom straight to your cell phones and inboxes, and infuse a little bit of Jewish learning between Passover and Shavuot holidays.

Sign up by texting follow omerlearning to the phone number 40404. Prefer to get e-mail instead of messages to your phone? Click here. Or, follow us on Twitter at @omerlearning.

The topic for this year is Psalms, every day we'll be tweeting out a verse from the Psalm that corresponds to the count (day 34, Psalm 34).

Should be fun (and totally painless). And for those who are counting, it should be a helpful reminder.

Learn more here.

Thursday, April 10, 2014

Down By The River

One of my favorite Arlington trail access points is 4 Mile Run Park. From here, you can jump on 4 Mile Run Trail, which in relatively short order connects you to either the WO&D trail or Mt. Vernon Trail. It's a relatively short walk/run from here to Shirlington, Crystal City, or Del Ray, if it's civilization you seek. You can combine the Four Mile Park trail and the Four Mile Run trail to form a 1.8 mile loop. This is especially useful for doing sprints (like we did yesterday), where covering lots of ground isn't key.

And for the Boy Scout / Photographer / 8 year old boy in me, there's even a small walkway down to the Four Mile Run stream (or river? or just 'run'?). Yesterday I had a few minutes to explore before and after our run.

Pop quiz: how far do you need to drive out of Arlington to go fly fishing? Answer: 0 miles:

Although, technically this section of Four Mile Run is in Alexandria. Still, this is the 4th fly fisherman I've seen fishing the area. I spoke to the guy, he didn't seem to be having any luck. But still, it looked like fun.

If I didn't know better, I'd say that I had found a piece of sea glass that had washed up on shore. It certainly felt like sea glass, it was smooth, yet seemed dense enough to not be a piece of plastic. With my luck, it was just a piece of trash left by a teenager. Check it out:

OK, I know this guy isn't natural. But he still made for a fun subject to photograph:

All around the park, Spring is springing! I know I keep taking the same picture of the same buds over and over again, but I don't care. They're just too beautiful to not notice and appreciate:

Now, where did I leave my allergy medicine?

Late Bloomer

Literally.

Wednesday, April 09, 2014

Think Like a Unix Geek: Using rsync on Windows to Avoid Restoring From The Cloud

Shira picked up a new laptop a week or so ago. Transferring the files from her old computer to the new one was going to be trivial. She uses CrashPlan as a backup solution, so all she needed to do was install the free version of the app on her new laptop, click the restore tab, and Bam! she was off and running.

Alas, it wasn't so simple. First, the restore dragged and dragged. It took 7 days to download about 400 gigs of data. When she had a mere 10 gigs of data left to restore, the process crashed. When she went to re-execute the restore, it started from scratch. Ugh.

Surely there had to be a better way to get files from Laptop A to Laptop B. The download from cloud method is technically effective, but as I learn every time I restore using Carbonite, it's both fragile and painful.

I noodled over the problem and ended up thinking: if this was a Linux box I'd just kick off rsync and the problem would practically solve itself. Wait a second, I thought, why don't I do just that?

I was inspired by the instructions here. First off, I downloaded rsync through Cygwin on both machines.

On the source (old) laptop, I setup the following /etc/rsyncd.secrets file:

agent:somepass

Also on the source (old) laptop, I setup the following /etc/rsyncd.conf file:

hosts allow = 192.168.1.12 192.168.1.11 192.168.1.14
auth users = agent
secrets file = /etc/rsyncd.secrets
read only = true
use chroot = no
transfer logging = true
log file = /var/log/rsyncd.log

[agent]
path = /cygdrive/c/Users/ShirasUserDirectory

Note: you'll want to tweak the IP's above so they correspond to your network. And you'll want to update the path under the [agent] block. The username 'agent' is fine to use, it doesn't need to exist as a local account or anything.

With those files in place, I was able to run:

 rsync --daemon

 tail -f /var/log/rsyncd.log

and to my shock and amazement, it worked!

From the destination (new) laptop I executed these commands:

  $ cd foo
  $ /usr/local/bin/rsync.exe -av  --ignore-existing   agent@192.168.1.17::'agent/foo/'  

This assumes, of course, that the source laptop is hanging out at 192.168.1.17. The above command asked me for a password, I entered somepass and contents of foo were successfully copied over to my new laptop. The --ignore-existing insures that files that are already on the new laptop don't get re-transferred.

I thought I was home free at this point. I tapped out the following command, hit enter and waited:

  $ /usr/local/bin/rsync.exe -av  --ignore-existing   agent@192.168.1.17::'agent/'  

This however, transferred a few files and then appeared to hang. I came back a few hours later and it had made some progress. But still, it appeared to be stuck.

My first thought was that I ran into the rsync hangs on cygwin problem. There's a number of solutions to this, which I tried.

The thing is, I don't actually think rsync was hanging. I think instead it was just slowing moving data around. When I finally added enough 'v's to the command (-avvvv is more verbose than -avv) I confirmed that data was being transferred.

The next step was to try to narrow down what was being copied. I had some initial success with this command (inspired by this post):

/usr/local/bin/rsync.exe -av --timeout=10 \
  --ignore-existing --exclude='AppData/*' --include='*/'  \
  --include='*.jpg' --exclude='*' agent@192.168.1.12::'agent/' .

This says to exclude the AppData directory (which is filled with temp stuff), include all other folders, include JPEG's and most importantly exclude everything else. This caused rsync to start transferring actually useful jpeg's over to the new computer (versus temp stuff). Finally, some progress. Unfortunately, it was still ridiculously slow.

I looked at what I could optimize next: how about getting rid of the Wireless connection? I dragged both computers downstairs to the physical router and pugged them in. I kicked off the above rsync command. Whooooo! The files whizzed by. I checked the Windows Network Performance, I had gone from 2mb/s to 50mb/s! Now we're talking.

After further experimentation, I kicked off my original command to copy all the files. Finally, the system had enough bandwidth, and it zipped along. At one point, there was a throughput of 300mb/s. Behold, the power of wires!

In the end, I learned some valuable lessons from this experience: (1) never underestimate the power of physical cables, (2) it pays to think like a Unix geek and (3) rsync rocks.

Next restore I'm skipping the download from the cloud and going right to this rsync solution. However, clumsy it is, it's way better than crossing my fingers for a week straight and hoping the massive restore works.

Tuesday, April 08, 2014

What's In The Bag, or Ben's Jr. Go Bag

LifeHacker has a continuing series where where they feature someone's Go Bag. Most recently they featured a Lean Engineer's bag (I didn't even know such a title existed). To me, this makes for fun browsing. I keep meaning to contribute my own bag tour to their flickr group, but have yet to get around to it. After reading Devin over at GoRuck's bag breakdown (which includes such "essentials" as a flask of Whiskey and a collection of George Orwell's writings), I decided it was time for me to take some action.

OK, let's get into this. First off, here's the overview:

Notice what's missing? How about the bag. That's actually by design. See, unlike my Lean Engineer Friend or Devin over at GoRuck, the bag itself changes. If I'm taking a walk through the neighborhood, I'm probably using the Port and Company Sling bag. If I'm traveling, like I was a few weeks ago, I'm probably using the day pack attached the the REI Stratocruiser (a solid piece of travel luggage, by the way). If I'm going into DC and bringing heaps of camera gear, I'm probably using a larger knapsack that can accommodate it all. In other words, it's not about the bag.

Also, modularity is key. If I'm going without a bag but wearing cargo shorts, I'll probably grab the Altoids Tin and Flip & Tumble bag, and do without the other items.

So just what are you looking at above?

  1. PhotoJojo lenses - these tiny lenses let me grab fish eye and macro shots with cell phone. They help turn my cell phone camera into a device that doesn't just serve as a backup to my DSLR, but compliments it.
  2. Anker Astro 3E battery - the battery on my S5 is supposed to have great performance, but I still find that I can effortlessly drain it. Back when I had a Galaxy S3, it took only a few hours of heavy use to be at 50% or below. This battery saves the day every time. It's especially useful during travel, when the phone gets even more use. This is probably my most used item.
  3. Perixx 805L Keyboard - this keyboard turns my Galaxy S5 into a touch typing machine. Between remote shell access, Terminal IDE and text input capability, this basically turns my cell phone into a simple, yet usable laptop. It replaces the MiniSuite Bluetooth Keyboard I was carrying, which was functional but not quite as powerful as the Perixx.
  4. An Altoids Tin filled with goodies (see below)
  5. A small red bag filled with goodies (see below)
  6. A Buff. In the winter, this serves as a balaclava for colds days. In the summer, I drench it and use it to keep my neck cool. While traveling I used this recently as an eye mask and a beanie (who knew it was going to be chilly in San Diego?!). Like any bandana, it's got hundreds of uses.
  7. Another Bag. this one is a Flip & Tumble, though I sometimes swap in Sea to Summit foldable backpack instead. Yes, I appreciate the irony of using a bag to carry around a bag. But, I find this guy gets a heck of a lot of use. After the battery above, it's probably my second most used item. Anytime we take a walk in the neighborhood, I find that we end up at the grocery store, pharmacy or library and I've got to haul stuff home. The bag works.

It's probably worth noting that what I'm describing above is much more in line with LifeHacker's Go Bag universe than what's traditionally called a Go Bag. A Go Bag is supposed to be what you grab when need to leave Right Now. Whereas LifeHacker tends to be more "what do you carry with you on a regular basis" (or EDC for those who know the lingo). The above items are designed mainly for life's first-world problems: being stuck on the tarmac and hoping my battery will stay alive long enough to finish my audio book, or using the macro lens to grab a photo of some curious looking insect. On the other hand, with some creativity, the items in the bag should be able to help me weather 24 hours pretty much in any location; from a Red Cross shelter to a night in the woods. So, comparing this to a fully stocked Go Bag, I'd call it a Go Bag Lite.

OK, enough chatter, onto the rest of the contents. Here's the Altoids Tin:

I've written about this guy before. Here's the current contents:

  • Stickers!
  • $20
  • A sheet of heavy duty aluminum foil
  • Band-aids
  • A short section of wire
  • A twist tie
  • A cotton ball (mainly used to keep the contents quiet)
  • Gorilla Tape wrapped around a gift card
  • Dental Floss
  • Blister Treatment
  • Index Cards, cut to fit
  • Headphones
  • Binder Clip
  • (4) Quarters
  • A Lightload Towel
  • (4) waterproof matches and striker
  • Nano sized write anywhere pencil
  • Coffee filter
  • Needle
  • Bobby pin
  • Rubber band
  • (1) dose of high powered migraine medication
  • (2) small fishing hooks
  • Strip of style tape

To date, the headphones are probably my most frequently used item. A random silicone bracelet keeps the tin closed and is useful in its own right.

And here's what's in the small red bag:

  • A tube of peanut butter. Yum! This guy is essential.
  • Shortbread cookies. Yum!
  • An USB wall charger. When combined with the cord from the Anker above, I can re-charged my cell phone or external battery at any outlet. It's a little bulky but power is so essential it's worth the trade off.
  • Bic Mini Lighter - as a Boy Scout, I've got to be ready to start a fire at moment's notice. And who knows, maybe I can rig up a torch to fight off zombies. Actual last usage: lighting birthday candles.
  • Athletic Tape - a veritable single-item first aid kit.
  • packet of medicines: Pepto Bismol, Imodium, Advil, Benadryl, that sort of thing. When you need an Imodium, you *need* an Imodium. Small, but powerful stuff.
  • Space Blanket - Lots of uses for this guy.

So there you have it. It may not contain the 3 cutting implements that Devin's go bag has, the guns, ammo and cash Salt has in her bag, but all of the items above are TSA compliant and can be dropped into any bag I'm carrying. And I'm ready for anything. Like an extra long wait in the dentist's office or a surprise trip to the farmer's market.

By the way, all this is on top of my usual pocket contents, which covers the essentials I truly don't want to be without.

So, nu? What's in your bag? Do share a link to your bag's tour.

Why You Shouldn't Hire Me to Direct Your Commercial

I'd probably be the worst creative director for a commercial you could hire. Consider this spot:

It's relatively funny, right? Of course, that's not what I see. What I see is a missed opportunity.

I see AT&T playing off the stereotypes of geeks vs. rockers. And rather than answering the question: "Do you know how to optimize a 9 beam multi beam antenna system?" with a simple "Nope," I would have rewritten the script so that the rocker responds something more along the lines of "Hell Yeah! I helped build that protocol when I was in high school!"

And I can already see the client rolling their eyes, "Geeze Simon, does everything we say and do need to be filled with rainbows and butterflies? Can't we make one rocker dude look a little dumb; people love simple humor and what's simpler than a rocker being dumber than nerds?"

What can I say, I'm all about seizing opportunities. Even if they are in a silly 30 second ad spot.

Thanks to my Brother David for passing me this video and knowing that this little innocuous bit of humor would get under my skin.

Friday, April 04, 2014

Google Analytics Annotations - A Simple, Yet Powerful Tool for Adding Context To Your Site's Traffic

The other day, one of my peers on a project showed me a feature of Google Analytics I'd never heard of: annotations. This article gave me some additional background on the topic, but really, one pictures says it all:

See those 'note' icons that I clunky circled? Those are annotations. Effectively, you add your own notes to the Google Analytics graphs. These notes are an easy way to track activity that may impact the website, but wouldn't automatically be picked up by Google Analytics.

Deploy an important change to the registration process? Then make an annotation. Now, when registrations plummet (or soar!), you'll have some idea of why.

It's a simple, yet brilliant way, to add context to Google Analytics that may otherwise be missing. All of a sudden, those peaks and valleys in the graphs may actually have some explanations behind them.

Recently, I blogged about maintaining a ChangeLog. Annotations dovetail nicely with this. By adding a simple annotation, like say:

Release: 3892

It's possible to look up in the ChangeLog exactly what was deployed in that release. And from there, you can tease out how the changes you pushed impacted your traffic and visitors.

Thanks to Teri Ross who introduced me to the concept of Annotations.

Thursday, April 03, 2014

A Little Love For the Humble ChangeLog

A couple of years ago I fully embraced a coding practice which has proven its value on numerous occasions: maintaining a release Change Log. Not surprisingly, I do it with a Google Spreadsheet. Here's the mechanics of the process:

I start off with an empty document:

Whenever I finish a feature or bug fix and push it to the customer to review, I add a bulleted item in the Notes column.

And when I get more done, I note it.

And even more done, I note that too.

When I finally do a release, I note the date and version and store them in the appropriate columns.

Finally, I insert a new row above the one I was working with, and that's where I'll note my next set of features and bug fixes.

So what does all this buy me?

The fact that it's a Google Doc means that I can easily share this information with anyone in the organization who might need it. It's also something other developers can contribute to with ease. Tracking all the features completed in one place means that I can inform my customer of the exact release contents before and/or after the release is done. Having the date column allows us to relate the releases to other events and reports. The version column allows me to get to a release's exact code contents with ease (svn up -r 2938, and I'm back to the moment right before the release).

I'm always suspicious about adding process or potentially duplicating information. When I started this practice, I had to convince myself that the change log wasn't something I could auto generate from version control or the bug tracking system. By now, however, I'm more than convinced: whatever work this practice had added, it's delivered far more value.

The Arlington Passover Challenge

I'm not on the Shopping Team; I've proven myself to be too unreliable for such an important role (I am, however, very much on the Taking Out The Garbage Team). So when I go shopping, it's more as a spectator to walk behind Shira and take specific orders. Unfortunately for her, this leaves me a lot of thinking time. And this time of year, as Passover is fast approaching, I have the same thought every time we turn the corner and see the grocery store's Passover endcap:

We should totally do an Arlington Only Passover this year!

See, the display usually carries a random and limited selection of items (say, Matzo, borscht and marshmallows) that leaves me wondering how anyone could stock up for 8 days of eating with such a limited selection. Just across the border in Maryland are stores overflowing with Passover friendly options, from basics like tuna fish and potato chips, to the absurd chocolate breakfast cereal.

So I urge Shira, who lost patience with me 3 aisle ago, what if this year we *did* an Arlington Only Passover. That is, stock up for holiday using just what the County grocery stores have to offer. Wouldn't that be fun, interesting and adventurous?!

My mind immediately starts running through the various challenges: Trader Joe's has us covered in the wine department. And you can use a roasted beet instead of a shankbone on the Seder plate. Heck, my Sister-in-Law recently sent me this article listing 25 main courses for Passover that don't contain meat. So even if you couldn't find Passover marked meat (Whole Foods had Passover marked Kosher chicken), you'd be all set. And for all those who want to be trendy, Whole Foods is even carrying marked Quinoa:

So far, I've yet to come across marked tuna fish or potato chips. But there's almost always sardines, and you can make your own potato chips, so that should work. (Sardines are fish, tuna are fish, same thing. Right?)

Did I mention that I'm not on the Cooking Team, too? So yeah, I could brainstorm all I want, but at the end of the day, Shira will be the one doing all the cooking. (Can you guess who's captain of the Clean Up Team?) As such, she gets to decide where we shop.

So yeah, this weekend we'll almost certainly go to Maryland and live it up. But I'm telling you, one of these years She's going to see my little experiment as an adventure and is going to embrace it. Just not this year.

Wednesday, April 02, 2014

20 Minutes and $20 To The Ultimate Thumb Drive

I know what you're thinking, Thumb drives? Aren't those so 2005?. First off, let's get our terminology straight: when I say thumb drive I actually mean a Micro SD Card and an itty bitty USB card reader (total cost: about $20). With this setup, you've get the following:

  • A backup SD card for your Android device
  • A way of plugging your Android device's card into any old computer
  • Assuming you standardize on Micro SD cards for all your devices (and use the included free SD card adapter where necessary), a backup card for your DSLR
  • Again, assuming you standardize on Micro SD Card, a way of getting your DLSR photos onto any computer without a cable
  • You add another layer of descending redundancy: when I travel, I'll probably use a laptop for computer access. And if I don't have access to my laptop, I'll probably use my cell phone. And if I don't have access to my cell phone, I can use the apps and data on the thumb drive
  • It's highly concealable. Just think, you can store thousands of documents in a nearly invisible package

OK, you're convinced. Now let's go make a thumb drive.

  1. Install the PortableApps platform. Now, when you visit your Mother-in-Law's house, and all she has is an ancient version of IE7 running, you can kick off Chrome.
  2. Install GnuWin32 (or, UnixUtils). Now, when you're at your Brother-in-Law's house, and need to help him edit 800 files for his thesis using sed, you're all set.
  3. Install Netcat. Now, when you're at your Sister-in-Law's house, and you want to show your Nephew how the internet *really* works, you can kick off nc and show him the basics of the HTTP protocol.
  4. Walk around your house and collect important documents. Basically, anything you'd be bummed to lose. Now, snap a picture of the front and back of said documents. Store them on the drive. For bonus points, encrypt them. Now, when you're at your Uncle's house talking about the fluke storm coming your way, you can check your Home Owner's insurance policy to see if it covers flooding.
  5. Head over to Project Gutenburg and download a number of classic books. Now, when you're Niece is saying she can't do her English assignment because she forgot her book at home, you're all set.
  6. Head over to Noah's Archive and download various survival related books. Now, when you're comparing notes with your survivalist-neighbor, you can show him how uber prepared you are.
  7. Save a copy of your private SSH keys to the drive. Again, encrypt if you're feeling up to the task. Now, when you're at your Aunt's house and need to fix a busted server, you can ssh in without using a password.
  8. Save a copy of the Time Traveler's Cheat Sheet. Oh wait. If you go back in time, how are you going to read said cheat sheet? Never mind, better print this one out and put it in your wallet.

20 minutes later, all your data should be collected and organized. Now, slap that USB reader on your keychain and you're good to go.

By the way, what did I miss?

Tuesday, April 01, 2014

Getting Back In Touch With My E-mail Roots - A Little Gmail Integration With Emacs

For the majority of my e-mail consuming life, I lived in emacs. First RMAIL, then Gnus. I was threading conversations before Gmail was a glint in anyone's eye. These days, though, I live in the Gmail universe (whether it's Google Apps for business or plain old Gmail for personal). And for the most part, life is good. Every once in a while I'll consider switching back to using emacs full time, but it just doesn't seem like the benefits are there (heresy, I know).

Then it hit me: maybe I can get some benefits of e-mail from emacs (mainly, super quick access without having to lift my fingers off the keyboard) without doing a big switch. That is, configure emacs for sending of e-mail and not worry about the reading side of things.

A quick Google search turned up this configuration, and I thought my setup was going only require a few seconds of work. Alas, it wasn't so simple.

I ran into a number of issues: First, Google requires either SSL or TLS encryption for sending of e-mail. I spent a bunch of time trying to get GnuTLS to run on my Windows environment. It seems like all the pieces are there, but I kept running into issues. While I was fiddling with this, I ran into another problem: Verizon FIOS blocks outgoing port 25. Not a huge deal, as you can switch to port 587, but it did cause me to scratch my head as to why my connection was just timing out.

Finally, as I was just about to give up on my dreams of emacs e-mail, I remembered that I've got a second option for encryption: SSL. I went ahead and installed stunnel as a Cygwin package and setup the following configuration:

# Inspired by: https://www.stunnel.org/pipermail/stunnel-users/2012-April/003695.html 
client = yes
output = stunnel-log.txt
debug = 7
options = NO_SSLv2
options = NO_SSLv3

# SERVICE-LEVEL OPTIONS
[SMTP Gmail]
 accept = 465
 connect = smtp.gmail.com:465

I then kicked off stunnel and set the following up in emacs:

(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-smtp-server "localhost")
(setq smtpmail-smtp-service 465)
(setq user-mail-address "ben@ideas2executables.com")

I was then able to hit Control-x m, type a message and hit Control-c Control-c to send it off. Emacs prompted me for my SMTP credentials (which is my gmail login) and to my shock and amazement, it worked.

I can now tap out quick message from emacs, all without messing with my existing e-mail setup. It may not be as exciting as the day I finally got Gnus setup the way I wanted it, but it's a step in the right direction.