وبلاگ بلیان

Learn AI-Assisted Python Programming, Second Edition

معرفی کتاب «Learn AI-Assisted Python Programming, Second Edition» نوشتهٔ Leo Porter and Daniel Zingaro، منتشرشده توسط نشر Manning Publications Co. LLC در سال 2024. این کتاب در فرمت epub، زبان انگلیسی ارائه شده است. «Learn AI-Assisted Python Programming, Second Edition» در دستهٔ بدون دسته‌بندی قرار دارد.

Once, to be a programmer you had to write every line of code yourself. Now tools like GitHub Copilot can instantly generate working programs based on your description in plain English. An instant bestseller, Learn AI-Assisted Python Programming has taught thousands of aspiring programmers how to write Python the easy way—with the help of AI. It’s perfect for beginners, or anyone who’s struggled with the steep learning curve of traditional programming. In Learn AI-Assisted Python Programming, Second Edition you’ll learn how to Write fun and useful Python applications—no programming experience required! Use the GitHub Copilot AI coding assistant to create Python programs Write prompts that tell Copilot exactly what to do Read Python code and understand what it does Test your programs to make sure they work the way you want them to Fix code with prompt engineering or human tweaks Apply Python creatively to help out on the job AI moves fast, and so the new edition of Learn AI-Assisted Python Programming, Second Edition is fully updated to take advantage of the latest models and AI coding tools. Written by two esteemed computer science university professors, it teaches you everything you need to start programming Python in an AI-first world. You’ll learn skills you can use to create working apps for data analysis, automating tedious tasks, and even video games. Plus, in this new edition, you’ll find groundbreaking techniques for breaking down big software projects into smaller tasks AI can easily achieve. About the Technology The way people write computer programs has changed forever. Using GitHub Copilot, you describe in plain English what you want your program to do, and the AI generates it instantly. About the Book This book shows you how to create and improve Python programs using AI—even if you’ve never written a line of computer code before. Spend less time on the slow, low-level programming details and instead learn how an AI assistant can bring your ideas to life immediately. As you go, you’ll even learn enough of the Python language to understand and improve what your AI assistant creates. What's Inside Prompts for working code Tweak code manually and with AI help AI-test your programs Let AI handle tedious details Praise for the First Edition copyright dedication contents foreword acknowledgments introduction AI assistants change how programming is done Audience What we expect from you What you will be able to do after reading this book The challenge in working with AI assistants Why we wrote this book Warning: Beware of elitism How this book is organized: A road map Source code downloads Software/hardware requirements liveBook discussion forum about the authors about the cover illustration 1 Introducing AI-assisted programming with GitHub Copilot 1.1 Improving how we talk to computers 1.1.1 Making it a little easier 1.1.2 Making it a lot easier 1.2 About the technology 1.2.1 Python, your programming language 1.2.2 GitHub Copilot, your AI assistant 1.2.3 How Copilot works behind the scenes—in 30 seconds 1.3 How Copilot changes how we learn to program 1.4 What else can Copilot do for us? 1.5 Risks and challenges when using Copilot 1.6 The skills we need 1.7 Societal concerns about AI code assistants like Copilot Summary 2 Getting started with Copilot 2.1 Setting up your computer to start learning 2.2 The software we’ll be using 2.2.1 Python 2.2.2 Visual Studio Code 2.2.3 GitHub account 2.3 Getting your system set up: Part 1 2.4 Working with Python in Visual Studio Code 2.4.1 Set up your working folder 2.4.2 Check to see if your setup is working properly 2.5 Writing and running some small programs 2.6 Getting your system set up: Part 2 2.6.1 Check to see if Copilot is working properly 2.7 Addressing common Copilot challenges 2.8 Our path forward 2.8.1 How we’ll be working with Copilot throughout the book 2.8.2 Showcasing Copilot’s value in a data processing task Summary 3 Designing functions 3.1 Functions 3.1.1 The components of a function 3.1.2 Using a function 3.2 The design cycle of functions with Copilot 3.3 Examples of creating good functions with Copilot 3.3.1 Dan’s stock pick 3.3.2 Leo’s password 3.3.3 Getting a strong password 3.3.4 Scrabble scoring 3.3.5 The best word 3.4 Benefits of functions 3.5 Roles of functions 3.6 What’s a reasonable task for a function? 3.6.1 Attributes of good functions 3.6.2 Examples of good (and bad) leaf functions 3.7 Exercises Summary 4 Reading Python code: Part 1 4.1 Why we need to read code 4.2 Asking Copilot to explain code 4.3 Top 10 programming features you need to know: Part 1 4.3.1 #1. Functions 4.3.2 #2. Variables 4.3.3 #3. Conditionals 4.3.4 #4. Strings 4.3.5 #5. Lists 4.4 Exercises Summary 5 Reading Python code: Part 2 5.1 Top 10 programming features you need to know: Part 2 5.1.1 #6. Loops 5.1.2 #7. Indentation 5.1.3 #8. Dictionaries 5.1.4 #9. Files 5.1.5 #10. Modules 5.2 Exercises Summary 6 Testing and prompt engineering 6.1 Why it’s crucial to test code 6.2 Closed-box and open-box testing 6.2.1 Closed-box testing 6.2.2 How do we know which test cases to use? 6.2.3 Open-box testing 6.3 How to test your code 6.3.1 Testing using the Python prompt 6.3.2 Testing in your Python file (we won’t be doing it this way) 6.3.3 doctest 6.4 Revisiting the cycle of designing functions with Copilot 6.5 Full testing example 6.5.1 Finding the most students we can add to a row 6.5.2 Improving the prompt to find a better solution 6.5.3 Testing the new solution 6.6 Another full testing example: Testing with files 6.6.1 What tests should we run? 6.6.2 Creating the function 6.6.3 Testing the function 6.6.4 Common challenges with doctest 6.7 Exercises Summary 7 Problem decomposition 7.1 Problem decomposition 7.2 Small examples of top-down design 7.3 Spelling suggestions 7.4 Spelling suggestions using top-down design 7.5 Breaking down the process subproblem 7.5.1 Getting the list of words from the word list file 7.5.2 Generating the list of all possible words 7.5.3 Generating the list of all real words 7.6 Summary of our top-down design 7.7 Implementing our functions 7.7.1 create_word_list 7.7.2 add_letter 7.7.3 delete_letter 7.7.4 change_letter 7.7.5 all_possible_words 7.7.6 all_real_words 7.7.7 get_spelling_suggestions 7.7.8 spell_check 7.8 Exercises Summary 8 Debugging and better understanding your code 8.1 What causes errors (bugs)? 8.2 How to find the bug 8.2.1 Using print statements to learn about the code behavior 8.2.2 Using VS Code’s debugger to learn about the code behavior 8.3 How to fix a bug (once found) 8.3.1 Asking Copilot to fix your bug via Copilot Chat 8.3.2 Giving Copilot a new prompt for the whole function 8.3.3 Giving Copilot a targeted prompt for part of a function 8.3.4 Modifying the code to fix the bug yourself 8.4 Modifying our workflow in light of our new skills 8.5 Applying our debugging skills to a new problem 8.6 Using the debugger to better understand code 8.7 A caution about debugging 8.8 Exercises Summary 9 Automating tedious tasks 9.1 Why programmers make tools 9.2 How to use Copilot to write tools 9.3 Example 1: Cleaning up email text 9.3.1 Conversing with Copilot 9.3.2 Writing the tool to clean up email 9.4 Example 2: Adding cover pages to PDF files 9.4.1 Conversing with Copilot 9.4.2 Writing the tool 9.5 Example 3: Merging phone picture libraries 9.5.1 Conversing with Copilot 9.5.2 Top-down design 9.5.3 Writing the tool 9.6 Exercises Summary 10 Making some games 10.1 Game programs 10.2 Adding randomness 10.3 Example 1: Bulls and Cows 10.3.1 How the game works 10.3.2 Top-down design 10.3.3 Parameters and return types 10.3.4 Implementing our functions 10.3.5 Adding a graphical interface for Bulls and Cows 10.4 Example 2: Bogart 10.4.1 How the game works 10.4.2 Top-down design 10.4.3 Implementing our functions 10.5 Exercises Summary 11 Creating an authorship identification program 11.1 Authorship identification 11.2 Authorship identification using top-down design 11.3 Breaking down the process subproblem 11.3.1 Figuring out the signature for the mystery book 11.4 Summary of our top-down design 11.5 Implementing our functions 11.5.1 clean_word 11.5.2 average_word_length 11.5.3 different_to_total 11.5.4 exactly_once_to_total 11.5.5 split_string 11.5.6 get_sentences 11.5.7 average_sentence_length 11.5.8 get_phrases 11.5.9 average_sentence_complexity 11.5.10 make_signature 11.5.11 get_all_signatures 11.5.12 get_score 11.5.13 lowest_score 11.5.14 process_data 11.5.15 make_guess 11.6 Going further 11.7 Exercises Summary 12 Future directions 12.1 Prompt patterns 12.1.1 Flipped interaction pattern 12.1.2 Persona pattern 12.2 Limitations and future directions 12.2.1 Where Copilot (currently) struggles 12.2.2 Is Copilot a new programming language? 12.3 Exercises Summary index
دانلود کتاب Learn AI-Assisted Python Programming, Second Edition