Software Engineering Demo Examples
Runnable Python 3 snippets and engineering templates illustrating core CSE concepts across logic, architecture, testing, and security. Click View to inspect any file in the code viewer.
For recommended next roadmaps across DSA, Paradigms, and specializations, see References & Next Roadmaps.
Phases 1–3: Logic, Architecture & Patterns
Boolean equivalence verification, dependency injection, and strategy-pattern decoupling.
| # | Example | Description | Link |
|---|---|---|---|
| 1 | Boolean Truth Table | Verifies De Morgan's Laws exhaustively over Boolean inputs. | View |
| 2 | Dependency Injection | Decouples domain service logic from storage via a Protocol interface. | View |
| 3 | Strategy Pattern | Replaces branching pricing conditionals with a dispatch table of functions. | View |
Phases 1 & 4: Testing, Security & Prompts
Boundary-focused unit tests, constant-time HMAC verification, and structured engineering prompt specs.
| # | Example | Description | Link |
|---|---|---|---|
| 4 | Unit Test Boundaries | Self-contained unittest suite checking normal, boundary, and error paths. | View |
| 5 | HMAC Signature Check | Constant-time webhook verification using hmac.compare_digest. | View |
| 6 | Prompt Specification Template | Structured Context / Task / Constraints / Acceptance prompt format. | View |