You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(style): improve readability by replacing em dashes and semicolons ✏️
- Replace em dashes (—) with commas in README and architecture docs
- Replace semicolons with commas in prose across DEEP-NOTES files
- Update style guide in STRUCTURE.md to reflect new punctuation rules
- Fix punctuation in Time-Complexity series for consistent readability
- Update PERSONAL/6D-1M.md framework examples with clearer punctuation
Copy file name to clipboardExpand all lines: ARCHITECTURE/CODE-ORGANIZATION.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -315,4 +315,4 @@ Code organization depends on each developer's style, team preferences, and proje
315
315
- Choose an approach that works for **your team**
316
316
- Refactor when it stops serving you
317
317
318
-
**Remember:** The best organization is one that your team can understand and maintain. There's no "one size fits all" solution—just principles and patterns you adapt to your situation.
318
+
**Remember:** The best organization is one that your team can understand and maintain. There's no "one size fits all" solution, just principles and patterns you adapt to your situation.
Copy file name to clipboardExpand all lines: ARCHITECTURE/DECISION-TREE.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,26 +26,26 @@ This isn't about decision trees in machine learning. It's about mapping technica
26
26
27
27
### Quick Takeaways
28
28
29
-
1.**One root question first** — Then branch from there
30
-
2.**Written criteria** — So branches stay consistent, not just feeling-based
31
-
3.**Leaf = action or decision** — Not "maybe" or "we'll see"
32
-
4.**Depth of 3–4 levels** — Deeper is hard to maintain
33
-
5.**Write the "why"** — One sentence per branch so context doesn't get lost
34
-
6.**Trees go stale** — Requirements change; treat them as living docs
35
-
7.**Check what already exists** — ADR or existing tree before creating a new one
36
-
8.**Simple > complete** — Something that gets used beats something perfect that nobody opens
29
+
1.**One root question first**, then branch from there
30
+
2.**Written criteria**, so branches stay consistent, not just feeling-based
31
+
3.**Leaf = action or decision**, not "maybe" or "we'll see"
32
+
4.**Depth of 3–4 levels**, deeper is hard to maintain
33
+
5.**Write the "why"**, one sentence per branch so context doesn't get lost
34
+
6.**Trees go stale**, requirements change, treat them as living docs
35
+
7.**Check what already exists**, ADR or existing tree before creating a new one
36
+
8.**Simple > complete**, something that gets used beats something perfect that nobody opens
37
37
38
38
---
39
39
40
40
## What Is a Decision Tree in Design?
41
41
42
42
Here, a decision tree is a branching decision structure. One question or condition at the top, its answers lead to the next branches, until you reach a single concrete decision or action.
43
43
44
-
-**Root** — The top-level question or condition (level 0)
45
-
-**Branch** — Each answer or criterion forms a branch
46
-
-**Leaf** — End of a branch: a decision or action you can actually take
44
+
-**Root**, the top-level question or condition (level 0)
45
+
-**Branch**, each answer or criterion forms a branch
46
+
-**Leaf**, end of a branch: a decision or action you can actually take
47
47
48
-
Short example: "Need per-service scale within 12 months?" → Yes → consider microservices / modular monolith; No → start with a simple monolith. It doesn't have to be formal; what matters is that the flow is readable and reusable.
48
+
Short example: "Need per-service scale within 12 months?" → Yes → consider microservices / modular monolith. No → start with a simple monolith. It doesn't have to be formal, what matters is that the flow is readable and reusable.
49
49
50
50
---
51
51
@@ -61,7 +61,7 @@ Less fit when:
61
61
62
62
- Criteria are still vague or change a lot
63
63
- The decision heavily depends on context you can't spell out
64
-
- One or two questions are enough; no need to map a full tree
64
+
- One or two questions are enough, no need to map a full tree
65
65
66
66
---
67
67
@@ -71,7 +71,7 @@ Start with **one root question** whose answers drive all branches below. Don't s
71
71
72
72
**❌ No clear root:**
73
73
74
-
Jump straight to: "REST or GraphQL? SQL or NoSQL? Monolith or microservices?" — everything floats, no logical order.
74
+
Jump straight to: "REST or GraphQL? SQL or NoSQL? Monolith or microservices?" - everything floats, no logical order.
75
75
76
76
**✅ Root question first:**
77
77
@@ -90,7 +90,7 @@ Write down criteria (and weights if needed) so branches don't rely on feeling al
90
90
91
91
**❌ Gut feel only:**
92
92
93
-
"Let's just use X." — Six months later nobody remembers why.
93
+
"Let's just use X." - Six months later nobody remembers why.
94
94
95
95
**✅ Written criteria:**
96
96
@@ -113,8 +113,8 @@ Every leaf (end of a branch) should be **one clear decision or action**, not "ma
113
113
114
114
**✅ Clear leaves:**
115
115
116
-
- "Use modular monolith; separate domains by folder, deploy as one unit"
117
-
- "Use GraphQL for public API; REST for internal"
116
+
- "Use modular monolith, separate domains by folder, deploy as one unit"
117
+
- "Use GraphQL for public API, REST for internal"
118
118
119
119
If the end is still "it depends," add one more level: write the question or criterion that splits that "depends" until you get a decision you can act on.
120
120
@@ -138,8 +138,8 @@ On each branch (or at least at each leaf), write **one sentence for "why"**: why
138
138
139
139
Examples:
140
140
141
-
- "Choose monolith because team is small and MVP in 3 months; refactor to microservices only if we see real bottleneck evidence."
142
-
- "GraphQL for public because mobile clients need query flexibility; REST for internal because it's simpler and tooling already exists."
141
+
- "Choose monolith because team is small and MVP in 3 months, refactor to microservices only if we see real bottleneck evidence."
142
+
- "GraphQL for public because mobile clients need query flexibility, REST for internal because it's simpler and tooling already exists."
143
143
144
144
This helps when context changes: you can reassess whether that "why" still holds or the tree needs an update.
Copy file name to clipboardExpand all lines: DEEP-NOTES/Job-Management/infinite-loop.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This note covers **infinite loops**: processes that run continuously, typically
19
19
20
20
**Infinite Loop**: A process that runs continuously without termination, using `while (true)` or similar constructs, often with periodic sleep or wait conditions.
21
21
22
-
- The process never exits naturally; it must be killed externally.
22
+
- The process never exits naturally, it must be killed externally.
23
23
- Resource consumption is continuous (CPU, memory, connections).
24
24
- Response time is immediate when work arrives.
25
25
@@ -84,11 +84,11 @@ while (true) {
84
84
85
85
## Important Points
86
86
87
-
-**Resource efficiency**: Poor for non-real-time workloads; consumes resources 24/7.
87
+
-**Resource efficiency**: Poor for non-real-time workloads, consumes resources 24/7.
88
88
-**Monitoring**: Harder to distinguish between idle and active states.
89
89
-**Scalability**: Multiple instances need coordination to avoid duplicate work.
90
-
-**Error handling**: Unhandled exceptions can crash the entire process; need robust recovery.
91
-
-**Memory leaks**: Dangerous in long-running processes; accumulate over time.
90
+
-**Error handling**: Unhandled exceptions can crash the entire process, need robust recovery.
91
+
-**Memory leaks**: Dangerous in long-running processes, accumulate over time.
92
92
-**Deployment**: Requires process managers (systemd, PM2) for restart capability.
Copy file name to clipboardExpand all lines: DEEP-NOTES/Time-Complexity/o-2-n-exponential.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,29 +13,29 @@ tags:
13
13
14
14
## Overview
15
15
16
-
This note covers **O(2ⁿ) exponential time**: the complexity class where the number of operations grows exponentially with _n_, e.g. doubling each time _n_ increases by 1. Typical pattern: exploring **all subsets** of _n_ elements (each item: in or out → 2ⁿ outcomes). Unlike O(n!): 2ⁿ = all subsets; n! = all orderings. Exponential algorithms become impractical very quickly; even for moderate _n_ (e.g. 30–50), 2ⁿ is huge. **Goal:** avoid enumerating all subsets or binary combinations unless _n_ is very small; recognize the "two choices per step, n steps" pattern and consider pruning, memoization, or DP.
16
+
This note covers **O(2ⁿ) exponential time**: the complexity class where the number of operations grows exponentially with _n_, for example doubling each time _n_ increases by 1. Typical pattern: exploring **all subsets** of _n_ elements (each item: in or out → 2ⁿ outcomes). Unlike O(n!): 2ⁿ = all subsets; n! = all orderings. Exponential algorithms become impractical very quickly; even for moderate _n_ (e.g. 30–50), 2ⁿ is huge. **Goal:** avoid enumerating all subsets or binary combinations unless _n_ is very small; recognize the "two choices per step, n steps" pattern and consider pruning, memoization, or DP.
17
17
18
18
## Definition
19
19
20
-
**O(2ⁿ)** means the running time is bounded by a constant times 2ⁿ (or more generally, cⁿ for some constant c > 1). So each time you add one to _n_, the worst-case work multiplies by a fixed factor (e.g. 2).
20
+
**O(2ⁿ)** means the running time is bounded by a constant times 2ⁿ (or more generally, cⁿ for some constant c > 1). So each time you add one to _n_, the worst-case work multiplies by a fixed factor (for example 2).
21
21
22
-
- 2^10 ≈ 1,000; 2^20 ≈ 1 million; 2^30 ≈ 1 billion. So "exponential" is not something you want for large _n_.
23
-
- Big O allows any exponential base (2ⁿ, 3ⁿ, etc.); we write 2ⁿ as the standard example for "exponential in n."
22
+
- 2^10 ≈ 1,000, 2^20 ≈ 1 million, 2^30 ≈ 1 billion. So "exponential" is not something you want for large _n_.
23
+
- Big O allows any exponential base (2ⁿ, 3ⁿ, and so on), we write 2ⁿ as the standard example for "exponential in n."
24
24
25
25
## The Analogy
26
26
27
-
**A decision tree that doubles at each step.** At each of _n_ steps you have two choices (e.g. yes/no, include/exclude). So you have 2×2×…×2 = 2ⁿ possible paths. Exploring all of them means 2ⁿ leaves. The tree "fans out" very fast. That's exponential growth. No way to avoid the explosion unless you prune or don't enumerate everything.
27
+
**A decision tree that doubles at each step.** At each of _n_ steps you have two choices (for example yes or no, include or exclude). So you have 2×2×…×2 = 2ⁿ possible paths. Exploring all of them means 2ⁿ leaves. The tree "fans out" very fast. That's exponential growth. No way to avoid the explosion unless you prune or don't enumerate everything.
28
28
29
29
## When You See It
30
30
31
31
Exponential time typically appears when:
32
32
33
-
-**Enumerating all subsets**: e.g. "try every subset of items" (2ⁿ subsets). Each element is either in or out, so 2 choices per element, so 2ⁿ.
34
-
-**Recursion with two (or more) branches per call**: e.g. Fibonacci done naively (each call branches into two), or recursive backtracking that tries two options at each step without memoization or pruning.
35
-
-**Some exact algorithms for NP-hard problems**: e.g. brute-force SAT (try all 2ⁿ truth assignments), or subset-sum by trying all subsets. Often the best _exact_ algorithm we have is exponential; we then rely on heuristics, approximation, or small _n_.
33
+
-**Enumerating all subsets**: for example "try every subset of items" (2ⁿ subsets). Each element is either in or out, so 2 choices per element, so 2ⁿ.
34
+
-**Recursion with two (or more) branches per call**: for example Fibonacci done naively (each call branches into two), or recursive backtracking that tries two options at each step without memoization or pruning.
35
+
-**Some exact algorithms for NP-hard problems**: for example brute-force SAT (try all 2ⁿ truth assignments), or subset-sum by trying all subsets. Often the best _exact_ algorithm we have is exponential, we then rely on heuristics, approximation, or small _n_.
36
36
-**Backtracking / exhaustive search**: when the search space is "all combinations of n binary choices."
37
37
38
-
You do **not** get O(2ⁿ) from a single loop (O(n)) or from nested loops with a fixed depth (e.g. O(n²), O(n³)). The key is "number of steps or choices grows with n, and we're doing work proportional to the number of outcomes."
38
+
You do **not** get O(2ⁿ) from a single loop (O(n)) or from nested loops with a fixed depth (for example O(n²), O(n³)). The key is "number of steps or choices grows with n, and we're doing work proportional to the number of outcomes."
39
39
40
40
## Examples
41
41
@@ -96,7 +96,7 @@ function sumArray(arr: number[]): number {
96
96
97
97
## Summary
98
98
99
-
-**O(2ⁿ)**: work proportional to 2ⁿ (or cⁿ); typical pattern is exploring all subsets or all n-step binary choices.
99
+
-**O(2ⁿ)**: work proportional to 2ⁿ (or cⁿ), typical pattern is exploring all subsets or all n-step binary choices.
100
100
-**Analogy:** a decision tree that doubles at each step. That's 2ⁿ leaves.
101
101
-**Watch for:** subset enumeration, naive recursion with two branches per level, brute-force exact algorithms. Use only for small n or when no better option exists.
0 commit comments