
This book is an ideal supplementary text for any programming course. That’s because an AI assistant like GitHub Copilot can help your students develop higher quality software faster than ever before. However, to do that, your students need to be able to read and write code so they can thoroughly review, test, debug, and improve the code that’s generated by AI.
So, you can start by teaching your students HTML/CSS, JavaScript, Python, SQL, or any other language. As you do this, you can use this book to show your students how they can use Copilot to empower them to be better software developers. This includes using Copilot to implement unit testing to thoroughly test the software, a skill that’s important when using AI to generate code. And it includes using Copilot to design and maintain software.
Our students always give feedback on their end-of-course evaluations that Murach textbooks are so well organized and easy to follow, with plenty of code examples, figures, and instructions."
To present the skills that your students need in a manageable progression, this book is divided into two sections.
Section 1 dives right in and gets your students started fast with a two-chapter course in using Copilot to develop software. These chapters show how to:
After your students finish section 1, they’ll be ready to jump to any of the chapters in section 2. As a result, you can assign whichever chapters are relevant to your course. These chapters show how to use Copilot to:
This book has been carefully designed to work as a supplement for any type of programming course. Here’s how our book can work for several common programming courses:
After your course teaches basic Python coding skills, it can use section 1 of this book to show your students how to use Copilot to enhance those skills. Then, as you teach more Python skills, you can assign any of the chapters in section 2 that make sense for your course. For example, you can assign chapter 3 to present more Copilot skills for developing Python code. Or, you can assign chapter 7 to show how to use Copilot to implement robust unit testing with pytest.
After your course teaches the basic JavaScript skills, you can use section 1 of this book to show your students how to use Copilot to enhance those skills. Then, as you teach more JavaScript skills, you can assign any of the chapters in section 2 that make sense for your course. For example, you may want to assign chapter 7 to show how to use Copilot to implement robust unit testing with Jest.
Once your course teaches the basic HTML/CSS skills, you can use section 1 of this book to show your students how to use Copilot to generate code. Then, after you teach your students how responsive web design works, you can assign chapter 4 so your students can use Copilot to generate the HTML and CSS for a website that implements a responsive design.
Once your course teaches the basic skills for using SQL to work with a database, you can use section 1 of this book to show your students how to use Copilot to generate code. Then, you can assign chapter 5 to show how to use Copilot to generate SQL that works with an existing database or creates a new database.
All of the recommended software for this book is available for free, and chapter 1 provides complete, step-by-step instructions that your students can use to install it on their computers.
To write code, your students need a code editor. This book shows how to use VS Code because it provides excellent tools for developing code in most languages including Python, JavaScript, HTML/CSS, and SQL. In addition, it provides an integrated way to use Copilot to edit code.
To test Python code that’s generated by Copilot, your students need to have Python installed on their system.
To test HTML, CSS, and JavaScript that’s generated by Copilot, your students need to have a web browser. This book shows how to use Google Chrome, but your students can use another web browser if they prefer.
To work with a database, your students need a database that implements the SQL standard. This book shows how to use DB Browser to work with SQLite, an embedded database that implements the SQL standard and doesn’t require installing a database server like MySQL, SQL Server, or Oracle. However, if you’re students already have access to a database server, they can use the skills described in this book to work with a database on that server.
This book doesn’t use Murach’s unique paired-pages format. Instead, it uses a reflowable format because we think it works better for eBooks, and more than half of our customers now use eBooks. This new format retains as many elements of our paired-pages format as possible, but we have modified them to make them work with the reflowable format. If you have a chance, let us know what you think of this format.
This book provides exercises at the end of each chapter, and we have not provided solutions to the exercises as part of the download for this book. As a result, you should be able to use the exercises at the end of each chapter as assignments. Due to the non-deterministic nature of AI, these solutions should be different for every student, but you should be able to evaluate each student’s solution on how well it completes the task assigned by the exercise.
Since this book is designed to be a supplementary text, we don’t currently plan to create the rest of our usual set of instructor’s materials for it (objectives, PowerPoint slides, and multiple-choice tests). But, if you’re planning on using this book as a supplement for your course, and some of these instructor’s materials would be helpful to you, please let us know which ones you’re interested in, and we’ll consider developing them.
“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.
Some important terms
An introduction to AI assistants
Four components of an AI assistant
Download the files for this book
Install VS Code
Enable Copilot
Install Python
Set up VS Code
Generate the code
Test the code thoroughly
Improve the code
Generate the code
Test the code thoroughly
Improve the code
The prompts for the Python program
Problems with LLMs
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
Use chat participants
Use slash commands
Be specific
Provide context
Specify output
Say what to do
Assign roles
Use structured formats
Zero-shot
Few-shot
Prompt chaining
Chain of thought
More types of prompts
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
Make a plan in the Chat window
Apply the code to the files
Run the program
Run the doctests
Add a graphical representation of a die
Format the player scores
Format the player turn
Ask Copilot for advice
Convert from functions to objects
Run the program
Examine the starting files
Create a directory structure
Develop the home page
Develop a speaker page
Fix the content for the home page
Refine the shared code
Refine the header
Scale the images
Add a menu toggle for small screens
Use nested styles
Add a submenu to the navbar
Add comments to HTML and CSS files
Install DB Browser for SQLite
Open a database and view its tables
Run SQL statements
Export a schema
Select data from a single table
Select data from multiple tables
Insert, update, and delete data
Create other types of queries
Create transactions
Generate a script that creates a database
Run the script and test the database
Gather requirements
Make architectural decisions
Create a project structure
Address other planning issues
Analyze existing code
Find and fix bugs
Find and fix security issues
Add comments
Create a README.md file
Install pytest
Generate some initial tests
Generate tests for edge cases and more
Troubleshoot failing tests
Install Node.js
Install Jest
Generate some initial tests
Generate tests for edge cases and more
Troubleshoot failing tests
Mock a dependency in Python
Mock a dependency in JavaScript
Generate tests for non-existent code
Generate code that passes the tests
Refactor the code by generating more tests
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 errors in this book, please send them to us by email, so we can post the corrections here. Thank you!
This is our site for college instructors. To buy Murach books, please visit our retail site.