• Complain

Avdi Grimm - Confident Ruby (for james tumino)

Here you can read online Avdi Grimm - Confident Ruby (for james tumino) full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Avdi Grimm Confident Ruby (for james tumino)
  • Book:
    Confident Ruby (for james tumino)
  • Author:
  • Genre:
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Confident Ruby (for james tumino): summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Confident Ruby (for james tumino)" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Avdi Grimm: author's other books


Who wrote Confident Ruby (for james tumino)? Find out the surname, the name of the author of the book and a list of all author's works by series.

Confident Ruby (for james tumino) — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Confident Ruby (for james tumino)" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Confident Ruby
Confident Ruby Confident Ruby Copyright 2013 Avdi Grimm All rights reserved - photo 1
Confident Ruby
Confident Ruby

Copyright 2013 Avdi Grimm. All rights reserved.

To Walter Grimm, who showed me the joy of building beautiful things.

Foreword

I met Avdi in 2011 at RubyConf in New Orleans. I was no one special, just an anonymous nerd who'd been browbeat into giving a talk or two. Jim Weirich had seen one of these talks and was determined that Avdi and I should meet. His introduction led to one of those arm-waving, session-skipping hallway conversations that expand minds and change lives. The three of us were so animated I'm surprised we weren't roundly shushed and permanently banned from the foyer.

Writing today, that moment floods back. Our island of conversation, the conference swirling around us, Jim's infectious enthusiasm and Avdi's earnest intensity. I could not believe I was standing there. It did not seem possible to be that lucky. I thought I'd died and gone to programmer's heaven.

I confessed that I was working on a book, "Practical Object-Oriented Design in Ruby", and Avdi graciously offered to read it. The word "read" vastly understates his efforts. Not only did he give feedback about the ideas but he went through the Ruby, line by line, correcting errors and improving code. When I thank him he makes excuses that dismiss his efforts, but happily, here I have the floor and can tell you how kind he is without fear of interruption.

And so, it is my great pleasure to introduce "Confident Ruby". Avdi's clarity of thought shines throughout this book. His vision of how methods should be organized provides a clear structure in which to think about code, and his recipes give straightforward and unambiguous guidance about how to write it.

He has a gift for illustrating the rigorously technical with the delightfully whimsical. In this book there are bank accounts, certainly, but there's also a bibliophile meet-up named "Bookface", and, deep inside, just when you might need a break, you'll find "emergency kittens". Indeed. His genius is to make the lighthearted example both useful and plausible.

Writing a book is hard work and motivations to do so run deep. In some fundamental way the drive to teach, to explain, to improve oneself and thereby the world, underlies all. I asked Avdi what made him write this book and he answered me with an email containing a number of reasons, two of which I'll share. He said "Explaining things is fun" but he also said "The truth is, this community has been so good to me that I live in a constant state of wondering why they are so nice, and wishing I could do more".

A sense of fun and a feeling of obligation; that's it, now you know him.

Avdi writes code that is easy to understand; in Confident Ruby he teaches us how to do the same. Among programmers, there is no higher praise.

Enjoy the book.

Sandi Metz
March, 28, 2014

Preface

In January of 2010 I gave the first tech talk of my life to a roomful of Ruby hackers in Baltimore, MD. I called the talk "Confident Code", and it distilled some notes I'd collected from my experience working on established Ruby codebases.

Since then I've given variations on that presentation at least half a dozen times at various conferences and meet-ups. To this day it is the talk that I receive the most positive feedback on. For years I've wanted to revisit, revise, and expand on that material in a longer format. The book you're reading is the realization of that desire.

There are so many people who have helped make this book a reality that it's hard to know where to begin.

First of all, thank you to all the people who saw the talk and encouraged me to turn it into a book in the first place. I don't remember everyone who did, but Mike Subelsky was almost certainly the first.

A huge thank you to Sandi Metz and Noel Rappin for reading early drafts and playing editor. The book is substantially more readable thanks to their feedback. Also to Dave Copeland, whose technical insights helped clarify a number of the patterns.

To my fellow Ruby Rogues Chuck Wood, James Gray, David Brady, Josh Susser, and Katrina Owen: some of you provided feedback, and all of you gave me moral support and a ready sounding board for my ideas. Thank you.

To all the many, many people who read beta versions of the book and gave me feedback and errata both large and small: if this book looks like a professional effort rather than the jottings of an absent-minded hacker, it's because of you. In no particular order: Dennis Sutch, George Hemmings, Gerry Cardinal III, Evgeni Dzhelyov, Hans Verschooten, Kevin Burleigh, Michael Demazure, Manuel Vidaurre, Richard McGain, Michael Sevestre, Jake Goulding, Yannick Schutz, Mark Ijbema, John Ribar, Tom Close, Dragos .M, Brent Nordquist, Samnang Chhun, Dwayne R. Crooks, Thom Parkin, and Nathan Walls. I am certain I have missed some names, and if yours is one of them I sincerely apologize. Know that your contribution is greatly valued.

Many thanks to Ryan Biesemeyer and Grant Austin, who donated e-reader hardware so that I could make sure the book looks good on all platforms.

Thanks to Benjamin Fleischer and Matt Swanson for volunteering their projects as refactoring guinea pigs.

Finally, thank you as always to Stacey for inspiring and encouraging me every day. And to Lily, Josh, Kashti, Ebba and Ylva, who daily teach me the meaning of joy.

Introduction

Ruby is designed to make programmers happy.

Yukhiro "Matz" Matsumoto

This is a book about Ruby, and about joy.

If you are anything like me, the day you first discovered the expressive power of Ruby was a very happy day. For me, I think it was probably a code example like this which made it "click":

. times do puts "Hello, Ruby world!" end

To this day, that's still the most succinct, straightforward way of saying "do this three times" I've seen in any programming language. Not to mention that after using several supposedly object-oriented languages, this was the first one I'd seen where everything, including the number "3", really was an object. Bliss!

Ruby meets the real world

Programming in Ruby was something very close to a realization of the old dream of programming in pseudocode. Programming in short, clear, intent-revealing stanzas. No tedious boilerplate; no cluttered thickets of syntax. The logic I saw in my head, transferred into program logic with a minimum of interference.

But my programs grew, and as they grew, they started to change. The real world poked its ugly head in, in the form of failure modes and edge cases. Little by little, my code began to lose its beauty. Sections became overgrown with complicated nested if/then/else logic and && conditionals. Objects stopped feeling like entities accepting messages, and started to feel more like big bags of attributes. begin/rescue/end blocks started sprouting up willy-nilly, complicating once obvious logic with necessary failure-handling. My tests, too, became more and more convoluted.

I wasn't as happy as I once had been.

Confident code

If you've written applications of substantial size in Ruby, you've probably experienced this progression from idealistic beginnings to somewhat less satisfying daily reality. You've noticed a steady decline in how much fun a project is the larger and older it becomes. You may have even come to accept it as the inevitable trajectory of any software project.

In the following pages I introduce an approach to writing Ruby code which, when practiced dilligently, can help reverse this downward spiral. It is not a brand new set of practices. Rather, it is a collection of time-tested techniques and patterns, tied together by a common theme:

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Confident Ruby (for james tumino)»

Look at similar books to Confident Ruby (for james tumino). We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Confident Ruby (for james tumino)»

Discussion, reviews of the book Confident Ruby (for james tumino) and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.