Clean Code Principles and Patterns: A Software Practitioner’s Handbook Front Cover

Clean Code Principles and Patterns: A Software Practitioner’s Handbook

  • Length: 489 pages
  • Edition: 1
  • Publisher:
  • Publication Date: 2023-01-25
  • ISBN-10: B0BT28PTDK
  • ISBN-13: 9798373835732

Clean Code Principles and Patterns is one of the most comprehensive no-fluff guides for 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 to understand them better. Examples are written in Java, JavaScript/TypeScript, and C++. Most of the examples are directly applicable to other programming languages, too. The reader should have basic knowledge of one object-oriented programming language to get the full benefit from this book.

The book is divided into ten chapters:

  1. Architectural design principles
  2. Object-oriented design principles
  3. Coding principles
  4. Testing principles
  5. Security principles
  6. API design principles
  7. Database types and related principles
  8. Concurrent programming principles
  9. Teamwork principles
  10. DevSecOps

After reading this book, you will know the following and much more:

  • How to design modern cloud-native microservices
  • What are autopilot microservices
  • What are event sourcing, CQRS, distributed transactions, saga orchestration pattern, and saga choreography pattern
  • 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
  • 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 domains 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
  • Most important refactoring techniques for everyday use
  • Why you should use a statically typed language
  • How to correctly handle errors and exceptions
  • How to not forget handle errors and exceptions
  • Why you should never pass or return a null value
  • How to avoid off-by-one errors effectively
  • What you should remember when using a Google search to get answers
  • When and how to optimize code
  • TDD, 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, and continuous integration (CI), and what is the difference between continuous delivery (CD) and continuous deployment (CD)
To access the link, solve the captcha.