AI-Assisted Programming: Better Planning, Coding, Testing, and Deployment

AI-Assisted Programming: Better Planning, Coding, Testing, and Deployment

AI-Assisted Programming: Better Planning, Coding, Testing, and Deployment
Автор: Taulli Tom
Дата выхода: 2024
Издательство: O’Reilly Media, Inc.
Количество страниц: 225
Размер файла: 2.7 MB
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы

Cover....1

Copyright....6

Table of Contents....7

Foreword....13

Preface....15

What’s Covered....16

How This Book Is Different....17

Who Should Read This Book....17

Conventions Used in This Book....17

Using Code Examples....18

O’Reilly Online Learning....18

How to Contact Us....19

Acknowledgments....19

Chapter 1. New World for Developers....21

Evolution and Revolution....22

Generative AI....25

The Benefits....26

Minimizing Search....26

Your Advisor....28

IDE Integration....29

Reflecting Your Codebase....30

Code Integrity....31

AI-Powered Documentation Generator....31

Modernization....32

Drawbacks....35

Hallucinations....35

Intellectual Property....35

Privacy....36

Security....37

Training Data....37

Bias....38

A New Way for Developers....38

Career....39

10x Developer?....39

Skills of the Developer....40

Conclusion....40

Chapter 2. How AI Coding Technology Works....41

Key Features....41

Code Suggestions and Context-Aware Completions Versus Smart Code Completion....42

Compilers Versus AI-Assisted Programming Tools....43

Levels of Capability....44

Generative AI and Large Language Models (LLMs)....46

Evolution....46

The Transformer Model....47

OpenAI Playground....50

Evaluating LLMs....55

Types of LLMs....58

Evaluation of AI-Assisted Programming Tools....60

Conclusion....61

Chapter 3. Prompt Engineering....63

Art and Science....64

Challenges....64

The Prompt....65

Context....66

Instructions....66

Summarization....67

Text Classification....68

Recommendation....68

Translation....69

Input of Content....70

Format....70

Best Practices....71

Be Specific....71

Acronyms and Technical Terms....72

Zero- and Few-Shot Learning....73

Leading Words....74

Chain of Thought (CoT) Prompting....74

Leading Questions....75

Ask for Examples and Analogies....75

Reducing Hallucinations....76

Security and Privacy....77

Autonomous AI Agents....78

Conclusion....80

Chapter 4. GitHub Copilot....81

GitHub Copilot....81

Pricing and Versions....82

Use Case: Programming Hardware....83

Use Case: Shopify....84

Use Case: Accenture....85

Security....85

Getting Started....86

Codespaces and Visual Studio Code....87

Suggestions....89

Comments....92

Chat....92

Inline Chat....97

Open Tabs....99

Command-Line Interface....100

Copilot Partner Program....101

Conclusion....102

Chapter 5. Other AI-Assisted Programming Tools....103

Amazon’s CodeWhisperer....103

Google’s Duet AI for Developers....105

Tabnine....107

Replit....108

CodeGPT....111

Cody....111

CodeWP....113

Warp....114

Bito AI....116

Cursor....117

Code Llama....118

Other Open Source Models....119

StableCode....119

AlphaCode....120

PolyCoder....120

CodeT5....121

Enterprise Software Companies....121

Conclusion....122

Chapter 6. ChatGPT and Other General-Purpose LLMs....123

ChatGPT....123

GPT-4....124

Navigating ChatGPT....125

Mobile App....128

Custom Instructions....129

Browse with Bing....129

Tedious Tasks....133

Regular Expressions....134

Starter Code....135

GitHub README....135

Cross-Browser Compatibility....136

Bash Commands....137

GitHub Actions....137

Plugins....138

The Codecademy Plugin....139

The AskYourDatabase Plugin....140

Recombinant AI Plugin....141

GPTs....141

Gemini....143

Applications....145

Gemini for Coding....146

Claude....148

Conclusion....150

Chapter 7. Ideas, Planning, and Requirements....151

Brainstorming....151

Market Research....153

Market Trends....155

Total Addressable Market....156

Competition....157

Requirements....159

Product Requirements Document....160

Software Requirements Specification....161

Interviews....162

Whiteboarding....163

Tone....164

Approaches to Project Planning....165

Test-Driven Development (TDD)....167

Planning Web Design....169

Conclusion....172

Chapter 8. Coding....173

Reality Check....173

Judgment Calls....175

Learning....176

Comments....177

Modular Programming....178

Starting a Project....179

Autofill....180

Refactoring....182

Ninja Code....182

Extract Method....183

Decomposing Conditionals....184

Renaming....184

Dead Code....185

Functions....186

Object-Oriented Programing....187

Frameworks and Libraries....188

Data....189

Frontend Development....191

CSS....192

Creating Graphics....192

AI Tools....193

APIs....196

Conclusion....197

Chapter 9. Debugging, Testing, and Deployment....199

Debugging....199

Documentation....200

Code Review....202

Unit Tests....203

Pull Requests....206

Deployment....207

User Feedback....209

The Launch....210

Conclusion....211

Chapter 10. Takeaways....213

The Learning Curve Is Steep....213

There Are Major Benefits....214

But There Are Drawbacks....214

Prompt Engineering Is an Art and Science....215

Beyond Programming....215

AI Won’t Take Your Job....216

Conclusion....216

Index....217

About the Author....224

Colophon....224

Get practical advice on how to leverage AI development tools for all stages of code creation, including requirements, planning, design, coding, debugging, testing, and documentation. With this book, beginners and experienced developers alike will learn how to use a wide range of tools, from general-purpose LLMs (ChatGPT, Gemini, and Claude) to code-specific systems (GitHub Copilot, Tabnine, Cursor, and Amazon CodeWhisperer).

You'll also learn about more specialized generative AI tools for tasks such as text-to-image creation.

Author Tom Taulli provides a methodology for modular programming that aligns effectively with the way prompts create AI-generated code. This guide also describes the best ways of using general purpose LLMs to learn a programming language, explain code, or convert code from one language to another.

 This book examines:

  • The core capabilities of AI-based development tools
  • Pros, cons, and use cases of popular systems such as GitHub Copilot and Amazon CodeWhisperer
  • Ways to use ChatGPT, Gemini, Claude, and other generic LLMs for coding
  • Using AI development tools for the software development lifecycle, including requirements, planning, coding, debugging, and testing
  • Prompt engineering for development
  • Using AI-assisted programming for tedious tasks like creating regular expressions, starter code, object-oriented programming classes, and GitHub Actions
  • How to use AI-based low-code and no-code tools, such as to create professional UIs.

Похожее:

Список отзывов:

Нет отзывов к книге.