liveBook · Manning

Chapter 3: Design and discovery

What you will learn in chapter 3 of Coding with AI

This introduction explains why planning matters in software design and how ChatGPT can help establish a foundation for an application.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction explains why planning matters in software design and how ChatGPT can help establish a foundation for an application.

Key terms: design phase, architecture, maintenance costs, ChatGPT, targeted questions

3.1 Getting to know ChatGPT

Introduces ChatGPT’s strengths and limitations and explains why developers should prompt thoughtfully and evaluate its responses.

Key terms: ChatGPT, large language model (LLM), text generation, stochastically, best guess, verify the output, real-world context, thoughtful prompts, evaluating responses, design and documentation

3.2 The problem

The section defines the HAM radio practice-test problem and shows why developers should clarify requirements and probe design questions before coding.

Key terms: problem, HAM radio license, practice tests, pool of questions, 35-question sessions, web application, design process, blind spots, alternative solutions, edge cases

3.3 Creating the right prompt

This section shows how to structure a prompt for a software design document and briefly introduces several other prompting approaches.

Key terms: role prompt, persona prompt, Introduction, Task, Contextual information, Instructions, Closing, software design document, Chain of thought prompting, Few-shot prompting

3.4 Measuring the effect on the design process

The section explains why using ChatGPT for a first design-document draft can save time while leaving refinement and judgment to developers.

Key terms: first draft, refinement, creation to curation, net gain, design meetings, documentation quality

3.5 A design document created with ChatGPT

This section uses the software development life cycle to frame a lightweight ChatGPT design document, shows how a prompt and conversation context shape it, and identifies risks to check in AI-generated designs.

Key terms: software development life cycle (SDLC), planning, analysis, design, implementation, testing, software design document, prompt, structure, potential pitfalls

3.6 Software design document: HAM radio license practice test application

The section presents ChatGPT’s design document for a HAM radio practice-test app and evaluates its components, risks, and technology choices.

Key terms: question pool database, question selector, user interface, grading component, question_id, question_text, options, correct_option, pitfalls, technical stack

3.7 Digging deeper

This section explains why clarifying key details in the initial design document can reduce changes during development.

Key terms: document, excessive churn, key details upfront

3.7.1 System overview (section 2)

The section uses ChatGPT to expand a brief system overview for a HAM radio practice-test app, then explains why the expanded design still needs human review.

Key terms: Question Pool Database, Question Selector, User Interface, Grading Component, System Overview, key subjects, same chat instance, inaccuracies, review and double-check, implied accuracy

3.7.2 Technical stack (section 5)

The section shows how chat context can shape a technical-stack draft and why developers should revise the AI’s suggestions for their application.

Key terms: chat context, Flask, Technical stack, tech stack, React.js, HTML templates

3.8 Generating user stories for our project

This section explains why the author asks ChatGPT to act as a product owner and how an existing chat context lets the request for user stories stay brief.

Key terms: product owner, backlog of tasks, user stories, context (chat), experienced product owner, prompt

3.8.1 Defining roles in prompts

This section explains how assigning ChatGPT a role shapes its responses and helps developers explore a problem from different perspectives.

Key terms: role, persona, context, roles, steer the output, different angles

3.8.2 The output: User stories document

This section presents ChatGPT’s unedited user stories for the HAM radio practice-test application and notes that the stories can change during development.

Key terms: user stories, primary interactions, expectations, user feedback, project requirements

3.8.3 Analyzing the output

This section explains why ChatGPT-generated user stories need human review and how to assess an initial draft at a high level.

Key terms: due diligence, initial draft, frameworks and outlines, user stories, logical progression, user’s journey

3.8.4 User stories document in detail

The section reviews ChatGPT-generated user stories for a practice-test application, identifying useful requirements while showing where the author would revise or defer them.

Key terms: user journey, user stories, Taking the Test, Submitting and Grading, Tracking Progress, backlog, MVP, User Interface and Experience, Accessing the Test, generative AI

3.9 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 2: First steps with AI-assisted coding Chapter 4: Coding the first version of our application →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.