I was wrrrr

I was wrrr
I remember Happy Days where Fonzie (Henry Winkler) was so macho he couldn’t say “I was wrong.”

When I’m trying to figure out why something is wrong, it’s easier to blame someone else. Usually, my first guess is not “It’s my fault.” However, I’ve learned that if I’m programming and I think it’s a compiler bug, I’m probably wrong.

I have a spreadsheet of driving statistics from 2003 to 2017. I was cleaning house this month, looking for old documents to scan before I shredded them. I was pleasantly surprised to find a few months of gas receipts from 2010 that weren’t in the spreadsheet. Score!

I entered the data and wanted to include it in my summary table showing each year’s totals.

I got a new row for 2010 set up. But 2010 had $0.00 spent and 0.000 gallons and wouldn’t show what I expected. It was very frustrating. I was trying to force Excel to do-the-right-thing and calculate those values and it refused to. Matrix formulas were a new to me, so I thought it must be some subtle Excel flaw. (Thinking along the lines of it’s someone else’s fault.)

I was getting pretty frustrated until I looked at my table a little closer. All of the other rows had the beginning date on the right and the ending date to the left, backwards!

When I added a 2010 row, I had entered the dates normally. Oops! I was wrong. Rather than kick myself, I just swapped the dates.

It wasn’t a (figurative) compiler bug after all nor someone else’s fault. I wonder how often I make equivalent assumptions in real life?

After trying to tell myself the backwards columns were too much work to fix, I noticed how much time I had already wasted because they were wrong. It turns out, Excel is smart and it was trivial to fix.

Table of gas usage statistics
(The 2010 receipts didn’t have mileage and the table shows zeros for that data.)

Logging the miles

As you can see from my earlier post of the gas price data Gas Price History I can be a data pack-rat at times.

Sometimes it’s worthwhile, sometimes not so much.

This summer I had a friend change my spark plugs. We did something incorrectly and my gas mileage has been worse ever since. With the cold weather, the problem has been more dramatic.

A hand and gas pump filling a gas tankBecause of my data charts, I know that the change this winter is worse than the normal seasonal variation of gas mileage. I’ll be getting the plugs redone soon and I hope that that will help.

Original image: Pumping Gas Nozzle Pump. By Mike Mozart [Image license]

Gas price history

I’ve found copies of my old gas price spreadsheet. Now I have a history of the Indiana gasoline prices from Nov. 2003 to Dec. 2015.

One of the reasons I wanted to find the data is to show the cliff. Between Oct. 8 and Nov. 7, 2008 the price of gas here dropped 40%.

Online sources show that the price of crude oil dropped rapidly in that period, but not as rapidly as the gas price in Indiana.

A graph of the price of gas

A graph of Indiana gas prices between 2003 and 2015

I’m still looking for data from the 20 month gap in 2009 and 2010.