Skip to content

Commit 57e3a8e

Browse files
committed
Restructed to develop a more rounded knowledge reference base.
1 parent c95a8cb commit 57e3a8e

File tree

19 files changed

+141
-45
lines changed

19 files changed

+141
-45
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2025 rfsJim
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 75 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,75 @@
1-
# Software design patterns in Typescript
2-
3-
Example code for design patterns. Where it makes sense classes and themes are continued across patterns.
4-
These aren't supposed to be fully functioning source code but templates, examples, and descriptions to assist in solving problems.
5-
The 23 Gang of Four (`GoF`) design patterns fall into three big camps:
6-
7-
1. Creational Patterns
8-
2. Structural Patterns
9-
3. Behavioral Patterns
10-
11-
## Creational Patterns
12-
How do we create objects in a flexible way?
13-
14-
- Singleton – only one instance allowed
15-
- Simple Factory - Honourable mention not a true pattern
16-
- Factory Method – let a method decide which subclass to instantiate
17-
- Abstract Factory – a factory of related factories
18-
- Builder – step-by-step construction
19-
- Prototype – clone existing objects
20-
21-
## Structural Patterns
22-
How do we organise objects and classes?
23-
24-
- Adapter – convert one interface to another (e.g., old plug to new socket)
25-
- Bridge – separate abstraction from implementation
26-
- Composite – tree structure (like folders & files)
27-
- Decorator – wrap stuff to add behaviour, used to attach additional responsibilities to an object dynamically.
28-
- Facade – a simple front for complex subsystems
29-
- Flyweight – reuse shared objects to save memory
30-
- Proxy – control access to an object (security, lazy loading etc.)
31-
32-
## Behavioral Patterns
33-
How do objects communicate and behave?
34-
35-
- Strategy – swap algorithms at runtime, defines family of algorithms encapsulates each one and makes them interchangeable.
36-
- Observer – event listeners / publish-subscribe. Defines one to many dependency between objects so that when one object changes state all it's dependents are notified.
37-
- Command – encapsulate actions as objects
38-
- Chain of Responsibility – pass requests down a chain
39-
- Interpreter – language grammar representation
40-
- Iterator – go through elements without exposing the structure
41-
- Mediator – centralised communication between objects
42-
- Memento – capture and restore object state
43-
- State – change behaviour based on internal state
44-
- Template Method – define skeleton of an algorithm with steps filled in by subclasses
45-
- Visitor – add operations to objects without changing them
1+
# 🧠 Software Development Handbook
2+
3+
## ✨ Foreword
4+
5+
Software development is part art form, part mathematics, part science — and part vibe.
6+
This handbook is a curated collection of what I’m learning: design patterns, algorithms, data structures, and foundational concepts.
7+
It’s part learning tool, part long-term reference.
8+
9+
It will grow as my knowledge and skills grow. I hope you find something useful in here, too — as I follow in the footsteps of giants and explore the endless world of code.
10+
11+
![Following in the footsteps of giants](assets/memes/standing_upon_shoulders_of_giants.jpg)
12+
13+
## 📚 Sections
14+
15+
### 🎨 Design Patterns
16+
Structured approaches to common software architecture challenges. Based on the **Gang of Four** (`Gof`) patterns.
17+
18+
- **Creational**
19+
- [Singleton](design_patterns/creational/singleton.ts)
20+
- [Factory Method](design_patterns/creational/factory.ts)
21+
<!-- - [Abstract Factory](design_patterns/creational/abstract_factory.md) -->
22+
- **Structural**
23+
- [Decorator](design_patterns/structural/decorator.ts)
24+
- [Proxy](design_patterns/structural/proxy.ts)
25+
<!-- - [Adapter](design_patterns/structural/adapter.md) -->
26+
<!-- - [Composite](design_patterns/structural/composite.md) -->
27+
- **Behavioral**
28+
- [Strategy](design_patterns/behavioral/strategy.ts)
29+
- [Observer](design_patterns/behavioral/observer.ts)
30+
<!-- - [Command](design_patterns/behavioral/command.md) -->
31+
32+
📄 [Full Pattern Index](design_patterns/README.md)
33+
34+
---
35+
36+
### ⚙️ Algorithms & Data Structures
37+
Code implementations of core computer science techniques.
38+
![How I feel writing this repo](assets/memes/no_idea_dog.jpg)
39+
40+
- **Sorting Algorithms**
41+
<!-- - [Bubble Sort](algorithms/sorting/bubble_sort.js)
42+
- [Quick Sort](algorithms/sorting/quick_sort.js)
43+
- [Merge Sort](algorithms/sorting/merge_sort.js)
44+
- [Radix Sort](algorithms/sorting/radix_sort.js) -->
45+
- **Searching Algorithms**
46+
<!-- - [Binary Search](algorithms/searching/binary_search.js)
47+
- [Linear Search](algorithms/searching/linear_search.js) -->
48+
- **Recursion**
49+
<!-- - [Factorial](algorithms/recursion/factorial.js) -->
50+
- **Data Structures**
51+
<!-- - [Hash Table](algorithms/data_structures/hash_table.js)
52+
- [Linked List](algorithms/data_structures/linked_list.js)
53+
- [Stack](algorithms/data_structures/stack.js) -->
54+
55+
📄 [Full Algorithm Index](algorithms/README.md)
56+
57+
---
58+
59+
### 🧩 Core Programming Concepts
60+
In-depth notes and examples of important programming fundamentals.
61+
62+
<!-- - [Callback](concepts/callback.md)
63+
- [Closure](concepts/closure.md)
64+
- [Event Loop](concepts/event_loop.md) -->
65+
66+
---
67+
68+
## 🔄 Contributions
69+
This repo is intended as a personal learning journal, but feel free to open issues or PRs if you spot something helpful to add or improve.
70+
71+
---
72+
73+
## 📜 License
74+
75+
[MIT](LICENSE)

