eva icon indicating copy to clipboard operation
eva copied to clipboard

Determine if "items" are an overengineered feature

Open meedstrom opened this issue 2 years ago • 0 comments

Looking at the project with fresh eyes, I feel like I committed premature DRY (Don't Repeat Yourself) when I introduced the concept of populating the list variable eva-items with objects created via eva-item-create (see Chapter 4 of the manual) and then letting the user run a "session" i.e. a sequence of interactions defined by these items.

It's flexible, hypothetically, because I do want to e.g. exclude certain items from a given session depending on whether they've been called before the same day, and things like that. But perhaps a different metaphor would be easier to work with, or no metaphor at all.

If we get rid of the concept of an "item", we'd need to duplicate more boilerplate code in each function that interacts with the user (such as eva-query-weight and almost all the other functions in eva-builtin.el). And then we'd let the user put together their own "session" which is just a list of these functions to loop through, and it'd be inflexible, but the user could have several different lists for different times of day, for example. Then at least it may be easier to debug and understand what's going on.

I may need to come back and clarify this further to myself. It's possible the thing I'm trying to simplify is just fundamentally complex in a way that shouldn't be abstracted. Or maybe the answer is to keep refining the metaphor until it's bug-free.

meedstrom avatar Dec 10 '21 20:12 meedstrom