"**Dependency chain**" is a term[^1] you can apply to any process[^2] which refers to the group of things that process depends on to be successful, and the chain of things that your dependencies depend on.
The fundamental principle in play:
> [!warning] If any one link in the chain fails, the whole thing falls down.
Any project you're working on, system you're building, service you're delivering, or job you're doing are will have dependencies - things that _must_ be there and fulfill their expected function in order for your thing to work. Put differently: the _only time your thing works is when **everything** works_.
Thus: **The more links in the dependency chain the more likely it is to fail**.
![[Pasted image 20250302222559.png]]
Each individual link in the chain might work 99% of the time, but as soon as that chain includes 69 links it will fail more often than not:
$0.99^{68}=0.5049$
$0.99^{69}=0.4998$
To make matters worse, dependencies _chains_ should really be called dependency _trees_:
![[Pasted image 20250302220031.png]]
To make matters _even worse_, [[Implicit Dependencies are Still Dependencies]].
# Ramifications of the Accumulating Unreliability of Dependency Chains
It is this accumulation of likely failures that cause [[Occam's Razor]] to be correct. This is one of the main reasons why you should [[Do the Simplest Thing]]. This is also why Rube Goldberg machines are so difficult to make.
I believe this is why we hear about outages on software built from cloud services so frequently. The problem is not just the code in your computer, it's the code in your computer, the success of transmission, the code on another (series of) computer(s, each with their own transmission/reception link), the success of a transmission back. If any one of those things incurs a problem, your system fails.
The lack of additional dependencies one of the (many) good reasons to choose [[SQLite]] as your data storage solution, unless you've reason not to.
# Rube Goldberg Example
A simple Rube Goldberg - it turns off a light by pushing a button.
## Components
The overall example system is comprised of two sets of dominos, a ball on a track, and a button that turns off a light.
![[Pasted image 20250302141420.png]]
## Subcomponents
Each of the subcomponents could be broken down to its own individual components.
![[Pasted image 20250302143234.png]]
These effects all rollup:
![[Pasted image 20250302144710.png]]
This example is further broken down in the [[Implicit Dependencies are Still Dependencies#Rube Goldberg Example]]
****
## Source
- self
## Related
[^1]: ...used primarily in coding, in which it refers to all the code your code _depends on_ to work, and the code each of your dependencies themselves depend on. This goes on as long as there is something dependent on something else.
[^2]: Or project, function, service delivery, piece of code, tool, plan, etc.