As programmers, weve all seen source code thats so ugly and buggy it makes our brain ache. Over the past five years, authors Dustin Boswell and Trevor Foucher have analyzed hundreds of examples of "bad code" (much of it their own) to determine why theyre bad and how they could be improved. Their conclusion? You need to write code that minimizes the time it would take someone else to understand it even if that someone else is you.
This book focuses on basic principles and practical techniques you can apply every time you write code. Using easy-to-digest code examples from different languages, each chapter dives into a different aspect of coding, and demonstrates how you can make your code easy to understand.
- Simplify naming, commenting, and formatting with tips that apply to every line of code
- Refine your programs loops, logic, and variables to reduce complexity and confusion
- Attack problems at the function level, such as reorganizing blocks of code to do one task at a time
- Write effective test code that is thorough and concise as well as readable
About the Author Dustin Boswell graduated from CalTech, and worked at Google for f.we years on web crawling infrastructure and ad programs. He's built several websites and enjoys work-ing on big data and machine learning.
Trevor Foucher has spent the past decade at Microsoft as an engineer, manager, and tech lead on Windows and security products, and at Google working on ad programs and search infrastructure.