How I work
Rules in data, not in code
Whenever the rule belongs to the business and changes at the speed of the business, it leaves the code and becomes configuration. I did this in payments, in the factory’s downtime engine and in an ETL engine, three domains with no relation whatsoever to each other. The cost is that the configuration becomes a critical part of the system and needs care of its own; the return is that the business stops waiting in the development queue.
Generalize after the third case
An abstraction created in anticipation is almost always wrong. Only the third use shows what is essential and what was an accident of the first. That is how it went with the shared libraries other teams install, and with the 5 packages I published: none of them was born the first time the problem appeared.
Derived state, never assigned
When an aggregate has state that depends on its parts, that state is computed, not written. Whoever
writes status = done creates the chance for the status to lie. It costs one recalculation
function and eliminates a whole category of support bug.
Idempotency in everything that comes from outside
External integrations resend, callbacks arrive out of order, robots reprocess queues. Every operation that receives a third-party call needs to answer the same thing if it is called twice.
One translator per platform, not a generic bus
A single bus looks like savings and becomes a bottleneck: every team waits in one team’s queue, and one platform’s incompatibility contaminates the common model. A dedicated translator is more code and less coupling.
Offline as a requirement, not as a feature
In an office, a network outage is an incident. On the shop floor it is Tuesday.
When I structured the industrial monitoring platform, I treated operating without a network as a premise from day one, and that changed the client’s whole architecture. If it had been left for the second phase, it would have cost a rewrite, because “working offline” is not a layer you install on top of an application that assumes a connection.
The conflict policy that stayed is last write wins, by the device’s clock, and it has a weakness I accept with my eyes open: it trusts a clock that is not mine. Here the risk is small, but in another context it would be the wrong choice. See Industrial monitoring.
Saying what I don’t know
A profile with no stated limit forces the reader to find the limits alone, and the first discovery contaminates everything that came before. I prefer the limit to be written before someone needs to ask.
In more detail
Three of these ideas have a note of their own, because each became practice with a rule and not only with intention: Design before implementing is where I decide before writing, How I debug is what I do when something is already wrong in production, and Code review and standards is how the house standard stops depending on who reviewed.