AI guide
【One-Line Pitch】
A hands-on workshop that pairs classic software design fundamentals with practical LLM prompting, teaching you to generate, refactor, test, and review code while building a real "Nutrition Advisor" API from scratch. Best for developers who already write code and want to use AI without sacrificing quality or maintainability.
【Book Arc】
- **Opening (~0%–10%)**: Sets the premise — treat AI as a pair programmer, but only trust it once you understand clean function design, naming, and the risks of shipping unreviewed AI code.
- **Early (~10%–30%)**: Builds the design foundation — OOP, SOLID, and design patterns — each introduced through a new Nutrition Advisor requirement, so theory is always tied to a concrete refactor.
- **Early–Middle (~30%–40%)**: Moves into testing (unit, TDD, test pyramids) and then wraps the domain in a Web API, showing how quickly AI can scaffold logging, validation, and controllers.
- **Middle (~40%–55%)**: Integrates a third-party service (ChatGPT/OpenAPI) and reorganizes the codebase into Onion/Clean Architecture, including an AI-assisted global code review.
- **Late (~55%–85%)**: Automates the lifecycle — CI with GitHub Actions (tests, static analysis, coverage) and CD to Azure (App Service, secrets, monitoring, troubleshooting).
- **Ending (~85%–100%)**: Final thoughts on prompt craft, what changed with newer GPT versions, and how to keep changes cheap as requirements evolve.
【Key Takeaways】
- **AI amplifies whatever design skill you already have** (Opening): the book's core thesis is that you cannot guide or scrutinize AI output without understanding clean code, so fundamentals come first.
- **Every chapter adds a requirement, not just code** (Early): the Nutrition Advisor grows incrementally, and old code is refactored as soon as new knowledge exposes flaws — modeling real change management.
- **Design patterns are chosen by context, not memorized** (Early): Facade, Adapter, Strategy, Command, Decorator, and Factory Method appear as answers to specific notification and filtering problems.
- **Testing works in both directions with AI** (Early–Middle): you can start from tests (TDD) or from existing code and generate tests, covering unit, integration, smoke, and acceptance (BDD/Specflow) layers.
- **Third-party integration deserves a versioned comparison** (Middle): the book swaps an endpoint implementation for an external API call and weighs when each approach fits, plus how to test around external dependencies.
- **Architecture is about decoupling business logic from infrastructure** (Middle): Onion Architecture, DTO/model separation, and screaming architecture keep the domain independent of frameworks.
- **CI/CD is largely generatable but still needs judgment** (Late): pipelines for build, quality checks, coverage, and Azure deployment are shown as AI-friendly, with attention to secrets, monitoring, and troubleshooting.
- **Minimize change to existing lines** (Ending): the stated end goal is adding new components rather than rewriting, so software absorbs evolving requirements gracefully.
【Reading Tips】
- Deep-read the early design chapters (clean functions, OOP, SOLID) — they are the lens you'll use to judge every AI suggestion later.
- Skim the Azure/GitHub Actions configuration steps if you already run pipelines; focus instead on the prompt patterns and the reasoning behind each pipeline stage.
- Treat the Nutrition Advisor as a lab: type the prompts yourself and compare AI output against the book's refactors rather than reading passively.
- Pay attention to the "say no to the business" moment and the code-review-by-AI sections — they show where human judgment must override the tool.
- Keep the appendix's prompt tips nearby as a quick reference while working on your own codebase.
【Coverage Limits】
The excerpts cover the book's structure, chapter objectives, and several concrete examples, but do not include full code listings or every prompt used; some chapters are summarized rather than shown in detail.
Passage locations
Excerpt 1
tware design like KISS, OOP, SOLID, and key design Patterns. ● Use Effective prompt engineering for generating code, refactoring, testing, and reviewing. ● C...
View in text
Excerpt 2
serializing, documentation, controllers, request validation. As well as how to test it: smoke and integration tests. The point of this chapter is to show how...
View in text
Excerpt 3
a better testability Writing unit tests Test frameworks in .NET Configuring ChatGPT to help write tests ChatGPT GitHub Copilot Number of test cases required...
View in text
Excerpt 4
: gain muscle, lose weight, gain weight. Let us get started. Let us ask ChatGPT for the formula we will be implementing ( https://chatgpt.com/ ). Type the fo...
View in text