Clean Ruby: A Guide to Crafting Better Code for Rubyists - Carleton... - Librairie Eyrolles
Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Clean Ruby: A Guide to Crafting Better Code for Rubyists
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Clean Ruby: A Guide to Crafting Better Code for Rubyists

Clean Ruby: A Guide to Crafting Better Code for Rubyists

Carleton DiLeo

115 pages, parution le 21/12/2019

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
Who This Book Is For
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
  • Modules
  • Creating Quality Methods
    • 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
  • Using Boolean Logic
  • Using a Variable
  • Using a Method
  • Unless
  • Ternary operator
  • Double negative
  • Truthy and Falsy
    • Truthy Values
    • Falsy Values
  • & vs &&
  • Classes
  • Initialize Method
    • Keep it Simple
    • Avoiding Errors
    • Too many parameters
  • Class methods vs instance methods
  • Instance variables
  • Private methods
  • Method order
  • Moving methods to a module
  • Limiting Inheritance
  • Refactoring
    • No change too small
    • Tests
    • Single Responsibility Principle
  • Test-Driven Development (TDD)
  • Start with tests
  • Implement our code
  • More Tests
  • Clean Tests
  • Wrapping up
  • Carleton DiLeo has been writing code ever since he built his first computer from parts in a dumpster. He has written code from high-traffic websites to back-end big data systems for video games. This wide base of knowledge provides Carleton with a unique perspective when writing Ruby code.

    Caractéristiques techniques

      PAPIER
    Éditeur(s) Apress
    Auteur(s) Carleton DiLeo
    Parution 21/12/2019
    Nb. de pages 115
    EAN13 9781484255452

    Avantages Eyrolles.com

    Livraison à partir de 0,01 en France métropolitaine
    Paiement en ligne SÉCURISÉ
    Livraison dans le monde
    Retour sous 15 jours
    + d'un million et demi de livres disponibles
    satisfait ou remboursé
    Satisfait ou remboursé
    Paiement sécurisé
    modes de paiement
    Paiement à l'expédition
    partout dans le monde
    Livraison partout dans le monde
    Service clients sav@commande.eyrolles.com
    librairie française
    Librairie française depuis 1925
    Recevez nos newsletters
    Vous serez régulièrement informé(e) de toutes nos actualités.
    Inscription