Eloquent Ruby

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.

 

 

Service-Oriented Design with Ruby and Rails

Ruby on Rails deployments are growing, and Rails is increasingly being adopted in larger environments. Today, Rails developers and architects need better ways to interface with legacy systems, move into the cloud, and scale to handle higher volumes and greater complexity. In Service-Oriented Design with Ruby and Rails Paul Dix introduces a powerful, services-based design approach geared toward overcoming all these challenges. Using Dix’s techniques, readers can leverage the full benefits of both Ruby and Rails, while overcoming the difficulties of working with larger codebases and teams.

Dix demonstrates how to integrate multiple components within an enterprise application stack; create services that can easily grow and connect; and design systems that are easier to maintain and upgrade. Key concepts are explained with detailed Ruby code built using open source libraries such as ActiveRecord, Sinatra, Nokogiri, and Typhoeus. The book concludes with coverage of security, scaling, messaging, and interfacing with third-party services.

Service-Oriented Design with Ruby and Rails will help you

  • Build highly scalable, Ruby-based service architectures that operate smoothly in the cloud or with legacy systems
  • Scale Rails systems to handle more requests, larger development teams, and more complex code bases
  • Master new best practices for designing and creating services in Ruby
  • Use Ruby to glue together services written in any language
  • Use Ruby libraries to build and consume RESTful Web services
  • Use Ruby JSON parsers to quickly represent resources from HTTP services
  • Write lightweight, well-designed API wrappers around internal or external services
  • Discover powerful non-Rails frameworks that simplify Ruby service implementation
  • Implement standards-based enterprise messaging with Advanced Message Queuing Protocol (AMQP)
  • Optimize performance with load balancing and caching
  • Provide for security and authentication

The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends

You’ll get started right away with RSpec 2 and Cucumber by developing a simple game, using Cucumber to express high-level requirements in language your customer understands, and RSpec to express more granular requirements that focus on the behavior of individual objects in the system. You’ll learn how to use test doubles (mocks and stubs) to control the environment and focus the RSpec examples on one object at a time, and how to customize RSpec to „speak“ in the language of your domain.

You’ll develop Rails 3 applications and use companion tools such as Webrat and Selenium to express requirements for web applications both in memory and in the browser. And you’ll learn to specify Rails views, controllers, and models, each in complete isolation from the other.

Whether you’re developing applications, frameworks, or the libraries that power them, The RSpec Book will help you write better code, better tests, and deliver better software to happier users.

Free eBook: Clever Algorithms

The book „Clever Algorithms: Nature-Inspired Programming Recipes“ by Jason Brownlee PhD describes 45 algorithms from the field of Artificial Intelligence. All algorithm descriptions are complete and consistent to ensure that they are accessible, usable and understandable by a wide audience.

5 Reasons To Read:

  1. 45 algorithms described.
  2. Designed specifically for Programmers, Research Scientists and Interested Amateurs.
  3. Complete code examples in the Ruby programming language.
  4. Standardized algorithm descriptions.
  5. Algorithms drawn from the popular fields of Computational Intelligence, Metaheuristics, and Biologically Inspired Computation.

Table of Contents

  1. Background
    1. Introduction: What is AI, Problem Domains, Unconventional Optimization, Book Organization, How to Read this Book, Further Reading
  2. Algorithms
    1. Stochastic Algorithms: Random Search, Adaptive Random Search, Stochastic Hill Climbing, Iterated Local Search, Guided Local Search, Variable Neighborhood Search, Greedy Randomized Adaptive Search, Scatter Search, Tabu Search, Reactive Tabu Search.
    2. Evolutionary Algorithms: Genetic Algorithm, Genetic Programming, Evolution Strategies, Differential Evolution, Evolutionary Programming, Grammatical Evolution, Gene Expression Programming, Learning Classifier System, Non-dominated Sorting Genetic Algorithm, Strength Pareto Evolutionary Algorithm.
    3. Physical Algorithms: Simulated Annealing, Extremal Optimization, Harmony Search, Cultural Algorithm, Memetic Algorithm.
    4. Probabilistic Algorithms: Population-Based Incremental Learning, Univariate Marginal Distribution Algorithm, Compact Genetic Algorithm, Bayesian Optimization Algorithm, Cross-Entropy Method.
    5. Swarm Algorithms: Particle Swarm Optimization, Ant System, Ant Colony System, Bees Algorithm, Bacterial Foraging Optimization Algorithm.
    6. Immune Algorithms: Clonal Selection Algorithm, Negative Selection Algorithm, Artificial Immune Recognition System, Immune Network Algorithm, Dendritic Cell Algorithm.
    7. Neural Algorithms: Perceptron, Back-Propagation, Hopfield Network, Learning Vector Quantization, Self-Organizing Map.
  3. Extensions
    1. Advanced Topics: Programming Paradigms, Devising New Algorithms, Testing Algorithms, Visualizing Algorithms, Problem Solving Strategies, Benchmarking Algorithms
  4. Appendix
    1. Ruby: Quick-Start Guide

