Название: Software Craftsmanship Using AI: Practical guide for using LLMs in writing, reviewing and testing code Автор: Almantas Karpavičius Издательство: BPB Publications Год: 2025 Страниц: 288 Язык: английский Формат: epub (true) Размер: 10.1 MB
This book is a workshop to create software using AI. A reader will be taken through a series of requirements and create a practical API from scratch. AI is without a doubt a productivity boost, and our goal is to help you maximize the boost by writing prompts effectively to generate, refactor, test, and review code.
This book is also a modern take on software design fundamentals. To be able to scrutinize AI-generated code and to be able to guide AI effectively to better results, one should understand the theory behind software design. It starts with basics like clean function design and object-oriented principles, then advances to SOLID principles, design patterns, and Onion architecture. Readers will learn essential testing methods, including unit, integration, and acceptance tests using BDD and Specflow. The guide covers API development, focusing on security, validation, error handling, and external system integration. It also explains CI/CD pipelines using Azure DevOps, including build and deployment pipelines with YAML configurations.
The purpose of this book is to take classic principles and put them into the context of AI. Is it enough to know theory, to be able to generate code using AI? Explore how much you can rely on AI (ChatGPT, GitHub Copilot)—and how much you need to know by yourself. We will aim to create a pair-programming-like experience and generate as much code as we can, writing as little code ourselves as possible. Quality is the key—at no point will we let the AI-generated code be worse than perfect.
This book is about changes. It starts with fundamental concepts and builds up knowledge with every chapter. Each introducing at least one new requirement to the Nutrition Advisor. Every chapter builds on what had already been implemented, but this does not only mean added new code for new requirements, but also means refactoring the old as soon as the new knowledge exposes flaws in the previous design. The book embraces the change in such a way that new things cause minimal impact. This book is an illustration of how to solve a real problem in an environment where change and evolution are the expected.
After reading this book, the reader will have a solid grasp on software design, as well as be able to scrutinize AI-generated code and create prompts to turn dirty code into clean.
Lastly, this book teaches us to embrace the changes in software requirements. The end goal is to teach a reader how to implement changes in software with minimum change to existing lines of code. You will be well-equipped to leverage AI as a valuable asset in your software development toolbox.
Key Features:
- Using AI tools to enhance your development process, from code generation to testing. - Build a real-world "Nutrition Advisor" application from start to finish, applying the concepts and techniques learned throughout the book. - Discover how to write clean, maintainable code using SOLID principles.
What you will learn:
- The fundamentals of software design like KISS, OOP, SOLID, and key design Patterns. - Use Effective prompt engineering for generating code, refactoring, testing, and reviewing. - Code review both for human and AI-generated code. - Design which minimizes changes when new requirements are introduced. - Build .NET REST Web API with tests. - Build CI/CD pipelines to deploy to Azure.
Who this book is for: This book is intended for software developers, aspiring programmers, and students in computer science or related fields who have a basic understanding of programming concepts and are eager to deepen their knowledge of software design principles and best practices.
Contents:
1. Clean Functions 2. Object Oriented Programming 3. SOLID Principles 4. Design Patterns 5. Unit Testing 6. Building a Web API 7. ChatGPT Integration to WebAPI 8. Clean Architecture 9. Continuous Integration 10. Continuous Deployment Appendix A: Final Thoughts Appendix B: Cheat Sheet
Скачать Software Craftsmanship Using AI: Practical guide for using LLMs in writing, reviewing and testing code
|