Book Profile
Code Complete 2nd Edition
Steve McConnell · 2004
A comprehensive guide to software construction that details the principles and practices for writing high-quality, maintainable code to manage complexity and improve programmer productivity.
Get the book →Code Complete bridges the vast gap between academic knowledge and common commercial practice, offering a definitive handbook for software developers at all levels. Whether you're a student, self-taught programmer, or an experienced technical lead, this book synthesizes decades of research and industry wisdom into practical, ready-to-use techniques for building robust and maintainable software. Through hundreds of code examples, checklists, and balanced discussions, it addresses every aspect of construction—from strategic prerequisites like architecture and design to tactical details of naming variables, structuring loops, and formatting code. By focusing on the central imperative of managing complexity, readers will learn how to improve their productivity, reduce debugging time, and ultimately elevate their work to the level of true software craftsmanship.
What it argues
A causal model derived from Steve McConnell's 'Code Complete, 2nd Edition,' illustrating how specific construction practices and developer characteristics lead to managed complexity and code readability, which in turn produce high-quality software and increased development productivity.
Key ideas it contributes
- Preparation Quality — The degree of quality and stability in upstream software development activities that precede construction. It encompasses a clear problem definition, well-understood and stable requirements, and a sound software architecture that provides a solid foundation for building the code.
- Construction Design Practices — The disciplined application of design principles and heuristics during the code construction phase. This involves creating well-defined abstractions, encapsulating implementation details, managing information hiding, and ensuring appropriate levels of cohesion within classes and loose coupling between them.
- Coding and Implementation Practices — The discipline of writing clear, readable, and correct code at the level of individual statements, routines, and variables. This includes using meaningful names, adhering to layout conventions, writing simple and direct control flows, and making effective use of data types.
- Quality Assurance Practices — The systematic execution of activities intended to find and remove defects during construction. This encompasses a combination of techniques, including collaborative practices like formal inspections and pair programming, and individual practices like developer testing and defensive programming.
- Programmer Character — The set of personal attributes and professional habits that enable a developer to apply technical knowledge effectively. Key traits include humility (recognizing one's fallibility), curiosity (a drive to learn), discipline (applying practices consistently), and intellectual honesty (admitting mistakes and facing facts).
- Managed Code Complexity — The property of a software system being structured into simple, intellectually manageable pieces. Low complexity means that a developer does not need to hold a large number of details in their mind simultaneously to understand or modify a part of the system, thus reducing cognitive load.
- Code Readability and Understandability — The quality of source code being easy for a human to read and comprehend. This involves not just cosmetic formatting but also clarity of intent, logical structure, and consistency, following the principle of writing programs for people first, computers second.
- Software Quality — The degree to which a software product meets its specified requirements and exhibits desirable internal and external characteristics. External characteristics include correctness and reliability. Internal characteristics, which are the focus of construction, include maintainability, flexibility, and reusability.