Dangerous Field

Back in the magical decade known as the 90’s I got my first graphing calculator.  It was one of the Casio FX-7000 variants–I don’t recall which one exactly, but I do clearly remember that it had 422 bytes of memory to be used by programs.  While I wrote some programs to do mathy stuff, most programs were games.  I think the first game I wrote for the calculator was a number guessing game where the game would generate a random number and the player would enter guesses and be told it the actual number was higher or lower.  There were various other games along the same vein.  Then I started coding with a friend and things got “Dangerous”.

My friend Jed had a Casio graphing calculator too.  His was newer and fancier and had more memory, but it used the same programming language.  One day (I think during French class), he showed me his new game “Dangerous Field”.  It was a text adventure game in which the game play went something like this:

DANGEROUS FIELD
U R IN A FIELD
WUT?
> N
U R IN A FIELD
WUT?
> E
U R IN A FIELD
WUT?
> N
U FALL IN HOLE
U DIE
3

Zork it was not.  In Dangerous Field you were in a field and could go North, South, East, or West.  After a random number of moves, you fell in a hole and died.  The “score” was the number of moves made.  There was no terrain or scenery apart from the field, there was no possible strategy, and there was no way to win.  But it was a start.

We made new versions of Dangerous Field adding various features such as a map stored as an array defining a path the player could potentially follow to escape the field.  Other games were added to the Dangerous series including “Dangerous House” and “Dangerous Cave”.  Combat was added as well as rudimentary graphics–all within 422 bytes.

In the years since then, I’ve written a lot of code in various programming languages, but never have I been so concise.  My next calculator was an HP48G (which I still regularly use and is currently sitting on my disheveled desk) with 32KB of RAM so I had enough room to write whatever I needed.  A full computer obviously has tons more space, and even the toy apps I’ve written for a space-constrained smart phone have been measured in megabytes.  So now, whenever I think about the constraints surrounding coding, I remember Dangerous Field and all that was crammed into 422 bytes.

Le Petit Prince–read it more than once

Some books are worth reading more than once.  One book with a lot of reread value is The Little Prince by Antoine de Saint-Exupéry and there are five copies in my home.  Although all are the same story, each book is different and makes me remember different things.

Little PrinceThe first book is a 45 year old Le Petit Prince in the original French.  I believe I stole it from my parents’ home and it most likely was previously claimed by my mother or sister.  I remember as a kid reading an English translation (which my parents probably still have along with another French copy) and enjoying the story while marveling that my parents and sister could read it.  Later when I was studying French I read portions of the text and experienced the story in new ways because I was forced to slow down (and often read it aloud).

小王子 was purchased for me by a good friend on a trip to China that I didn’t get to take.  My Chinese is lousy and I can only pick out words here and there, but since it has English on the left page and Chinese on right, I can read the English and appear like I’m capable in Chinese.  This book reminds me of what I gave up and what I gained by not going on the trip.

The English copy of The Little Prince was a gift from my sister-in-law and it was accompanied by doll in the picture above.  It’s a different translation from the one I grew up on (suggesting another book for my library) and so provides the opportunity to see the familiar tale in another way.  Because of the doll, the book was often packed separately from other books as we moved several times.  Being separate, I remember various times pausing from my packing or unpacking and reading various snippets.

In general, I don’t like shopping in stores, but I do like bookstores and also enjoy Japanese stores so browsing in Japanese bookstores is particularly fun.  I purchased 星の王子さま on a trip to Tokyo with the family in 2008.  When I peek at the book, I remember that trip, my other times in Japan, and the many hours I spent reading Japanese novels and stories in grad school.

Finally there is Il Piccolo Principe which I purchased as a Valentine’s Day gift for my wife this year.  It doesn’t remind me of any trip to Italy, but rather makes me think about my wife.  It makes me think about what she gave up and what she gained in joining me on an adventure.  Along with the book, I also gave her a wooden card with a favorite quote (in the English translation I knew as a child) laser engraved on it.

foxCard

If you haven’t read The Little Prince, I recommend it.  If you have read it, it doesn’t take long to read it again and it usually seems better than you remembered it.  You definitely want to read it more than once.