Download: http://www.cleveralgorithms.com/

Ruby on Rails 3 Tutorial Livelessons Bundle: Learn Rails by Example

Ruby on Rails 3 Tutorial LiveLessons is your complete video guided tour of modern Rails web development! Top Rails expert and author Michael Hartl walks you through the entire process: installing and setting up Rails, designing Rails applications with MVC and REST, building dynamic pages, coding effectively in Ruby, implementing registration and authentication, adding social features, even testing and deployment.

Just watch and learn: You’ll find expert insight, modern best practices, and step-by-step instructions for solving real-world problems!

  • LiveLessons are video courses that are organized into short, self-contained lessons–you’ll learn key skills in as little as [shortest lesson time to come] minutes
  • Track your progress as you follow clearly defined learning objectives
  • Follow along as your instructor shows exactly how to get great results in your real-world environment

Ruby on Rails 3 Tutorial: Learn Rails by Example

Using Rails 3, developers can build web applications of exceptional elegance and power. Although its remarkable capabilities have made Ruby on Rails one of the world’s most popular web development frameworks, it can be challenging to learn and use. Ruby on Rails™ 3 Tutorial is the solution. Leading Rails developer Michael Hartl teaches Rails 3 by guiding you through the development of your own complete sample application using the latest techniques in Rails web development.

Drawing on his experience building RailsSpace, Insoshi, and other sophisticated Rails applications, Hartl illuminates all facets of design and implementation—including powerful new techniques that simplify and accelerate development.

You’ll find integrated tutorials not only for Rails, but also for the essential Ruby, HTML, CSS, JavaScript, and SQL skills you’ll need when developing web applications. Hartl explains how each new technique solves a real-world problem, and he demonstrates this with bite-sized code that’s simple enough to understand, yet novel enough to be useful. Whatever your previous web development experience, this book will guide you to true Rails mastery.

 

This book will help you

  • Install and set up your Rails development environment
  • Go beyond generated code to truly understand how to build Rails applications from scratch
  • Learn Test Driven Development (TDD) with RSpec
  • Effectively use the Model-View-Controller (MVC) pattern
  • Structure applications using the REST architecture
  • Build static pages and transform them into dynamic ones
  • Master the Ruby programming skills all Rails developers need
  • Define high-quality site layouts and data models
  • Implement registration and authentication systems, including validation and secure passwords
  • Update, display, and delete users
  • Add social features and microblogging, including an introduction to Ajax
  • Record version changes with Git and share code at GitHub
  • Simplify application deployment with Heroku
 
 

RailsTutorial.org: Michael Hartl’s awesome new Rails TutorialThe Ruby on Rails3 Tutorial: Learn Rails by Example by Michael Hartl has become a must read for developers learning how to build Rails apps.

—Peter Cooper, editor of Ruby Inside

Very detailed and hands-on Rails Tutorial!

Great job! I’m learning Rails, and found your tutorial to be one of the most detailed and hands-on guides. Besides many details of Rails, it also taught me about Git, Heroku, RSpec, Webrat, and most important (at least to me), it emphasized the Test-Driven Development (TDD) methodology. I learned a lot from your tutorial. Keep up the good job! Thanks so much for sharing it.

—Albert Liu, senior manager, Achievo Corporation.

Ruby on Rails Tutorial is the best!

