Code Reviews 101 (Code Reviews 101 - The wisdom of good coding)
Code Reviews 101
The Wisdom of Good Coding
About the Book
Ranked in the top 5 best code reviews books of all time on BookAuthority.
A paperback version is available on Amazon and other retailers.
There is no perfect code, whilst too many ways to write bad code. Even clean code will start to smell over time. The more the functionalities, the complexity and the number of different programmers working on it will make it smell. Healthy code requires incremental improvements, and reviews to stay that way.
Would you also like to make more money as a programmer by being better at it?
Discover the job-changing experience that you need. Sure enough, you might perform long searches on the web to try to put it all together. But why should you waste your time when you can have 15+ years of experience condensed into a single book?
You can continue doing what you are doing. But let’s be frank, you won't have read up to this point if you wanted it.
You are here because you believe you can have a better career by being a good programmer. It’s very tough to self-learn without the shared experience and guidance provided into this book.
This book will walk through different approaches, reasoning why they are good or bad, as well as providing some clarifying examples (mainly Python). The book is broken down into different areas ranging from design and good coding practices to performances and security. A checklist ends all the chapters to help you during the code review process of your projects.
Don't read this book...if:
We are not here to talk about theoretical mumbo jumbo. We are going to talk about practical guidance. And it is our duty - as professionals - to code in the best possible way. Is it not?!
This book might not be right for you if:
- If you are looking for an entire encyclopedia on data structures, software architectures, and any possible software engineering facets: this book is not for you. Certain concepts in the book are in pills: it provides just the core information that can assist you in doing better choices. This book is not made to impress you, it is made to help you out. To be handy and on point.
- It is not a Python programming book. Nor a programming book per se either. It is meant to help in writing better code by looking at it from several angles.
- This book is not boring. If you are looking for endless mechanical chapters, wrong choice. Let’s add some fun, life is too short.
- If your heart as a programmer is too sensible on how bad code can be, please stop. I care about you, seriously. Or at least, read with caution, don’t stress too much: there are other wonderful things in the world!
- And if you get upset identifying bad things that you did... no worries every single programmer on earth has been there!
This book is right for you...if:
This book is aimed at people with at least some experience with programming in some sort of language: C, C++, Java, Python. It could be easier for Object Oriented programming cowboys and cowgirls to go through the book, but a lot of concepts discussed in the book are general enough to be the foundations of good coding. Some more advanced chapters - like concurrency and security - might require some more focus to make your own if you are fairly new to them. But, no worries, keep going, it will be rewarding and it will give you the right tools to be at the top of your game.
Hence, this book is for:
- Passionate programmers willing to go the extra mile and be better at their jobs. You will be happier, better paid and with a easier life.
- People who just started to program: this book will power up your programming skills. It will avoid you all the avoidable errors.
- Software engineers of all kinds. Knowing a programming language is not enough to be good at it. And I am sure you are or you will be a really good one.
- More experienced IT people in search for a quick guide on how to review code.
But at the end of the day, I hope you’ll enjoy it!
Reader Testimonials

