What you will learn in Coding with AI
Examples in Python
Chapter by chapter
Chapter 1: Introducing generative AI
The introduction presents generative AI as a way for developers to delegate some implementation work while retaining responsibility for higher-level design.
What you learn in chapter 1 →Chapter 2: First steps with AI-assisted coding
The chapter introduction recommends starting with generative AI coding tools by choosing one and experimenting.
What you learn in chapter 2 →Chapter 3: Design and discovery
This introduction explains why planning matters in software design and how ChatGPT can help establish a foundation for an application.
What you learn in chapter 3 →Chapter 4: Coding the first version of our application
The chapter introduces the need for a sound application foundation and explains how stubs let developers assemble and run an application before implementing its functionality.
What you learn in chapter 4 →Chapter 5: Using Blackbox AI to generate base code
The chapter introduces AI-assisted application development as a collaboration in which AI speeds up coding while the developer supplies judgment and direction.
What you learn in chapter 5 →Chapter 6: Generating a software backend with Tabnine
The introduction connects the existing question database to the need for persistent test sessions that keep a test-taker’s questions available.
What you learn in chapter 6 →Chapter 7: Building user interfaces with ChatGPT
The chapter introduces AI-assisted UI design as a way to turn a working backend into a usable application and explains why chat-based tools can help plan the frontend.
What you learn in chapter 7 →Chapter 8: Building effective tests with generative AI
The chapter introduces why testing matters and how generative AI can make writing thorough tests faster.
What you learn in chapter 8 →Chapter 9: Prompt engineering
The introduction explains why prompt engineering matters for developers using generative AI, while previewing the techniques covered in the chapter.
What you learn in chapter 9 →Chapter 10: Vibe coding with Cursor
The introduction explains vibe coding as conversational, AI-assisted development and positions it as a fast way to prototype without replacing structured practices for important applications.
What you learn in chapter 10 →Concepts explained in this book
- promptA prompt is natural-language input that instructs a generative artificial-intelligence system what response or result to produce.
- prompt engineeringPrompt engineering is the systematic design and refinement of instructions and context provided to an AI system to elicit desired outputs.
- GitHub CopilotCopilot Chat is a conversational generative AI tool that answers questions and assists with software-related tasks across web, desktop, and mobile interfaces.
- code generationCode generation is the automated production of source code from natural-language instructions, existing code, or other structured input.
- contextContext is the surrounding conversation history, instructions, assumptions, and other information that determines the meaning and intent of an input.
- generative modelingArtificial intelligence that produces new content, such as text, source code, documentation, or tests, from learned patterns and input instructions.
- test generationTest generation is the automated or semi-automated creation of software tests and their test data or expected outcomes.
- AI assistanceA conversational programming approach in which developers guide an AI system with natural-language requests instead of detailed specifications.
- ChatGPTChatGPT is a conversational generative-artificial-intelligence service that generates text and code in response to user prompts.
- testA test case is a defined input, execution condition, and expected result used to evaluate software behavior.
- pytestpytest is a Python testing framework that supports concise test writing, test discovery, fixtures, and extensible execution.
- Blackbox AIBlackbox AI is an AI-powered software development assistant that provides code generation, code assistance, and related programming support.
- language modelA large language model is a neural language model trained on extensive data to understand and generate language, including programming-language text.
- TabnineTabnine is an AI-powered programming assistant that provides context-aware code suggestions in supported code editors.
- test fixtureA test fixture is reusable setup data, state, or environment configuration required to execute a test.
- continuous improvementIterative evaluation is the repeated assessment of generated results followed by changes intended to improve their quality or accuracy.
- autocompleteA programming assistance feature that suggests code according to predefined rules or patterns rather than generative prediction.
- CursorCursor is an AI-assisted code editor that supports software development through natural-language interaction and code generation.
- user storyA user story is a concise requirement describing a software capability from the perspective of a user or other stakeholder.
- SQLiteSQLite is a lightweight embedded relational database engine that stores a database in a local file.
- databaseA database is a system that stores organized information and retrieves records matching explicit queries.
- chain-of-thought promptingChain-of-thought prompting is a prompting technique that guides an AI model through a problem using a sequence of intermediate reasoning steps.
- debuggingDebugging is the process of locating, diagnosing, and correcting defects in software.
- sessionA session is a recorded instance of a student's practice test that tracks its questions, answers, and result counts.
- JSONJSON is a text-based standard format for representing structured data with objects, arrays, and primitive values.
- question setA question set is a grouped collection of questions assembled for a particular assessment or practice activity.
- separation of concernsSeparation of concerns is a design principle that assigns distinct responsibilities to separate software components so they do not overlap unnecessarily.
- grading componentA grading component is a software component that evaluates submitted answers against correct answers and computes an assessment result.
- question selectorA question selector is a component or procedure that chooses questions from an available question pool for an assessment.
- wireframeA wireframe is a schematic interface layout that shows the structure and placement of content and controls without final visual styling.
- stubStubbing is the practice of creating simplified substitute implementations so other application components can be developed or tested before the real functionality exists.
- prompt structureAn organization of a prompt into labeled sections that specify a goal, relevant semantics, requirements, and process flow.
- cursorA database cursor is an object that executes database statements and accesses their results through an established connection.
- refactoringCode refactoring is the restructuring of existing source code to improve its internal organization without changing its externally observable behavior.
- PythonPython is a general-purpose, dynamically typed programming language commonly used for application development, automation, and data science.
- FlaskFlask is a lightweight Python web framework for building web applications and HTTP services.
- context managerA context manager is an object protocol that performs setup on entering a managed block and cleanup when the block exits.
- natural language processingNatural language processing is the computational analysis and generation of human language, including interpreting text and producing meaningful language-related outputs.
- virtual environmentA Python virtual environment is an isolated Python runtime environment with its own interpreter and installed packages, separate from other projects and the system installation.
- unique constraintA unique constraint is a database rule requiring values in a column or column group to be distinct across records.
- context-awarenessContextual awareness is the ability to preserve and apply surrounding task information when interpreting inputs and producing responses.
- sequential thinkingA reasoning approach that decomposes a task into ordered logical steps and considers the actions or decisions required at each step.
- quiz systemA quiz system is an application that presents questions, accepts answers, and manages assessment interactions and results.
- output controlOutput control is a prompting technique that constrains the format, structure, content, or other properties of an AI model's response.
- diffA diff is a representation of additions, deletions, and other differences between two versions of text or data.
- integrity errorAn integrity error is a database-related error raised when an operation violates an integrity constraint such as uniqueness or referential integrity.
- requirementsSoftware requirements are specified capabilities, constraints, and qualities that a software system must satisfy.
- instructionA directive that specifies an action or response an artificial-intelligence model should produce.
- technology stackA tech stack is the set of technologies selected to build and operate a software application.
- validationValidation is the checking of input or application state against expected rules and constraints.
- training datasetTraining data is the collection of examples analyzed by a machine-learning model during training.
- performanceThe degree to which software executes efficiently in terms of time and computational-resource use.
- flowchartA flowchart is a diagram that represents a process or algorithm as connected steps and decision points.
- feedback integrationFeedback integration is the incorporation of quality or correctness feedback into a subsequent version of an output or implementation.
- requestsRequests is a Python library for sending HTTP requests and receiving responses from web services.
- decompositionProblem decomposition is the division of a complex task into smaller, manageable subtasks.
- JinjaJinja2 is a Python templating engine that renders text or HTML from templates containing expressions and control directives.
- database connectionA database connection is an active communication link through which software accesses a database and submits operations.
- render_templaterender_template is a Flask function that renders a named template with supplied context data and returns the resulting response content.
- cookieA cookie is a small piece of data that a web browser stores and sends with requests to preserve client-specific state.
- session IDA session identifier is a value that uniquely identifies a user's active application session.
- domain knowledgeDomain-specific knowledge is specialized understanding of the problem area to which software is applied.
- feedbackUser feedback is information, opinions, or evaluations provided by users about a product, service, or interaction.
- parameterized queryA parameterized query is a database query whose values are supplied separately from the query structure to reduce injection risk and improve safe query execution.
- requirements extractionRequirements extraction is the process of identifying and interpreting software requirements from project information and stakeholder needs.
- probability theoryA numerical measure expressing the likelihood of a possible outcome.
- HTTP GETAn HTTP request that retrieves a resource or representation from a specified server endpoint.
- ExcalidrawA browser-based tool for creating and editing hand-drawn-style diagrams.
- MermaidJSMermaid is a text-based diagramming tool that generates diagrams from a declarative syntax.
- documentation generationDocumentation generation is the automatic production of software documentation from source code, comments, or related project information.
- anti-pattern promptingAnti-pattern prompting asks an AI system to identify harmful or ineffective implementation approaches and explain how to avoid them.
- attack-scenario promptingAttack-scenario prompting asks an AI system to design or evaluate an implementation against specified security attacks.
- comparative promptingComparative prompting asks an AI system to evaluate multiple approaches against specified criteria and explain their tradeoffs.
- component-first promptingComponent-first prompting asks an AI system to design and implement individual frontend components and their relationships before assembling the larger interface.
- maintenance-focused promptingMaintenance-focused prompting specifies long-term maintainability concerns such as clarity, observability, documentation, and team handoff.
- role-reversal promptA role-reversal prompt instructs an AI system to adopt a specified professional role while addressing the user's problem from that role's perspective.
- scenario-based promptingScenario-based prompting asks an AI system to account for explicitly described usage situations, conditions, or workflows.
- state-transition promptingState-transition prompting asks an AI system to model a workflow as states and explicitly defined transitions, including failure transitions.
- ReactReact.js is a JavaScript library for building user interfaces from reusable components.
- clarifying questionA question asked to obtain missing information needed to specify a task, audience, tone, or constraint.
- recursive promptingRecursive prompting is a prompting technique that repeatedly uses prior outputs or intermediate results to generate subsequent prompts or responses.
- content blockA content block is a named region in a template that child content can fill or override.
- web formAn HTML form is a browser interface element that groups controls for collecting and submitting user input.
- context managementContext management is the deliberate organization of codebase information and prompts so an AI system receives relevant context for producing useful outputs.
- instruction refinementInstruction refinement is the systematic process of making AI instructions clearer, more specific, and less ambiguous to improve the usefulness and predictability of generated outputs.
- style guideA style guide is a set of rules and guidance governing the visual and interaction design of an application or product.
- multiple-choice formatA multiple-choice format presents a question with several provided answers from which a respondent selects one or more responses.
- sqlite3The Python standard-library module that provides an interface to SQLite databases.
- bar chartA bar chart is a data visualization that represents values with rectangular bars whose lengths correspond to those values.
- MatplotlibA Python library for creating static, animated, and interactive data visualizations.
- profilingThe measurement and analysis of a program's execution behavior, such as runtime and resource usage, to identify performance characteristics.
- tkinterPython's standard interface to the Tk graphical user-interface toolkit.
- ai suggestionAn AI suggestion is a software-development recommendation or proposed code generated by an artificial intelligence system.
- output formatAn output format is the specified structural arrangement and representation that a generated response must follow.
- context manipulationContext manipulation is the deliberate arrangement of information, examples, instructions, and behavioral constraints in a prompt to influence an AI model's responses.
- boilerplate codeBoilerplate code is repetitive, standard code required for common implementation tasks but contributing little distinctive application behavior.
- tokenizationTokenization is the process of breaking text into smaller units such as words, punctuation marks, or phrases.
- scaffoldApplication scaffolding is the automated generation of a basic application structure, including starter code, files, and directories.
- context-aware coding assistanceProgramming assistance that incorporates the surrounding code, project information, and current editing context when generating or suggesting results.
- role-playingA prompting method that assigns an assumed role or identity to an AI system to shape its perspective and response behavior.
- role promptingA prompting technique that instructs an artificial-intelligence model to respond from a specified professional role or perspective.
- pygamePygame is a Python library that provides modules for developing games with graphics, input, sound, and related functionality.
- hallucinationAn AI-generated output that is fluent or confident but factually incorrect, nonsensical, or unsupported.
- setA set is an unordered collection data structure that stores unique elements and supports efficient membership operations.
- attentionAn attention mechanism computes the relevance of elements in an input sequence so a model can emphasize information important to the current computation.
- transformer architectureA Transformer is a neural-network architecture that processes sequence elements using attention and can process them in parallel.
- context cueA prompting technique that supplies hints or surrounding information to steer a model toward an appropriate approach.
- iterative promptingA prompting technique that repeatedly revises inputs based on model outputs until the response better satisfies the intended goal.
- multiple methodsA problem-solving technique that requests or applies several independent approaches and compares their results.
- pattern predictionA technique for generating language by estimating the most probable subsequent word or character from preceding context.
- template layoutA reusable page structure that keeps common outer elements stable while replacing an inner region with page-specific content.
- test suiteA collection of software tests maintained and executed together to evaluate an application or component.
- probabilistic systemA system whose outputs are governed by probability and may vary for the same input.
- request messagePOST is the HTTP request method for submitting data to a server for processing, often creating or changing a resource.
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.