What’s a Triby?

tribblesWhen I saw the word “Triby”, my mind jumped to a classic Star Trek episode and I imaged Captain Kirk and a bunch of fuzzy things.  A quick search revealed that those are “Tribbles” and that the Triby is very different, but the similarity in name grabbed my attention enough that I put forth to answer the question, “What’s a Triby?”

Last month I commented (perhaps bemoaned?) that all the fancy gadgets aren’t very family friendly.  Apparently Triby is a new product which is all about “Connecting you with the music and people you love”.  I find it interesting that music is listed before people, but it does seem to be a step in the right direction.

The core of Triby is the Alexa Voice Service.  This means that it is a lot like the Alexa on the Amazon Echo.  However, it doesn’t seem to support everything Alexa has to offer such as some music services (Spotify and Pandora) and home automation solutions (WeMo and Phillips Hue).  Even without those, the core Alexa functionality and numerous skills available (such as Nanny State) provide many features useful to a family.

There is also some “internet calling” capability in Triby.  This allows for hands-free calling.  It appears as though it is configured so that calls can only be made to/from specified contacts–this suggests that a kid could easily call Grandma but there wouldn’t be concern of telemarketers calling.

Triby goes beyond voice communication with a small display and a few buttons.  By default, the screen appears to have a clock, the day/date, weather information.  Some pictures show the Triby displaying information about what music is playing, or displaying virtual sticky notes sent from the phone app.  The buttons are shortcuts to call people or play specific stations and do other tasks like answer a call (but presumably those things can be done with voice as well).

tribyTo me the Triby looks like a toy radio for children.  It has a magnet on the back so that it can be attached to a fridge.  The buttons are also have a toy-ish appearance.  The screen is a small e-ink display–probably to reduce power consumption (the battery lasts about two days on a charge).  The neatest physical aspect of the Triby is the mechanical flag that pops out of the side when a new message is received.

I’d love to have a chance to play with a Triby, but I don’t see myself forking at $200 for one (or even the current $169 sale price on Amazon).  I think Triby has good intentions, but I’m not seeing a WOW! factor.  I wouldn’t be surprised if soon there is a new and improved Triby available that is flashier.  For now my family will continue using our BakBoard and Echo combination, but I’m glad that companies are starting to produce family-friendly tech products.

Can I have screen time?

Nanny StateScreens provide “cheap” entertainment.  By “cheap” I’m not referring to the cost in terms of money, but rather effort to participate.  It’s much easier to turn on the TV and vegetate than to go on a hike and easier to hop on social media than call up a friend and go see a movie.  Because of the ease, screens are often the go-to entertainment choice.

In my home, the kids tend to frequently want screen time not only in lieu of entertainment that requires effort, but often instead of performing other, more important tasks.  So, when a kid expresses a desire to a parental unit for permission to utilize a screen, the parent typically ascertains things such as:

  • Status of homework
  • Status of chores
  • Completion of daily instrument practice
  • State of personal space (room clean, bed made, etc.)
  • If any sanctions are in place prohibiting screen use

Even though the kids are familiar with the criteria, usually there are multiple requests made before the kid has completed everything necessary to be allowed screen time.  Each of the rejections could be deemed as a negative parent/child interaction.  I decided to offload this monotonous task and created Nanny State.

Nanny State is a Alexa Skill for the Amazon Echo.  Basically, a kid says “Alexa, ask Nanny State if I can have screen time.”  The kid then must respond to a few yes/no questions covering the items in the list above.  If the kid provides an unsatisfactory answer, the response is “No screen for you.”  If all answers are as they should be, the kid is instructed to confirm with a parent.

For fun, I submitted Nanny State to Amazon.  This morning I received an e-mail stating that “Your Alexa skill Nanny State is now live!”.  This means that anyone who owns an Echo can go to the Alexa App or http://echo.amazon.com/#skills and enable Nanny State (or click on the image and it will take you there).

enableNannyState

Less social networking, more familial interaction

It seems to me that as technology drops in price and becomes ubiquitous that it tends to focus on the individual and neglect the family unit.  I don’t see this as a deliberate attack on families, but I do see opportunities for innovation an effort in improving technology to make things easier for families.

