High-Tech Garage Sale

We were going to have a garage sale with some friends. We would need to be able to trace the money from each item sold to each seller so that we could split the money at the end. There are no-tech ways to do that, but I wondered if a little tech wouldn’t make our lives easier.

If you’ve been to a multi-family garage sale or yard sale, you will probably have seen these methods in action: Price stickers with the seller’s initials or a symbol. Price stickers of various colors. When you made your purchase, the cashier may have taken those stickers or made notes in a notebook. They did that to make sure that the money made its way to the right person.

For our sale, the first problem I wanted to solve was calculating change. Making change is not something I do every day, so I wanted to make it easy and accurate. On my trusty HP-12C, I can do the math, but I can also track separate sums in a number of registers. In theory, I could track each seller’s total in one of these registers. That way, I could have all of the per-seller totals ready to go at the end of the sale. As cool as that would be, it’s an unfamiliar process, even to me. For this reason, it would be error prone and I would not feel comfortable using it.

Conceptually, though, it’s not a difficult problem. I need to capture the seller and amount for each item sold, then calculate the total and any change due. Each sale should probably have a timestamp and a transaction ID number, too. I don’t need to track what was sold or who it was sold to. All transactions should be written to a file, in an easy-to-read format.

If I were to create a small application for this, what would a straightforward interface look like? Replicating a calculator seemed easy enough, but how to track the seller for each item? As I thought about this use case, I imagined having an enter key for each seller. After putting in the item price, I’d just hit the enter key for that item’s seller.

This reminded me of a macropad that I had built, a Nullbits Tidbit. I could connect the macropad to a tablet running an application that would interpret the user input, display relevant information, and record everything to a file. I had Termux installed on my tablet, providing a Linux environment that I could develop in. I’ve created applications in Bash, Awk, and Gforth, so I had some tools that I was familiar with.

I chose to write the application in forth. I find forth encourages a combination of top-down design and bottom-up development. You can view the project at Gitlab. I enjoy writing forth because I get to get my hands dirty. No libraries, no templates, nothing comes for free. Actually, Gforth provides a pretty rich environment. Still, I learned a lot about what a C complier does because I had to do it myself. I also did steal a couple things from the Gforth manual.

I’m really happy with the minimal user interface. I wanted the interface to be snappy and fast. No wasted movement, no wasted time. The Tidbit macropad is the secret sauce in this solution. It has just the right number of keys in just the right layout. One choice I made was to not use the decimal when entering an amount. This freed up a key on the macropad, simplified input processing, and simplified the user interface. In case the user made a mistake, I provided a way to void the transaction and start over. I recorded all transactions, even voided ones, to a CSV file.

One of my goals was to provide transparency to all the sellers. I think this transparency was important because this solution was new to everyone and it needed to earn their trust. I used ledger to sanity-check the math and to produce plain text detail and summary reports. I wrote a script that would generate the reports and upload them, along with the transaction data, to my VPS. I configured cron in Termux to run this script every fifteen minutes. This let the other sellers see that transactions were indeed being recorded and what their total revenue was. This also provided a backup mechanism in case something happened to the tablet.

We’ve used this solution for two years in a row at our own sale. I even lent it out to another group and they were successful with it as well. It’s a relatively minimal solution, but it removes so many pain points from the garage sale experience. For example, sellers will frequently negotiate a price on one or more items. Being able to type that in, often during check-out, reduces friction. It does both the job of the calculator and the stickers/notebook for the effort of the calculator alone. At the end of the sale, I have all the data and it is pretty straightforward to give folks their share of the take. I am so happy to not have a bunch of hand-written stickers to add up.