BookAuthority
5 Best Code Review Books of All Time
About BookAuthority: As featured on CNN, Forbes and Inc – BookAuthority identifies and rates the best books in the world, based on public mentions, recommendations, ratings and sentiment. Book ranked here: https://bookauthority.org/books/best-code-review-books
Table of Contents
-
Preface
- The Art of Programming
- Who This Book is Meant For?
- What is Covered in This Book
- Don’t read this book…if
- Feedback and Errata
- Disclaimer
-
1 Introduction
- 1.1 This Code Really Smells
- 1.2 This Code Smells bad, so what?
- 1.3 Software Development Life Cycle
-
1.4 What Can I do to Smell the Code
- Code Reviews Overview
- Manual vs automated
- Quality First
- Impact
-
2 Code Structure
-
2.1 It is Not Just a Matter of Not-That-Good-Code
- Spaghetti Recipe
- The Unforgiven
-
2.2 Software Architectures
- Why Software Architectures?
- People Minded
- Be Smart
- Takeaway
- 2.3 APIs
- 2.4 Control Structures
-
2.5 Health Status in bites
- Takeaway
- 2.6 Review Checklist
-
2.1 It is Not Just a Matter of Not-That-Good-Code
-
3 Data Structures
- 3.1 Why Data Structures
- 3.2 Array
- 3.3 Linked-List
- 3.4 Doubly Linked-List
- 3.5 Stack
- 3.6 Queue
- 3.7 Hash Map
- 3.8 Binary Search Trees
- 3.9 Takeaway
- 3.10 Further Reading
- 3.11 Review Checklist
-
4 Design smells
- 4.1 Introduction to smells
-
4.2 Cyclic Dependencies
- Example
-
4.3 Feature Density
- Example
- 4.4 Unstable Dependency
-
4.5 Mashed Components
- Example
- 4.6 Ambiguous Interfaces
-
4.7 Mesh Components
- Example
- 4.8 First Lady Components
-
4.9 That’s not my Responsibility Component
- Example
- 4.10 Further Reading
- 4.11 Review Checklist
-
5 Software Architectures
-
5.1 Code Under the Shower
- The Days of Creation
- The Big Puzzle
- Behave Code, Behave!
- 5.2 Further Reading
- 5.3 Review Checklist
-
5.1 Code Under the Shower
-
6 From Scratch
- 6.1 Problem Statement
- 6.2 Is this right?
-
6.3 Requirements
- FURPS+
- Validation
- 6.4 Technologies
- 6.5 What do you have? What do you need?
- 6.6 Processes
-
6.7 Bonus Tip
- Before we start
- In progress
- After
- 6.8 Review Checklist
-
7 Data and Naming
-
7.1 Naming
- You should be…what?!
- Not you Again
- The Good, The Bad, The Ugly
- 7.2 Parameterization
- 7.3 Modifiers
- 7.4 Keywords
- 7.5 That’s Magic
- 7.6 Further Reading
- 7.7 Review Checklist
-
7.1 Naming
-
8 Comments
- 8.1 If the Code is Good I don’t need Comments Philosophy
- 8.2 Conditions and Flows
- 8.3 IO Definition
- 8.4 Inline Comments
- 8.5 TODOs
- 8.6 That’s Obvious
- 8.7 Did you just lie to that programmer?
- 8.8 Comments Driven Development (CDD)
- 8.9 Coding Conventions
- 8.10 Further Reading
- 8.11 Review Checklist
-
10 Concurrency, parallelism and performances
-
10.1 Foundation of Concurrency
- CPUs and Cores
- Threads are Not Processes
-
10.2 Correctness of Concurrent Code
- Thread Safety
-
10.3 Parallelism and Performances
- Amdahl’s Law
- Observation
- Asymptotic Analysis
- 10.4 Further Reading
- 10.5 Review Checklist
-
10.1 Foundation of Concurrency
-
11 Security
-
11.1 Security is such a P.A.I.N
- Confidentiality
- Integrity
- Availability
- Non-Repudiation
- 11.2 Fact or Fiction?
-
11.3 Security Principles
- Least Privilege
- Defence in Depth
- Segregation of Duties
- Fail Safe
- Complete Mediation
- Least Common Mechanism
- Weakest Link
-
11.4 Security Code Review
- Secure Software Development Lifecycle
- Word of caution
- 11.5 Further Reading
- 11.6 Review Checklist
-
11.1 Security is such a P.A.I.N
-
13 Code Reviews
-
13.1 Code Metrics
- Defect Density
- Defect Removal Effectiveness
-
13.2 Review Metrics
- Inspection Rate
- Code Coverage
- Defect Detection Rate
-
13.3 Recommendations and guidelines
- Clear Review Goals
- Stay scientific, stay SMART
- Plan ahead
- Checklist: simply not enough
-
13.4 Code Reviews for Developers
- That’s a Trap
- Manners
-
13.5 Code Reviews for Managers
- Quality means Faster
- Distributed Teams
- Show me the Math
- 13.6 Review Checklist
-
13.1 Code Metrics
- Conclusion
- Glossary
- Bibliography
- Index
- About the author
- More from Giuliana Carullo
- Disclaimer
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Do Well. Do Good.
Authors have earned$11,597,977writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++20 - The Complete Guide
Nicolai M. JosuttisAll new language and library features of C++20 (for those who know previous C++ versions).
The book presents all new language and library features of C++20. Learn how this impacts day-to-day programming, to benefit in practice, to combine new features, and to avoid all new traps.
Buy early, pay less, free updates.
Other books:
Jetpack Compose internals
Jorge CastilloJetpack Compose is the future of Android UI. Master how it works internally and become a more efficient developer with it. You'll also find it valuable if you are not an Android dev. This book provides all the details to understand how the Compose compiler & runtime work, and how to create a client library using them.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
SignalR on .NET 6 - the Complete Guide
Fiodar SazanavetsLearn everything there is to learn about SignalR and how to integrate it with the latest .NET 6 and C# 10 features. Learn how to connect any type of client to SignalR, including plain WebSocket client. Learn how to build interactive applications that can communicate with each other in real time without making excessive calls.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
Functional event-driven architecture: Powered by Scala 3
Gabriel VolpeExplore the event-driven architecture (EDA) in a purely functional way, mainly powered by Fs2 streams in Scala 3!
Leverage your functional programming skills by designing and writing stateless microservices that scale, powered by stateful message brokers.
The easiest way to learn design patterns
Fiodar SazanavetsLearn design patterns in the easiest way possible. You will no longer have to brute-force your way through each one of them while trying to figure out how it works. The book provides a unique methodology that will make your understanding of design patterns stick. It can also be used as a reference book where you can find design patterns in seconds.
Cronache di Domain-Driven Design
Francesco Strazzullo, Matteo Baglini, Gianluca Padovani, Emanuele DelBono, Marco Consolaro, Alessandro Colla, Uberto Barbini, Alberto Acerbis, Julie Camosseto, DDD Open, and Alberto BrandoliniCronache di Domain-Driven Design: un libro corale in italiano fatto di storie indipendenti tra loro, che sono il risultato dell’applicazione di Domain-Driven Design su progetti reali.
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
CCIE Service Provider Version 4 Written and Lab Exam Comprehensive Guide
Nicholas RussoThe service provider landscape has changed rapidly over the past several years. Networking vendors are continuing to propose new standards, techniques, and procedures for overcoming new challenges while concurrently reducing costs and delivering new services. Cisco has recently updated the CCIE Service Provider track to reflect these changes; this book represents the author's personal journey in achieving that certification.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #3
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #4
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #6
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible... - #7
Modern C++ Collection
3 Books
Get All about Modern C++C++ Standard Library, including C++20Concurrency with Modern C++, including C++20C++20Each book has about 200 complete code examples. Updates are included. When I update one of the books, you immediately get the updated bundle. You can expect significant updates to each new C++ standard (C++23, C++26, .. ) and also... - #9
Retromat eBook Bundle for Agile Retrospectives
2 Books
If you facilitate retrospectives this bundle is for you: "Plans for Retrospectives" helps beginners learn the lay of the land with tried-and-true plans. Once you know your way around, "Run great agile retrospectives" contains all 135+ activities in Retromat for you to mix and match.