Efficient Coding: The Java Development Handbook cover

Efficient Coding: The Java Development Handbook

Rating 4.1
Word count
359 words
Chapters
40
ISBN
9787121349096

Tags

Summary

This book originates from the Alibaba Java Development Handbook, which has influenced a great many developers, and is co-authored by Gu Jin (Yang Guanbao), head of Alibaba Group's code platform, and Ming Sha (Gao Haihui), a senior development engineer at Alibaba Cloud. It does not stop at listing "rule clauses"; instead, it explains the background, technical principles, and real failure cases behind each rule, aiming to help readers move from "writing according to the rules" to "writing consciously after understanding the principles." The book has nine chapters: it opens with computer fundamentals, covering 0 and 1, floating-point representation and arithmetic, character sets and garbled text, CPU-memory cooperation, TCP/IP and connection pools, SQL injection, and XSS/CSRF and other information-security topics; next comes object-oriented theory, including classes and interfaces, abstract classes and inner classes, access permissions, this and super, serialization, method overloading, generics and primitive/wrapper types, and strings; Chapter 3 covers code style, including naming conventions, indentation, spaces, line breaks, and comment formats; Chapter 4 enters the JVM, covering bytecode, class loading, memory layout, object instantiation, and garbage collection; Chapter 5 discusses exception classification, logging standards, and logging frameworks; Chapter 6 systematically covers data structures and the collections framework, delving into HashMap, TreeMap, red-black trees, and ConcurrentHashMap; Chapter 7 focuses on concurrency and multithreading, including thread safety, locks, volatile, thread-pool source code, and ThreadLocal; Chapter 8 covers unit-testing principles, coverage, and JUnit practice; Chapter 9 discusses the significance of coding standards and how to drive their adoption, and touches on engineer growth. The book follows a "diagrams over tables, tables over words" approach, with numerous hand-drawn illustrations, source-code snippets, and online failure postmortems, balancing technical breadth and depth. It can serve both as an advanced reader for systematic study and as a desk reference to consult at any time.

Editor's review

很多 Java 书教你怎么「跑通」,这本书教你怎么「写好」。它脱胎于广为人知的《阿里巴巴Java开发手册》,但并非那份规约清单的复读版——作者把每一条规则背后的原理、代价和真实事故都摊开讲清楚,让「规范」从束缚变成判断力。 三个亮点值得一说。第一是「溯源式」讲法:不从语法开始,而是从0与1、浮点数精度、字符集乱码、TCP 握手这些底层讲起,很多线上疑难 bug 的根因就此显形。第二是「图胜于表」的表达:大量手绘图与源码片段,把 HashMap 的红黑树演进、线程池参数设计、ThreadLocal 的引用关系这些抽象结构画得一眼可懂。第三是实战分量:集合、并发、JVM、日志、单元测试几章都结合了阿里的真实故障复盘,读起来不像教材,更像一位老工程师在旁边讲他踩过的坑。 语言轻松,章节短小,可以通读,也可以按需查阅。作为从「能写代码」到「写出可维护代码」的那块踏板,它在同类书里相当少见地把技术深度与工程素养放在了一起。

Who it's for

A good fit for

  • 已掌握 Java 基本语法、希望摆脱「只会调用 API」的初中级开发者
  • 准备面试、需要系统补齐集合、并发、JVM 等底层原理的求职者
  • 想推动团队代码规范落地的技术负责人与架构师
  • 计算机相关专业学生,用于把课堂知识与工程实践对接

Not a good fit for

  • 完全没有编程基础、需要从变量与循环学起的零基础读者
  • 只关注前端、Go 或 Python 等非 Java 技术栈的开发者
  • 希望找一本速查语法手册或速成教程的人