A phone number used to be associated with a location–dialing a personal phone number would cause the phone to ring in a home.  Today, more people are cutting the land line and only using cell phones and this sometimes makes effective communication more difficult because there is no way to contact anyone in the family, only a particular individual.  This is particularly difficult for my kids who want to call friends–the younger ones don’t have cell phones yet, but when both parents work, calling cells simply doesn’t work.

Another example is the calendar.  Traditionally there would be a calendar on the wall or refrigerator that would be used to track activities for the family as a whole as well as individual family members.  Electronic calendaring systems have been around for quite some time now, but still paper calendars seem the norm for families.

It was the calendar that got me started making BakBoard, and it seems many other people have had similar ideas.  Just today I learned about the wall mounted information display created by Tom Scott which has a calendar, weather information, and (my favorite) a countdown timer to help get the kids out the door to catch the bus.  There’s also the Wall Mounted Calendar and Notification Center which doesn’t have the bus timer, but does have some buttons to change the calendar view and to refresh the web page.  Additionally there is a simple Raspberry Pi Wall Mounted Google Calendar.

BakBoard is an attempt to try to make a gadget designed for consumption by the family rather than an individual.  It remains in a known, central location and displays information for the entire household.  However, I think the technology involved is primitive when compared to many services out there tailored to the individual.

I think the Amazon Echo is going in the right direction a device for a family rather than the individual and it is considerably more sophisticated than BakBoard.  Boy #2 uses it to listen to music while washing the dishes.  Boy #1 uses it to remind him when it’s time to go to school.  Boy #3 likes the corny jokes it tells and also adds random items to the shopping list.  The girl child can ask it how to spell words.  The caveat is that everything happens on my account.  It is possible to switch between accounts (both my wife and I have accounts but the kids don’t), but it seems cumbersome.  Also, many of the integrations are user specific.

There is a lot of room for improvement in making technology look at the family rather than the individual.  From what I’ve seen, the biggest complications are finding a good way to balance privacy and security.  Other issues include treating the family as a unit while still recognizing that the family is made up of individuals.  Since I don’t dislike my family, this is an area which I want to further explore.

 

BakBoard

BakBoard

A couple months ago I had the idea that it would be nice to have a display in the kitchen to help the family be organized and coordinated.  I wanted it to have a clock, school schedule information, calendar information, and a family Fitbit leaderboard and to power it with my Raspberry Pi.

While searching around I came across DakBoard which seemed close to what I wanted.  It provides date/time information and displays calendar events.  Additionally it can display weather information, but the really brilliant piece it has that I was missing from my idea was to display pictures.  I immediately created an account to try it out, but unfortunately ran into some problems with the Dropbox integration and was unable to get support in the forum and my e-mails for help went unanswered–it seems not much is happening with DakBoard.  Since the code isn’t open source and it didn’t provide for my requirements, I went about creating my own “BakBoard”.

The above picture is a screen shot I took of BakBoard this evening.  It currently has the following features:

  • Date/time in the top left.
  • School information in the top right.  If it is before 4:00pm, it displays the schedule for the current day and after 4:00pm it displays the schedule for the next day.  The service that provides the school schedule information is described in this post.
  • Calendar information on the bottom.  It provides five days of information: the current day and the next five days.
  • Fitbit leaderboard on the right.  Currently it just has the avatar and number of steps.
  • Picture is the background for the entire board.  The pictures come from from selected subdirectories in my DropBox folder.  The picture changes every 10 seconds.

It remains a work in progress and I’m learning a lot, but already the family enjoys having the BakBoard display in the kitchen.  In future posts I may describe how things are implemented, what I’ve learned in the process, and new features added.

“I’m Nathan and I’m anti-social” or “No, thank you. We don’t want to . . .”

I’m the first to admit that I’m not the most social, outgoing guy in the world. When a new group is having everyone do a self-introduction, I used to try to keep with a succinct, “I’m Nathan and I’m anti-social.” Unfortunately people would often misinterpret my message in one of two ways:

  1. That I am making a joke and am really a very social person and should of course be pulled into all social interactions.
  2. That I am subtly crying for help and secretly longing to be included in all social interactions.

