The Art of Readable Code: Simple and Practical Techniques for Writing Better Code

-
The Art of Readable Code: Simple and Practical Techniques for Writing Better Code
PDF
  • eBook:
    The Art of Readable Code: Simple and Practical Techniques for Writing Better Code
  • Author:
    Dustin Boswell, Trevor Foucher
  • Edition:
    1 edition
  • Categories:
  • Data:
    November 26, 2011
  • ISBN:
    0596802293
  • ISBN-13:
    9780596802295
  • Language:
    English
  • Pages:
    206 pages
  • Format:
    PDF

-
Book Description
As programmers, we’ve all seen source code that’s 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 they’re 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 program’s 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

-

Content

1. Code Should Be Easy to Understand

PART I - Surface-Level Improvements
2. Packing Information into Names
3. Names That Can’t Be Misconstrued
4. Aesthetics
5. Knowing What to Comment
6. Making Comments Precise and Compact

PART II - Simplifying Loops and Logic
7. Making Control Flow Easy to Read
8. Breaking Down Giant Expressions
9. Variables and Readability

PART III - Reorganizing Your Code
10. Extracting Unrelated Subproblems
11. One Task at a Time
12. Turning Thoughts into Code
13. Writing Less Code

PART IV - Selected Topics
14. Testing and Readability
15. Designing and Implementing a “Minute/Hour Counter”

Free sample

-
Add comments
Прокомментировать
Введите код с картинки:*
Кликните на изображение чтобы обновить код, если он неразборчив
Copyright © 2019
-

-