Reading tips

  1. 第一遍按章节顺序通读,先建立「底层—语法—规范—工程」的完整知识地图。
  2. 读到集合与并发两章时对照 JDK 源码打开 IDE 实测,边读边验证结论。
  3. 把本书当案头手册,遇到乱码、精度、线程池或日志问题时按目录回查对应小节。
  4. 团队共读时可从第9章「如何推动落地」倒着读,先定规则再补原理。

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Computer Fundamentals
  2. 1.1 Entering the World of 0 and 1
  3. 1.2 Floating Point (Scientific Notation, Floating-Point Representation, Addition and Subtraction, Using Floating Point)
  4. 1.3 Character Sets and Garbled Text
  5. 1.4 CPU and Memory
  6. 1.5 TCP/IP (Network Protocols, IP, TCP Connection Establishment, TCP Connection Teardown, Connection Pools)
  7. 1.6 Information Security (Hackers and Security, SQL Injection, XSS and CSRF, CSRF, HTTPS)
  8. 1.7 The Evolution of Programming Languages
  9. Chapter 2 Object Orientation
  10. 2.1 OOP Concepts
  11. 2.2 First Encounter with Java
  12. 2.3 Classes (Defining a Class, Interfaces and Abstract Classes, Inner Classes, Access Control, this and super, Class Relationships, Serialization)
  13. 2.4 Methods (Method Signatures, Parameters, Constructors, Methods Within a Class, getters and setters, Synchronous and Asynchronous, Overriding)
  14. 2.5 Overloading
  15. 2.6 Generics
  16. 2.7 Data Types (Primitive Data Types, Wrapper Types, Strings)
  17. Chapter 3 Code Style
  18. 3.1 Naming Conventions (Constants, Variables)
  19. 3.2 Code Presentation Style (Indentation, Spaces and Blank Lines, Line Breaks and Height, Control Statements)
  20. 3.3 Code Comments (The Three Elements of Comments, Comment Formats)
  21. Chapter 4 Entering the JVM
  22. 4.1 Bytecode
  23. 4.2 The Class-Loading Process
  24. 4.3 Memory Layout
  25. 4.4 Object Instantiation
  26. 4.5 Garbage Collection
  27. Chapter 5 Exceptions and Logging
  28. 5.1 Exception Classification
  29. 5.2 try Blocks
  30. 5.3 Throwing and Catching Exceptions
  31. 5.4 Logging (Logging Standards, Logging Frameworks)
  32. Chapter 6 Data Structures and Collections
  33. 6.1 Data Structures
  34. 6.2 The Collections Framework Diagram (List, Queue, Map, Set)
  35. 6.3 Collection Initialization
  36. 6.4 Arrays and Collections
  37. 6.5 Collections and Generics
  38. 6.6 Comparing Elements (Comparable and Comparator, hashCode and equals)
  39. 6.7 The fail-fast Mechanism
  40. 6.8 Map Collections (Red-Black Trees, TreeMap, HashMap, ConcurrentHashMap)

FAQ

这本书和《阿里巴巴Java开发手册》有什么区别?
后者是条目式的规约清单,内容精简;本书由同一体系作者撰写,在规约基础上大幅扩展,逐条解释规则背后的原理,并补充计算机基础、面向对象、JVM、集合、并发、单元测试等系统知识,可视为前者的深度讲解版。
零基础可以读吗?
不建议作为第一本 Java 入门书。书中开篇就涉及浮点数表示、TCP 连接、JVM 内存布局等内容,需要读者至少熟悉 Java 基本语法与面向对象概念,否则容易被底层原理劝退。
书中的内容会因 JDK 版本更新而过时吗?
书基于 JDK 8 前后的技术栈写作,部分 API 细节与新版本存在差异,但讲解的核心思路——精度问题、集合结构、线程池设计、类加载机制——依然成立,阅读时留意版本差异即可。
ISBN 与出版时间以哪个为准?
本书 ISBN 为 9787121349096,由电子工业出版社出版,出版社官方页面标注 2018 年 9 月,部分渠道标注 10 月,属于同一版次的印次差异。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

杨冠宝 Author

Yang Guanbao has limited publicly available information; the identity currently verifiable is that of the author of The Alibaba Java Development Manual (2nd Edition). The book belongs to the programming and design category and centers on coding standards and engineering practices in Java development, addressing real-world development scenarios and emphasizing the executability of rules and consistency in team collaboration. This work suggests that Yang Guanbao focuses on turning scattered development experience into standard texts that are easy to consult and follow, with a writing style that is itemized and practical, concise in language, and directly serving developers' daily work. Since only this one work is held in the collection, his biographical background, other writings, and research directions cannot yet be confirmed, and readers may use the book as the main entry point for understanding his editorial approach.

More by the same author

Top rated in the same category