Book description
This book will provide you with all of the tools you need to be a professional Ruby developer. Starting with the core principles, such as syntax and best practices, and up to advanced topics like metaprogramming and big data analysis.
About This Book
- Provides the core skills required to become a Ruby programmer
- Covers how to use the most popular Ruby Gem libraries
- Includes details on regular expressions
Who This Book Is For
This is a complete course written from the ground up for beginners wanting to gain a solid understanding of the Ruby language. It starts at the beginning with how to install Ruby and work with it on multiple machines, so simply have a computer that's connected to the Internet and you'll be ready.
What You Will Learn
- Learn how to use Ruby code effectively, picking the right tool for the job and not duplicating built-in functionality
- Gain best software development practices, and how to identify and fix common errors
- Absorb core programming skills, such as variables, strings, loops, conditionals, and much more
- Explore object-oriented programming and learn to create modular, reusable code that you can use across projects
- Build 10 practical Ruby programs as you work through the book on topics such as big data analysis and solving Euler equations
In Detail
Ruby is a powerful, general-purpose programming language that can be applied to any task. Whether you are an experienced developer who wants to learn a new language or you are new to programming, this book is your comprehensive Ruby coding guide. Starting with the foundational principles, such as syntax, and scaling up to advanced topics such as big data analysis, this book will give you all of the tools you need to be a professional Ruby developer. A few of the key topics are: object-oriented programming, built-in Ruby methods, core programming skills, and an introduction to the Ruby on Rails and Sinatra web frameworks. You will also build 10 practical Ruby programs.
Created by an experienced Ruby developer, this book has been written to ensure it focuses on the skills you will need to be a professional Ruby developer. After you have read this book, you will be ready to start building real-world Ruby projects.
Style and approach
This is a comprehensive course for learning the Ruby programming language that works methodically through everything that you need to know. It begins with the basics of the language and then works through some complete projects to apply your skills and ensure that you have fully absorbed them and can use them in the real world.
Table of contents
- Preface
- Introduction to the Ruby Programming Language
- Ruby Variables
- Ruby Strings
- Working with Numbers in Ruby
-
Ruby Methods
- Creating methods in Ruby
- What does a Ruby method return?
- What are the differences between class and instance methods in Ruby?
- Ruby proc tutorial
- The Ruby lambda tutorial
- What is the difference between procs and lambdas in Ruby?
- Guide to method arguments in Ruby
- Using splat and optional arguments in Ruby methods
- Summary
- Ruby Iterators and Loops
- Ruby Collections
- Ruby Conditionals
-
Object-Oriented Programming in Ruby
- Introduction to how OOP works
- Ruby OOP development – setters, getters, and methods
- Working with instantiation in Ruby
- Creating an initializer method in a Ruby class
- The working of OOP inheritance
- Overview of private versus public methods
- The working of polymorphism and usage of super
- Dead simple OOP
- SOLID OOP development – the simple responsibility principle
- SOLID OOP development – the open/closed principle guide and example
- SOLID OOP development – the Liskov substitution principle
- SOLID OOP development – the interface segregation principle
- SOLID OOP development – the dependency inversion principle
- Summary
- Working with the Filesystem in Ruby
- Error Handling in Ruby
- Regular Expressions in Ruby
- Searching with grep in Ruby
- Ruby Gems
-
Ruby Metaprogramming
- Metaprogramming introduction
- How to integrate metaprogramming techniques into a custom class
- How to use metaprogramming for opening and customizing the String class
- How Rails use metaprogramming for the find_by method
- Utilizing metaprogramming with method_missing to create methods on the fly
- Incorporating respond_to_missing to conform to metaprogramming best practices
- Implementing metaprogramming with define_method
- Summary
- Ruby Web Frameworks
- Working with APIs in Ruby
-
Ruby Algorithms
- Introduction to sorting algorithms
- Implementing the bubble sort algorithm
- Implementing the quick sort algorithm
- Implementing the merge sort algorithm
- Implementing a prime number counting algorithm
- How to code the power digit sum algorithm
- Implementing a humanize counting algorithm
- Implementing a date algorithm
- How to code a Fibonacci digit counter
- Implementing a permutation algorithm
- Implementing an amicable number algorithm
- Implementing a factorial algorithm
- Implementing an even Fibonacci number algorithm
- Implementing the least common multiple
- Summary
- Machine Learning
Product information
- Title: Comprehensive Ruby Programming
- Author(s):
- Release date: June 2017
- Publisher(s): Packt Publishing
- ISBN: 9781787280649
You might also like
book
Ruby Wizardry
Ruby Wizardry is a modern day fairy tale that teaches programming skills kids can use.
book
Mastering Ruby Closures
The road to Ruby mastery is paved with blocks, procs, and lambdas. To be a truly …
book
Ruby in a Nutshell
Ruby is an absolutely pure object-oriented scripting language written in C and designed with Perl and …
book
Ruby Cookbook, 2nd Edition
Why spend time on coding problems that others have already solved when you could be making …