Just wanted to say that your Ruby on Rails tutorial is the best! I’ve been trying for a while to wrap my head around Rails. Going through your tutorial, I’m finally feeling comfortable in the Rails environment. Your pedagogical style of gradually introducing more complex topics while at the same time giving the reader the instant gratification and a sense of accomplishment with working examples really works for me. I also like the tips and suggestions that give me a sense of learning from a real Rails insider. Your e-mail response to a problem I ran into is an example of your generous sharing of your experience.

—Ron Bingham, CEO, SounDBuytz

I love the writing style of the Rails Tutorial

I love the writing style of the Rails Tutorial, and there is so much content that is different from other Rails books out there, making it that much more valuable…Thanks for your work!

—Allen Ding

Ruby on Rails 3: Das Entwickler-Handbuch

Das Buch von Hussein und Tanja „Ruby on Rails 3: Das Entwickler-Handbuch“ erscheint im April in einer neuen und aktualisieren Version.

Einiges hat sich getan: Rails 3 integriert das Ruby-Framework »Merb« und erweitert damit enorm sein Potenzial. Die neue Version bietet so eine viel größere Flexibilität bei der Wahl des Datenbank-, Test- und Template-Frameworks. Die zahlreichen und komplexen Möglichkeiten des Frameworks werden ausführlich behandelt. Dabei bleibt das Buch stets verständlich und praxisbezogen, da Rails anhand mehrerer »Realworld«-Beispiele anschaulich erläutert wird. Alle Beispielapplikationen sind dabei systematisch aufgebaut: von einer einfachen bis zu einer komplexen Anwendung inklusive TestDrivenDevelopment. Tipps und Tricks, eine umfassende Befehlsreferenz und eine Einführung in die Sprache Ruby lassen dann keine Wünsche mehr offen.

The Rails 3 Way

Ruby on Rails strips complexity from the development process, enabling professional developers to focus on what matters most: delivering business value via clean and maintainable code. The Rails™ 3 Way is the only comprehensive, authoritative guide to delivering production-quality code with Rails 3. Pioneering Rails expert Obie Fernandez and a team of leading experts illuminate the entire Rails 3 API, along with the idioms, design approaches, and libraries that make developing applications with Rails so powerful. Drawing on their unsurpassed experience and track record, they address the real challenges development teams face, showing how to use Rails 3 to maximize your productivity.

Using numerous detailed code examples, the author systematically covers Rails 3 key capabilities and subsystems, making this book a reference that you will turn to again and again. He presents advanced Rails programming techniques that have been proven effective in day-to-day usage on dozens of production Rails systems and offers important insights into behavior-driven development and production considerations such as scalability. Dive deep into the Rails 3 codebase and discover why Rails is designed the way it is—and how to make it do what you want it to do.

This book will help you

  • Learn what’s new in Rails 3
  • Increase your productivity as a web application developer
  • Realize the overall joy in programming with Rails
  • Leverage Rails’ powerful capabilities for building REST-compliant APIs
  • Drive implementation and protect long-term maintainability using RSpec
  • Design and manipulate your domain layer using Active Record
  • Understand and program complex program flows using Action Controller
  • Master sophisticated URL routing concepts
  • Use Ajax techniques via Rails 3 support for unobtrusive JavaScript
  • Learn to extend Rails with popular gems and plugins, and how to write your own
  • Extend Rails with the best third-party plug-ins and write your own
  • Integrate email services into your applications with Action Mailer
  • Improve application responsiveness with background processing
  • Create your own non-Active Record domain classes using Active Model
  • Master Rails’ utility classes and extensions in Active Support
Praise for the Previous EditionThis encyclopedic book is not only a definitive Rails reference, but an indispensable guide to Software-as-a-Service coding techniques for serious craftspersons. I keep a copy in the lab, a copy at home, and a copy on each of my three e-book readers, and it’s on the short list of essential resources for my undergraduate software engineering course.

—Armando Fox, adjunct associate professor, University of California, Berkeley

Everyone interested in Rails, at some point, has to follow The Rails Way.

—Fabio Cevasco, senior technical writer, Siemens AG, and blogger at H3RALD.com

I can positively say that it’s the single best Rails book ever published to date. By a long shot.