Neither interpretation works in my favor.  For some reason some people cannot comprehend that I do not want to behave like an extrovert.  And while honesty may be the best policy, it does tend to offend people or come off as surly or whiny.

Along with “I’m anti-social”, here are some other things that many people don’t seem to always understand:

  • I don’t like people.  I do like individuals.  But just because I interact with a set of individuals individually, it doesn’t mean that I want to interact with them all together.
  • Just because I’m competent and can function in society and interact with people as necessary doesn’t mean I enjoy it.  Also, just because I don’t enjoy interacting with large groups doesn’t mean I’m not good at it.
  • I would rather stay home with my family than go “out with the guys”.  Being in a group is not relaxing entertainment, but tiring work.
  • I don’t mind just sitting quietly and letting others do the talking–being quiet doesn’t mean that I’m upset or that I don’t care or that I am angry or don’t like someone.
  • I’m good at talking with an individual or speaking to a hundred or more people, but somewhere in the middle I feel very awkward and uncomfortable.
  • I really don’t care what people think.  People are stupid.  But there are a few individuals whose opinions I highly value.

Those are a few things I wish people would understand when I say that I’m anti-social.  If someone feels the same way, perhaps I’ve found a new friend, and if I told my new friend “No, thank you.  I don’t want to” do something, no offense would be taken.

Lighter than Docker

I’ve got four kids attending three different schools. Even though the schools are all in the same district and have the same holidays, each has a slightly different schedule. For example, the middle and high school have “A” and “B” days to designate which classes students should attend that day. The elementary school has days 1 through 8 to identify the daily “special” (PE, music, library, etc.) . Also, each school has different days for conferences, finals, etc. Each school provides a PDF of the school calendar, but that means keeping track of three URLs or printed pages, so I wrote a rest service.

The coding of the rest service was pretty simple and didn’t take too long.  The dataset isn’t very large and is static, so no fancy database was required; just some JSON files containing the information.  It was a good opportunity to practice using Python since that is the current programming language I’m learning on the side.  Since I’m a fan of Docker and the magic it works, I wrapped everything into a Docker image and now anyone can obtain the image from a public repository on Dockerhub.

Running the rest service from a container works great.  After I verified the functionality, I created a container using Amazon’s EC2 Container Service.  The container service was fairly easy to use and everything still worked smoothly.  However, since my 12 months of the Amazon Web Services free tier has long expired, after several hours I had accumulated a debt of $0.22 for only dozens of requests and seconds of computing time.  I’m cheap and don’t like the idea of containers trickling my pennies away while doing very little.  So I decided to try out AWS Lambda.

The first thing I like about AWS Lambda is that it’s cheap: up to 1,000,000 requests and 3,200,000 seconds of computing time per month are free and there is no charge when the code is not running.  It was easy to adapt my code to run as a Lambda function since what I needed was basically a subset of what is in my Docker container.  I just had to provide the functional code and didn’t need to worry about any web server to handle the HTTP communications.  In addition, the Lambda service also automatically provides scalability and high availability.

For my school calendar rest microservice, I think the Lambda implementation has worked out better than my initial Docker solution.  I needed something lightweight and got exactly that.  Here are some of the advantages/disadvantages of Docker vs Lambda:

Docker Lambda
-Portable
-Pretty much any language
-Scaling with Compose/Kubernetes/etc.
-When it’s running, it’s running
-User defined configuration
-Only on AWS
-Java, JS, and Python
-Automatic scaling
-Only runs when needed
-Configuration the AWS Lambda way

How Randall Munroe ruined most comics for me

Several years ago I was introduced to xkcd which is drawn by Randall Munroe.  I believe it was in a comment on Slashdot that basically said “Obligatory xkcd reference: link_to_some_xkcd_comic“.  It was amusing and I went back to “1” and worked my way forward.  I added xkcd to my feed reader and became a regular follower of the strip.

