Refactoring with C++: Explore modern ways of developing maintainable and efficient applications

Danilov, Dmitry

  • 出版商: Packt Publishing
  • 出版日期: 2024-07-19
  • 售價: $1,860
  • 貴賓價: 9.5$1,767
  • 語言: 英文
  • 頁數: 368
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1837633770
  • ISBN-13: 9781837633777
  • 相關分類: C++ 程式語言Refactoring
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Improve readability and understandability of code using C++ best practices

Key Features:

- Enrich your coding skills using features from the modern C++ standard and industry approved libraries

- Implement refactoring techniques and SOLID principles in C++

- Apply automated tools to improve your code quality

- Purchase of the print or Kindle book includes a free PDF eBook

Book Description:

Despite the prevalence of higher-level languages, C++ is still running the world, from bare-metal embedded systems to distributed cloud-native systems. C++ is on the frontline whenever there is a need for a performance-sensitive tool supporting complex data structures. The language has been actively evolving for the last two decades.

This book is a comprehensive guide that shows you how to implement SOLID principles and refactor legacy code using the modern features and approaches of C++, the standard library, Boost library collection, and Guidelines Support Library by Microsoft. The book begins by describing the essential elements of writing clean code and discussing object-oriented programming in C++. You'll explore the design principles of software testing with examples of using popular unit testing frameworks such as Google Test. The book also guides you through applying automated tools for static and dynamic code analysis using Clang Tools.

By the end of this book, you'll be proficient in applying industry-approved coding practices to design clean, sustainable, and readable real-world C++ code.

What You Will Learn:

- Leverage the rich type system of C++ to write safe and elegant code

- Create advanced object-oriented designs using the unique features of C++

- Minimize code duplication by using metaprogramming

- Refactor code safely with the help of unit tests

- Ensure code conventions and format with clang-format

- Facilitate the usage of modern features automatically with clang-tidy

- Catch complex bugs such as memory leakage and data races with Clang AddressSanitizer and ThreadSanitizer

Who this book is for:

This book will benefit experienced C++ programmers the most, but is also suitable for technical leaders, software architects, and senior software engineers who want to save on costs and improve software development process efficiency by using modern C++ features and automated tools.

Table of Contents

- Coding Standards in C++

- Main Software Development Principles

- Causes of Bad Code

- Good Candidates for Rewriting - Patterns and Anti-Patterns

- The Significance of Naming

- Utilizing a Rich Static Type System in C++

- Classes, Objects, and OOP in C++

- Designing and Developing APIs in C++

- Code Formatting and Naming Conventions

- Introduction to Static Analysis in C++

- Dynamic Analysis

- Testing

- Modern Approach to Managing Third Parties

- Version Control

- Code Review

商品描述(中文翻譯)

改善 C++ 代碼的可讀性和可理解性,運用最佳實踐

主要特點:
- 利用現代 C++ 標準和業界認可的庫來提升你的編程技能
- 在 C++ 中實施重構技術和 SOLID 原則
- 應用自動化工具來改善你的代碼質量
- 購買印刷版或 Kindle 版書籍可獲得免費 PDF 電子書

書籍描述:
儘管高階語言普遍存在,C++ 仍然在各個領域發揮著重要作用,從裸金屬嵌入式系統到分散式雲原生系統。每當需要性能敏感的工具來支持複雜數據結構時,C++ 總是站在最前線。這門語言在過去二十年中持續不斷地演進。

本書是一本全面的指南,展示了如何使用 C++ 的現代特性和方法、標準庫、Boost 庫集合以及 Microsoft 的 Guidelines Support Library 來實施 SOLID 原則和重構遺留代碼。本書首先描述了編寫乾淨代碼的基本要素,並討論了 C++ 中的物件導向編程。你將探索軟體測試的設計原則,並以使用流行的單元測試框架(如 Google Test)的範例進行說明。本書還指導你如何使用 Clang Tools 應用靜態和動態代碼分析的自動化工具。

在本書結束時,你將能熟練運用業界認可的編碼實踐,設計出乾淨、可持續且可讀的實際 C++ 代碼。

你將學到的內容:
- 利用 C++ 的豐富類型系統來編寫安全且優雅的代碼
- 使用 C++ 的獨特特性創建先進的物件導向設計
- 通過元編程最小化代碼重複
- 在單元測試的幫助下安全地重構代碼
- 使用 clang-format 確保代碼約定和格式
- 自動促進現代特性的使用,使用 clang-tidy
- 使用 Clang AddressSanitizer 和 ThreadSanitizer 捕捉複雜的錯誤,如內存洩漏和數據競爭

本書適合對象:
本書最適合有經驗的 C++ 程序員,但也適合希望通過使用現代 C++ 特性和自動化工具來節省成本並提高軟體開發過程效率的技術領導者、軟體架構師和高級軟體工程師。

目錄:
- C++ 中的編碼標準
- 主要軟體開發原則
- 壞代碼的成因
- 重新編寫的良好候選者 - 模式與反模式
- 命名的重要性
- 在 C++ 中利用豐富的靜態類型系統
- C++ 中的類、物件與物件導向編程
- 在 C++ 中設計和開發 API
- 代碼格式化和命名約定
- C++ 中靜態分析的介紹
- 動態分析
- 測試
- 管理第三方的現代方法
- 版本控制
- 代碼審查