Heather's World

September 5, 2015 4:22 pm

Heather has been using her Nabi Jr. tablet for awhile now.  It has a camera on it that can spin from front-facing to back-facing.  I configured it to automatically sync the pictures to the computer.

With the pictures all in place I created a time-lapse of Heather's past year.  If you don't care about the nerdy details of how I made it, jump to the bottom to watch the video.

It started with the 925 pictures she took over the last year.  I ran them through ImageMagick to pad them to a consistent size:

$ cd /home/heather/Pictures
$ mkdir ~/Desktop/tmp
$ find "./2014/12 December 2014" "./2015" -name "*.jpg" -exec mogrify -gravity center -background black -extent 1600x1600 -path ~/Desktop/tmp {} \;

Then I, again, used ImageMagick to interpolate 3 transition frames between each picture so it's less jumpy (still pretty jumpy though):

$ cd ~/Desktop/tmp
$ mkdir morphs
$ convert *.jpg -morph 3 ./morphs/out-%04d.jpg

Okay, that's a little bit of a lie.  ImageMagick's convert tool currently (version 6.x) reads in all input before doing anything.  When it tries to load in the 925 images it uses up all the memory in my computer and then dies.  So I had to break it up into batches (IM 7 supposedly fixes this problem).  I used batches of 100 which still used about 7 GB of RAM:

$ ls *.jpg | head -n 100 | tail -n 100 | convert @- -morph 3 morphs/a-%04d.jpg
$ ls *.jpg | head -n 200 | tail -n 101 | convert @- -morph 3 morphs/b-%04d.jpg
$ ls *.jpg | head -n 300 | tail -n 101 | convert @- -morph 3 morphs/c-%04d.jpg
# .... all the way through head -n 900 .....
$ ls *.jpg | tail -n 26 | convert @- -morph 3 morphs/j-%04d.jpg

Doing it in batches results in a duplicate frame between each batch, so at this point we have to delete b-0000.jpg, c-0000.jpg, d-0000.jpg, etc. (but keep a-0000.jpg).

Now we're ready to run them through mencoder to produce our video:

$ cd morphs
$ mencoder mf://\*.jpg -mf w=1600:h=1600:fps=16:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -of lavf -lavfopts format=mp4 -oac copy -o ~/Desktop/output.mp4

I tried doing this with ffmpeg/avconv, but it kept cropping my images and I couldn't make it work.  I also spent hours trying to get all this to work without using intermediate files, but ultimately failed.  This process is a little more arduous (I might get around to writing it all into a script at some point) but it does work.

