Search Results for "ruby-best-practices"

Ruby Best Practices

Ruby Best Practices

Increase Your Productivity - Write Better Code

  • Author: Gregory T Brown
  • Publisher: "O'Reilly Media, Inc."
  • ISBN: 9780596555818
  • Category: Computers
  • Page: 336
  • View: 3402
DOWNLOAD NOW »
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.

Rails AntiPatterns

Rails AntiPatterns

Best Practice Ruby on Rails Refactoring

  • Author: Chad Pytel,Tammer Saleh
  • Publisher: Addison-Wesley Professional
  • ISBN: 9780132660068
  • Category: Computers
  • Page: 336
  • View: 3742
DOWNLOAD NOW »
The Complete Guide to Avoiding and Fixing Common Rails 3 Code and Design Problems As developers worldwide have adopted the powerful Ruby on Rails web framework, many have fallen victim to common mistakes that reduce code quality, performance, reliability, stability, scalability, and maintainability. Rails™ AntiPatterns identifies these widespread Rails code and design problems, explains why they’re bad and why they happen—and shows exactly what to do instead. The book is organized into concise, modular chapters—each outlines a single common AntiPattern and offers detailed, cookbook-style code solutions that were previously difficult or impossible to find. Leading Rails developers Chad Pytel and Tammer Saleh also offer specific guidance for refactoring existing bad code or design to reflect sound object-oriented principles and established Rails best practices. With their help, developers, architects, and testers can dramatically improve new and existing applications, avoid future problems, and establish superior Rails coding standards throughout their organizations. This book will help you understand, avoid, and solve problems with Model layer code, from general object-oriented programming violations to complex SQL and excessive redundancy Domain modeling, including schema and database issues such as normalization and serialization View layer tools and conventions Controller-layer code, including RESTful code Service-related APIs, including timeouts, exceptions, backgrounding, and response codes Third-party code, including plug-ins and gems Testing, from test suites to test-driven development processes Scaling and deployment Database issues, including migrations and validations System design for “graceful degradation” in the real world

Effective Ruby

Effective Ruby

48 Specific Ways to Write Better Ruby

  • Author: Peter J. Jones
  • Publisher: Addison-Wesley Professional
  • ISBN: 0133847063
  • Category: Computers
  • Page: 240
  • View: 6165
DOWNLOAD NOW »
If you’re an experienced Ruby programmer, Effective Ruby will help you harness Ruby’s full power to write more robust, efficient, maintainable, and well-performing code. Drawing on nearly a decade of Ruby experience, Peter J. Jones brings together 48 Ruby best practices, expert tips, and shortcuts—all supported by realistic code examples. Jones offers practical advice for each major area of Ruby development, from modules to memory to metaprogramming. Throughout, he uncovers little-known idioms, quirks, pitfalls, and intricacies that powerfully impact code behavior and performance. Each item contains specific, actionable, clearly organized guidelines; careful advice; detailed technical arguments; and illuminating code examples. When multiple options exist, Jones shows you how to choose the one that will work best in your situation. Effective Ruby will help you systematically improve your code—not by blindly following rules, but by thoroughly understanding Ruby programming techniques. Key features of this concise guide include How to avoid pitfalls associated with Ruby’s sometimes surprising idiosyncrasies What you should know about inheritance hierarchies to successfully use Rails (and other large frameworks) How to use misunderstood methods to do amazingly useful things with collections Better ways to use exceptions to improve code reliability Powerful metaprogramming approaches (and techniques to avoid) Practical, efficient testing solutions, including MiniTest Unit and Spec Testing How to reliably manage RubyGem dependencies How to make the most of Ruby’s memory management and profiling tools How to improve code efficiency by understanding the Ruby interpreter’s internals

Puppet Best Practices

Puppet Best Practices

Design Patterns for Maintainable Code

  • Author: Chris Barbour,Jo Rhett
  • Publisher: "O'Reilly Media, Inc."
  • ISBN: 1491923040
  • Category: Computers
  • Page: 308
  • View: 7178
DOWNLOAD NOW »
If you maintain or plan to build Puppet infrastructure, this practical guide will take you a critical step further with best practices for managing the task successfully. Authors Chris Barbour and Jo Rhett present best-in-class design patterns for deploying Puppet environments and discuss the impact of each. The conceptual designs and implementation patterns in this book will help you create solutions that are easy to extend, maintain, and support. Essential for companies upgrading their Puppet deployments, this book teaches you powerful new features and implementation models that weren’t available in the older versions. DevOps engineers will learn how best to deploy Puppet with long-term maintenance and future growth in mind. Explore Puppet’s design philosophy and data structures Get best practices for using Puppet’s declarative language Examine Puppet resources in depth—the building blocks of state management Learn to model and describe business and site-specific logic in Puppet See best-in-class models for multitiered data management with Hiera Explore available options and community experience for node classification Utilize r10k to simplify and accelerate Puppet change management Review the cost benefits of creating your own extensions to Puppet Get detailed advice for extending Puppet in a maintainable manner

