AI-Assisted Programming

Book description

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

Publisher resources

View/Submit Errata

Table of contents

  1. Foreword
  2. Preface
    1. What’s Covered
    2. How This Book Is Different
    3. Who Should Read This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  3. 1. New World for Developers
    1. Evolution and Revolution
    2. Generative AI
    3. The Benefits
      1. Minimizing Search
      2. Your Advisor
      3. IDE Integration
      4. Reflecting Your Codebase
      5. Code Integrity
      6. AI-Powered Documentation Generator
      7. Modernization
    4. Drawbacks
      1. Hallucinations
      2. Intellectual Property
      3. Privacy
      4. Security
      5. Training Data
      6. Bias
    5. A New Way for Developers
      1. Career
      2. 10x Developer?
      3. Skills of the Developer
    6. Conclusion
  4. 2. How AI Coding Technology Works
    1. Key Features
    2. Code Suggestions and Context-Aware Completions Versus Smart Code Completion
    3. Compilers Versus AI-Assisted Programming Tools
    4. Levels of Capability
    5. Generative AI and Large Language Models (LLMs)
      1. Evolution
      2. The Transformer Model
      3. OpenAI Playground
    6. Evaluating LLMs
    7. Types of LLMs
    8. Evaluation of AI-Assisted Programming Tools
    9. Conclusion
  5. 3. Prompt Engineering
    1. Art and Science
    2. Challenges
    3. The Prompt
    4. Context
    5. Instructions
      1. Summarization
      2. Text Classification
      3. Recommendation
      4. Translation
    6. Input of Content
    7. Format
    8. Best Practices
      1. Be Specific
      2. Acronyms and Technical Terms
      3. Zero- and Few-Shot Learning
      4. Leading Words
      5. Chain of Thought (CoT) Prompting
      6. Leading Questions
      7. Ask for Examples and Analogies
    9. Reducing Hallucinations
    10. Security and Privacy
    11. Autonomous AI Agents
    12. Conclusion
  6. 4. GitHub Copilot
    1. GitHub Copilot
      1. Pricing and Versions
      2. Use Case: Programming Hardware
      3. Use Case: Shopify
      4. Use Case: Accenture
      5. Security
    2. Getting Started
      1. Codespaces and Visual Studio Code
      2. Suggestions
      3. Comments
      4. Chat
      5. Inline Chat
      6. Open Tabs
      7. Command-Line Interface
    3. Copilot Partner Program
    4. Conclusion
  7. 5. Other AI-Assisted Programming Tools
    1. Amazon’s CodeWhisperer
    2. Google’s Duet AI for Developers
    3. Tabnine
    4. Replit
    5. CodeGPT
    6. Cody
    7. CodeWP
    8. Warp
    9. Bito AI
    10. Cursor
    11. Code Llama
    12. Other Open Source Models
      1. StableCode
      2. AlphaCode
      3. PolyCoder
      4. CodeT5
      5. Enterprise Software Companies
    13. Conclusion
  8. 6. ChatGPT and Other General-Purpose LLMs
    1. ChatGPT
    2. GPT-4
    3. Navigating ChatGPT
      1. Mobile App
      2. Custom Instructions
    4. Browse with Bing
    5. Tedious Tasks
      1. Regular Expressions
      2. Starter Code
      3. GitHub README
    6. Cross-Browser Compatibility
    7. Bash Commands
    8. GitHub Actions
    9. Plugins
      1. The Codecademy Plugin
      2. The AskYourDatabase Plugin
      3. Recombinant AI Plugin
    10. GPTs
    11. Gemini
      1. Applications
      2. Gemini for Coding
    12. Claude
    13. Conclusion
  9. 7. Ideas, Planning, and Requirements
    1. Brainstorming
    2. Market Research
      1. Market Trends
      2. Total Addressable Market
    3. Competition
    4. Requirements
      1. Product Requirements Document
      2. Software Requirements Specification
      3. Interviews
      4. Whiteboarding
      5. Tone
    5. Approaches to Project Planning
      1. Test-Driven Development (TDD)
      2. Planning Web Design
    6. Conclusion
  10. 8. Coding
    1. Reality Check
    2. Judgment Calls
    3. Learning
    4. Comments
    5. Modular Programming
    6. Starting a Project
    7. Autofill
    8. Refactoring
      1. Ninja Code
      2. Extract Method
      3. Decomposing Conditionals
      4. Renaming
      5. Dead Code
    9. Functions
    10. Object-Oriented Programing
    11. Frameworks and Libraries
    12. Data
    13. Frontend Development
      1. CSS
      2. Creating Graphics
      3. AI Tools
    14. APIs
    15. Conclusion
  11. 9. Debugging, Testing, and Deployment
    1. Debugging
    2. Documentation
    3. Code Review
      1. Unit Tests
      2. Pull Requests
    4. Deployment
      1. User Feedback
      2. The Launch
    5. Conclusion
  12. 10. Takeaways
    1. The Learning Curve Is Steep
    2. There Are Major Benefits
    3. But There Are Drawbacks
    4. Prompt Engineering Is an Art and Science
    5. Beyond Programming
    6. AI Won’t Take Your Job
    7. Conclusion
  13. Index
  14. About the Author

Product information

  • Title: AI-Assisted Programming
  • Author(s): Tom Taulli
  • Release date: April 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098164560