Posts

Showing posts from March, 2024

Fuel price conversion fun

Image
I was bored so wrote this VI while sat on the sofa which converts US petrol prices to UK petrol prices. I was surprised that there's no site that already does this, but it's a slightly annoying conversion. The UK measures their price in litres, the US measures their price per gallon, and US gallons are smaller than UK gallons. Today fuel in the US costs less than half that of fuel in the UK. I knew it was cheap over there, but didn't realise quite how cheap!   If I was to make the program better, I would use HTTP APIs to get the live prices, but I can't find suitable free APIs and the code would probably require me to get off the sofa and sit at my desk. Nah. It would also be nice to write the code to compare any 2 countries prices, for petrol and diesel. Scope creep.  Code is here: https://github.com/alt14/US-UK_FuelPriceConverter