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

Fractal Geometry of Software Design

Avatar for Vlad Khononov Vlad Khononov
June 01, 2025
27

Fractal Geometry of Software Design

Presented at Craft 2025

Avatar for Vlad Khononov

Vlad Khononov

June 01, 2025
Tweet

Transcript

  1. coupling.dev #Cra ft Conf vladikk • How much food do

    we need to stay alive? • How creative are we? • How profitable are our companies?
  2. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?
  3. coupling.dev #Cra ft Conf vladikk METABOLIC RATE OF ANIMALS West,

    G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  4. coupling.dev #Cra ft Conf vladikk REGISTERED PATENTS West, G. (2018).

    Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  5. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. INCOME AND ASSETS OF COMPANIES
  6. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?
  7. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  8. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. How much food do we need to stay alive? How creative are we? How profitable are our companies?
  9. coupling.dev #Cra ft Conf vladikk "Viewed through this lens, cities,

    companies, plants, animals, our bodies, and even tumors manifest a remarkable similarity in the ways that they are organized and function." - Geo ff rey West
  10. coupling.dev #Cra ft Conf vladikk AGENDA 1. A primer on

    energy supply networks 2. How network theory applies to software design 3. Leveraging the network theory to manage complexity 4. S ^ D
  11. coupling.dev #Cra ft Conf vladikk ENERGY SUPPLY NETWORKS Systems that

    are sustained by the transport of energy through hierarchical networks.
  12. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN Intrusive Coupling Functional Coupling Model Coupling Contract Coupling
  13. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN Intrusive Coupling Functional Coupling Model Coupling Contract Coupling • How the parts of the system are implemented • Private interfaces • Not intended for inter-component integration
  14. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN Intrusive Coupling Functional Coupling Model Coupling Contract Coupling • Knowledge of what the system has to do • Business logic • Use cases • Rules, invariants, constraints
  15. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN Intrusive Coupling Functional Coupling Model Coupling Contract Coupling • Models of the business domain • Data structures • Software system-related aspects of the business domain • Understanding of the functional requirements
  16. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN Intrusive Coupling Functional Coupling Model Coupling Contract Coupling • Components’ integration contracts • Integration-specific models, APIs • The minimal data needed for components to work together
  17. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.
  18. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  19. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  20. coupling.dev #Cra ft Conf vladikk METABOLIC RATE OF ANIMALS West,

    G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  21. coupling.dev #Cra ft Conf vladikk METABOLIC RATE OF ANIMALS West,

    G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  22. coupling.dev #Cra ft Conf vladikk y = 3.4 * x3/4

    West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  23. coupling.dev #Cra ft Conf vladikk y = 3.4 * x3/4

    y = x Sublinear Growth Linear Growth Sublinear function grows slower than any linear function
  24. coupling.dev #Cra ft Conf vladikk Chihuahua Yorkshire Terrier Pug Beagle

    Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg
  25. coupling.dev #Cra ft Conf vladikk Chihuahua Yorkshire Terrier Pug Beagle

    Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg BASAL METABOLIC RATE The minimum number of calories a day needed to stay alive without performing any activities. https://www.sciencedirect.com/topics/engineering/basal-metabolic-rate
  26. coupling.dev #Cra ft Conf vladikk Chihuahua Yorkshire Terrier Pug Beagle

    Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg 110 220 440 880 1,760 3,520 Breed Weight Basal Metabolic Rate
  27. coupling.dev #Cra ft Conf vladikk Chihuahua Yorkshire Terrier Pug Beagle

    Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg 110 220 440 880 1,760 3,520 110 180 302 521 876 1,474 Breed Weight Linear Thinking Basal Metabolic Rate
  28. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. NO. OF GASOLINE STATIONS
  29. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  30. coupling.dev #Cra ft Conf vladikk REGISTERED PATENTS West, G. (2018).

    Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  31. coupling.dev #Cra ft Conf vladikk y = x1.15 y =

    x West, G. (2018). Scale: The universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson.
  32. coupling.dev #Cra ft Conf vladikk y = x1.15 y =

    x Superlinear Growth Linear Growth Superlinear function grows faster than any linear function
  33. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.
  34. coupling.dev #Cra ft Conf vladikk ECONOMIES OF SCALE Superlinear Growth

    Sublinear Growth Linear Growth WHY DON’T ENERGY SUPPLY NETWORKS GROW INDEFINITELY?
  35. coupling.dev #Cra ft Conf vladikk "You can plainly see the

    impossibility of increasing the size of structures to vast dimensions either in art or in nature; … also it would be impossible to build up the bony structures of men, horses, or other animals so as to hold together and perform their normal functions . . . for if his height be increased inordinately he will fall and be crushed under his own weight.” - Galileo Galilei
  36. coupling.dev #Cra ft Conf vladikk x2 x2 x2 Weight increase:

    Strength increase: 2 * 2 * 2 = x8 2 * 2 = x4
  37. coupling.dev #Cra ft Conf vladikk x2 x2 x2 Weight increase:

    Strength increase: 2 * 2 * 2 = x8 2 * 2 = x4
  38. coupling.dev #Cra ft Conf vladikk GROWTH LIMITS Superlinear Growth Sublinear

    Growth Linear Growth • As a system grows, it becomes more efficient • Undesired consequences of growth become more efficient as well
  39. coupling.dev #Cra ft Conf vladikk Knowledge (sublinear growth) Complexity (superlinear

    growth) Cognitive Limit (No growth) Functionality (Linear growth)
  40. coupling.dev #Cra ft Conf vladikk Knowledge (sublinear growth) Complexity (superlinear

    growth) Cognitive Limit (No growth) Functionality (Linear growth) "You can plainly see the impossibility of increasing the size of structures to vast dimensions either in art or in nature; … so also it would be impossible to build up the bony structures of men, horses, or other animals so as to hold together and perform their normal functions . . . for if his height be increased inordinately he will fall and be crushed under his own weight.” - Galileo Galilei
  41. coupling.dev #Cra ft Conf vladikk Knowledge (sublinear growth) Complexity (superlinear

    growth) Cognitive Limit (No growth) Functionality (Linear growth)
  42. coupling.dev #Cra ft Conf vladikk “I have sketched a bone

    whose natural length has been increased three times and whose thickness has been multiplied until, for a correspondingly large animal, it would perform the same function which the small bone performs for its small animal” - Galileo Galilei
  43. coupling.dev #Cra ft Conf vladikk “if one wishes to maintain

    in a great giant the same proportion of limb as that found in an ordinary man he must find a harder and stronger material for making the bones” - Galileo Galilei
  44. coupling.dev #Cra ft Conf vladikk POSTPONING GROWTH LIMITS 1. Adapt

    form / shape to withstand increased stress 2. Use stronger materials
  45. coupling.dev #Cra ft Conf vladikk https://en.wikipedia.org/wiki/List_of_largest_cities_throughout_history Stone tools, Fire, Bow,

    Wheel Writing Water Mill Gunpowder Printing Press Optical Lens Steam Engine Telegraph Plastics Airplane Transistor Nuclear Power Space Flight Internet Mobile Technology
  46. coupling.dev #Cra ft Conf vladikk “if one wishes to maintain

    in a great giant the same proportion of limb as that found in an ordinary man he must find a harder and stronger material for making the bones” - Galileo Galilei
  47. coupling.dev #Cra ft Conf vladikk Knowledge (sublinear growth) Complexity (superlinear

    growth) Cognitive Limit (No growth) Functionality (Linear growth) Cognitive Limit (superlinear growth)
  48. coupling.dev #Cra ft Conf vladikk “I have sketched a bone

    whose natural length has been increased three times and whose thickness has been multiplied until, for a correspondingly large animal, it would perform the same function which the small bone performs for its small animal” - Galileo Galilei
  49. coupling.dev #Cra ft Conf vladikk "Highly complex, self-sustaining structures, whether

    cells, organisms, ecosystems, cities, or corporations, require the close integration of enormous numbers of their constituent units that need e ff icient servicing at all scales. This has been accomplished in living systems by evolving fractal-like, hierarchical branching network systems.” - Geo ff rey West
  50. coupling.dev #Cra ft Conf vladikk Y. Chen, P. Cheng, Heat

    transfer and pressure drop in fractal tree-like microchannel nets Lorthois, Sylvie, and Francis Cassot. "Fractal analysis of vascular networks: insights from morphogenesis." Journal of theoretical biology 262.4 (2010): 614-633.
  51. coupling.dev #Cra ft Conf vladikk Chihuahua Yorkshire Terrier Pug Beagle

    Boxer Newfoundland 1.8kg 3.5kg 7kg 14.5kg 29kg 58kg 110 220 440 880 1,760 3,520 110 180 302 521 876 1,474 Breed Weight Linear Thinking Basal Metabolic Rate
  52. coupling.dev #Cra ft Conf vladikk West, G. (2018). Scale: The

    universal laws of life and death in organisms, cities and companies. Weidenfeld & Nicolson. NO. OF GASOLINE STATIONS
  53. coupling.dev #Cra ft Conf vladikk Knowledge (sublinear growth) Complexity (superlinear

    growth) Cognitive Limit (No growth) Functionality (Linear growth) Complexity Sublinear growth)
  54. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN Intrusive Coupling Functional Coupling Model Coupling Contract Coupling Shared Knowledge Encapsulated Knowledge Boundaries Encapsulated Knowledge
  55. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.
  56. coupling.dev #Cra ft Conf vladikk INTEGRATION STRENGTH (S) Intrusive Coupling

    Functional Coupling Model Coupling Contract Coupling Shared Knowledge Encapsulated Knowledge Boundaries Encapsulated Knowledge
  57. coupling.dev #Cra ft Conf vladikk DISTANCE (D) M ethods Classes

    Sub-M odules M odules Com ponents (M icro)Services System s Coordination
  58. coupling.dev #Cra ft Conf vladikk LOW STRENGTH HIGH STRENGTH ?

    LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • Low shared knowledge • Minimizes cascading changes
  59. coupling.dev #Cra ft Conf vladikk LOW STRENGTH HIGH STRENGTH Loose

    Coupling LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • Low shared knowledge • Minimizes cascading changes
  60. coupling.dev #Cra ft Conf vladikk LOW STRENGTH HIGH STRENGTH ?

    Loose Coupling LOW DISTANCE HIGH DISTANCE • High shared knowledge • Frequent cascading changes • Low cost of cascading changes
  61. coupling.dev #Cra ft Conf vladikk LOW STRENGTH HIGH STRENGTH High

    Cohesion Loose Coupling LOW DISTANCE HIGH DISTANCE • High shared knowledge • Frequent cascading changes • Low cost of cascading changes
  62. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH ? Loose Coupling LOW DISTANCE HIGH DISTANCE • Low cost of cascading changes • Low shared knowledge • Co-located unrelated modules
  63. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling LOW DISTANCE HIGH DISTANCE • Low cost of cascading changes • Low shared knowledge • Co-located unrelated modules
  64. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling ? LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • High shared knowledge • Frequent cascading changes
  65. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE • High cost of cascading changes • High shared knowledge • Frequent cascading changes
  66. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE
  67. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE
  68. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE MODULARITY = STRENGTH XOR DISTANCE
  69. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE M = S XOR D
  70. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE M = S ^ D
  71. coupling.dev #Cra ft Conf vladikk 1. Minimize integration strength as

    much as possible 2. Balance integration strength and distance • Both are high? — Reduce distance • Both are low? — Increase distance APPLYING M=S^D
  72. coupling.dev #Cra ft Conf vladikk 1. Minimize integration strength as

    much as possible 2. Balance integration strength and distance • Both are high? — Reduce distance • Both are low? — Increase distance 3. Repeat at all levels of abstraction APPLYING M=S^D
  73. coupling.dev #Cra ft Conf vladikk KNOWLEDGE: THE ENERGY OF SOFTWARE

    DESIGN So ft ware systems are sustained by the transport of knowledge (energy) through hierarchical networks of modules.
  74. coupling.dev #Cra ft Conf vladikk Knowledge (sublinear growth) Complexity (superlinear

    growth) Cognitive Limit (No growth) Functionality (Linear growth)
  75. coupling.dev #Cra ft Conf vladikk High Cohesion LOW STRENGTH HIGH

    STRENGTH Local Complexity Loose Coupling Global Complexity LOW DISTANCE HIGH DISTANCE M = S XOR D