Time for a new project.

The idea of an application that would help me track all my stuff has been rattling around in the noggin for quite a while. At one point, I’d hoped that maybe I could get Google Assistant to give some verbal means to tell me where I put that #2 Phillips screwdriver. A couple days of poking at IFTTT later… idea abandoned.

But now, it came back (I still don’t know where that screwdriver is) and my thought is this would be a great way to expand my knowledge/practice of go, and databases, and REST and APIs and… well, there’s a lot of things I can poke at here.

First Steps

Rather than jumping right into the code, I brought up the old daily journal app (see Obsidian) and created a new collection (see Bullet Journaling). For the really wild part, I stopped with code once I had the basic core repo set up and building. Did that take half a day? Yes. Did I stop immediately without going any further? Mostly. I count this as a huge success though. Figuring out a better name after I set up the repo and now I need to do some conversion… well, it was 90% success at least.

Design

So, back in my journal, I created a high-level summary of the project and then a page to start listing out my subcommands. It feels a bit like code, but the main benefit is that I’m rounding out what I want this thing to look like when using it. So far, very good results. I have iterated a few times on how the command structure looks and had to make some decisions about what kind of information I would want to include. There are notes on first deliverable functionality, ideas for the future, and it’s saving a lot of time.

An interesting discovery after doing some of this work is that it highlights the usefulness of a flowchart or state diagram of some sort. A means to visualize where application flow would happen and help define test cases and expectations. It also feeds into user documentation nicely too.

Output

Currently, the document looks like this:

---
date created: Sunday, June 19th, 2022 12:09:41 pm
date modified: Wednesday, June 22nd, 2022 12:53:45 am
title: subcommands
---

# subcommands

%%TODO: rename ‘name’ to ‘thing’%%

## `store [name] in [location]`

- adds item 'name' into storage 'location'

## `use [name] from [location]`

- pull item 'name' out of storage 'location' temporarily and track in ephemeral place while in use.
- Intended to be relevant when calling the 'cleanup' subcommand.

## `find [name]`

- return list of storage locations that contain an item called 'name'

## `rename [name]-[id] to [name]`

- change the name of specific item
- id would use a unique (but easy to input) identifier in the event multiple things have same name
- TODO: should each item have a unique name?
- TODO: should application tell user what the unique name is when they add something to tracking?

## `cleanup`

- Lists of all items that have been ‘used’ but not `put-away`
- include storage locations to assist in returning them to right place

## `put-away [name] (in <location>)`

- remove item from ephemeral storage
- adding a different location than previously recorded would be equivalent to 'put-away' and 'move' commands

## `move [name] from [location] to [location]`

- change storage location for that item

## `remove [name] from [location]`

- stop tracking specified item
- TODO: does this permanently delete the item or just flag as removed?

## `borrow [name] from [person]`

- add item to a special location for borrowed items
- TODO: ability to add item to a storage location?
- TODO: is this something that should be tracked with location like other items but a flag to indicate borrowed?

## `lend [name] to [person]`

- take out of storage location (like use)
- set flag that it is now loaned
- TODO: ability to set return date?
- TODO: autocomplete people from history?
- TODO: add contact info for a person?

## `return [name]`

- functionally very similar to put away
- removes borrow/loaned flags
- TODO: add ability to change location here too?

## `organize`

- Group items (like with like) and generate report that highlights discrepancies.
- TODO: may need some metadata to help determine which things are “alike”

## `places`

- list out all storage locations

## `inventory`

- Generate a list of all tracked items, locations, quantities, and status (loaned/borrowed)