Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M3424

Lasagna Code

Lasagna Code
BusinessHigh supportManagement
Included
account_tree

Updated 2026-07-31

Loading revision record…

INTRODUCTION

English translation pending.

CORE DEFINITION

Lasagna code is an architecture with too many layers and boundaries drawn too strictly, so that changing one small feature requires traversing controller, service, manager, and data-access layers in sequence. Each layer is internally clean and the separation looks principled, yet the vertical cost of any end-to-end change grows with the number of layers. The same pattern appears in organizations with many reporting levels, where information degrades and decisions slow as they travel upward. Decoupling in one direction creates a new coupling in another.

SCAFFOLDING EFFECT

psychology

Reduce cognitive load

- Count the crossings: measure how many layers a typical end-to-end change must pass. - Slice vertically: group code by business capability rather than by technical layer. - Flatten the static parts: merge or skip middle layers that rarely change.

anchor

Anchor fast decisions

Strict layering decouples components horizontally while creating a vertical dependency chain. Every change must be threaded through all layers, so coordination cost grows with depth and each hop adds translation, delay, and information loss. Clear structure and maintainable structure are therefore not the same property.

MINIMUM ACTION

In progress 0/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more

Source support: Explicit

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Spaghetti_codeZH · Explicit
    verified

RELATED MODELS