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.


Rent Scout Report for Colorado

Rent Scout, the application for searching for ideal rental properties is finally generating reports.  Here is the report generated for yesterday.  You can see that it is estimating a really high rate of return on properties here in Colorado.  I don’t believe that is completely accurate as there are many costs I have not accounted for.  Anyway, here is a link where you can download the report:

Rent Scout Report 04/28/2017

Calculating rental property maintenance costs

A common rule of thumb is 1% of the property value per year.  So for a $200,000 home, you should expect $2,000/year of maintnence costs.  This is too general for me as I’m looking to use numbers in my favor.  Here is a list of some of the specific items to find details on:

  • HOA fees and what they cover.  In some multiunit places this might cover bigger ticket items like exterior paint, lawn care, and roofing.  Another important detail is how fixed is this number.  Has it always been what it is now or is there a history of it being raised regularly.  You wouldn’t want a greedy HOA board eating all your profit.
  • Lawn care.  To answer this you need to know the size and type of landscaping.  Then you need to know what reputable local companies charge to keep this up.
  • Exterior.  Is it brick or siding?  If siding, how long has it been since it was painted?
  • Roof.  This is a big one that can eat your lunch.  You should know the history of the roof before you move forward.  How long as it been since it was replaced?  Who did the work?  Is there any sort of warrantee?  How much of a problem is hail in the area?
  • Interior flooring.  Hardwood requires you refinish it every so often and carpet goes bad.  Ideally you would have vinyl everywhere with some rugs that can be replaced easily in-between renters.
  • Appliances.  Does the house come with new appliances?  What does it cost to replace each one?  How long are they expected to last?
  • HVAC and water heaters.  When was the last time it was serviced?  What does it cost to replace?  How long do you expect it to last?

This is a good start.  The only way to really know is to go get data.  All of these questions could be answered by directed questions for the seller, however there should be someway to do better than that.

A trusted real estate broker gave me the advice that expenses are often underestimated and some investors have found that small condos are better for this reason.  The exterior work is handled for all the properties at once and you pay for it together though an HOA fee.  This reduces costs of the maintenance.  The other way to reduce cost is by having better customers.  The single professionals and childless couples that rent condos are generally much nicer to your property than the families that rent single family homes.  This makes sense, now I just need to find data to test this.  Truth is in numbers.

How to calculate profitability of potential rental properties

Before we begin I want to state that I am not a realtor nor am I a real estate investment advisor or a layer.  If you need any of those people you should contact them.  To calculate the profitability of a potential rental property you need a few numbers:

  • Price of the property
  • Estimated Monthly Rent
  • Interest rate on loan
  • Amount of downpayment
  • Property taxes

For an example let us use this property:

6625 Depew St Arvada, CO 80003

List price is $225,000.  There is a slight problem you will notice in the description that this house probably has structural issues.  For the sake of argument I’m going to assume that we want this property for it’s monthly return on our investment and not for the value of the asset.  I’m not going to live here and so long as it isn’t going to be condemned in the next few years I’ll take the low price as that helps my profitability and pass the low price onto the next buyer in several years.

For the estimated monthly rent I’m going to let zillow help us out.  They do a good job of letting us know what a house of about this size in this neighborhood will rent for.  Zillow estimates with their Rent Zestimate that you can rent this house for $2000/mo with a range from $1700/mo to $2500/mo.  We should be conservative and pick that lower number because from the look of the pictures this is not a prime rental.  Here is the link for the listing on zillow.

Next to calculate the interest rate I’m going to also be conservative and go with an easy round number of 4%.  This is something that changes and will depend on your credit worthiness but for sake of argument lets say it is 4% because right now it is a bit lower than that.

To calculate what our monthly payment on the loan is we will need one more datapoint, how much we can invest.  For the sake of argument lets say that we have $40,000 to put down on this investment.  Here is the formula you can use to calculate the monthly payment (in python):

For our example we will get a 30 year loan for $185,000 ($225,000 – $40,000) so the number of months is 360 (12 * 30).  The result is a monthly payment of $883.21

The last thing on our list is property taxes.  For simplicity we will use that Colorado has an average property tax rate of  0.63% – Source.  If we put in the specific zip code we get an average property tax rate of 0.697% in Jefferson county.  We will assume that after we purchase the property they will assess the home at the price we purchased it for, $225,000.  This will result in an annual property tax of $1,568.25, or $130.69/mo

One more thing.  For the sake of argument we will assume that we will have the property managed by a management company that will deal with getting new renters and answering phone calls.  We will nominally set this to be 10% of the rental income.  That is easy because we are going to try to rent at $1700/mo so our fee should be $170/mo.

So now we have all the data we need to make an estimate.  We add up all our calculated expenses for the year and we multiply to calculate how much rent we could take in during a year.

This means that we will take in $20,400 and pay out $14,200.87 in a year.  This is not counting other expenses like homeowners insurance, broken appliances, and time spent paying the bills without a renter while the property is on the rental market.  The profit for the year is only $6193.13.  The metric that these sort of deals is measured on is called “cash on cash” meaning the amount of yearly profit divided by the amount of money you put down to begin with to start this investment (the down payment).

15% annual return on your money is much better than any saving account is going to give you.  Let me remind you that I am not a layer, investment advisor, or realtor and if you need one of those you should contact one.

