• Genere: Libro
  • Lingua: Inglese
  • Editore: Apress
  • Pubblicazione: 11/2019
  • Edizione: 1st ed.

Clean Ruby

48,98 €
46,53 €
AGGIUNGI AL CARRELLO
TRAMA
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 choicesIdentify bad code and fixed itCreate quality names for all of your variables, classes, and modules Write better, concise classesImprove the quality of your methodsProperly use modules Clarify your Boolean logic See when and how you refactorImprove your understanding of TDD and write better tests Who This Book Is ForThis book is written for Ruby developers. There is no need to learn a new language or translate concepts to Ruby.

SOMMARIO
The Qualities of Clean CodeReadabilityExtensibilitySimplicityNaming ThingsVariablesNaming conventionsThe dataLengthAvoid unnecessary informationAvoid conjunctionsOnly alpha charactersMethodsUse verbsReturn valueBang methodsClassesPurposeRoleModulesCreating Quality MethodsParametersUse fewer parametersParameter orderReturn ValuesGuard ClauseLengthHow to shorten a methodToo shortCommentsQuality commentsStale commentsComments and refactoringLimit NestingUsing Boolean LogicUsing a VariableUsing a MethodUnlessTernary operatorDouble negativeTruthy and FalsyTruthy ValuesFalsy Values& vs &&ClassesInitialize MethodKeep it SimpleAvoiding ErrorsToo many parametersClass methods vs instance methodsInstance variablesPrivate methodsMethod orderMoving methods to a moduleLimiting InheritanceRefactoringNo change too smallTestsSingle Responsibility PrincipleTest-Driven Development (TDD)Start with testsImplement our codeMore TestsClean TestsWrapping up

AUTORE
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.

ALTRE INFORMAZIONI
  • Condizione: Nuovo
  • ISBN: 9781484255452
  • Dimensioni: 235 x 155 mm Ø 454 gr
  • Formato: Brossura
  • Illustration Notes: X, 113 p.
  • Pagine Arabe: 113
  • Pagine Romane: x