Custom Emergency Contact Card for our AirBnB

I wanted unique signs for our AirBnB so I used Photoshop to create these.  They are very simple but look great on the fridge at our place.  Here they are.  There is an emergency contact card, quick reference to where to find the fire extinguisher and first aid kit, wifi login, and lastly our house rules.


A blur of excitement and preparation

The first few days on Airbnb have been a blur.  We listed on Sunday evening and are already booked through the end of October.  The next real challenge will be on Sunday when we have our first guests checking out at noon and our next guests checking in at 3.  On Monday we got our first booking, Thursday through Sunday and our first “Verification Pending” booking for the next couple weeks.  That booking fell through and we got a second booking on Tuesday almost as soon as the pending one went away for Sunday through Friday.  Then we got a couple of booking inquiries for both Thanksgiving and Christmas.  The one for thanksgiving found a larger place that’d work better for their family.  They wanted some place with multiple bathrooms as that made it easier “traveling with girls”.  The one for Christmas asked if we would be ok with two well trained rotties and I responded saying that rotties are awesome and they are welcome to book the place.  When I do that it starts a 24 hour counter.  After 24 hours they had not booked it and the pre-approval expired.  They messaged saying that they are trying to coordinate with 4 people and will give us an answer by the end of the week.  In response I sent them a special offer to book the place at the rate in the first pre-approval.  I did this because we increased our cleaning fee form $40 to $75 realizing that resetting the place after people stay there with pets and children is going to be a lot of work.  Then we got a booking for 25 days starting on Friday.  This time with a picture and a verified account.  I believe it is the same person as before as the first name for both accounts is the same.   In short this week has been crazy already and we are super excited.

The crazyness hasn’t just been the booking though, we’ve been doing a bunch of work up to the last minute to prepare for the first guest.  Beth took Tuesday off work and did an amazing job cleaning up the yard.  I came over after work and we spent a couple hours cleaning and then while we doing a home depot run for some mulch for the planters we realized that our guests that are staying for a while will probably want to use the washer and dryer.  And while we lived there for the last 4 years and used that set to do laundry we realized guests probably wouldn’t appreciate how poorly the dryer works.  For one it just doesn’t work that well at drying clothes so you have to run it for a very long time and be careful to not overfill it.  The second thing is that it causes a ton of humidity in the house when it is running resulting in that humidity condensing on the walls in the bathroom and hallway and causing those walls to become grimy.  As a result we hopped on craigslist and looked for a new set.  We found a couple we liked and sent out emails asking if we could buy them either that night or the next day.  One that we really liked responded saying we could get it that night so we went and bought it.  It took till 1:30 am before we finally got home, but now the house has a new washer and dryer that the guests won’t have to fight.  Also, we are super stoked about the fact that this dryer uses a condenser to remove moisture and has a drain output.  On the next day Wednesday we finished up cleaning and setting the house up for the first guests after we got off work.  This morning I sent our guest a message letting them know the house is ready and they can check in when ever they want today.  Now we just have to sit back and wait for any messages from our guests and new booking requests.

Here is a picture of the new (to us) washer and dryer we installed:

Once again, here is a link to the listing for all the details on it:

Here we go!

Last night we listed our first property on AirBnB.  This was really exciting and we were holding our expectations in check.  For pricing we are using wheelhouse and it recommended a base price of $155.  We thought this sounded high as we are just getting started and have no reviews so we set it at $124.  When we woke up this morning we had couple real surprises.  The first day we set to be available was Thursday and  someone had booked our place for Thursday through Sunday.  For messaging we are using and in less than a minute of them booking the place it had sent them a message thanking them for booking the place.  They responded thanking us for responding so quickly.  So far we are off to a great start.  We decided that maybe we should block off Monday as this is our first booking and we want to make sure we can clean the place before anyone else books it.  I log onto airbnb to do this and discover that someone has booked Sunday Oct 1st through Oct 15th.  However instead the status shows Pending Verification.  Looking this up it means that they have about a day to finish their reservation and confirm their info.  We are really excited about this whole process and the fact that we’ve seen such immediate success at getting a couple bookings.  After that I blocked off Monday Oct 16th to make sure we can clean the place before anyone else shows up.  There are still a few small things we need to button up here before we are ready for Thursday.

How to connect a data API to your react app

This is something that seems like it should be obvious and it probably is to those who create websites regularly, however I struggled with it for a bit.  This tutorial from Fullstack React is awesome and helped me figure this out.  The TL;DR version is below.

Use two nodejs servers, one to serve the client application (that can then be bundled by webpack) and one to serve the api in development.  To run these at the same time use the tool concurrently.  Then when you are ready for deployment you can pack the client app (that you built into a static asset with webpack) and then serve it by the api server with this code:

Then you just copy the code to run the api server and client/build folder to your server and run it how you would normally there.  As to a example of how you serve data to your react app here is an example.



React Component:

For a more detailed example refer to the article listed above.  This is something I learned recently while improving  You can find the source of that site on GitHub.


How to learn something you’ve been struggling with

If there is something you want to learn, instead of trying the brain-dead method taught in schools where you try to read a textbook and take tests, find something you want to do that requires that topic.  This has been a useful heuristic for me.  By doing a project I learn what I want in a deeper way.  The natural next step is to answer the question what project do you want to do instead of what do you want to learn.  Then go do those projects and learn new things.

