A Practical Introduction to TDD Using Problem and Solution Domain Analysis
Learn the basics of test driven development (TDD) using Ruby. You will carry out problem domain analysis, solution domain analysis, designing test cases, and writing tests first. These fundamental concepts will give you a solid TDD foundation to build upon. Test Driven Development in Ruby is written more » by a developer for developers.
The concepts are first explained, then a coding demo illustrates how to apply the theory in practice. At the end of each chapter an exercise is given to reinforce the material. Complete with working files and code samples, you'll be able to work alongside the author, a trainer, by following the material in this book.
What You Will Learn
* Carry out problem domain analysis, solution domain analysis, designing test cases, and writing tests first
* Use assertions
* Discover the structure of a test and the TDD cycle
* Gain an understanding of minimal implementation, starter test, story test, and next test
* Handle refactoring using Ruby
* Hide implementation details
* Test precisely and concretely
* Make your code robust
Who This Book Is For
Experienced Ruby programmers or web developers with some prior experience with Ruby. « less
From Novice to Professional
Learn the principles behind object-oriented programming and within a few chapters create a fully functional Ruby application. You'll also gain a basic understanding of many ancillary technologies such as databases, XML, web frameworks, and networking - some of which are needed as part of a fully functioning more » Ruby application.
Based on the bestselling first and second editions, Beginning Ruby, Third Edition is a leading guide to learn Ruby from the ground up. The new edition of this book provides the same excellent introduction to Ruby as the previous editions plus updates for the newest version of Ruby 2.3. This book can also be used as a textbook or companion to a textbook on beginning Ruby programming.
The light and agile Ruby programming language remains a very popular open source scripting option for developers building today's web and even some enterprise applications. And, now, Ruby also has applications using the Raspberry Pi, popular among hobbyists and makers. Many former Java developers still use Ruby on Rails today, the most popular framework for building Ruby applications.
What You'll Learn
* What are the fundamentals of Ruby and its object-oriented building blocks
* How to work with Ruby libraries, gems, and documentation
* How to work with files and databases
* How to write and deploy Ruby applications
* What are the various Ruby web frameworks and how to use them
* How to do network programming with Ruby and more
Who This Book Is For
This book is for beginning programmers, programmers new to Ruby, and web developers interested in learning and knowing the foundations of the Ruby programming language. « less
Deliver Scalable Web Apps Using the JVM
Deploy using the JVM's high performance while building your apps in the language you love. This book introduces you to three JRuby deployment strategies that give you the performance and scalability you need, while you use a language designed for rapid development. Explore common deployment scenarios, more » including consolidating an MRI-based Ruby deployment onto a single JVM process and porting a Rails application to JRuby, getting it into production, and keeping it running. This new edition has new chapters on Puma, performance tuning, and Java integration, and is updated to the latest versions of JRuby 9k, Rails 4, and JDK 8.
JRuby is a fast, scalable, and powerful JVM language with all the benefits of a traditional Ruby environment. JRuby deployments have fewer moving parts and consume less memory than traditional Ruby. With this book, you can now use JRuby in the real world to build high-performance, scalable applications.
Deploying your apps on the JVM requires some new approaches. Start by creating a JRuby microservice that takes advantage of the JVM's native concurrency. Then use Docker to build a virtual production environment that's a stable, reproducible place to explore JRuby deployment. Next, port an existing Rails application to JRuby, preparing the app to take advantage of the JVM platform--all while keeping everything that's friendly and familiar to Ruby developers. Deploy the Rails app to Docker with a multi-threaded Puma server to Heroku or your own private cloud.
Take advantage of powerful Java libraries. See how JRuby fits into the enterprise by switching your app to use TorqueBox, an all-in-one JRuby environment that includes built-in support for messaging, scheduling, and daemons--perfect for handling the big jobs. Finally, take a deep dive into JVM performance tuning and set up a continuous deployment environment with Travis CI.
What You Need:
To run the examples in this book, you'll need a computer that can run the Java Virtual Machine and a connection to the Internet. « less
A Problem-Solution Approach
Solve your Ruby programming problems that occur during your day-to-day scripting work. This book contains a varied selection of practical and interesting code recipes designed to make your coding life easier. Ruby Recipes includes solutions to problems in working with data, handling exceptions, writing more » blocks, and using regular expressions.
This book provides ready scripts for both simple complex scripting tasks, which you can use readily or with only minor modifications. These scripts cover areas such as collections, classes and structures, functional programming, and log handling. With these handy recipes at your fingertips, you will be able to solve those niggling problems and become even more efficient.
What You Will Learn
* Install and run Ruby
* Read and write data
* Write functions
* Work with arrays, ranges, hashes, and iterators
* Handle dates and time
* Process XML as text
* Master OOP concepts such as classes, objects, subclassing, and inheritance
* Connect to databases
Who This Book Is For
Programmers new to Ruby, and web developers interested in knowing the foundations of the language. « less
What will you learn from this book?
What’s all the buzz about this Ruby language? Is it right for you? Well, ask yourself: are you tired of all those extra declarations, keywords, and compilation steps in your other language? Do you want to be a more productive programmer? Then you’ll love Ruby. With more » this unique hands-on learning experience, you’ll discover how Ruby takes care of all the details for you, so you can simply have fun and get more done with less code.
Why does this book look so different?
Based on the latest research in cognitive science and learning theory, Head First Ruby uses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works. « less
Why spend time on coding problems that others have already solved when you could be making real progress on your Ruby project? This updated cookbook provides more than 350 recipes for solving common problems, on topics ranging from basic data structures, classes, and objects, to web development, distributed more » programming, and multithreading.
Revised for Ruby 2.1, each recipe includes a discussion on why and how the solution works. You’ll find recipes suitable for all skill levels, from Ruby newbies to experts who need an occasional reference. With Ruby Cookbook, you’ll not only save time, but keep your brain percolating with new ideas as well.
* Data structures including strings, numbers, date and time, arrays, hashes, files and directories
* Using Ruby’s code blocks, also known as closures
* OOP features such as classes, methods, objects, and modules
* XML and HTML, databases and persistence, and graphics and other formats
* Web development with Rails and Sinatra
* Internet services, web services, and distributed programming
* Software testing, debugging, packaging, and distributing
* Multitasking, multithreading, and extending Ruby with other languages « less
Why Ruby is Slow, and How to Fix It
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 more » 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. « less
Updated for Ruby 2.2, this handy reference offers brief yet clear explanations of Ruby’s core elements—from operators to blocks to documentation creation—and highlights the key features you may work with every day. Need to know the correct syntax for a conditional? Forgot the name of that String method? more » This book is organized to help you find the facts fast.
Ruby Pocket Reference, 2nd Edition is ideal for experienced programmers who are new to Ruby. Whether you’ve come to Ruby because of Rails, or you want to take advantage of this clean, powerful, and expressive language for other applications, this reference will help you easily pinpoint the information you need.
You’ll find detailed reference material for:
* Keywords, operators, comments, numbers, and symbols
* Variables, pre-defined global variables, and regular expressions
* Conditional statements, method use, classes, and exception handling
* Methods for the BasicObject, Object, Kernel, String, Array, and Hash classes
* Time formatting directives
* New syntax since Ruby 1.9 « less
Program Like the Ruby Pros (Facets of Ruby)
Write powerful Ruby code that is easy to maintain and change. With metaprogramming, you can produce elegant, clean, and beautiful programs. Once the domain of expert Rubyists, metaprogramming is now accessible to programmers of all levels. This thoroughly revised and updated second edition of the bestselling more » Metaprogramming Ruby explains metaprogramming in a down-to-earth style and arms you with a practical toolbox that will help you write your best Ruby code ever.
Dig under the surface and explore Ruby's most advanced feature: a collection of techniques and tricks known as metaprogramming. In this book, you'll learn metaprogramming as an essential component of Ruby and discover the deep, non-obvious details of the language. Once you understand the tenets of Ruby, including the object model, scopes, and singleton classes, you're on your way to applying metaprogramming both in your daily work assignments and in your fun, after-hours projects. « less
Ruby Quick Syntax Reference is a condensed code and syntax reference to the Ruby scripting language. It presents the essential Ruby syntax in a well-organized format that can be used as a handy reference.
You won't find any technical jargon, bloated samples, drawn out history lessons, or witty stories more » in this book. What you will find is a language reference that is concise, to the point and highly accessible. The book is packed with useful information and is a must-have for any Ruby programmer.
This book is a quick, handy pocket syntax reference for experienced Ruby programmers, and a concise, easily-digested introduction for other programmers new to Ruby. « less