How Time Works In Plim

/images/_1ccd4951-245c-4fc9-94ad-b67299ba11a6.jpeg

To me, budgeting is fun - until something goes wrong - and then it’s like herding fish. Money is always in constant motion, so it’s hard to look at just a single frozen moment - to examine all the parts and see how they fit together - before everything changes again.

Funds go in and out of your accounts a hundred times a day. You get pay deposits, cash withdrawals, you buy stuff on credit or with cash, you pay bills. Then there are the transactions that happen without you even being involved, like automatic bill payments, subscription services, charitable donations… And let’s not even talk about our kids and spouses out in the world spending more money while you’re still in the basement trying to get a handle on what they spent yesterday.

Add to that a budget tool that’s always adding things up and moving them around in an effort to help, and I just want to scream for the world to stand the fuck still for a minute and let me take a look. There are times - especially when I’m trying to track down a leak - that I really want to freeze it all and step forward slowly, one transaction at a time, so I can get a picture of where the error came from.

Well, that’s exactly what plim is going to let me do.

To accomplish this, I’ve established a few operational ground rules:

Rule 1: No Automation

The only time something in your plim system changes is when you change it.

To be clear, I don’t mean that you can’t have automatic savings transfers or bill payments. Automate whatever you like in your banking system. But in your budgeting system, automation is like closing your eyes while juggling chainsaws. Plim wants you to keep both your hands.

Rule 2: No Editing

You can add records to plim, but you can never change them. Going back to edit a mistake is like pretending it didn’t happen - as though you magically went back in time and erased the original mistake from the timeline. But reality doesn’t work that way, so plim doesn’t either. Instead, plim embraces the fact that the world is messy and that mistakes happen, so it records them exactly as they happened, and then records what steps you took to correct them. When you view your financial history with plim, you’re viewing what actually happened. Mistakes included.

Rule 3: Time Comes In Boxes

The real world sometimes feels like money is flowing in and out of your life in a constantly churning tide, with some bills from last month not yet paid, even though you’ve already received new bills for this month… Is there ever a clear boundary between last month’s money and this month’s money?

Well in plim, the answer is, “Yes.” All the records for August of 2020 are in the 2020-08 box, and you can get a complete picture of that month’s finances without ever looking anywhere else.

An important corollary of this rule is that for any given transaction, any user actions that modify our understanding of that transaction must also be included in the box - even if they occurred much later. So, suppose you bought a chair in Jan 2023 and recorded it as a leak in your Allowance bucket, but then in Feb, you realize that it should have been assigned to the Furniture bucket. Even though you made the correction in Feb, the new assignment record will still be date stamped with Feb, but it will be stored in the Jan box.

Rule 4: Records Have Two Times

To get a clear view of any transaction in your financial history, you need to know five things:

  1. Where the money came from

  2. Where it went

  3. Why it moved

  4. When it moved

  5. When you found out that it moved

I’ve never seen a budgeting app that even tried to capture #5, but in my view, without that, you can’t reconstruct what was going on in your head at a particular moment in history, and that often makes it impossible to figure out what happened when things go sideways.

Consequently, plim tracks transaction times and plim times. Transaction times come from your banking files and typically only include a date. Plim times are full timestamps, accurate to the second, and record when a file or transaction was added to plim. With this information, plim can reveal both what you knew and when you knew it.

Rule 5: Snapshots Have Two Times

As a consequence of Rule 4, a snapshot of how your finances stood at any particular time depends not only on the date you’re looking at, but also on the date you’re looking from.

Consider this scenario: It’s Sept 19, 2024 at 15:32:04. Your kids have just come home from school and they want to buy a new video game. You consult your records, see that there’s room left in the budget, and say yes. An hour later, you download your bank records and see that the account was actually overdrawn because your wife bought something on her way to work this morning and hasn’t logged it yet.

A snapshot of what was going on at that moment in time (2024-09-19T15:32:04, which plim calls the Target Time) will look very different depending on whether you use the information you had at 15:32:04, or include the information you didn’t get until 16:46:14. Plim refers to these as two different As-of Times.

By default, Plim will usually assume that both the target time and the as-of time are right now. If you run plim show to generate a budget snapshot, it will give you a report about right now, using all the information you’ve entered up until right now.

Similarly, if you run plim show --month 2024-03 to look back at your finances on March 31, 2024, it will still use right now for the as-of date. So even though you received some late bills the following April and accidentally assigned them to April instead of March, then noticed the mistake in July and fixed it, your snapshot taken as-of today will show everything in its current, corrected form.

But if you run plim show --month 2024-03 --as_of 2024-03-31 to look at what you knew back on March 31, when the problems had not yet been discovered and fixed, plim’s report will show you the world as you knew it back then.

Rule 6: It’s Your Data - Do What You Want

Plim will offer no tools for editing history, changing dates, altering records, etc., but there’s a reason I chose to use human readable CSV files for all the records. Because, being human readable, they’re also human editable.

You can go into any file and make any change you like. Plim can’t stop you. This means you can also write your own tools to interface with the plim records. Or, since plim is open source, you could even make plim your bitch and have it replace all your timestamps with random moments in history, if that’s what you really want.

Yes, plim currently expects the data to behave the way I’ve outlined and will probably get confused if you change much, but that’s because I’m a finance doofus and had to lock everything down in order to understand it. If you’ve found a good reason to change the rules, drop me a note. I’m happy to learn new tricks.


Read More


/images/_91cd6bf6-9ea8-4a54-b099-89afdaaa47fc.jpeg

Looting The Battlefield

I’ve been experimenting for months on different ways to convert podcast content into a form I can use in Frankie. I’ve found several solutions, but along the way, I’ve left the resulting file tree in absolute chaos. I’ve got files in a dozen directories and an equal number of formats. There are fragments of scripts and clips and tools scattered throughout the hierarchy like bodies left to rot on a medieval battlefield, but there’s also no consistency, little documentation, and worse, still no definitive process.

Well it’s time to loot those bodies, gather the useful bits into a proper plan, and bury whatever is left.

/images/_afb96080-dcb3-4d43-93e4-3fc8dafd1dc1.jpeg

Packaging Lesson Plans

As mentioned here, I recently got some exciting features working in console mode, but now I have to get them working on my phone. Getting the new code there should be easy enough - I can just pull the git repo - but delivering the lesson content is going to be a bit more complicated.

Mechanical Overlords
Mechanical Overlords