You don’t want to learn something for that thing anyway, you want to learn because that learning gives you new power to do things.  I find that it is just best to do things and learn what you need along the way.

Go forth and hack something, it’s good for you.

Three easy ways to get more readers for your blog

  • Shamelessly plug this blog (it will give you good luck)
  • Look directly into the sun
  • Cry, make list, post, do more crying

In all seriousness the primary reason people are looking at anything on the internet is to get off, but after they cleanup the mess they just made they are here for simple entertainment.  This is not because they don’t have better things to do but because they don’t want to do those things.  Of course there are the posts about how to do stuff and those do help people who are looking to do stuff and get clicks from those people.  Though how many of those are there really?  It is probably worth someone’s time to care about them but if you just want readers who are happy that you exist on the internet you should entertain.  Here is my advice on how to do this:

  • Short funny posts (no one wants to read, that feels like work)
  • Stupid titles that promise something you desire (like more readers on your blog)
  • Subtle adds

This post is a good example of a shameless plug as it is designed to get you to look at my blog.  I’m not really sure the people I want to communicate with is other sad saps like myself who are writing blogs instead of doing something useful.  Yet here I am, and I do relate to you, so I write to you.  Just to be nice I’m going to give you something fun to do after reading this:

Best Car Mod EVER – McM

I find these guys hilarious and you will to.  What are you doing looking at my blog, go watch their video and loose yourself to some hilarious antics about modifying cars.

Collect good Black Swans

I’m in the middle of listening to the book The Black Swan on Audible and it had changed my perspective greatly on several things.  One is the probability of events outside normal is larger than commonly believed and is unknowable.  These black sawn events can be good and tend to affect scalable activities.  In order to collect these we need to be doing things that are scalable.  Writing is a good example because you only write once regardless of how many people read what you write.  It is no more effort for me if no one reads this or if millions read this.  As a result I’m trying to do more scalable things in order to position myself to have the opportunity of collecting black swans of sort.  This means that I have to daily accept that every time I do something it could be a complete failure.  There are no guarantees things that are scalable will every pay off.  However if they do, the amount they will pay off will dwarf and greatly affect the average, meaning that it can be orders of magnitude in goodness.  If none of this made sense you need to go read the book and learn about now not all uncertainty is created equal and how that can affect your decision making.  Of all the books I’ve listened to in the last couple years only two books have I listened to twice and I’m probably going to listen to this one a third time and buy the book to read in print because I want the concepts in this book to really sink in.

Caching your requests to Nominatim with geopy to avoid timeouts using dynamodb

TL;DR; get the source code for this at my GitHub gist and use for your projects:

Github Gist

The Problem

Nominatim is a free way to turn address strings into latitude and longitude points for mapping.  This is really useful if you want to draw addresses on a map or something.  If you are like me you will just look up the example code and run with it till you realize something.  There is a terms of use and if you query the same address multiple times you will get temporarily blocked.  The terms of use state that you should cache the results.

The Plan

Here I’m going to show you how to do that with DynamoDB.  DynamoDB is a sql-less database that is supported on AWS.  It is simple to setup and use and is free for low volume use.  It is a great alternative to MongoDB and I plan on learning it and using it in future projects.  Before you get started you need to setup your local environment for using the AWS api.  Here is a link for how to do it: AWS API Quickstart.  Once you have that working I can talk you through how to make this work.

Create the Table

The first thing we are going to do is create a table.  For my hashed primary key I am specifying a string I’m calling ‘query’ that I will explain later.  This string is how I will look up results in the future as it is a representation of the string that I will send to Nominatim later.  You only have to specify the attributes that are also keys here as the database is schema-less.

Push first to database

To push a record to the database you use the function put_item.  It has one important parameter, Item, that you set to the dictionary that you want to push to the database.  It will create a new item or override any existing item where the key matches.

One thing I want to point out is that the floating point format the database accepts is only decimal.Decimal.  That is not the normal floating point value type in python (float) and is not what is returned by our geolocator for latitude and longitude.  There is a second complication, if you try to just initialize them as decimal.Decimal sometimes you will get an exception about storing an inexact decimal.  This is nastiness that results from python’s handling of floating point numbers and is part of why decimal.Decimal exists.  To get around this I just cast my float as a string and then initialize the decimal.Decimal with that string.  That will never cause it to be Inexact.  The downside is you loose a bit of precision doing this.  This is not a concern here as it is enough precision for what is returned by geocode.

You will notice that I’m doing some weird stuff with the query to address string.  This is something you might modify for you application but I did this as I am using this query as a filename for one of my projects and I hate spaces or comas in filenames.  Other than that this is rather simple.

Getting a record from the database

Here I show how I retrieve a record from the database.  When the item comes back from the database it is a json formatted string so we just use json.dumps to convert it back into a dictionary.   There is one other thing, DecimalEncoder.  This is used to help convert the decimal.Decimal objects back into either floats or ints depending on if they have a fractional part.

Putting it all together

Here we put it all together with two functions, get_address and get_query that are the real external interface to this short library.  These functions handle testing if the query string is in the database and if it is going and getting it from there.  If not it does the request out to Nominatim and stores the result in the database and gives you back your result.


And that is it folks.  Check out the gist, copy and paste it into your project and solve this annoying problem for good.