← All notes

Note

Three kinds of central, revisited

In September I wrote about three kinds of central. The phrase “central versus peripheral” does three different jobs when you build software, and “protection” does two. In November we drew the map of the data again. In the two months between, Landholder Connect grew from 32 database tables to 63. The new tables hold matters (pieces of work such as a negotiation), instruments (agreements such as a land access agreement), security risk assessments and more.

The three questions still stand. Two of them needed sharpening, and “protection” picked up a third meaning.

What changed underneath

The biggest change was not a feature. In September, almost every connection between two records was a promise that only the app’s code kept. When a stakeholder was deleted, only the app’s code stood between that delete and an engagement left pointing at a stakeholder who no longer existed.

Since then, the database itself enforces most of those connections. A rule in the database, called a foreign key, says that a pointer must point at a real record, and says what happens to the pointer when that record goes. In September there was one such rule between two kinds of record. By November there were 36.

That change is the reason two of the three questions needed sharpening.

The map, redrawn

Scatter of record types by how many kinds of record point at them and how many they point at, measured in November. Stakeholders 15, properties 12 and engagements 7 lead, then matters 4. Along the bottom are the records that nothing points at.

Measured against the live database structure, the same way as in September. Up the page is how many kinds of record point at this one. Across the page is how many kinds of record it points at. The records that nothing points at have their own row along the bottom. The hollow circles show where the three core records stood in September.

Holds the app up: count only independent records

The September claim still holds. “There are really only three things in the database that need heavy protection” is still the “pointed at” column read aloud: 15, 12, 7, then a gap. Properties, stakeholders and engagements each have more kinds of record pointing at them than they did in September, and no new kind of record has come near them.

The next record is a matter, with four. Three of those four are the matter’s own parts: its links to engagements, its history of stages, and its plan. A record’s own parts do not make it central. So the sharper question is “Do other, independent records depend on this one?” By that count, a matter has none.

Breaks quietly: a second condition

In September, a shape alone predicted where damage would build up without anyone noticing. The shape was a record that nothing points at, which itself points at several others. In November that shape needs a second condition. Where the database now keeps a pointer, the pointer cannot be left pointing at nothing, so a record in that corner can still be safe. The links between people and land sit in that corner, and so do the links between matters and engagements. Both are safe, because the database keeps both of their pointers.

So the sharper question is “Does nothing point at this record, and does it hold a pointer that only the app keeps?” The records that meet both conditions are the amber dots.

The shape predicted again. Four of the five amber records keep their pointers because of a decision that someone wrote down. The fifth is the security risk assessment, which can cite up to five engagements as its evidence. When one of those engagements is deleted, the assessment keeps pointing at it, and nothing anywhere said what that should mean. Nobody went looking there because of a complaint. The shape of the map led us there.

“Protection” is three things now

In September I split protection into two questions. The database’s new rules answer a third question.

The question What answers it
From the user They meant to do this. Should the app make it harder? A confirmation that names what will go.
From loss They did not choose this, for example after a crash or a failed save. Durable storage and backups.
From the app The app’s own code makes a mistake in a delete or a merge. The database’s own rules, which refuse the delete or clear the pointer, whatever the code forgot.

The mistake that the September note warned about happened again in a new place. In September, a protection question was settled by a priority rule. In November, we found a protection question that had been settled by a product rule. The product rule says that merging two duplicate stakeholder records should never combine two sets of risk scores. That rule is sound. But the merge applied the rule by deleting the duplicate’s assessment and its history, even when the record being kept had no assessment at all. The question that the merge should have asked was “Can a merge lose a person’s work?”, and the answer is no. The merge is being changed so that it moves the assessment across when the kept record has none, and refuses to go ahead when both records have one.

A kind of record the three axes didn’t see

Nine of the new tables hold the app’s own judgements and summaries: security risk assessments, assessment reports and project summaries. Nobody enters them as records, and they hold nothing else up. They sit beside the core records, because one of the app’s rules says that generated information is never written into a record.

Generated records are where protection questions slip, because a generated record looks cheap. Some are cheap, because a summary can be made again. Others are not. A risk assessment holds a person’s scores and reviews, and nobody can make those again. For each generated record, ask whether a person put something into it.

The ranking moves slowly, and the numbers don’t

The September note said that the structure of the data was the slowest thing to change. In the two months since, the number of tables doubled, and the number of kinds of record that point at stakeholders went from 6 to 15. Yet the order of the top three never changed. So the September advice holds with one correction. When an opinion and the structure disagree, trust the structure’s ranking, not its numbers.

Which axis answers which question, updated

The last two questions in this table are new since September.

The question in front of you The axis that answers it
How fast does this bug need fixing? the user’s path
Should this delete be refused, or just confirmed? holds the app up
Should this button warn before it destroys something? holds the app up
Where should a safeguard go? breaks quietly
What might already be broken that nobody has reported? breaks quietly
Is this worth building at all? none of them: that’s a product question
A new kind of record holds a pointer. Does the pointer need a database rule or a written decision? breaks quietly
Can a merge or a delete lose something the app generated? protection: ask whether a person put something into it