✓ Schweizer Online-Shop
AI-Assisted Coding

AI-Assisted Coding

The Practical Guide for Software Development

von Sebastian Springer, Bernd Öggl, Michael Kofler

Unsere Artikel-Nr.
L3D3GR2

Beschreibung

Generative AI is transforming software development. Stay on the cutting edge with this guide to AI pair programming. Learn how to make the most of modern tools like ChatGPT and GitHub Copilot to improve your coding. Automate refactoring, debugging, and other tedious tasks, and use techniques such as prompt engineering and retrieval-augmented generation to get the code you need. Follow practical examples that show how you can program faster, more efficiently, and with fewer errors with the help of AI. In this book, you’ll learn about: a. Hype versus Reality Learn from expert developers to understand the possibilities (and pitfalls) of AI tools. With the help of practical code examples, see how to use AI helpers correctly to their full potential. b. Assistants for All Tasks This guide gives you an up-to-date overview of all aspects of AI-assisted coding: GitHub Copilot autocompletions, project bootstrapping with OpenHands, debugging and refactoring, application development, and more. c. In the Cloud or Local. Use OpenAI’s API to integrate AI models directly into your own scripts and automations—or use local large language models (LLMs) to work independently of cloud services. Highlights include: 1) Structured programming with AI 2) Debugging 3) Unit testing 4) Refactoring 5) Automatic document creation 6) Database development and design 7) Scripting and administration 8) Local large language models (LLMs) 9) Retrieval-augmented generation (RAG) 10) ChatGPT and GitHub Copilot 11) OpenHands 12) OpenAI API.

Spezifikationen

SpracheEnglisch
AutorSebastian Springer, Bernd Öggl, Michael Kofler
Auflage1
Erscheinungsjahr2025
ErscheinungslandDeutschland
FormatBuch (Softcover)
DetailformatSoftcover
Anzahl Seiten395

Inhaltsverzeichnis

... Preface ... 17

... Local Execution of Language Models ... 17

... Coding with AI Support for Advanced Users ... 18

... AI Makes Mistakes and Hallucinates ... 19

... The Three Stages of Using AI ... 19

... There’s No Getting around AI Tools ... 20

Part I ... Coding with AI Support ... 23

1 ... Introduction ... 25

1.1 ... Coding via Chat ... 25

1.2 ... The Art of Prompting ... 34

1.3 ... Code Wizards ... 41

1.4 ... Chat or Wizard? ... 52

1.5 ... Basic Principles of Large Language Models ... 53

2 ... Pair Programming ... 67

2.1 ... Structuring Code into Functions ... 68

2.2 ... Example: IBAN Validation ... 76

2.3 ... Object-Oriented Programming ... 83

2.4 ... Example: Quiz ... 91

2.5 ... Example: Solving Sudoku ... 97

3 ... Debugging ... 107

3.1 ... Web Applications ... 108

3.2 ... App Development ... 116

3.3 ... Developing on Raspberry Pi ... 119

3.4 ... Visual Studio and Visual Studio Code ... 122

3.5 ... Conclusion ... 125

4 ... Refactoring ... 127

4.1 ... Introduction to Refactoring ... 127

4.2 ... Refactoring Using AI Tools ... 128

4.3 ... Best Practices ... 141

4.4 ... Conclusion ... 142

5 ... Testing Software ... 145

5.1 ... Generating Test Data ... 146

5.2 ... AI-Supported Test Automation ... 149

5.3 ... Test-Driven Development with AI ... 155

5.4 ... Using Dependencies ... 161

5.5 ... Optimizing Tests ... 167

5.6 ... End-to-End Tests ... 174

5.7 ... Conclusion ... 178

6 ... Documenting Software ... 179

6.1 ... Challenges with Documentation ... 180

6.2 ... Inline Documentation ... 181

6.3 ... Function and Class Documentation ... 184

6.4 ... API Documentation ... 187

6.5 ... Outdated Documentation ... 191

6.6 ... Conclusion ... 194

7 ... Databases ... 195

7.1 ... Database Design ... 195

7.2 ... SQL Commands ... 205

7.3 ... Administration ... 213

7.4 ... Client Programming ... 219

8 ... Scripting and System Administration ... 221

8.1 ... Scripting ... 221

8.2 ... Example: Converting a Python Script to PHP Code ... 228

8.3 ... Regular Expressions ... 230

8.4 ... System Administration ... 234

8.5 ... Example: “wget” Script Plus “tmpfs” Configuration ... 240

8.6 ... Calling GitHub Copilot and ChatGPT in the Terminal ... 245

Part II ... Local Language Models and Advanced AI Tools ... 251

9 ... Executing Language Models Locally ... 253

9.1 ... Spoiled for Choice of Large Language Model ... 254

9.2 ... GPT4All ... 259

9.3 ... Ollama ... 262

9.4 ... Open WebUI for Ollama ... 267

9.5 ... Continue ... 275

9.6 ... Ollama API ... 277

9.7 ... Tabby ... 280

9.8 ... Conclusion ... 282

10 ... Automated Code Processing ... 285

10.1 ... OpenAI API ... 286

10.2 ... Ollama API ... 297

10.3 ... Groq API ... 299

10.4 ... Example: Automated Commenting of Code ... 301

10.5 ... Example: From Python 2 to Python 3 ... 308

11 ... Level 3 Tools: OpenHands and Aider ... 313

11.1 ... OpenHands ... 314

11.2 ... Using OpenHands ... 320

11.3 ... Aider ... 323

11.4 ... Using Aider ... 328

12 ... Retrieval-Augmented Generation and Text-to-SQL ... 337

12.1 ... RAG Quick Start ... 338

12.2 ... The Viel-Falter (Many Butterflies) Project ... 341

12.3 ... Loading Documents ... 343

12.4 ... Creating an Index ... 345

12.5 ... Vector Store Databases ... 348

12.6 ... RAG Queries ... 351

12.7 ... Text-to-SQL ... 355

13 ... Risks and Outlook ... 367

13.1 ... Issues and Limitations of Using AI Tools ... 367

13.2 ... Exemplary AI Failure ... 370

13.3 ... Ethical Issues ... 381

13.4 ... Conclusions and Outlook ... 384

... The Authors ... 389

... Index ... 391

Bewertungen

Produkt bewerten

Für dieses Produkt liegt noch keine Bewertung vor. Wenn Sie es gekauft haben, teilen Sie gerne Ihre Erfahrung.

Zahlungsarten

payment-einzahlungsscheinpayment-twintpayment-mastercardpayment-visapost-finance-paypayment-apple-paypayment-google-paysamsung-pay

Rechnung (Einzahlungsschein mit QR-Code), Twint, Kreditkarte, PostFinance, Apple, Google oder Samsung Pay.

Versand

Kostenlos: Schweiz & Liechtenstein

Rückgabe

Kein Rückgaberecht

Bei diesem Produkt hat entweder der Hersteller/Verlag das Rückgaberecht ausgeschlossen oder eine Rückgabe ist aufgrund des Vertriebssystems nicht möglich.