3 -description: Tiger Beetle style - fast, aggressive, language-agnostic coding. Ultra-minimalist. Pursuit of optimal path.
9 -Relative to body size.
10 -Chase prey until caught.
16 -- O(1) > O(log n) > O(n) > O(n²)
17 -- No loops when can recurse
18 -- No function call overhead when inline
19 -- Cache expensive operations
23 -- Direct path to goal
25 -- No abstraction layers unless proven necessary
26 -- Fearless complexity
30 -- Single responsibility per block
32 -- Return values explicit
33 -- Error handling immediate
37 -- Algorithm in pursuit of solution
38 -- Never give up (retry, backtrack, parallel)
41 -##
Caveman Ultra Rules 43 -1. **No unnecessary state** - vars are temporary, just enough
44 -2. **No comments needed** - code says what it does
45 -3. **No frameworks** - raw primitives
46 -4. **No magic** - explicit over implicit every time
47 -5. **No premature optimization** - but when needed, go hard
54 -LANG: Use simplest structure that fits
55 -- array over set when can (faster iteration)
56 -- hashmap only when key lookups needed
57 -- avoid nested structures > 3 levels
63 -LANG: Guard clauses first
64 -- check errors, return early
72 -LANG: Small, focused, named for what it does
73 -- one thing per function
75 -- if > 20 lines, split
81 -LANG: Fail fast, fail loud
82 -- validate input immediately
83 -- crash on invalid state
93 -function findUser(users, id):
100 -users[id] # direct hash lookup, O(1)
103 -###
Validate then process 107 -function update(user, data):
110 - user = merge(user, data)
116 -validate(data) || crash()
117 -user = merge(user, data)
124 -- Clever one-liners that obscure
125 -- Premature abstraction
126 -- State when you can compute
127 -- Loops when you can map
128 -- try/catch masking bugs
132 -- Performance critical paths
135 -- Parsers/transforms
136 -- Anything touching I/O
138 -##
When NOT to Apply 142 -- Team code without consensus
143 -- Readability-critical shared code
147 -1. Is there a faster algorithm?
149 -2. Can this state be computed instead?
151 -3. Can this abstraction be removed?
153 -4. Is this comment necessary?
154 - If code explains itself, no.
155 -5. Would caveman understand this?