assets/memes/no_idea_dog.jpg

73.2 KB
Loading
82.8 KB
Loading

design_patterns/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Software design patterns in Typescript
2+
3+
Example code for design patterns. Where it makes sense classes and themes are continued across patterns.
4+
These aren't supposed to be fully functioning source code but templates, examples, and descriptions to assist in solving problems.
5+
The 23 Gang of Four (`GoF`) design patterns fall into three big camps:
6+
7+
1. Creational Patterns
8+
2. Structural Patterns
9+
3. Behavioral Patterns
10+
11+
## Creational Patterns
12+
How do we create objects in a flexible way?
13+
14+
- Singleton – only one instance allowed
15+
- Simple Factory - Honourable mention not a true pattern
16+
- Factory Method – let a method decide which subclass to instantiate
17+
- Abstract Factory – a factory of related factories
18+
- Builder – step-by-step construction
19+
- Prototype – clone existing objects
20+
21+
## Structural Patterns
22+
How do we organise objects and classes?
23+
24+
- Adapter – convert one interface to another (e.g., old plug to new socket)
25+
- Bridge – separate abstraction from implementation
26+
- Composite – tree structure (like folders & files)
27+
- Decorator – wrap stuff to add behaviour, used to attach additional responsibilities to an object dynamically.
28+
- Facade – a simple front for complex subsystems
29+
- Flyweight – reuse shared objects to save memory
30+
- Proxy – control access to an object (security, lazy loading etc.)
31+
32+
## Behavioral Patterns
33+
How do objects communicate and behave?
34+
35+
- Strategy – swap algorithms at runtime, defines family of algorithms encapsulates each one and makes them interchangeable.
36+
- Observer – event listeners / publish-subscribe. Defines one to many dependency between objects so that when one object changes state all it's dependents are notified.
37+
- Command – encapsulate actions as objects
38+
- Chain of Responsibility – pass requests down a chain
39+
- Interpreter – language grammar representation
40+
- Iterator – go through elements without exposing the structure
41+
- Mediator – centralised communication between objects
42+
- Memento – capture and restore object state
43+
- State – change behaviour based on internal state
44+
- Template Method – define skeleton of an algorithm with steps filled in by subclasses
45+
- Visitor – add operations to objects without changing them
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)