Here's is the view from Heather's world from December 2014 through September 2015 (there's no audio):

Or right-click and "save as..." to download it here: Heather's View - Dec 2014 - Sep 2015 (small)

If you watch closely you'll see Christmas, Jess being very pregnant, Corinne appears, Grandma visits, Kyle's birthday, and a lot of wandering around the house.

It's not super exciting, but I think it's kind of an interesting insight into Heather's world.

Carputer!

August 15, 2015 1:22 pm

IMG_20150815_123630as

One of the features in the Honda Odyssey that I've been looking forward to making use of is the auxiliary audio/video inputs located in the third row on the driver's side.  There's also a standard AC power outlet back there next to them.  This combination allows me to wire up a Raspberry Pi as an in-car entertainment system which is infinitely more useful than trying to swap DVDs up at the front console. This is especially true if one parent is sitting in the back with the kids because they won't be able to reach the DVD slot to switch discs and having the driver do so is not a great plan.

Also, it allows us to avoid the awfulness of DVDs: menus, previews, ads, FBI warnings--blurgh what a terrible experience.  Boot this up, select a show, and you're watching it instantly.

We've got some road trips coming up so I wanted to get this set up beforehand.  First I imaged an SD card with OSMC, an OS built around Kodi with the goal of making setup trivial.  And it really was trivial: Install the OSMC installer on your computer, run it, insert your SD card, click some options and you're good to go.  Pop out the SD card and plug it into the RPi.

Then I copied a bunch of movies and TV shows to a 64GB USB flash drive and plugged it into the Raspberry Pi (version 1 model B).  To get things started I hooked the RPi up to the network and the TV in the house so it could download updates and the appropriate metadata for the videos.  After initial setup I took it out to the van for a trial run.

IMG_20150815_123543as
The Raspberry Pi and associated cords fit nicely in the cup-holder.

I plugged everything in and turned on the car electronics.  The RPi booted up and was ready to roll in just a couple of minutes.  To control it I'm using this wireless keyboard/mouse combo by Lenovo which works great in this application.

IMG_20150815_125218as

Heather helped me out by watching a few minutes of Finding Nemo.  She declared it the best thing ever.

IMG_20150815_123557asThe 4 purplish lights you can see above the screen are the infrared LEDs that transmit the audio to the wireless headphones.  This allows the rear passengers to listen to the movie through the headphones while other passengers do something else--a sanity-saving feature for the adults in the vehicle.

Decisions are made by those who show up

June 16, 2015 10:30 am

The article "Inside Obama's Stealth Startup" was published yesterday over at fastcompany.com.  It discusses the U.S. Digital Service as well as 18F and the effort to bring government tech into the 21st century.  When these stories post I oftentimes take a look at the comment threads on common tech watering holes like Slashdot and HackerNews.  Generally speaking, Slashdot comment threads are rather cynical while HackerNews tends to be more optimistic, but overall it provides some kind of view into how the greater tech world is responding.  So I was surprised at the amount of cynicism expressed in the comments on HackerNews on this article.

Now, I tend to be fairly cynical, the only negative remark on my annual performance appraisals has always been that I should try to be less cynical.  (Personally, I think my cynicism has helped make our team successful, but I digress...) While I may be somewhat cynical, I'm also on the inside of government work.  I know my team members and their skills.  I know the mission space my software is used in.  And I know my background and motivations.

I understand feeling that nothing in government could really be improved so this whole thing must be nothing more than a PR campaign.  It's not.  This is possibly the first genuine attempt at meaningfully improving government tech services ever.  And there are more people pushing for it than just those in the U.S.D.S. or 18F.

I'm reminded of a quote from The West Wing: "Decisions are made by those who show up."

The government isn't just another corporation out to make a profit.  It is the thing which makes our country more than some lines on a map.  If it's not working the way you want it to then you have two choices: whine and complain on the Internet about how broken it is or show up and do something about it.

torbakhopper via Flickr - Creative Commons Licensed
torbakhopper via Flickr - Creative Commons Licensed

The government is likely to continue to exist for some time to come*.  If we're not trying to make it better then it's not going to get better.  If you know me well you know I am not Mr. Patriotic, and in fact I find patriotism dangerous as it is often used to stifle dissent.  This isn't about being patriotic or that somehow the U.S. is better than other countries.  This is about the U.S. government being our government.  And it was created upon the idea that the citizens should have some say in how their government operates.

For years technology in government has fallen behind due to thousands of qualified techies deciding they would rather chase piles of money by selling ads and shiny, metal gadgets than trying to make the government better.  And I get that it's not just about the money. Fighting bureaucracy is hard and exhausting.

But if we don't fight it then it's only going to get worse.  And we can change it.  I have changed my small corner of it.

When I started in my job 6 years ago the source code for this group was stored in an ancient deployment of SVN, the applications were built on homegrown J2EE frameworks with no documentation, missing source code, years behind industry best practices, and with release cycles measured in months.  The code was like spaghetti, it barely functioned, and the intended users hated it.  They disliked it so much that they continued throwing their data into Excel to avoid using the custom software which was supposed to be more useful than Excel.  There was no reason for it but culture and lack of energy to fight for change.

When I joined, the existing software group had disbanded.  I still haven't gotten a full story about what happened, but on my first day on the job the "team" consisted of myself, a database administrator, and a team manager.  Seeing the catastrophe of code that was in front of me I pushed on the manager to let me build a prototype using a modern framework (what did we have to lose, after all?).  It was a smash success and that prototype grew to become one of our core applications.

Now, with the help of willing managers and with our tiny team of software developers (just me, then 2, then 4, now ~7) we've made massive changes.  We use Git for our version control, we build our applications on popular open-source frameworks and libraries, we follow industry best practices as much as possible, our release cycles are measured in weeks and sometimes days.  Our users love the software and constantly ask for more advanced tools.  Our management estimates our technology environment to be at least a year ahead of any other organization in our mission space, we have saved the government millions of dollars, and we have saved lives.

Fighting the bureaucracy is hard.  Some days you think it would just be easier to give in.  It would be easier to give in.  But then nothing gets better.

We have enough work to keep a team twice our size busy but we can't find qualified people to fill the positions.  If the qualified people choose money over service then government technology will continue to suffer.

Our government is what we make of it and the decisions are made by those who show up.

So show up.

Software Wine-Tasting

June 8, 2015 2:14 pm

In the software world there is a term, "dogfooding," (shortened from "eating your own dog food") which describes the act of a team / company using the very software they build--usually as a critical part of their daily work.

That is, if you're the GMail team and you want to produce the best GMail service you can, you want your software developers, designers, managers, etc. all using GMail on a daily basis.  This will expose them to rough edges that need to be improved and the raw exposure will hasten the work to fix issues.  It also serves to show confidence in the product.  You might be suspicious of the quality of GMail if you heard that all the people that work on the product use something else.

This is all well and good for the kind of software that your own team can use on a daily basis.  But what if your software isn't an email client, or an instant messenger, or a music player?  The software I spend my time building is not software that I have any reason to use.  The customers/users are a specialized group of people.

I was having a technical discussion today with a group of software developers on this subject.  We recognized that dogfooding our software didn't make any sense in our environment, but it did make sense to sit down with our users and observe how they use the software and what seems to be confusing or slowing them down.  I described this process as "wine-tasting."  We're not consuming the product, we merely sample it in small quantities to try and understand it better.

So there you have it: if you can't dogfood your software, you should at least by wine-tasting it.

Tech Museum

April 11, 2015 12:54 pm

Heather's been feeling a little uneasy about the new family organization.  So on April 1st I took the day off and we went down to the Tech Museum in San Jose for which Mike and Tina gave us a gift certificate for Christmas.

Heather had a blast.

We started with the requisite Chick-Fil-A, since one was in the area.  As we pulled in to the parking lot Heather began exclaiming, "I love Chick-Fil-A.  We're so close I can almost taste it!"  And as soon as we walked in, "This is the best day ever!"

IMG_20150401_120704So the trip started off good.

At the Tech Museum she liked playing with the infrared camera:

IMG_20150401_134349And anything she could put her hands on, which was pretty much everything:

IMG_20150401_140418The downside of the visit was that the place was crawling with school groups with little to no supervision.  Nothing particularly bad, but every exhibit was therefore swamped and trying to get a chance to play with it was difficult at times.  But, after about 2:30 when all the school groups left it was quite nice.  Heather got a chance to have the robot artist draw her picture:

IMG_20150401_143934And the spelling robot wrote her name in blocks:

It was fun. We'll have to go back sometime.