Tidy First?: A Personal Exercise in Empirical Software Design

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Messy code is a nuisance. "Tidying" code, to make it more readable, requires breaking it up into manageable sections. In this practical guide, author Kent Beck, creator of Extreme Programming and pioneer of software patterns, suggests when and where you might apply tidyings to improve your code while keeping the overall structure of the system in mind. Instead of trying to master tidying all at once, this book lets you try out a few examples that make sense for your problem. If you have a big function containing many lines of code, you'll learn how to logically divide it into smaller chunks. Along the way, you'll learn the theory behind software design: coupling, cohesion, discounted cash flows, and optionality. This book helps you: • Understand the basic theory of how software design works and the forces that act on it • Explore the difference between changes to a system's behavior and changes to its structure • Improve your programming experience by sometimes tidying first and sometimes tidying after • Learn how to make large changes in small, safe steps • Approach software design as an exercise in human relationships

Author(s): Kent Beck
Edition: 1
Publisher: O'Reilly Media
Year: 2023

Language: English
Commentary: Publisher's PDF
Pages: 122
City: Sebastopol, CA
Tags: Software Engineering; Programming; Best Practices; Design Thinking; Refactoring; Coupling; Cohesion

Cover
Copyright
Table of Contents
Foreword
Preface
What Is Tidy First?
Audience
What You Will Learn
Structure of the Book
Why “Empirical” Software Design?
How I Came to Write Tidy First?
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Introduction
Part I. Tidyings
Chapter 1. Guard Clauses
Chapter 2. Dead Code
Chapter 3. Normalize Symmetries
Chapter 4. New Interface, Old Implementation
Chapter 5. Reading Order
Chapter 6. Cohesion Order
Chapter 7. Move Declaration and Initialization Together
Chapter 8. Explaining Variables
Chapter 9. Explaining Constants
Chapter 10. Explicit Parameters
Chapter 11. Chunk Statements
Chapter 12. Extract Helper
Chapter 13. One Pile
Chapter 14. Explaining Comments
Chapter 15. Delete Redundant Comments
Part II. Managing
Chapter 16. Separate Tidying
Chapter 17. Chaining
Conclusion
Chapter 18. Batch Sizes
Chapter 19. Rhythm
Chapter 20. Getting Untangled
Chapter 21. First, After, Later, Never
Never
Later
After
First
Summary
Part III. Theory
Chapter 22. Beneficially Relating Elements
Elements
Relating
Beneficially
Beneficially Relating Elements
Chapter 23. Structure and Behavior
Chapter 24. Economics: Time Value and Optionality
Chapter 25. A Dollar Today > A Dollar Tomorrow
Chapter 26. Options
Chapter 27. Options Versus Cash Flows
Chapter 28. Reversible Structure Changes
Chapter 29. Coupling
Chapter 30. Constantine’s Equivalence
Chapter 31. Coupling Versus Decoupling
Chapter 32. Cohesion
Chapter 33. Conclusion
Appendix. Annotated Reading List and References
Index
About the Author
Colophon