Автор: Petri Silen
Издательство: Leanpub
Год: 2024-01-09
Страниц: 676
Язык: английский
Формат: pdf (true), epub
Размер: 22.5 MB
One of the most comprehensive no-fluff guides for Python software developers to help them write clean code every day. The book is packed with principles and patterns that help developers, from novices and juniors to seniors and experts, to write cleaner code.
Clean Code Principles and Patterns: Python Edition is one of the most comprehensive no-fluff guides for Python software developers to help them write clean code every day. The author, Petri Silen, has almost 30 years of industry experience in designing and implementing software, and now he puts all his knowledge gained during the years into this book. The book is packed with principles and patterns that help developers, from novices and juniors to seniors and experts, to write cleaner code. The principles and patterns presented in the book are accompanied by realistic yet straightforward examples to help the reader understand them better. The reader should have basic knowledge of Python programming language to get the full benefit from this book.
This book teaches you how to write clean code. It presents software design and development principles and patterns in a very practical manner. This book is suitable for both junior and senior developers. Some basic knowledge of programming in Python is required. All examples in this book are presented in Python, except some examples related to frontend code, which are in jаvascript/TypeScript. The content of this book is divided into ten chapters. All Python examples in this book require Python 3.11 or later. This is a book for primarily software developers. For that reason, some topics are not covered exhaustively. This includes topics related to architecture, DevSecOps, E2E, and non-functional testing. Those are topics most relevant to software architects, DevOps specialists and test/QA engineers. I want to cover them in this book because it is always good to have a basic understanding of topics closely related to software development.
This book presents a lot of principles, best practices, and patterns. It can be difficult to grasp them all on a single read, which is not the purpose. You should pick the most relevant topics for yourself, embrace them, and try to put them into use in everyday coding. You can always return to the book to learn additional topics. Some principles, patterns, and practices can be subjective and open for debate, but I have only put into this book such principles, patterns, and practices that I have used or would use myself. In the last Conclusion chapter, I will list the topics that I consider the most important based on my experience in real-life projects.
The book is divided into ten chapters:
Architectural design principles
Object-oriented design principles
Coding principles
Testing principles
Security principles
API design principles
Database types and related principles
Concurrent programming principles
Teamwork principles
DevSecOps
After reading this book, you will know the following and much more
How to design modern cloud-native microservices (examples with Kubernetes)
What are autopilot microservices
What are event sourcing, CQRS, distributed transactions, saga orchestration pattern, and saga choreography pattern
What are the main concepts of object-oriented programming
What are the different programming paradigms (imperative, functional, OO)
What are the five SOLID principles, and how to put them into use in real-life code
What are the 25 design patterns, and how to use them
What is the MVC pattern, and how MVP and MVVM differ from each other
How to achieve a clean design for a microservice (hexagonal/clean architecture). What is a vertical slice architecture
Why and how to use dependency injection
Detailed instructions with concrete examples on how to uniformly name various software entities like classes, functions, and variables
Why you should prefer composition over inheritance
How to split a software system into subdomains and bounded contexts using domain-driven design
How to organize a source code repository
How to organize code into directories
Concrete ways how to avoid writing comments and refactor comments away
What are the most common issues that static code analyzers find, and how to correct them
Typical code smells and refactoring techniques to solve them
Why you should use type annotations
How to correctly handle errors and exceptions
How not to forget to handle errors and exceptions
How to avoid off-by-one errors effectively
What you should remember when using a Google search or Generative AI like ChatGPT to get answers
When and how to optimize code
TDD, BDD, ATDD, unit testing, mocking, integration testing, E2E testing, and non-functional testing
What is threat modeling and how to conduct it
Authentication and authorization using OpenID Connect and OAuth2
What are the essential security features to implement in an application
How to design APIs using technologies like JSON-RPC, REST, GraphQL, SSE, WebSocket, gRPC, and event-driven services
When and how to use a relational database, document database, key-value store, or wide-column database
How to avoid SQL injection attacks using ORM or parameterized SQL queries
When to use threading or parallel algorithms and how to ensure thread safety
What principles to follow when working in a software development team
What are DevOps, SecOps, containerization, and continuous integration (CI). What is the difference between continuous delivery (CD) and continuous deployment (CD). What is observability.
And much more
Скачать Clean Code Principles And Patterns Python Edition (Completed)