Journal entry for


I added the first topic to my “ideas for the future of coding” section on the site (current title: Un-separating program state and definition).

Logging this thought I’ve been having for a long time (if I’m not repeating an earlier entry):

An action and its intent should be first class things

I think that programming with a history of first class, meaningful, user/programmer actions, sounds very valuable. Actions are things like: clicking a button to do something, editing the definition of a program,… You need to capture the intent of the action and the causality, not just the lower level effects of the action. Causality is which actions in the past lead to the current one being able to exist, e.g. drawing a square leads to the square being able to be resized later.

This is related to why commit messages are so important in development: the individual edits to the code are only there because we can’t easily capture our true intent in the code.

The more of the actual intent is logged, even in a CRUD-style program, the better you can do things like changing the underlying state model and migrating the old to the new state by replaying actions.

I guess this all kind of sounds obvious, like, “can’t you just name functions appropriately” or something, but I think there’s more to it.