Systems grow by addition. People improving something search first for changes that add and overlook changes that remove unless something prompts them; a system in use grows more complex unless work is done to reduce it; parts outlive the jobs they were added for and still draw upkeep; and parts that do the same job drift apart and cause faults. Automating such a system speeds up the parts that should have been removed and makes them harder to see. Trim and fold is the work that reverses this, done in a fixed order: lay out the skeleton, every part with the one job it does; trim the parts that do no job; fold the parts that do the same job into one; hone what is left; and automate last. Because adding is the default, the pass has to be repeated.
1 strong · 8 moderate · 3 proposed propositions, resting on 11 primary references. Strong means measured directly in at least two independent studies; moderate, that it follows from established findings but has not been tested as stated; proposed, not yet tested.
Propositions
-
P1
Strong
People improving something search first for changes that add, and overlook changes that remove.
Across eight experiments, people were less likely to find a better subtractive change when nothing cued it; in one, 41% of an uncued group removed a piece against 61% of a group told that removing pieces was free, and only 70 of 651 suggestions to a university president (11%) removed something. A replication found 1,155 additive ideas against 297 subtractive ones.
-
P2
Moderate
Removal is found more often when the task cues it or people search longer, and less often under mental load.
In the same experiments, three practice trials raised the share who subtracted from 49% to 63%, and people under higher load found fewer subtractive solutions.
1 reference: [1]
-
P3
Moderate
A system in use grows more complex unless work is done to maintain or reduce it.
Lehman's second law of software evolution, drawn from the release histories of large programs.
1 reference: [3]
-
P4
Moderate
A share of a working system goes unused, and upkeep is still spent on it.
In a business system at a reinsurer, watched in use for two years, 25% of its methods were never executed, and 7.6% of 9,987 changes made by its maintainers were to methods nobody used.
1 reference: [4]
-
P5
Moderate
Before use, people weigh what a product can do above how easy it is to use, so products gain features that lower satisfaction once in use.
Three studies of feature fatigue: buyers chose products with more features and were less satisfied with them after use.
1 reference: [5]
-
P6
Moderate
Copies of one part drift apart, and the drift causes faults.
In five commercial and open-source systems, 52% of groups of duplicated code had been changed inconsistently, 28% of those unintentionally, and nearly every second unintentional change was a fault: 107 faults, confirmed by the developers.
1 reference: [6]
-
P7
Moderate
Automating a process before removing its unneeded steps keeps those steps and runs them faster.
Hammer's argument from early re-engineering cases: computers had been used to speed up old processes, and the gains came from removing steps first.
1 reference: [7]
-
P8
Moderate
Automation leaves people the hardest parts of a process and less practice at them, so an automated process is harder to see and correct.
Bainbridge's ironies of automation, from industrial process control.
1 reference: [8]
-
P9
Moderate
Some parts that look like duplicates are deliberate and do work, so a part's job has to be known before it is trimmed or folded.
In a study of cloning in real systems, many duplicates were deliberate engineering choices that served a purpose. Chesterton made the general point about removing a fence whose use is unknown.
1 reference: [9]
-
P10
Proposed
Doing the steps in order, skeleton, trim, fold, hone, automate, leaves a smaller system to automate than any other order.
Trimming before folding avoids merging something that is about to be removed; folding before honing means one copy is improved instead of two; automating last means only kept, sharpened parts are automated. Not tested.
No study yet
-
P11
Proposed
The fold is the step most often skipped, because each of two parts doing one job looks justified on its own.
Removing a part is a visible decision; two parts that overlap only show as a duplicate when their jobs are written side by side. Not tested.
No study yet
-
P12
Proposed
Because adding is the default, a pass held on a schedule finds more to remove than one prompted only by trouble.
Follows from propositions 1 to 3: without a cue, removal is overlooked, and complexity grows between passes. Not tested.
No study yet
1Definition
Trim and fold is a pass over a system that reverses its growth by addition, done in a fixed order. A system here is anything built up part by part and kept in use: a product's features, a site's pages, a workflow's steps, a codebase, a set of tools or a routine.
- Lay out the skeleton. List every part with the one job it does, who uses it and how often.
- Trim. Remove each part that does no job now.
- Fold. Merge parts that do the same job into one.
- Hone. Sharpen each remaining part to its job.
- Automate. Hand the kept, repeating parts to a machine, last.
Accretion is the condition the pass corrects: parts added one at a time, each sensible when added, that stay after their job has moved on or been taken over by another part.
2Prior work
Most of the pieces have names already. That people overlook subtraction was shown in eight experiments by Adams and colleagues [1] and replicated [2]. That software grows more complex unless work is done to reduce it is Lehman's second law [3]. Programmers call the cost of accumulated shortcuts technical debt and the work of restructuring without changing behaviour refactoring; their rule against keeping one piece of knowledge in two places is "don't repeat yourself". Lean manufacturing begins its 5S routine with sort: remove what is not needed from the workplace. Hammer argued in 1990 that companies should remove steps before automating them [7]. Chesterton's fence is the warning against removing something before knowing why it was put there [10].
What this theory adds is the order and the fold. Subtraction research treats change as add or remove; it has little to say about merging two parts that do one job, which is where copies drift and fault [6]. The skeleton, every part written beside its job, is what makes both removal and merging safe, because it shows which parts have no job and which share one, and it answers Chesterton before anything is cut [9, 10]. Automation comes last so that it runs on what survived [7, 8]. And because the default is to add, the pass is upkeep that recurs, like the maintenance in this site's other theories, and is never finished once.
3Mechanism
Parts arrive one at a time, each for a reason. When people look for a way to improve something, they search first for something to add, and they find removals mainly when the task points at them, when they search for longer, or when they are not under load [1]. Those are the conditions of building: a problem in front of you, little time, and nothing prompting you to look at what is already there. So each change tends to be an addition.
- Add a part each one sensible on its own
- The job moves on the part stays
- Copies drift one job, two places
- Upkeep grows more to keep and to find
- Automate on top the clutter runs faster
- Back to the first step
What helps. Lay out the skeleton, trim and fold, then automate what is left.
Jobs move on, and parts stay. A page built for one purpose is replaced by a better one, and both remain. A feature asked for once is used by nobody after a year and is still updated when the code around it changes: in one business system, a quarter of the methods were never run in two years and still received 7.6% of the changes [4]. Buyers reward features before use and regret them after [5], so the outside pressure also runs toward adding.
Copies drift. When two parts do one job, a change made to one is often not made to the other. In five systems, more than half of the groups of duplicated code had been changed inconsistently, and about half of the unintended inconsistencies were faults [6]. The same thing happens outside code: two lists of the same customers, two pages that both explain a topic, two steps that both check the same figure.
Complexity grows unless work is done against it [3]. More parts means more to keep up, more places to look and more places for copies to disagree. Automating at this point runs every part, needed or not, faster, and leaves people the hard cases with less practice at them [7, 8].
Trim and fold breaks the loop where it is cheapest. Writing each part beside its job is the cue that removal needs [1]. Parts with no job are trimmed; parts with the same job are visible side by side and can be folded; and what is automated afterwards is smaller.
4Evidence
The bias toward adding is the best-measured link: eight experiments, field data from suggestions and edits, and a replication [1, 2]. The growth of complexity in systems in use is an established empirical law in software [3], and the cost of unused parts is measured in one industrial system [4]. That features are chosen before use and regretted after is shown in three studies [5]. That duplicates drift and cause faults is measured in five systems [6], and that some duplicates are deliberate is shown in another study [9]. That automation should follow removal is an argument from cases and from process control [7, 8]. The order of the steps, the fold as the step most often skipped, and the value of a scheduled pass are proposed and untested.
5Measures
- Parts. How many parts the system has, counted the same way before and after a pass.
- Parts with a named job. The share of parts for which someone can say in one line what they do.
- Parts in use. The share used at least once in a set period, from logs where they exist.
- Parts per job. How many parts share each job; any job with two or more is a fold candidate.
- Places to look. How many places a person checks to do one common task.
- Upkeep on unused parts. The share of changes or time spent on parts nobody uses.
- Automation removed later. How many automated steps were later found to be unneeded.
6Protocol
For any system that has grown for a while:
- Lay out the skeleton. List every part. Beside each, write its one job in a line, who uses it and how often. Mark any part whose job nobody can state.
- Ask about the unknowns. For each part with no stated job, find out why it was added before deciding anything.
- Trim. Remove each part with no job now. Where removal is risky, hide it first and see whether anyone notices.
- Fold. Sort the skeleton by job. Where two or more parts do one job, keep one, move what is unique in the others into it, and point the old places at it.
- Hone. For each kept part, make it do its one job better: fewer steps, clearer names, one place for each fact.
- Automate. Only now, hand the repeating, stable parts to a machine.
- Repeat. Put the next pass on a calendar.
7A four-question check
- What one job does this part do?
- Who would notice if it were gone?
- Does another part already do the same job?
- Would I automate it as it is now?
8Worked examples
This site. Canopticon's own record of what was built and removed shows every step [11]. The author found five overlapping sections confusing, so essays and papers were folded into one shelf and each section was given one job. Two indexes, /answers and /numbers, were built and then trimmed when they proved incoherent for this site's readers. Five separate processing passes, each with its own trigger, were folded into one state machine. Six superseded design systems left about 500 stylesheet rules that no page used, and they were removed. The admin desk was cut from four places to look to two. Automation came after: processing runs one step at a time from the admin page. The passes were not done in one sitting or always in this order; read through this theory, each was a trim or a fold that the next round of building had made necessary.
A bookkeeper's month-end close. This example is an illustration. A small bookkeeping practice runs a fourteen-step month-end close and wants to automate it. Its skeleton shows three spreadsheets that each hold the client list (one job, three parts), two reports no client has opened in a year (no job), and a check of bank totals done twice, once in each of two tools. Trimming the reports and folding the client lists and the double check leaves nine steps. Of those, the bank import and the reconciliation repeat each month in the same form and are automated. Automating the original fourteen would have kept three client lists in step by machine.
Suggestions to a university president. In one of the subtraction studies, a new president asked the campus how to improve the university; of 651 suggestions, 70 (11%) removed something [1]. Read through this theory, the request worked as a cue for adding. A request for a skeleton, each office and program beside its job, would have been the cue for removal.
9Scope
The theory applies to any system built up by additions and kept in use: software, websites, workflows, documents, product lines, tool kits and routines. It is strongest where parts can be counted and their use observed. It says less about systems where redundancy is the job, such as backups, safety systems and second checks, which look like duplicates and are there on purpose; the skeleton should name that job so the fold leaves them alone. It does not say how often to run the pass, and it does not judge which jobs a system should do.
10Counter-evidence
The subtraction effect is real but moderate: in the clearest experiment, 41% of people removed a piece with no cue, against 61% of those cued to remove [1]. Lehman's laws come from large, long-lived programs, and small or new systems may not show the same growth [3]. The unused-code study is one system at one company [4], and widely repeated figures for unused features in commercial software come from small or unpublished samples. Duplicates are not always harmful: many in real systems are deliberate and serve a purpose [9], and folding can couple parts that were better kept apart. Removing a part has costs too: someone may have relied on it without the logs showing it, and a trim can undo work that was right for a reason nobody wrote down [10]. And some automation does pay before a system is cleaned up, when the cleanup would take longer than the saving.
References
The studies behind the propositions. Each says what was read for this theory: 4 in full, 1 from the abstract, 6 from a secondary account.
- Adams, G. S., Converse, B. A., Hales, A. H., & Klotz, L. E. (2021). People systematically overlook subtractive changes. Nature, 592, 258–261. doi:10.1038/s41586-021-03380-y Publisher · Read in full · Supports P1, P2
- Fillon, A. A., Girandola, F., Bonnardel, N., & Souchet, L. (2022). People systematically overlook subtractive changes (2021): replication and extension. PsyArXiv preprint. doi:10.31234/osf.io/4jkvn Publisher · Cited from a secondary account · Supports P1
- Lehman, M. M. (1980). Programs, life cycles, and laws of software evolution. Proceedings of the IEEE, 68(9), 1060–1076. doi:10.1109/PROC.1980.11805 Publisher · Cited from a secondary account · Supports P3
- Eder, S., Junker, M., Jürgens, E., Hauptmann, B., Vaas, R., & Prommer, K.-H. (2012). How much does unused code matter for maintenance? 34th International Conference on Software Engineering (ICSE), 1102–1111. doi:10.1109/ICSE.2012.6227109 wwwbroy.in.tum.de · Read in full · Supports P4
- Thompson, D. V., Hamilton, R. W., & Rust, R. T. (2005). Feature fatigue: when product capabilities become too much of a good thing. Journal of Marketing Research, 42(4), 431–442. doi:10.1509/jmkr.2005.42.4.431 Publisher · Abstract read · Supports P5
- Juergens, E., Deissenboeck, F., Hummel, B., & Wagner, S. (2009). Do code clones matter? 31st International Conference on Software Engineering (ICSE), 485–495. doi:10.1109/ICSE.2009.5070547 arxiv.org · Read in full · Supports P6
- Hammer, M. (1990). Reengineering work: don't automate, obliterate. Harvard Business Review, 68(4), 104–112. hbr.org · Cited from a secondary account · Supports P7
- Bainbridge, L. (1983). Ironies of automation. Automatica, 19(6), 775–779. doi:10.1016/0005-1098(83)90046-8 Publisher · Cited from a secondary account · Supports P8
- Kapser, C. J., & Godfrey, M. W. (2008). "Cloning considered harmful" considered harmful: patterns of cloning in software. Empirical Software Engineering, 13(6), 645–692. doi:10.1007/s10664-008-9076-6 Publisher · Cited from a secondary account · Supports P9
- Chesterton, G. K. (1929). The drift from domesticity. In The Thing. London: Sheed & Ward. no open copy linked · Cited from a secondary account
- Canopticon source repository. CLAUDE.md, the project's record of what was built, changed and removed. github.com · Read in full