Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Psychology of Overengineering

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

The Psychology of Overengineering

Fabian Gosebrink

October 28, 2026

Transcript

106 slides
  1. Bad code is code The ideas behind it: where things

    live, how they fit together, why.
  2. orders/ orders-v2/ orders-legacy/ // please don't use export class OrderWrapper

    { // so we can swap it out one day private orders = inject(OrderService); private ordersV2 = inject(OrderServiceV2); shared/ load() { if (flags.newCheckout2023) { return this.ordersV2.load(); } return this.orders.load(); order-wrapper.service.ts feature-flags.ts // newCheckout2023 } }
  3. orders/ orders-v2/ orders-legacy/ // please don't use export class OrderWrapper

    { // so we can swap it out one day private orders = inject(OrderService); private ordersV2 = inject(OrderServiceV2); shared/ load() { if (flags.newCheckout2023) { return this.ordersV2.load(); } return this.orders.load(); order-wrapper.service.ts feature-flags.ts // newCheckout2023 } } The box gets a little heavier each time.
  4. Do you ? Base model 99,900 ✓ Sport package ✓

    21-inch wheels ✓ Heated seats ✓ All-wheel drive ✓ Ambient lighting ✓ Panorama roof ✓ Night vision ✓ Sport exhaust + 4,800 + 2,400 + 650 + 3,900 + 480 + 1,950 + 2,700 + 3,100
  5. Do you ? For the trip to the bakery. Base

    model 99,900 ✓ Sport package ✓ 21-inch wheels ✓ Heated seats ✓ All-wheel drive ✓ Ambient lighting ✓ Panorama roof ✓ Night vision ✓ Sport exhaust + 4,800 + 2,400 + 650 + 3,900 + 480 + 1,950 + 2,700 + 3,100
  6. export class DataView { data = input.required<Row[]>(); columns = input<Column[]>([]);

    layout = input<'table' | 'grid' | 'cards'>('table'); sortable = input(true); filterable = input(true); pageSize = input(25); density = input<'compact' | 'comfortable'>('comfortable'); config = input<DataViewConfig>(DEFAULT_CONFIG); dataSource = input<DataSource<Row>>(new DefaultDataSource()); // ... five more inputs // in case we ever go multi-tenant tenantId = input<string>();
  7. export class DataView { data = input.required<Row[]>(); columns = input<Column[]>([]);

    layout = input<'table' | 'grid' | 'cards'>('table'); sortable = input(true); filterable = input(true); pageSize = input(25); density = input<'compact' | 'comfortable'>('comfortable'); config = input<DataViewConfig>(DEFAULT_CONFIG); dataSource = input<DataSource<Row>>(new DefaultDataSource()); // ... five more inputs // in case we ever go multi-tenant tenantId = input<string>(); An option nobody uses still costs something every time it's read.
  8. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event
  9. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event ✓ Defined SaveStrategy + DefaultSaveStrategy
  10. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event ✓ Defined SaveStrategy + DefaultSaveStrategy ✓ Added a saveForm slice to the store
  11. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event ✓ Defined SaveStrategy + DefaultSaveStrategy ✓ Added a saveForm slice to the store ✓ Wrote adapters for three future storage backends
  12. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event ✓ Defined SaveStrategy + DefaultSaveStrategy ✓ Added a saveForm slice to the store ✓ Wrote adapters for three future storage backends ✓ Added a plugin hook for custom save behaviour
  13. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event ✓ Defined SaveStrategy + DefaultSaveStrategy ✓ Added a saveForm slice to the store ✓ Wrote adapters for three future storage backends ✓ Added a plugin hook for custom save behaviour ...
  14. "Add a button that saves the form." ✓ Created FormSaveService

    ✓ Added FormSaveFacade ✓ Introduced a SaveFormRequested event ✓ Defined SaveStrategy + DefaultSaveStrategy ✓ Added a saveForm slice to the store ✓ Wrote adapters for three future storage backends ✓ Added a plugin hook for custom save behaviour ... ?
  15. ?

  16. Our code has A colleague who shows up for the

    first time, every single morning.
  17. Our code has A colleague who shows up for the

    first time, every single morning.
  18. changes shape. Knowledge moves from heads into the repo. Or

    the model makes a very confident guess.
  19. agent-01 agent-02 agent-03 agent-04 agent-05 worktree/ checkout worktree/ search worktree/

    profile worktree/ export worktree/ roles █ █ █ █ █ agent-06 agent-07 agent-08 agent-09 agent-10 worktree/ reports worktree/ i18n worktree/ tests worktree/ layout worktree/ offline █ █ █ █ █
  20. agent-01 agent-02 agent-03 agent-04 agent-05 worktree/ checkout worktree/ search worktree/

    profile worktree/ export worktree/ roles █ █ █ █ █ agent-06 agent-07 agent-08 agent-09 agent-10 worktree/ reports worktree/ i18n worktree/ tests worktree/ layout worktree/ offline █ █ █ █ █
  21. Small changes one can follow Consistent over clever "Do I

    understand this?" Conventions in a file the whole team looks after
  22. Any fool can make things bigger, more complex, and more

    violent. It takes a touch of genius – and – to move in the opposite direction. · Small Is Beautiful, 1973
  23. What am I afraid of? Who pays for this decision

    later? What would I build if I knew I could change it later?
  24. ?

  25. ? Having feels safer than needing. Being prepared feels more

    responsible than choosing. AI makes building so cheap that it's all easier than ever.
  26. ? Having feels safer than needing. Being prepared feels more

    responsible than choosing. AI makes building so cheap that it's all easier than ever. Adding a feature feels easier than a difficult conversation.
  27. ? Having feels safer than needing. Being prepared feels more

    responsible than choosing. AI makes building so cheap that it's all easier than ever. Adding a feature feels easier than a difficult conversation.

More Decks by Fabian Gosebrink

Other Decks in Technology