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!
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.
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."
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.
To present the skills that you need in a manageable progression, this book is divided into two sections.
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
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
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.
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.
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.
To test Python code that’s generated by Copilot, you need to have Python installed on your system.
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.
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.
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.
“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
See for yourself how this book can get you started fast with the industry-leading AI coding assistant, GitHub Copilot.
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
This download includes:
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!
For orders and customer service:
1-800-221-5528
Weekdays, 8 to 4 Pacific Time
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.