Node.js / TypeScript
Weekly Goalsβ
- Machine Coding
- Implement 3β4 additional problems:
- In-memory DB.
- Pub/sub system.
- Notification service (simplified).
- URL shortener or task scheduler.
- Emphasize:
- Tests.
- Edge cases.
- Clean error handling.
- Implement 3β4 additional problems:
- DSA
- 2β3 problems/day, including graphs/heaps as needed.
- Interview Skills
- Practice explaining design choices out loud.
Use with:
Weekly Overview Tableβ
| Day | Focus |
|---|---|
| 1 | In-memory DB β design & implementation |
| 2 | Pub/sub system β design & implementation |
| 3 | Notification service β design & implementation |
| 4 | URL shortener or task scheduler β implementation |
| 5 | Refactor & write tests for all problems |
| 6 | Mixed machine coding mock (2 short problems) |
| 7 | Weekly review & integration with portfolio |
Day 1 β In-Memory Document Store (Mini DB)β
4-Hour Planβ
-
Block 1 (Design β 60β75 min)
- From machine-coding-bank.md (In-memory DB):
- API:
insert,find,update,delete.
- API:
- Classes:
DocumentStore,Collection.
- From machine-coding-bank.md (In-memory DB):
-
Block 2 (Implementation β 60β75 min)
- Implement:
- Collections and basic operations.
- Query predicates as functions.
- Implement:
-
Block 3 (Testing & Short DSA β 45β60 min)
- Test basic operations.
- 1 DSA problem.
6-Hour Planβ
- Add:
- Extensions (60 min):
- Optional simple equality index on a field.
- Extensions (60 min):
Day 2 β Pub/Sub Event Systemβ
4-Hour Planβ
-
Block 1 (Design β 60β75 min)
- From machine-coding-bank.md (Pub/Sub):
- API:
subscribe,unsubscribe,publish.
- API:
- Class:
PubSubwith topic β handlers map.
- From machine-coding-bank.md (Pub/Sub):
-
Block 2 (Implementation β 60β75 min)
- Implement:
- Subscribe/unsubscribe semantics.
- Publish that safely calls all handlers (handle errors).
- Implement:
-
Block 3 (Testing & Short DSA β 45β60 min)
- Test multiple subscribers.
- 1 DSA problem.
6-Hour Planβ
- Add:
- Async extension (60 min):
- Allow async handlers and ensure one failing doesnβt break others.
- Async extension (60 min):
Day 3 β Notification Service (Simplified)β
4-Hour Planβ
-
Block 1 (Design β 60β75 min)
- From machine-coding-bank.md (Notification Service):
- Channels: in-app + email stub.
- Use patterns:
- Strategy or Factory for channels.
- Classes:
NotificationService,Channel,EmailChannel,InAppChannel.
- From machine-coding-bank.md (Notification Service):
-
Block 2 (Implementation β 60β75 min)
- Implement:
- Basic send logic.
- Template rendering (simple string replace).
- Implement:
-
Block 3 (Testing & Short DSA β 45β60 min)
- Test various notification types.
- 1 DSA problem.
6-Hour Planβ
- Add:
- Data storage (60 min):
- Store sent notifications in an in-memory log for querying.
- Data storage (60 min):
Day 4 β URL Shortener or Task Schedulerβ
4-Hour Planβ
-
Block 1 (Design β 60β75 min)
- Pick one:
- URL shortener.
- Task scheduler (delayed jobs).
- Use machine-coding-bank.md specification.
- Pick one:
-
Block 2 (Implementation β 60β75 min)
- Implement core logic and simple interface/CLI.
-
Block 3 (Testing & Short DSA β 45β60 min)
- Test key flows and constraints.
- 1 DSA problem.
6-Hour Planβ
- Add:
- Additional scenarios (60 min):
- For URL shortener: add click tracking.
- For scheduler: handle cancellations.
- Additional scenarios (60 min):
Day 5 β Refactor & Tests Across All Problemsβ
4-Hour Planβ
-
Block 1 (Code Review β 60β75 min)
- Review code for:
- In-memory DB.
- Pub/sub.
- Notification service.
- URL shortener/scheduler.
- Review code for:
-
Block 2 (Testing β 60β75 min)
- Add/strengthen tests:
- Edge cases.
- Error scenarios.
- Add/strengthen tests:
-
Block 3 (DSA β 30β45 min)
- 1β2 mixed problems.
6-Hour Planβ
- Add:
- Documentation (60 min):
- Each mini-project: add README with design + how to run.
- Documentation (60 min):
Day 6 β Mixed Machine Coding Mock (2 Short Problems)β
4-Hour Planβ
-
Block 1 (Mock 1 β 90 min)
- Choose an easier/medium problem (e.g., feature flag service).
- Time-box: 15 min design, 60 min code, 15 min tests.
-
Block 2 (Mock 2 β 60β75 min)
- Choose a small second problem (e.g., shopping cart).
-
Block 3 (Review β 30 min)
- Analyze time usage and mistakes.
6-Hour Planβ
- Add:
- Little refactor (60 min):
- Improve whichever mock was messiest.
- Little refactor (60 min):
Day 7 β Weekly Review & Integration with Portfolioβ
4-Hour Planβ
-
Block 1 (Review β 60β75 min)
- Summarize:
- Patterns used.
- Gaps in your machine coding approach.
- Update skill gap template (machine coding ability).
- Summarize:
-
Block 2 (Portfolio Integration β 60β75 min)
- Decide:
- Which 2β3 machine coding projects youβll polish and showcase as GitHub repos.
- Decide:
-
Block 3 (DSA β 30β45 min)
- Mixed problems, light.
6-Hour Planβ
- Add:
- Polish (60 min):
- For 1 project, ensure code is clean, documented, and ready to share.
- Polish (60 min):