Skip to Content
Meubles Morinière

Engineering choices4 min read

Technical case studies

Eleven engineering problems that came up on the project, from a one-of-a-kind piece sold on two channels to an assistant that must not make up a single figure. For each one, I give the solution that was kept, what it achieved and its limits.

The other sections describe the code as it is. Here I tell how it got there. Each study starts from a problem where the obvious solution wasn’t enough. They all follow the same outline: the problem, the constraints, the alternatives, the decision, the implementation, the results, then the limits.

The studies

StudyThe problemThe decision
Holding a piece during paymenta one-of-a-kind piece could sell twice, in the store and online, while Stripe was collectinga hold derived from pending orders, with no table to expire or clean up
A promised date you can keepthe delivery date wasn’t computed the same way from one screen to the next, and then it shifted with suppliersone rule, the upper bound, a promise frozen at payment and a view of the link that threatens it
Payments that cannot be editedthe law wants any edit to cash records to show, even one made with full privilegesa hash chain computed by the database, verified every morning and after every migration
An erasure that survives a restorewhen a copy was restored, erased customers came backa register of hashes outside the database, replayed when a copy is restored
The storefront only has the rights it needsthe storefront is open to the whole Internet and it shares the ERP’s databasea dedicated Postgres role, column-level grants and triggers that check what it writes
A request that may or may not have gone outa refund with no answer stayed pending forever, and a stale read overwrote a newer statethe unknown outcome kept as a state, keys taken from the announced fact, states that never move backwards
A morning check that says what it could not reada paid order never shipped or a forgotten refund throws no erroranomaly readings every morning, a “blind” section when a reading fails, an outside witness
An assistant that does not bring the factsa language model writes plausible figures in places where a figure commits the storetake away the model’s ability to carry facts, then cross-check every number it still writes
Two applications born from a forktwo copies of the same pricing rule drifted apart and nothing flagged itshared packages, extracted piece by piece, and a twin check at push time
Tests that read the code in place of the revieweran action with no guard or a cache never expired pass the compiler and ordinary teststests that read the source code, carry their written exceptions and run at every push
An ERP too heavy to maintainthe ERP was growing four times faster than it was shrinkingchange the writing rule rather than launch a big clean-up

How to read them

  • I cite my sources. A file or a symbol (file.ts#SYMBOL) says where the rule is. A commit (git show <hash>) says when it showed up and why. Code excerpts are read from the repository when this doc is built, like those of the Skills and evidence pages. Identifiers are in English, while comments and test names are in French.
  • I only say an alternative was rejected when a record shows it: a commit message, a code comment, a dated decision. The others are the ones a reader would ask about. They’re there to place the decision in context, and I don’t claim anyone debated them.
  • The figures are dated. They describe the project at the time of the study, and I give the counting method when it matters.
  • The limits are part of the result. Each study says what the solution doesn’t solve and what’s left to do.

On this page