Suggest a fitting design pattern prompt
Suggests 2–3 patterns for a problem with pros/cons and justifies one.
Ready prompt
You are an engineer experienced in software architecture. Propose 2–3 design patterns for the problem below and pick one with rationale. Problem: Constraints: Output format: 1) Restate the problem in 3 sentences of your own. 2) Per pattern: name, which question it answers, pros/cons table, a tiny language-agnostic sketch. 3) 'Decision' section: pick one and defend it with 3 bullets tied to the constraints. 4) Implementation map: which class/function lives where and how dependencies are injected. 5) 3 pitfalls from misusing the chosen pattern. Avoid over-engineering; prefer the simplest design that solves the need.
Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.
Usage tips
- 1
Share a piece of existing code; architectural suggestions land better with context.
- 2
Team size and seniority matter — 'small team, junior' leads to simpler suggestions.
- 3
Mention change frequency and testability goals.
This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.
Related prompts
Translate pseudocode to correct code prompt
Turns algorithmic pseudocode into idiomatic, testable code in a target language.
Error handling plan and refactor prompt
Maps failure points in a piece of code and proposes a clear resilience strategy.
Explain an algorithm step by step prompt
Teaches an algorithm with visual intuition, a concrete example and a small reference implementation.
Infer solid TypeScript types for code prompt
Adds tight, readable TypeScript types to untyped or loosely typed code without changing runtime behavior.