reklama - zainteresowany?

Ruby Best Practices. Increase Your Productivity - Write Better Code - Helion

Ruby Best Practices. Increase Your Productivity - Write Better Code
ebook
Autor: Gregory T Brown
ISBN: 978-05-965-5581-8
stron: 328, Format: ebook
Data wydania: 2009-06-11
Księgarnia: Helion

Cena książki: 101,15 zł (poprzednio: 128,04 zł)
Oszczędzasz: 21% (-26,89 zł)

Dodaj do koszyka Ruby Best Practices. Increase Your Productivity - Write Better Code

Tagi: Programowanie | Ruby - Programowanie

How do you write truly elegant code with Ruby? Ruby Best Practices is for programmers who want to use Ruby as experienced Rubyists do. Written by the developer of the Ruby project Prawn, this concise book explains how to design beautiful APIs and domain-specific languages with Ruby, as well as how to work with functional programming ideas and techniques that can simplify your code and make you more productive. You'll learn how to write code that's readable, expressive, and much more.

Ruby Best Practices will help you:

  • Understand the secret powers unlocked by Ruby's code blocks
  • Learn how to bend Ruby code without breaking it, such as mixing in modules on the fly
  • Discover the ins and outs of testing and debugging, and how to design for testability
  • Learn to write faster code by keeping things simple
  • Develop strategies for text processing and file management, including regular expressions
  • Understand how and why things can go wrong
  • Reduce cultural barriers by leveraging Ruby's multilingual capabilities

This book also offers you comprehensive chapters on driving code through tests, designing APIs, and project maintenance. Learn how to make the most of this rich, beautiful language with Ruby Best Practices.

Dodaj do koszyka Ruby Best Practices. Increase Your Productivity - Write Better Code

 

Osoby które kupowały "Ruby Best Practices. Increase Your Productivity - Write Better Code", wybierały także:

  • Learning Java Lambdas
  • Learn Python Programming
  • Building Microservices with Spring
  • Modern C++: Efficient and Scalable Application Development
  • Python: Advanced Guide to Artificial Intelligence

Dodaj do koszyka Ruby Best Practices. Increase Your Productivity - Write Better Code

Spis treści