Many xkcd comics follow the same formula used by most comics in which multiple characters converse and by the end the reader has hopefully noticed something humorous.  In the case of xkcd, the humor is often rather nerdy.  I must confess that it was weeks or months before I discovered that every xkcd comic contains some mouseover text.  This means that when the mouse cursor is hovering over the comic, additional text appears which can take the joke even further.  So I had to go back and read all the comics again and remember to hover the cursor over each so I could get the whole xkcd experience.  In many cases the additional text takes a funny comic and makes it even funnier.  In other cases it takes a comic that doesn’t seem super funny and twists it into something hilarious.

Randall Munroe also has a serial (and book) called “What If” where he publishes “Serious Scientific Answers to Absurd Hypothetical Questions”.  Along with a technical explanation and general wit, the text is interspersed with illustrations.  These illustrations and the accompanying mouseover text not only help to convey the message, but also make the article seem less stuffy.

There are other intelligent, funny people besides Randall Munroe who create comics.  I read their comics and often chuckle when I finish.  Now, whether I’m reading on the web or in print, I always have a strong inclination to mouseover the comic and get the “rest”, but instead I’m left hanging . . .

Droning on

Bebop_Drone_2016-03-20T184442+0000_EEA2CFLast week Boy #2 used his hard-earned savings to buy a little quadcopter.  With practice, he has become rather adept at piloting rather than crashing and has had a lot of fun.  But what intrigued me the most was that it contains a camera which can take still pictures or video.  Since I didn’t think it would be nice to take over the boy’s new toy and since it is was my birthday, I decided could buy my own toy.

It’s not easy to jump into the world of UAVs (Unmanned Aerial Vehicles).  I quickly discovered that there are too many choices out there.  You can spend anywhere from  less than $20 to several thousands of dollars.  There are many different types which have various characteristics and strengths.  To further complicate things, there are recent laws and regulations affecting the use of UAVs.

Since I’m interested in the video/photography side of things and wanted something easy to fly and with a decent camera–that narrowed down the field a lot.  Also, though not a hard requirement, I thought that supporting a FPV (First person View) would be neat.  I did a fair amount of reading reviews and looking at different options in my “few hundred dollar” price range.  If I already had a good camera like a GoPro, I might have gone with a Phantom, but since I needed a camera, I ended up going with a Parrot Bebop.

I knew I would want to play with my new toy as soon as I got it, so I started my preflight tasks before it was delivered.

First was all the legal stuff.  Because the Bebop weighs more than .55 pounds I had to register with the FAA.  I installed the FAA B4UFLY app which told me I was less than 5 miles from an airport and needed to notify them of my intent to fly.  Of course they don’t publish the telephone number of the tower, so it took a little web searching and e-mailing to find the correct contact information.  I then sent an e-mail containing the checklist information from Guidance for UAS ATCT Notification Calls.  For the time and duration of operation I said “Daylight hours” and gave the dates for spring break.  I didn’t receive a response, but the airport doesn’t approve flights, they can only deny flights.  Since I’m more than 4 miles from the airport and won’t be going above 400 feet, I doubt they care, but if they do they know how to contact me.

Next I installed FreeFlight 3 onto my phone.  I tried playing with the app, but there isn’t much you can do without something to control.  So then I just had to wait for my Bebop to be delivered.

Once it was delivered, the first step was to get a battery charging.  Also, I wrote my FAA UAS Certificate number onto the Bebop with a Sharpie.  For my first flight I wanted to try it indoors, so I attached the propeller protectors.  I was then ready to try to fly.

It took a few minutes to figure out how to connect to the Bebop.  My phone could see the Bebop wifi network and it connected, but when I started FreeFlight, it didn’t connect up.  It turns out the problem as my phone had “Smart network switch” enabled so it would see that the Bebop wasn’t connected to the Internet and automatically switch over to the home wifi which does have Internet access.  Once I disabled “Smart network switch” I was able to connect.

After trying to fly a bit indoors and crashing into Boy#2, it was time to take off the propeller protectors and head outside.  The Bebop is fairly easy to control and all the kids took a turn.  It started to rain a bit and so I was about to finish up for the evening, but then a rainbow appeared.  I flew the Bebop up to about 100ft (I had the Bebop configured to go no higher than 30 meters and took it up to that max) and took a few pictures; one of which is at the top of this post.  By then the rain was increasing and the battery charged was diminished, so it was time to land and return home.