This chapter covers
- How AI assistants change how new programmers learn
- Why programming is never going to be the same
- How AI assistants like Copilot work
- How Copilot solves introductory programming problems
- Possible perils of AI-assisted programming
In this chapter, we’ll talk about how humans communicate with computers. We’ll introduce you to your AI assistant, GitHub Copilot, an amazing tool that uses artificial intelligence (AI) to help people write software. More importantly, we’ll show you how Copilot can help you learn how to program. We’re not expecting that you’ve written any programs before. If you have, please don’t skip this chapter, even if you already know a little bit about programming. Everyone needs to know why writing programs is different now that we have AI assistants like ChatGPT and Copilot, and that the skills we need to be effective programmers change. As we’ll see, we also need to be vigilant, because sometimes tools like ChatGPT and Copilot lie.
1.1 How we talk to computers
Would you be happy if we started by asking you to read and understand the code below?1
section .text global _start _start: mov ecx, 10 mov eax, '0' l1: mov [num], eax mov eax, 4 mov ebx, 1 push ecx mov ecx, num mov edx, 1 int 0x80 mov eax, [num] inc eax pop ecx loop l1 mov eax, 1 int 0x80 section .bss num resb 1