Learning Devise for Rails

Learning Devise for Rails

  • Author: Hafiz Barie Lubis,Nia Mutiara,Giovanni Sakti
  • Publisher: Packt Publishing Ltd
  • ISBN: 1782167056
  • Category: Computers
  • Page: 104
  • View: 1786
DOWNLOAD NOW »
A hands-on, step-by-step guide to using Devise for authentication in Rails.If you are a web developer who is getting started with Rails and you are looking for authentication solutions, then this is the book for you. If you are a current Rails developer who is looking to extend your authentication implementation with capabilities such as authorization and remote authentication, this book will also be great for you.

Ajax Patterns and Best Practices

Ajax Patterns and Best Practices

  • Author: Christian Gross
  • Publisher: Apress
  • ISBN: 9781430201311
  • Category: Computers
  • Page: 416
  • View: 936
DOWNLOAD NOW »
Takes a unique angle on Ajax, providing patterns for application development and best practices for integrating Ajax and REST into rich applications Designed to suit all groups of developers across many platforms, who are interested in the hot new topic of Ajax High demand for Ajax knowledge. Leading technology companies like Google and Yahoo are looking for developers with intimate knowledge of Ajax

Best Practices of Award-Winning Elementary School Principals

Best Practices of Award-Winning Elementary School Principals

  • Author: Sandra Harris
  • Publisher: Corwin Press
  • ISBN: 1452235864
  • Category: Education
  • Page: 216
  • View: 1437
DOWNLOAD NOW »
Using survey results and contributions from 35 award-winning elementary school principals nationwide, this essential resource examines over 100 field-based practices recognized as the best for the elementary school principalship.

Selenium Design Patterns and Best Practices

Selenium Design Patterns and Best Practices

  • Author: Dima Kovalenko
  • Publisher: Packt Publishing Ltd
  • ISBN: 1783982713
  • Category: Computers
  • Page: 270
  • View: 436
DOWNLOAD NOW »
Whether you are an experienced WebDriver developer or someone who was newly assigned a task to create automated tests, this book is for you. Since the ideas and concepts are described in simple terms, no previous experience in computer coding or programming is required.

Practical Ruby Projects

Practical Ruby Projects

Ideas for the Eclectic Programmer

  • Author: Topher Cyll
  • Publisher: Springer Science & Business
  • ISBN: 1430204710
  • Category: Computers
  • Page: 328
  • View: 7208
DOWNLOAD NOW »
Revitalized by Ruby on Rails, the Ruby language continues to grow in popularity. Books like this are necessary to fill the demand. Here is a classic of its kind; required reading for Ruby programmers who have already mastered the basics and want to learn higher level techniques. Practical Ruby Projects presents nine diverse projects that will teach new and innovative techniques in a learn-by-example fashion. They include a turn-based adventure game and a generative music creator. While there are many other Ruby titles, none of them take this unique project-based approach to teaching.

Ruby Performance Optimization

Ruby Performance Optimization

Why Ruby is Slow, and How to Fix It

  • Author: Alexander Dymo
  • Publisher: Pragmatic Bookshelf
  • ISBN: 1680504584
  • Category: Computers
  • Page: 200
  • View: 993
DOWNLOAD NOW »
You don't have to accept slow Ruby or Rails performance. In this comprehensive guide to Ruby optimization, you'll learn how to write faster Ruby code--but that's just the beginning. See exactly what makes Ruby and Rails code slow, and how to fix it. Alex Dymo will guide you through perils of memory and CPU optimization, profiling, measuring, performance testing, garbage collection, and tuning. You'll find that all those "hard" things aren't so difficult after all, and your code will run orders of magnitude faster. This is the first book ever that consolidates all the Ruby performance optimization advice in one place. It's your comprehensive guide to memory optimization, CPU optimization, garbage collector tuning, profiling, measurements, performance testing, and more. You'll go from performance rookie to expert. First, you'll learn the best practices for writing Ruby code that's easy not only on the CPU, but also on memory, and that doesn't trigger the dreaded garbage collector. You'll find out that garbage collection accounts for 80% of slowdowns, and often takes more than 50% of your program's execution time. And you'll discover the bottlenecks in Rails code and learn how selective attribute loading and preloading can mitigate the performance costs of ActiveRecord. As you advance to Ruby performance expert, you'll learn how profile your code, how to make sense out of profiler reports, and how to make optimization decisions based on them. You'll make sure slow code doesn't creep back into your Ruby application by writing performance tests, and you'll learn the right way to benchmark Ruby. And finally, you'll dive into the Ruby interpreter internals to really understand why garbage collection makes Ruby so slow, and how you can tune it up. What You Need: Some version of Ruby. The advice from this book applies to all modern Ruby versions from 1.9 to 2.2. 80% of the material will also be useful for legacy Ruby 1.8 users, and there is 1.8-specific advice as well.