• Fri frakt över 249 kr
  • •
  • Snabba leveranser
  • •
  • Billiga böcker
Kundservice

Du är på sajten för privatpersoner.

Företag, bibliotek eller offentlig verksamhet?

Du handlar på classic.bokus.com, där alla dina funktioner finns intakta.
Till classic.bokus.com
Bokus logotyp. Gå till startsidan.
  • Erbjudanden
  • Student
  • Topplistor
  • Barn & ungdom
  • Bokus Play
  • E-böcker
  • Ljudböcker
  • Pocketböcker
  • Spel och pussel

5% studentrabatt – använd koden KURSBOK27 →

Sidfot

Mina sidor

    Hjälp

    • Kundservice
    • Vanliga frågor och svar
    • Frakt och leverans
    • Retur vid ångerrätt
    • Reklamera vara
    • Betalning
    • Köpvillkor
    • Allmänna villkor
    • Information om webbplatsens tillgänglighet

    Om Bokus

    • Om oss
    • Pressrum
    • För studenter
    • För företag
    • För bibliotek och offentlig verksamhet
    • För leverantörer
    • Hållbarhet

    Populärt

    • Aktuella erbjudanden
    • Presentkort
    • Studentlitteratur
    • Nya böcker
    • Topplistor
    • Signerade böcker
    • Engelska böcker

    Inspiration

    • Boktips
    • BookTok
    • Barnbokskaraktärer
    • Populära författare
    Logotyp för Bokus
    Följ oss på Facebook (extern länk)Följ oss på Instagram (extern länk)Följ oss på YouTube (extern länk)Följ oss på TikTok (extern länk)
    bokus @ CookiesAnpassa cookiesIntegritetspolicyKöpvillkor
    Till Citymail hemsida (extern länk)Till Budbee hemsida (extern länk)Till Postnord hemsida (extern länk)Till Schenker hemsida (extern länk)Till Early Bird hemsida (extern länk)Till Walleys hemsida (extern länk)
    1. Data och IT
    2. Programmeringsböcker
    3. Programspråk

    Eloquent Ruby

    AvRuss Olsen

    Häftad, Engelska, 2011

    Del i serien Addison-Wesley Professional Ruby Series

    368 kr

    Beställningsvara. Skickas inom 7-10 vardagar. Fri frakt över 249 kr.

    Fler format och utgåvor

    Häftad

    572 kr

    E-bok

    400 kr

    Beskrivning

    It’s easy to write correct Ruby code, but to gain the fluency needed to write great Ruby code, you must go beyond syntax and absorb the “Ruby way” of thinking and problem solving. In Eloquent Ruby, Russ Olsen helps you write Ruby like true Rubyists do–so you can leverage its immense, surprising power.

    Olsen draws on years of experience internalizing the Ruby culture and teaching Ruby to other programmers. He guides you to the “Ah Ha!” moments when it suddenly becomes clear why Ruby works the way it does, and how you can take advantage of this language’s elegance and expressiveness.

    Eloquent Ruby

    starts small, answering tactical questions focused on a single statement, method, test, or bug. You’ll learn how to write code that actually looks like Ruby (not Java or C#); why Ruby has so many control structures; how to use strings, expressions, and symbols; and what dynamic typing is really good for.

    Next, the book addresses bigger questions related to building methods and classes. You’ll discover why Ruby classes contain so many tiny methods, when to use operator overloading, and when to avoid it. Olsen explains how to write Ruby code that writes its own code–and why you’ll want to. He concludes with powerful project-level features and techniques ranging from gems to Domain Specific Languages.

    A part of the renowned Addison-Wesley Professional Ruby Series, Eloquent Ruby will help you “put on your Ruby-colored glasses” and get results that make you a true believer.

    Produktinformation

    • Utgivningsdatum:2011-03-16
    • Mått:178 x 229 x 23 mm
    • Vikt:688 g
    • Format:Häftad
    • Språk:Engelska
    • Serie:Addison-Wesley Professional Ruby Series
    • Antal sidor:448
    • Upplaga:1
    • Förlag:Pearson Education
    • ISBN:9780321584106

    Utforska kategorier

    • Programspråk inom Data och IT

    Mer om författaren

    Russ Olsen’s career spans three decades, during which he has written everything from graphics device drivers to document management applications. These days, he diligently codes GIS, web service security, and process automation solutions. He spends much of his otherwise free time writing and speaking about programming, especially Ruby and Clojure. His first book was the highly regarded Design Patterns In Ruby (Addison-Wesley, 2007). He is also the lurking presence behind the Technology As If People Mattered blog at www.russolsen.com.

    Recensioner i media

    "R>Eloquent Ruby is like programming in Ruby itself: fun, surprisingly deep, and you'll find yourself wishing it was always done this way. Wherever you are in your Ruby experience from novice to Rails developer, this book is a must read." --Ethan Roberts Owner, Monkey Mind LLC "Eloquent Ruby lives up to its name. It's a smooth introduction to Ruby that's both well organized and enjoyable to read, as it covers all the essential topics in the right order. This is the book I wish I'd learned Ruby from." --James Kebinger Senior Software Engineer, PatientsLikeMe www.monkeyatlarge.com "Ruby's syntactic and logical aesthetics represent the pinnacle for elegance and beauty in the ALGOL family of programming languages. Eloquent Ruby is the perfect book to highlight this masterful language and Russ's blend of wit and wisdom is certain to entertain and inform." --Michael Fogus Contributor to the Clojure programming language and author of The Joy of Clojure

    Innehållsförteckning

    • Foreword xixPreface xxiAcknowledgments xxvAbout the Author xxviiPART I: The Basics 1Chapter 1: Write Code That Looks Like Ruby 3The Very Basic Basics 4Go Easy on the Comments 6Camels for Classes, Snakes Everywhere Else 8Parentheses Are Optional but Are Occasionally Forbidden 9Folding Up Those Lines 10Folding Up Those Code Blocks 11Staying Out of Trouble 12In the Wild 13Wrapping Up 15Chapter 2: Choose the Right Control Structure 17If, Unless, While, and Until 17Use the Modifier Forms Where Appropriate 19Use each, Not for 20A Case of Programming Logic 21Staying Out of Trouble 23In the Wild 25Wrapping Up 27Chapter 3: Take Advantage of Ruby’s Smart Collections 29Literal Shortcuts 29Instant Arrays and Hashes from Method Calls 30Running Through Your Collection 33Beware the Bang! 36Rely on the Order of Your Hashes 38In the Wild 38Staying Out of Trouble 40Wrapping Up 42Chapter 4: Take Advantage of Ruby’s Smart Strings 43Coming Up with a String 44Another API to Master 47The String: A Place for Your Lines, Characters, and Bytes 49In the Wild 50Staying Out of Trouble 51Wrapping Up 52Chapter 5: Find the Right String with Regular Expressions 53Matching One Character at a Time 54Sets, Ranges, and Alternatives 55The Regular Expression Star 57Regular Expressions in Ruby 58Beginnings and Endings 60In the Wild 62Staying Out of Trouble 63Wrapping Up 64Chapter 6: Use Symbols to Stand for Something 65The Two Faces of Strings 65Not Quite a String 66Optimized to Stand for Something 67In the Wild 69Staying Out of Trouble 70Wrapping Up 71Chapter 7: Treat Everything Like an Object–Because Everything Is 73A Quick Review of Classes, Instances, and Methods 74Objects All the Way Down 76The Importance of Being an Object 77Public, Private, and Protected 79In the Wild 81Staying Out of Trouble 82Wrapping Up 84Chapter 8: Embrace Dynamic Typing 85Shorter Programs, But Not the Way You Think 85Extreme Decoupling 89Required Ceremony Versus Programmer-Driven Clarity 92Staying Out of Trouble 93In the Wild 94Wrapping Up 96Chapter 9: Write Specs! 97Test::Unit: When Your Documents Just Have to Work 98A Plethora of Assertions 101Don’t Test It, Spec It! 101A Tidy Spec Is a Readable Spec 104Easy Stubs 105. . . And Easy Mocks 107In the Wild 108Staying Out of Trouble 110Wrapping Up 113PART II: Classes, Modules, and Blocks 115Chapter 10: Construct Your Classes from Short, Focused Methods 117Compressing Specifications 117Composing Methods for Humans 121Composing Ruby Methods 122One Way Out? 123Staying Out of Trouble 126In the Wild 127Wrapping Up 128Chapter 11: Define Operators Respectfully 129Defining Operators in Ruby 129A Sampling of Operators 131Operating Across Classes 134Staying Out of Trouble 135In the Wild 137Wrapping Up 139Chapter 12: Create Classes That Understand Equality 141An Identifier for Your Documents 141An Embarrassment of Equality 142Double Equals for Everyday Use 143Broadening the Appeal of the == Method 145Well-Behaved Equality 146Triple Equals for Case Statements 149Hash Tables and the eql? Method 150Building a Well-Behaved Hash Key 152Staying Out of Trouble 153In the Wild 154Wrapping Up 156Chapter 13: Get the Behavior You Need with Singleton and Class Methods 157A Stubby Puzzle 158A Hidden, but Real Class 160Class Methods: Singletons in Plain Sight 162In the Wild 164Staying Out of Trouble 165Wrapping Up 167Chapter 14: Use Class Instance Variables 169A Quick Review of Class Variables 169Wandering Variables 171Getting Control of the Data in Your Class 174Class Instance Variables and Subclasses 175Adding Some Convenience to Your Class Instance Variables 176In the Wild 177Staying Out of Trouble 179Wrapping Up 179Chapter 15: Use Modules as Name Spaces 181A Place for Your Stuff, with a Name 181A Home for Those Utility Methods 184Building Modules a Little at a Time 185Treat Modules Like the Objects That They Are 186Staying Out of Trouble 189In the Wild 190Wrapping Up 191Chapter 16: Use Modules as Mixins 193Better Books with Modules 193Mixin Modules to the Rescue 195Extending a Module 197Staying Out of Trouble 198In the Wild 202Wrapping Up 205Chapter 17: Use Blocks to Iterate 207A Quick Review of Code Blocks 207One Word after Another 209As Many Iterators as You Like 210Iterating over the Ethereal 211Enumerable: Your Iterator on Steroids 213Staying Out of Trouble 215In the Wild 217Wrapping Up 218Chapter 18: Execute Around with a Block 219Add a Little Logging 219When It Absolutely Must Happen 224Setting Up Objects with an Initialization Block 225Dragging Your Scope along with the Block 225Carrying the Answers Back 227Staying Out of Trouble 228In the Wild 229Wrapping Up 231Chapter 19: Save Blocks to Execute Later 233Explicit Blocks 233The Call Back Problem 234Banking Blocks 236Saving Code Blocks for Lazy Initialization 237Instant Block Objects 239Staying Out of Trouble 240In the Wild 243Wrapping Up 244PART III: Metaprogramming 247Chapter 20: Use Hooks to Keep Your Program Informed 249Waking Up to a New Subclass 250Modules Want To Be Heard Too 253Knowing When Your Time Is Up 255. . . And a Cast of Thousands 256Staying Out of Trouble 257In the Wild 259Wrapping Up 261Chapter 21: Use method_missing for Flexible Error Handling 263Meeting Those Missing Methods 264Handling Document Errors 266Coping with Constants 267In the Wild 268Staying Out of Trouble 270Wrapping Up 271Chapter 22: Use method_missing for Delegation 273The Promise and Pain of Delegation 274The Trouble with Old-Fashioned Delegation 275The method_missing Method to the Rescue 277More Discriminating Delegation 278Staying Out of Trouble 279In the Wild 281Wrapping Up 283Chapter 23: Use method_missing to Build Flexible APIs 285Building Form Letters One Word at a Time 286Magic Methods from method_missing 287It’s the Users That Count–All of Them 289Staying Out of Trouble 289In the Wild 290Wrapping Up 292Chapter 24: Update Existing Classes with Monkey Patching 293Wide-Open Classes 294Fixing a Broken Class 295Improving Existing Classes 296Renaming Methods with alias_method 297Do Anything to Any Class, Anytime 299In the Wild 299Staying Out of Trouble 303Wrapping Up 303Chapter 25: Create Self-Modifying Classes 305Open Classes, Again 305Put Programming Logic in Your Classes 308Class Methods That Change Their Class 309In the Wild 310Staying Out of Trouble 314Wrapping Up 315Chapter 26: Create Classes That Modify Their Subclasses 317A Document of Paragraphs 317Subclassing Is (Sometimes) Hard to Do 319Class Methods That Build Instance Methods 321Better Method Creation with define_method 324The Modification Sky Is the Limit 324In the Wild 327Staying Out of Trouble 330Wrapping Up 332PART IV: Pulling It All Together 333Chapter 27: Invent Internal DSLs 335Little Languages for Big Problems 335Dealing with XML 336Stepping Over the DSL Line 341Pulling Out All the Stops 344In the Wild 345Staying Out of Trouble 347Wrapping Up 349Chapter 28: Build External DSLs for Flexible Syntax 351The Trouble with the Ripper 352Internal Is Not the Only DSL 353Regular Expressions for Heavier Parsing 356Treetop for Really Big Jobs 358Staying Out of Trouble 360In the Wild 362Wrapping Up 364Chapter 29: Package Your Programs as Gems 367Consuming Gems 367Gem Versions 368The Nuts and Bolts of Gems 369Building a Gem 370Uploading Your Gem to a Repository 374Automating Gem Creation 375In the Wild 376Staying Out of Trouble 377Wrapping Up 380Chapter 30: Know Your Ruby Implementation 381A Fistful of Rubies 381MRI: An Enlightening Experience for the C Programmer 382YARV: MRI with a Byte Code Turbocharger 385JRuby: Bending the “J” in the JVM 387Rubinius 388In the Wild 389Staying Out of Trouble 389Wrapping Up 390Chapter 31: Keep an Open Mind to Go with Those Open Classes 391Appendix: Going Further 393Index 397

    Betyg & recensioner

    3/5