Understanding the 4 Rules of Simple Design
Год: 2014
Автор: Corey Haines
Издательство: Leanpub
ISBN: N/A
Язык: Английский
Формат: PDF/EPUB/MOBI
Качество: Изначально компьютерное (eBook)
Интерактивное оглавление: Да
Количество страниц: 88
Описание:
Modern software development is a game of ever-increasing frequency of change. This is why it is imperative to build systems that are flexible and can adapt to changing requirements, both expected and (more often) unexpected. That is why I've written this book.
From 2009 to 2014, I traveled the world working with software developers, both individually and in teams, to improve their craft. Primarily, I did this through a training workshop format called coderetreat. Over those years, I had the opportunity to watch 1000's of pairs of programmers work on exactly the same system, Conway's Game of Life. As time progressed, I began to see patterns arise. I noticed common techniques and designs that spanned languages and companies and crossed national borders.
As co-founder and a facilitator of coderetreat workshops, I had the unique opportunity to provide feedback, both direct and through questions, on improving the act of writing adaptable, simple code. Through the day, we worked on improving our ability to make good choices around the minute-by-minute decisions made while writing code.
This book is about those things I learned from watching these 1000's of pairs working on the same problem. It contains a large part of the feedback that I provide during a typical coderetreat. The primary focus is on the thought process behind refactoring, and how that is influenced by the 4 rules of simple design.
This book is not about Conway's Game of Life. Instead, it uses its domain as a backdrop to discuss the thoughts and ideas behind the 4 rules of simple design. It focuses on the small decisions made while designing your code with the goal of building robust, adaptable codebases that can stand the test of time.
With forewords by Joe Rainsberger and Kent Beck.
Foreword: Kent Beck
Foreword: Joe Rainsberger
Acknowledgements
Introduction
This Book
Who It Is For
What It Is (And Isn’t) About
Format
Why Ruby?
Where do these thoughts come from?
Good Design?
Coderetreats
Conway’s Game of Life
4 Rules of Simple Design
Examples
Test Names Should Influence Object’s API
Duplication of Knowledge about Topology
Behavior Attractors
Testing State vs Testing Behavior
Don’t Have Tests Depend on Previous Tests
Breaking Abstraction Level
Naive Duplication
Procedural Polymorphism
Making Assumptions About Usage
Unwrapping an Object
Inverted Composition as a Replacement for Inheritance
Other Good Stuff
Other Design Guidelines
Example constraints
Some Thoughts On Pair-Programming Styles
Driver-Navigator
Ping-Pong Pairing
Which Style Should You Choose?
Further Reading
4 Rules of Simple Design
General Design
Testing
Other Things You Probably Should Most Definitely Read