—Antonio Cangiano, software engineer and technical evangelist at IBM

This book is a great crash course in Ruby on Rails! It doesn’t just document the features of Rails, it filters everything through the lens of an experienced Rails developer—so you come our a pro on the other side.

—Dirk Elmendorf, co-founder of Rackspace, and Rails developer since 2005

The key to The Rails Way is in the title. It literally covers the “way” to do almost everything with Rails. Writing a truly exhaustive reference to the most popular Web application framework used by thousands of developers is no mean feat. A thankful community of developers that has struggled to rely on scant documentation will embrace The Rails Way with open arms. A tour de force!

—Peter Cooper, editor, Ruby Inside

In the past year, dozens of Rails books have been rushed to publication. A handful are good. Most regurgitate rudimentary information easily found on the Web. Only this book provides both the broad and deep technicalities of Rails. Nascent and expert developers, I recommend you follow The Rails Way.

—Martin Streicher, chief technology officer, McLatchy Interactive; former editor-in-chief of Linux Magazine

Hal Fulton’s The RubyWay has always been by my side as a reference while programming Ruby. Many times I had wished there was a book that had the same depth and attention to detail, only focused on the Rails framework. That book is now here and hasn’t left my desk for the past month.

—Nate Klaiber, Ruby programmer

As noted in my contribution to the Afterword: “What Is the Rails Way (To You)?,” I knew soon after becoming involved with Rails that I had found something great. Now, with Obie’s book, I have been able to step into Ruby on Rails development coming from .NET and be productive right away. The applications I have created I believe to be a much better quality due to the techniques I learned using Obie’s knowledge.

—Robert Bazinet, InfoQ.com, .NET and Ruby community editor, and founding member of the Hartford, CT, Ruby Brigade

Extremely well written; it’s a resource that every Rails programmer should have. Yes, it’s that good.

—Reuven Lerner, Linux Journal columnist

The Rails™ 3 Way is a comprehensive resource that digs into the new features in Rails 3 and perhaps more importantly, the rationale behind them.
—Yehuda Katz, Rails Core

Beginning Rails 3

Beginning Rails 3 is the practical starting point for anyone wanting to learn how to build dynamic web applications using the latest release of the Rails framework for Ruby. You’ll learn how all of the components of Rails fit together and how you can leverage them to create sophisticated web applications with less code and more joy. This book is particularly well suited to those with little or no experience with web application development, or who have some experience but are new to Rails.

Beginning Rails 3 assumes basic familiarity with web terms and technologies, but doesn’t require you to be an expert. Rather than delving into the arcane details of Rails, the focus is on the aspects of the framework that will become your pick, shovel, and axe. Part history lesson, part introduction to object-oriented programming, and part dissertation on open source software, this title doesn’t just explain how to do something in Rails, it explains why.
* Learn to create Rails web applications from scratch
* Includes a gentle introduction to the Ruby programming language
* Completely updated to include the new features of Rails 3What you’ll learn Rails 3 is a huge new release that includes the combined power of Rails and Merb. Beginning Rails 3 will get you started in learning this new technology and creating dynamic web applications in next to no time.
* Install Rails on a Mac, Windows, or Linux system
* Understand the Model-View-Controller architecture
* Learn the value of databases and how to set up MySQL in Rails
* Get instant feedback on your work by testing in the Rails Console
* Add Ajax and visual effects to create rich user interfaces
* Use and create your own Rails plug-insWho is this book for?
Web developers who want to harness the power of Rails 3 to quickly build dynamic Rich Internet Applications. Anyone who hasn’t used Rails before will be able to learn the basics from this book. About the Apress Beginning Series The Beginning series from Apress is the right choice to get the information you need to land that crucial entry-level job. These books will teach you a standard and important technology from the ground up because they are explicitly designed to take you from „novice to professional.“ You’ll start your journey by seeing what you need to know-but without needless theory and filler. You’ll build your skill set by learning how to put together real-world projects step by step. So whether your goal is your next career challenge or a new learning opportunity, the Beginning series from Apress will take you there-it is your trusted guide through unfamiliar territory!

Rails AntiPatterns: Best Practice Ruby on Rails Refactoring

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