Crewing for a team is an important, fun, and inexpensive way to get into Rally

You want to drive a rally car, welcome to the party, we all do. Driving a rally car involves allot of money and time and is completely worth it. Just because you don’t have the money to build a car or go to an event doesn’t mean you can’t have an awesome time going to events as an important part of a rally team. This year at the 100 Acre Woods rally I went as part of a two man crew for two cars from Colorado. Competing in a rally is a complicated task that is made much better with a crew. As crew we took the cars to tech, ran the service stops, and did many small things to make our teams successful.

Rally involves several logistical problems before the race even starts. First, for 100 Acre Woods, we tow two rally cars ~850 miles. After arriving you need to figure out Lodging, Registration, Recce, and Tech inspection. With a large group of people it is often more convenient and less expensive to rent a house then stay in hotel rooms. This year we stayed in a comfortable house, The Lodge At Fair Winds with wifi (important because there is no cell coverage). Ideally you’d want to find a place that has a garage you can use in case you need to do overnight repairs to the cars. This year we were fortunate to not have to do any repairs at the lodge as both of our drivers did a good job of keeping their cars on the road. Lodging should be coordinated before you arrive but there is still the task of getting all the vehicles to the location, checking in, unloading gear and finding the closest place to buy beer and food.

Recce (short for reconnaissance) is where the driver and codriver drive the stage roads with the stage notes at posted speeds in a non-race vehicle. This can only be done by the driver and codriver and is the first task on their mind before the race. For our team we used rental cars because they present the same perspective as the race car (vs a truck) and the roads are often times rough back roads that would really beat up the truck. Having a couple of crew members makes getting a rental and doing registration simpler because you have more drivers. Registration is the simple task of checking in with the organizers and showing them that you have all the required items (prof of insurance and registration on race and crew vehicles).

Often on the same day as recce a tech inspection needs to be done. Doing Recce alone is a really taxing activity as you are driving hundreds of miles slowly and checking the notes you received at registration. If you are experienced you are also writing pace notes (extra reminders that help you know where you can go faster). Working as a crew member you can make recce more successful by handling tech inspection. What that means is you drive the race car from the house or hotel to the place where the organizers are looking over the cars and inspecting the safety gear to make sure you are following all the safety rules. This is fun because you get to drive the race car and hang out by all the other race cars. In our case we got to see the Escrot build being teched. If you weren’t at the race you should go to the next race where they enter because that build is awesome. Pictures and video do not do that car justice. At tech inspection you will also register for service areas and at this point it is advantageous to try to get a good spot surrounded by others you know so you can help each other out.

One of the big downsides to working as crew is there is often limited opportunity for you to spectate on stage because you have to be in service areas as need to be somewhere where you have good cell coverage to give your team the best chance of being able to contact you if they need to. However you do get to go to the shakedown stage (a short practice before the race starts on the first day). This can be a fun opportunity to see the cars launch. The organizers did a good job of marking out places where you could spectate as crew however just know that as crew you are just as much on a schedule as your team and they are depending on you being in service when they get there. When you go out to spectate you are taking the risk that you get lost, are caught behind traffic, or your vehicle has a problem and your team is without a crew when they need them. We attempted to spectate on stage 2 and managed to take a wrong turn that resulted in us only seeing the second half of the field. Thankfully on the way out of there back to service we had no trouble and made it to service before our teams did.

At service you have a limited time to try to fix anything that is wrong with the car and prepare it to continue racing. Because both of the drivers of our teams did an awesome job keeping their cars on the road there was no major repairs for us to do. To keep them going at pace we did small things while they got a chance to stretch their legs outside of the car. The cars went up on jack stands and we looked underneath for any damage, checked and adjusted tire pressures, checked the torque on all lug nuts, refilled water and other drinks for the driver and codriver, and got them food to eat. Lastly we looked up their times on stage and encouraged them to continue pushing for the win.

When you are competing in a rally you have many things to think about and keep track of as a driver/codriver team. One of the things you have very little time for is pictures and keeping up on how the race is going for everyone else. As crew you should be taking pictures to share online for friends and family and looking for updates on the competitors. This is fun and the driver/codriver team can focus more on driving fast with you handling the media side of racing and keeping them informed on their times and how their competitors are doing. You can see more of my pictures and follow me on instagram at tyler_128_. To find more pictures and videos of of 100 Acre Woods check out these tags #100aw, #100awrally, #100acrewoodrally, etc.

Working on a crew is an awesome way to participate in rally at a very low cost, build great friendships, and help your friends be more competitive. It is completely worth it and much more involved than you would initially think.  Special thanks to Steve, Scott, Sam, Joe, and Grant for letting me be a part of their team and participate in such an awesome event.

In the end both teams did well.  Steve and Scott pushed hard and drove the wheels off the car for a 3rd overall finish, 2nd in national class (OL and SP), and 1st in OL for both days regionally. Sam and Joe were successful in completing Sam’s first event as a driver and having a blast doing it.  Pictures don’t do this event justice, the roads are amazing, the local people are inviting, the competition was fierce, the organizers and volunteers ran a smooth event, and the weather was perfect.  If you want to get into rally you should find a team that you can crew with, it will not only be a great time but you will learn so much about the sport that will help you if you plan on building a car and competing yourself.