My Cart (0)

Customer Service 1-800-221-5528

AI-Assisted Programming with Copilot

by Mary Delamater and Scott McCoy
7 chapters, 232 pages, 149 figures
Published June 2025
ISBN 978-1-943873-23-4
Print: $39.50
eBook: $34.50
Print + eBook: $52.00

This book is your guide to mastering GitHub Copilot, an industry-leading AI assistant for software development. It shows you how to harness the power of large language models (LLMs) to write higher quality code faster than ever before. Since Copilot can handle the busywork and syntax for you, you can focus on innovation.

College Instructors

Go to our instructor's site to learn more about this book and its instructor's materials.

This is my first exposure to Murach's books, and I love them. I like the organization of the content, the consistent approach in each book, and the accuracy of the material."

Bob L., Michigan

  • About this Book
  • Table of Contents
  • FREE Downloads
  • Book FAQs
  • Corrections
  • Reviews

Who this book is for

This book is designed for any developer who wants to improve their productivity by using GitHub Copilot as their AI assistant. To show how to do that, this book presents examples in Python, JavaScript, HTML, CSS, and SQL. However, the skills and concepts apply to all programming languages.

What this book does

To present the skills that you need in a manageable progression, this book is divided into two sections.

Section 1: Get started fast

Section 1 dives right in and gets you started fast with a two-chapter course in using Copilot to develop software. These chapters show how to

  • Set up Copilot to work from within VS Code.
  • Create a Python program with Copilot.
  • Create a JavaScript web app with Copilot.
  • Master the essential skills for working with Copilot’s Chat window.
  • Use Copilot’s inline chat interface to edit code more efficiently.
  • Follow the best practices for prompt engineering.

Section 2: More skills as you need them

After you finish section 1, you’ll be ready to jump to any of the chapters in section 2. As a result, you can jump to the chapter contains the skills that you need right now. The chapters in this section show how to

  • Use docstrings and doctests to guide Copilot so it generates the Python code you want.
  • Generate HTML and CSS for a responsive website.
  • Use a schema to provide the context for generating SQL that works with a database.
  • Implement robust unit testing for Python code with pytest.
  • Implement robust unit testing for JavaScript code with Jest.
  • Implement test-driven design (TDD).
  • Get expert advice about software design and requirements gathering.
  • Summarize a project with a README.md file.

Why you'll learn faster and better with this book

Like all our books, this book is designed to make it as easy as possible for you to learn new skills faster and retain them better. To do that, it presents the Copilot skills you’re likely to need on the job without wasting your time by presenting background information that you aren’t likely to need. In addition, the exercises at the end of each chapter provide a way for you to gain valuable hands-on experience without extra busywork.

Recommended software

All of the recommended software is available for free, and our book provides complete, step-by-step instructions that for installing it on your computer.

VS Code

To write code, you need a code editor. This book shows how to use Visual Studio Code because it’s an industry-leading tool for developing code in most languages including Python, JavaScript, HTML, CSS, and SQL. In addition, it provides an integrated way to use Copilot to generate and edit code.

Python

To test Python code that’s generated by Copilot, you need to have Python installed on your system.

Chrome

To test HTML, CSS, and JavaScript that’s generated by Copilot, you need to have a web browser. This book shows how to use Google Chrome, but you can use another web browser if you prefer.

DB Browser for SQLite

To test the SQL statements, you need to have access to a database that implements the SQL standard. This book shows how to use DB Browser to work with an embedded SQLite database. This provides a way to test SQL statements without needing to install a database server like MySQL, SQL Server, or Oracle.

New eBook friendly format

This book doesn’t use the unique paired-pages layout that’s used by most Murach books. Instead, it uses the single-page layout that’s used by most other publishers. When we designed the layout for this book, we retained as many elements of our paired-pages layout as possible while converting them to a single-page layout. We think the result works significantly better for eBooks and equally well for printed books.

Praise for Murach books

“This is my first exposure to Murach’s books, and I love them. I like the organization of the content, the consistent approach in each book, and the accuracy of the material.”
—Bob L., Michigan

“I can’t praise this book highly enough. The clarity used in picking what to include, when to introduce it, and how to do so is remarkable.”
—Charles Ferguson, Software Developer, Australia

“Another thing I like is the exercises at the end of each chapter. They’re a great way to reinforce the main points of each chapter and force you to get your hands dirty.”
—Hien Luu, SD Forum/Java SIG

“Your book was indispensable to me. The answers were right there at every turn. All the examples made sense, and they all worked!”
—Alan Vogt, ETL Consultant, Massachusetts

“This book covers the perfect amount of description, and it does not make you bored by providing unnecessary details.”
—Posted at an online bookseller

On Murach’s Python Programming: “This is now my third book for Python, and it is the ONLY one that has made me feel comfortable solving problems and reading code.”
—Posted at an online bookseller

