T Minus and Counting

Today I leave for vacation. This is the first time I’ve left the continent in more than 5 years. One of the best parts of planning a big trip is building anticipation leading up to the date. I took this anticipation and used it to try out the APIs for Alexa’s Flash Briefing, something I check every morning for my news podcasts.

Its very much a hack. The Alexa flash briefing it not so much an API as it is an RRS feed that you can push daily updates to. I didn’t want to set up a full RSS service just for the few weeks leading up to the trip so with some help from other blog posts I managed to use AWS Lambda behind an API gateway endpoint to mock out a bare bones RRS feed server. One that just decrements a number every day.

from __future__ import print_function
import json
import datetime

def respond(err, res=None):
 return {
 'statusCode': '400' if err else '200',
 'body': json.dumps({
 "uid": "1234",
 "updateDate": datetime.datetime.utcnow().isoformat() + 'Z',
 "titleText": str(days_to_trip()) + " days to vacation",
 "mainText": err.message if err else res['message'],
 "redirectionUrl": "https://yoururl.com"
 }),
 'headers': {
 'Content-Type': 'application/json',
 },
}

def days_to_trip():
 trip = datetime.datetime(2018,8,30,0,0,0,0,datetime.timezone.utc)
 today = datetime.datetime.now(datetime.timezone.utc)
 return (trip-today).days + 1

def lambda_handler(event, context):
 rawdata = "there are " + str(days_to_trip()) + " days until your trip to europe"
 reply = { "message": rawdata,
 }
 return respond(None, reply)

The date is hard coded the python is sloppy. But it did what I wanted, telling me every morning how many days I had left until my trip, and I was able to get it together in a couple of hours.

Soon they will start boarding for my flight and the adventure will start, the count down has reached zero.

A Spider’s Snack

I previously posted some pictures of a spider I found which had apprehended a wasp in its web. I also took the opportunity to take some video. It was very up close with a very small depth of field, making the video a little shaky and blurry. I have tried a little to correct for this with some post processing.

Outside of the shoddy camera work its still rather impressive, if you are not arachnophobic.

The previous post was Lucky Spiders

Subject Isolation

In photography there is a concept called subject isolation, which simply means make sure what you want people to see in your photo stand out. This is commonly done by using a narrow depth of field to cause an intentional blur of everything that is not the subject. This effect is often called bokeh, and its popularity is the reason that so many wide aperture lenses are being made to day.

I recently got the ‘thrifty 50’ 50mm 1.8 prime from Sony. With the aperture open to 1.8 this lens should have a very narrow focal plane and lots of background blurring. Throwing on a tube extender for some ‘macro’ shots narrows the depth of field even further. I went for a walk to the local rose garden, self assigned to practice some subject isolation and try out the new lens.