100 C++ Mistakes and How to Avoid Them
暫譯: 100 個 C++ 錯誤及其避免方法

Yonts, Rich

  • 出版商: Manning
  • 出版日期: 2025-03-25
  • 售價: $2,330
  • 貴賓價: 9.5$2,214
  • 語言: 英文
  • 頁數: 360
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1633436896
  • ISBN-13: 9781633436893
  • 相關分類: C++ 程式語言
  • 海外代購書籍(需單獨結帳)

商品描述

Learn how to handle errors, inefficiencies, and outdated paradigms by exploring the most common mistakes you'll find in production C++ code.

100 C++ Mistakes and How To Avoid Them reveals the problems you'll inevitably encounter as you write new C++ code and diagnose legacy applications, along with practical techniques you need to resolve them.

Inside 100 C++ Mistakes and How To Avoid Them you'll learn how to:

- Design solid classes
- Minimize resource allocation/deallocation issues
- Use new C++ features
- Identify the differences between compile and runtime issues
- Recognize C-style idioms that miss C++ functionality
- Use exceptions well

100 C++ Mistakes and How To Avoid Them gives you practical insights and techniques to improve your C++ coding kung fu. Author Rich Yonts has been using C++ since its invention in the 1980s. This book distills that experience into practical, reusable advice on how C++ programmers at any skill level can improve their code. Unlike many C++ books that concentrate on language theory and toy exercises, this book is loaded with real examples from production codebases.

Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.

About the technology

Over ten billion lines of C++ code are running in production applications, and 98-developers find and fix mistakes in them every day. Even mission-critical applications have bugs, performance inefficiencies, and readability problems. This book will help you identify them in the code you're maintaining and avoid them in the code you're writing.

About the book

100 C++ Mistakes and How To Avoid Them presents practical techniques to improve C++ code, from legacy applications to modern codebases that use C++ 11 and beyond. Author Rich Yonts provides a concrete example to illustrate each issue, along with a step-by-step walkthrough for improving readability, effectiveness, and performance. Along the way, you'll even learn how and where to replace outdated patterns and idioms with modern C++.

What's inside

- Design solid classes
- Resource allocation/deallocation issues
- Compile and runtime problems
- Replace C-style idioms with proper C++

About the reader

Covers C++ 98 through 23, with an emphasis on diagnosing and improving legacy code.

About the author

Rich Yonts is a Senior Software Engineer at Teradata and a long-time software engineer using C++, Java, and Python. He has held a number of technical and leadership roles during his many years at IBM and Sony.

Table of Contents

1 C++: With great power comes great responsibility
Part 1
2 Better modern C++: Classes and types
3 Better modern C++: General programming
4 Better modern C++: Additional topics
Part 2
5 C idioms
6 Better premodern C++
Part 3
7 Establishing the class invariant
8 Maintaining the class invariant
9 Class operations
10 Exceptions and resources
11 Functions and coding
12 General coding

商品描述(中文翻譯)

學習如何處理錯誤、低效能和過時的範式,透過探索在生產環境中最常見的 C++ 代碼錯誤。

100 C++ Mistakes and How To Avoid Them 揭示了在撰寫新的 C++ 代碼和診斷舊有應用程式時,您不可避免會遇到的問題,以及解決這些問題所需的實用技術。

100 C++ Mistakes and How To Avoid Them 中,您將學習如何:

- 設計穩固的類別
- 最小化資源分配/釋放問題
- 使用新的 C++ 特性
- 辨識編譯時和執行時問題的差異
- 認識錯過 C++ 功能的 C 風格慣用法
- 妥善使用例外

100 C++ Mistakes and How To Avoid Them 提供了實用的見解和技術,以提升您的 C++ 編碼技巧。作者 Rich Yonts 自 1980 年代 C++ 發明以來便一直在使用這門語言。本書將這些經驗提煉成實用且可重用的建議,幫助各種技能水平的 C++ 程式設計師改善他們的代碼。與許多專注於語言理論和玩具練習的 C++ 書籍不同,本書充滿了來自生產代碼庫的真實範例。

購買印刷版書籍可獲得 Manning Publications 提供的免費 PDF 和 ePub 格式電子書。

關於技術

超過十億行的 C++ 代碼正在生產應用程式中運行,98% 的開發者每天都在發現和修正其中的錯誤。即使是關鍵任務的應用程式也存在錯誤、性能低效和可讀性問題。本書將幫助您識別您正在維護的代碼中的問題,並避免在您撰寫的代碼中出現這些問題。

關於本書

100 C++ Mistakes and How To Avoid Them 提供了改善 C++ 代碼的實用技術,涵蓋從舊有應用程式到使用 C++ 11 及以後版本的現代代碼庫。作者 Rich Yonts 提供具體範例來說明每個問題,並提供逐步的指導以改善可讀性、有效性和性能。在此過程中,您甚至會學到如何以及在哪裡用現代 C++ 替換過時的模式和慣用法。

內容概覽

- 設計穩固的類別
- 資源分配/釋放問題
- 編譯和執行時問題
- 用正確的 C++ 替換 C 風格慣用法

關於讀者

涵蓋 C++ 98 到 23,重點在於診斷和改善舊有代碼。

關於作者

Rich Yonts 是 Teradata 的資深軟體工程師,並且是一位長期使用 C++、Java 和 Python 的軟體工程師。在 IBM 和 Sony 的多年工作中,他擔任過多個技術和領導職位。

目錄

1 C++:強大的能力伴隨著重大的責任
第 1 部分
2 更好的現代 C++:類別和類型
3 更好的現代 C++:一般編程
4 更好的現代 C++:其他主題
第 2 部分
5 C 風格慣用法
6 更好的前現代 C++
第 3 部分
7 建立類別不變式
8 維護類別不變式
9 類別操作
10 例外和資源
11 函數和編碼
12 一般編碼

作者簡介

Rich Yonts is a Senior Software Engineer at Teradata and a long-time software engineer using C++, Java, and Python. Rich held a number of technical and leadership roles during his many years at IBM and Sony. As an assistant professor, he has dealt with questions and issues of undergraduate and graduate students learning programming. He has deep experience on large code bases and considers himself both a student and a teacher of C++.

作者簡介(中文翻譯)

Rich Yonts 是 Teradata 的資深軟體工程師,並且是一位長期使用 C++、Java 和 Python 的軟體工程師。在 IBM 和 Sony 的多年工作經歷中,Rich 擔任過多個技術和領導職位。作為一名助理教授,他處理過本科生和研究生學習程式設計時的問題和挑戰。他在大型程式碼庫方面擁有豐富的經驗,並認為自己同時是 C++ 的學生和教師。