Clean Ruby: A Guide to Crafting Better Code for Rubyists
Carleton DiLeo
Résumé
Learn how to make better decisions and write cleaner Ruby code. This book shows you how to avoid messy code that is hard to test and which cripples productivity. Author Carleton DiLeo shares hard-learned lessons gained from years of experience across numerous codebases both large and small. Each chapter covers the topics you need to know to make better decisions and optimize your productivity. Many books will tell you how to do something; this book will tell you why you should do it. Start writing code you love.
What You Will Learn
- Build better classes to help promote code reuse
- Improve your decision making and make better, smarter choices
- Identify bad code and fixed it
- Create quality names for all of your variables, classes, and modules
- Write better, concise classes
- Improve the quality of your methods
- Properly use modules
- Clarify your Boolean logic
- See when and how you refactor
- Improve your understanding of TDD and write better tests
This book is written for Ruby developers. There is no need to learn a new language or translate concepts to Ruby.
- The Qualities of Clean Code
- Readability
- Extensibility
- Simplicity
- Naming Things
- Variables
- Naming conventions
- The data
- Length
- Avoid unnecessary information
- Avoid conjunctions
- Only alpha characters
- Methods
- Use verbs
- Return value
- Bang methods
- Classes
- Purpose
- Role
- Parameters
- Use fewer parameters
- Parameter order
- Return Values
- Guard Clause
- Length
- How to shorten a method
- Too short
- Comments
- Quality comments
- Stale comments
- Comments and refactoring
- Limit Nesting
- Truthy Values
- Falsy Values
- Keep it Simple
- Avoiding Errors
- Too many parameters
- No change too small
- Tests
- Single Responsibility Principle
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Apress |
Auteur(s) | Carleton DiLeo |
Parution | 21/12/2019 |
Nb. de pages | 115 |
EAN13 | 9781484255452 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse