I recently authored my first book! It is an exploration of clean code through the lens of JavaScript: Clean Code in JavaScript (Publisher Link)
This is not a book about frameworks or “one size fits all” abstractions. It’s about navigating, with care, the needs of our users and fellow programmers. The world of JavaScript is increasingly complex, burdened and blessed with myriad opinions and approaches. I wrote this book, in part, because I wanted to distill this complexity.
The book is over 500 pages and covers topics across the gamut from DOM reconciliation to the Law of Demeter. The broad chapters are outlined here:
- What is Clean Code Anyway?
- Setting the Scene
- The Tenets of Clean Code
- The Enemies of Clean Code
- SOLID and Other Principles
- Naming Things Is Hard
- JavaScript and Its Bits
- Primitive and Built-In Types
- Dynamic Typing
- Operators
- Parts of Syntax and Scope
- Control Flow
- Crafting Abstractions
- Design Patterns
- Real-World Challenges
- Testing and Tooling
- The Landscape of Testing
- Writing Clean Tests
- Tools for Cleaner Code
- Collaboration and Making Changes
- Documenting Your Code
- Other Peoples’ Code
- Communication and Advocacy
- Case Study (Exploration of a real-world project)
The book functions as both a user-empathic exploration of programming and a nitty-gritty JavaScript (ES2020) manual, training the reader to consider how each design decision and language construct might help or hinder the quality of their code and the experiences it creates.
Take a look: Clean Code in JavaScript (Publisher Link)
Thanks for reading! Please share your thoughts with me on Twitter. Have a great day!