“Your books shine out from the rest—the quality of writing and presentation of information is topnotch, and the consistency of quality across books is impressive.”
—Nolan Tamashiro, Developer

View the table of contents for this book in a PDF: Table of Contents (PDF)

Click on any chapter title to display or hide its content.

Section 1 Get started with Copilot

Chapter 1 Create two short programs

Background terms and concepts

Some important terms

An introduction to AI assistants

Four components of an AI assistant

How to set up your computer

Download the files for this book

Install VS Code

Enable Copilot

Install Python

Set up VS Code

How to create a web app

Generate the code

Test the code thoroughly

Improve the code

How to create a Python program

Generate the code

Test the code thoroughly

Improve the code

A review and a look forward

The prompts for the Python program

Problems with LLMs

Chapter 2 The essential skills for using Copilot

How to edit files

Use the Chat window in Ask mode

Use the Chat window in Edit mode

Use the Chat window in Agent mode

Use inline chat

Use comment prompts

How to choose which technique to use

How to use chat participants and slash commands

Use chat participants

Use slash commands

Best practices for prompt engineering

Be specific

Provide context

Specify output

Say what to do

Assign roles

Use structured formats

Types of prompts

Zero-shot

Few-shot

Prompt chaining

Chain of thought

More types of prompts

Section 2 More skills as you need them

Chapter 3 Create a Python program

How to use Python doctests with Copilot

How to add a doctest to a function

How to run doctests

How to use Copilot to write doctests

How to simulate user input or random numbers

Generate the initial code

Make a plan in the Chat window

Apply the code to the files

Run the program

Run the doctests

Improve the initial code

Add a graphical representation of a die

Format the player scores

Format the player turn

Refactor the code

Ask Copilot for advice

Convert from functions to objects

Run the program

Chapter 4 Create a website

Start the website

Examine the starting files

Create a directory structure

Develop the home page

Develop a speaker page

Refine the web pages

Fix the content for the home page

Refine the shared code

Refine the header

Fix two responsive design issues

Scale the images

Add a menu toggle for small screens

Refactor the website

Use nested styles

Add a submenu to the navbar

Add comments to HTML and CSS files

Chapter 5 Work with a database

How to work with SQLite

Install DB Browser for SQLite

Open a database and view its tables

Run SQL statements

Export a schema

Work with an existing database

Select data from a single table

Select data from multiple tables

Insert, update, and delete data

Create other types of queries

Create transactions

Create a new database

Generate a script that creates a database

Run the script and test the database

Chapter 6 Design and maintain software

How to design new software

Gather requirements

Make architectural decisions

Create a project structure

Address other planning issues

How to maintain existing software

Analyze existing code

Find and fix bugs

Find and fix security issues

Add comments

Create a README.md file

Chapter 7 Implement unit testing

An introduction to unit testing

How to unit test Python code

Install pytest

Generate some initial tests

Generate tests for edge cases and more

Troubleshoot failing tests

How to unit test JavaScript

Install Node.js

Install Jest

Generate some initial tests

Generate tests for edge cases and more

Troubleshoot failing tests

How to mock external dependencies

Mock a dependency in Python

Mock a dependency in JavaScript

How to use test-driven development (TDD)

Generate tests for non-existent code

Generate code that passes the tests

Refactor the code by generating more tests

Sample PDFs

See for yourself how this book can get you started fast with the industry-leading AI coding assistant, GitHub Copilot.

Chapter 1: Create two short programs

This chapter shows how to use Copilot to create two short programs, a web app that uses JavaScript to perform a calculation and a Python program that performs the same calculation. But first, this chapter introduces some important background terms and concepts, and it shows how to set up your computer to work with Copilot.
Download Now

Book programs and exercises

This download includes:

  • All of the code that’s presented in this book.
  • The starting code for the exercises at the end of each chapter.

Chapter 1 shows how to install and use these files.
Download Now

On this page, we’ll be posting answers to the frequently asked questions (FAQs) for this book here. So, if you have any questions, please send them to us by email. Thanks!

There are no book corrections that we know of at this time. But if you find any, please send them to us by email, so we can post the corrections here. Thanks!

There are no reviews for this product yet.

To leave a review, please log in to your account.     Log In Here

Our Ironclad Guarantee

You must be satisfied. Try our print books for 30 days or our eBooks for 14 days. If they aren't the best you've ever used, you can return the books or cancel the eBooks for a prompt refund. No questions asked!

Contact Murach Books

For orders and customer service:

1-800-221-5528

Weekdays, 8 to 4 Pacific Time

College Instructors

If you're a college instructor who would like to consider a book for a course, please visit our website for instructors to learn how to get a complimentary review copy and the full set of instructional materials.