Ruby Best Practices. Increase Your Productivity - Write Better Code eBook -- spis treści

  • Ruby Best Practices
    • SPECIAL OFFER: Upgrade this ebook with OReilly
    • Foreword
    • Preface
      • Audience
      • About This Book
      • Conventions Used in This Book
      • Using Code Examples
      • Safari Books Online
      • How to Contact Us
      • Acknowledgments
    • 1. Driving Code Through Tests
      • A Quick Note on Testing Frameworks
      • Designing for Testability
      • Testing Fundamentals
        • Well-Focused Examples
        • Testing Exceptions
        • Run the Whole Suite at Once
      • Advanced Testing Techniques
        • Using Mocks and Stubs
        • Testing Complex Output
      • Keeping Things Organized
        • Embedding Tests in Library Files
        • Test Helpers
        • Custom Assertions
      • Conclusions
    • 2. Designing Beautiful APIs
      • Designing for Convenience: Ruports Table() feature
      • Rubys Secret Power: Flexible Argument Processing
        • Standard Ordinal Arguments
        • Ordinal Arguments with Optional Parameters
        • Pseudo-Keyword Arguments
        • Treating Arguments As an Array
      • Rubys Other Secret Power: Code Blocks
        • Working with Enumerable
        • Using Blocks to Abstract Pre- and Postprocessing
        • Blocks As Dynamic Callbacks
        • Blocks for Interface Simplification
      • Avoiding Surprises
        • Use attr_reader, attr_writer, and attr_accessor
        • Understand What method? and method! Mean
          • Question marks
          • Exclamation points
        • Make Use of Custom Operators
      • Conclusions
    • 3. Mastering the Dynamic Toolkit
      • BlankSlate: A BasicObject on Steroids
      • Building Flexible Interfaces
        • Making instance_eval() Optional
        • Handling Messages with method_missing() and send()
        • Dual-Purpose Accessors
      • Implementing Per-Object Behavior
      • Extending and Modifying Preexisting Code
        • Adding New Functionality
        • Modification via Aliasing
        • Per-Object Modification
      • Building Classes and Modules Programmatically
      • Registering Hooks and Callbacks
        • Detecting Newly Added Functionality
        • Tracking Inheritance
        • Tracking Mixins
      • Conclusions
    • 4. Text Processing and File Management
      • Line-Based File Processing with State Tracking
      • Regular Expressions
        • Dont Work Too Hard
        • Anchors Are Your Friends
        • Use Caution When Working with Quantifiers
      • Working with Files
        • Using Pathname and FileUtils
      • The tempfile Standard Library
        • Automatic Temporary Directory Handling
        • Collision Avoidance
        • Same Old I/O Operations
        • Automatic Unlinking
      • Text-Processing Strategies
        • Advanced Line Processing
          • Using Enumerator
          • Tracking line numbers
        • Atomic Saves
      • Conclusions
    • 5. Functional Programming Techniques
      • Laziness Can Be a Virtue (A Look at lazy.rb)
      • Minimizing Mutable State and Reducing Side Effects
      • Modular Code Organization
      • Memoization
      • Infinite Lists
      • Higher-Order Procedures
      • Conclusions
    • 6. When Things Go Wrong
      • A Process for Debugging Ruby Code
      • Capturing the Essence of a Defect
      • Scrutinizing Your Code
        • Utilizing Reflection
        • Improving inspect Output
        • Finding Needles in a Haystack
      • Working with Logger
      • Conclusions
    • 7. Reducing Cultural Barriers
      • m17n by Example: A Look at Rubys CSV Standard Library
      • Portable m17n Through UTF-8 Transcoding
        • Source Encodings
        • Working with Files
        • Transcoding User Input in an Organized Fashion
      • m17n in Standalone Scripts
        • Inferring Encodings from Locale
        • Customizing Encoding Defaults
      • m17n-Safe Low-Level Text Processing
      • Localizing Your Code
      • Conclusions
    • 8. Skillful Project Maintenance
      • Exploring a Well-Organized Ruby Project (Haml)
      • Conventions to Know About
        • What Goes in a README
        • Laying Out Your Library
        • Executables
        • Tests
        • Examples
      • API Documentation via RDoc
        • Basic Documentation Techniques and Guidelines
        • Controlling Output with RDoc Directives
      • The RubyGems Package Manager
        • Writing a Gem::Specification
        • Working with Dependencies
      • Rake: Rubys Built-in Build Utility
      • Conclusions
    • A. Writing Backward-Compatible Code
      • Avoiding a Mess
        • Selective Backporting
        • Version-Specific Code Blocks
        • Compatibility Shims for Common Operations
      • Nonportable Features in Ruby 1.9
        • Pseudo-Keyword Hash Syntax
        • Multisplat Arguments
        • Block-Local Variables
        • Block Arguments
        • New Proc Syntax
        • Oniguruma
        • Most m17n Functionality
      • Workarounds for Common Issues
        • Using Enumerator
        • String Iterators
        • Character Operations
        • Encoding Conversions
      • Conclusions
    • B. Leveraging Rubys Standard Library
      • Why Do We Need a Standard Library?
      • Pretty-Printer for Ruby Objects (pp)
      • Working with HTTP and FTP (open-uri)
      • Working with Dates and Times (date)
      • Lexical Parsing with Regular Expressions (strscan)
      • Cryptographic Hash Functions (digest)
      • Mathematical Ruby Scripts (mathn)
      • Working with Tabular Data (csv)
      • Transactional Filesystem-Based Data Storage (pstore)
      • Human-Readable Data Serialization (json)
      • Embedded Ruby for Code Generation (erb)
      • Conclusions
    • C. Ruby Worst Practices
      • Not-So-Intelligent Design
        • Class Variables Considered Harmful
        • Hardcoding Yourself Into a Corner
        • When Inheritance Becomes Restrictive
      • The Downside of Cleverness
        • The Evils of eval()
        • Blind Rescue Missions
        • Doing method_missing Wrong
      • Conclusions
    • Index
    • About the Author
    • Colophon
    • SPECIAL OFFER: Upgrade this ebook with OReilly

Dodaj do koszyka Ruby Best Practices. Increase Your Productivity - Write Better Code

Code, Publish & WebDesing by CATALIST.com.pl



(c) 2005-2024 CATALIST agencja interaktywna, znaki firmowe należą do wydawnictwa Helion S.A.