Posts

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

Advent of Code 2022

This year I did Advent of Code  again for the second year running. If you're not familiar with it, it is a set of daily language-agnostic code challenges during December. Here are some thoughts on my experience this year.

Custom QuickDrop Shortcut - Git Diff/LVCompare

Image
Do you use the LVCompare diff tool? I do, all the time now. If you haven't used it before, it's like playing spot the difference between 2 versions of the same VI but LabVIEW will list what is different and take you to the location of the differences. It's great. My favourite uses are: Double checking before committing files that what I think I changed is what I actually changed, to make sure I have good commit notes and didn't do anything by accident Especially when I see a file listed that I didn't think I did any work on... This normally results in reverting it after checking what the difference is! Understanding what someone actually changed, usually when doing code reviews or pull requests If I find what looks like 2 versions of the same file, checking they are actually the same. I had the tool set up to work with my Git GUI of choice, TortoiseGit. I would normally run it by navigating to Windows Explorer, right clicking on a file or a log entry and selecting w

How to Set Up 'Arrange VI Window' for an Orderly Project

Image
Nowadays at work I get to use LabVIEW 2020, which has some great inbuilt shortcuts. One of these is 'Arrange VI Window'. Arrange VI Window was added into LabVIEW 2019, but can be downloaded for earlier LabVIEW versions here . The default QuickDrop shortcut is Ctrl + Space, Ctrl + F . It does many things apart from arranging the windows - moving the origin to (0,0), aligning controls on the front panel to match the connector pane ('clean up front panel'), and resizing the windows to fit the code or as much code as possible with a small border. These are all great. But I was after something in particular that it didn't seem to provide.

GLA Summit 2021 Report

Image
I had been looking forward to GLA summit for months, so much so that I booked the time off work so I could concentrate fully!   There were so many great presentations, but some personal highlights for me were:

Why my friend hates LabVIEW

Image
So there's a lot of takes on why some people hate LabVIEW. Here's mine. I have a friend who is an engineer and had been asked to learn LabVIEW for a work project. 'Oh goodie', I thought, 'someone else to talk LabVIEW with!' But to my sorrow, he gets angry even when the word 'LabVIEW' is mentioned. He hates it. 'I can't find the examples. It's so slow to write. I can't get it to work.'.

The Beer Money Problem - Two Less Successful Solutions (#3)

Image
This is the final post about the MLUG Beer Money challenge: if you are lost, start here . The first solution method that I describe isn't particularly fast, but it is fun.