My Account Log in

2 options

Comprehensive ruby programming : go from beginner to confident programmer / Jordan Hudgens.

Ebook Central Academic Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Hudgens, Jordan, author.
Language:
English
Subjects (All):
Ruby (Computer program language).
Physical Description:
1 online resource (1 volume) : illustrations
Edition:
1st edition
Place of Publication:
Birmingham, [England] ; Mumbai, [India] : Packt, 2017.
System Details:
Mode of access: World Wide Web.
text file
Biography/History:
Hudgens Jordan: Jordan Hudgens is a full-stack developer and the founder of DevCamp and the Bottega Code School. As a developer for over the past 15 years, he specializes in Ruby on Rails, React, Vue. js, and TypeScript with a focus on API development. He has built applications for a wide variety of organizations, including Eventbrite and Quip. He has published and maintains multiple open-source NPM modules that help individuals automate the development process for JavaScript and TypeScript applications. Additionally, he has published over 30 courses, taught 42, 000 students globally, and written several programming books.
Summary:
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...
Contents:
Cover
Copyright
Credits
About the Author
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Chapter 1: Introduction to the Ruby Programming Language
What is Ruby?
Popular sites that use Ruby
Installing Ruby on a computer
Ruby language dashboard
Installing different Ruby versions with RVM
Summary
Chapter 2: Ruby Variables
Using variables in Ruby
Variable code implementation
Printing to the Ruby console
Using puts
Using p
Getting input from the Ruby console using gets and chomp
Code implementation
Variable scope and variable types
Local variables
Global variables
Instance variables
Constants
Class variables
Chapter 3: Ruby Strings
Using strings in Ruby
Missing quotation marks
Printing strings
Storing strings in variables
String interpolation guide for Ruby
What is string interpolation?
String manipulation guide
What is string manipulation?
String manipulation code examples
Method chaining
A practical implementation
Give it a bang!
String substitution guide
Adding a bang
Becoming a block head
Split, strip, and join guides for strings
Using the strip method
Using the split method
Using the join method
Chapter 4: Working with Numbers in Ruby
Integer arithmetic guide
Arithmetic order of operations
Difference between integers and floats
Chapter 5: 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
Proc code example
What is a block?
The Ruby lambda tutorial
Stabby lambdas
What is the difference between procs and lambdas in Ruby?
Argument count
Return behavior
Guide to method arguments in Ruby.
What are method arguments?
Method argument syntax
Method argument code examples
Named arguments
Default argument values
Using splat and optional arguments in Ruby methods
Traditional splat arguments
Keyword-based splat arguments
Optional arguments
Chapter 6: Ruby Iterators and Loops
The while loop guide
The while loop code example
The each iterator method tutorial
The each loop code example
The for...in loops tutorial
Looping over a hash
Nested iterator code example
Using the select method
Using the map method - part 1
The map method code example
Using the map method - part 2
Summing values in an array using the inject method
Chapter 7: Ruby Collections
Using arrays
Deleting items from arrays
Using push and pop for arrays
The Ruby hash tutorial
The hash code example
Deleting elements from a hash
Iterating over a hash for a key or value
Top hash methods in Ruby
Adding elements to a hash
Swapping keys and values
Merging hashes
Converting a hash into an array
Listing all keys
Listing all values
Chapter 8: Ruby Conditionals
The conditionals guide
Real-world use of conditionals
Code example of conditionals
Syntax for the unless conditional
Running Ruby files
The unless conditional code example
Nested if...else conditionals
The if...elsif conditional code example
The conditional workflow
Guide to compound conditionals
Compound conditionals code example
Compounded compound conditionals
Additional conditional operators
Chapter 9: Object-Oriented Programming in Ruby
Introduction to how OOP works
A real-world OOP example
Ruby OOP development - setters, getters, and methods
Working with instantiation in Ruby.
What does instantiation mean? - A real-world example
Connecting the dots
Instantiation code example
Implementing instantiation
Creating an initializer method in a Ruby class
Adding an initializer to a Ruby class
Working with optional values
Using named arguments
Overriding default values
The working of OOP inheritance
Overview of private versus public methods
Private versus public methods
Private method code example
The working of polymorphism and usage of super
So how does polymorphism fit in?
Dead simple OOP
My history with OOP
How does OOP work?
SOLID OOP development - the simple responsibility principle
The single responsibility principle
The SRP in the real world
An SRP example
The class that knew too much
Rule of thumb - no ands allowed
A mailer class
The sales tax class
Why the SRP is important
SOLID OOP development - the open/closed principle guide and example
The open/closed principle definition
A surprisingly challenging task
The open/closed principle example
The naive approach
I don't like change!
A better way
SOLID OOP development - the Liskov substitution principle
The LSP definition
Breaking down the LSP
The LSP example
The problem
The LSP violation
The fix
SOLID OOP development - the interface segregation principle
The ISP definition
The ISP code example
Introducing the moderator
The result
A caveat
SOLID OOP development - the dependency inversion principle
The DIP in the real world
The DIP definition
The DIP code example
Recap
Chapter 10: Working with the Filesystem in Ruby
Creating a file
Ruby File class
Other options you can pass as the second option
Reading files into a program using the File class
Deleting a file
Appending a file.
Building a log file
Chapter 11: Error Handling in Ruby
Error handling tutorial
Error handling - the best practices
Developing a custom error logger in Ruby
Chapter 12: Regular Expressions in Ruby
Regular expression code example
Regex code example
How to validate an IP address using regular expressions
How to develop a wheel of fortune game
Chapter 13: Searching with grep in Ruby
How to use grep in Ruby
How to use grep instead of the select and map methods
Chapter 14: Ruby Gems
Introduction to Ruby gems
How to research Ruby gems
How to research gems
Chapter 15: 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
Why do we need to call super?
Resources
Incorporating respond_to_missing to conform to metaprogramming best practices
Implementing metaprogramming with define_method
Chapter 16: Ruby Web Frameworks
Sinatra web framework development
Introduction to the Ruby on Rails framework
Chapter 17: Working with APIs in Ruby
How to work with APIs in Ruby
How to use the httparty Ruby gem
How to create a custom API connector in Ruby
How to parse an API in Ruby
Chapter 18: Ruby Algorithms
Introduction to sorting algorithms
Bubble sort
Quick sort
Merge sort
Implementing the bubble sort algorithm
Bubble sort code example
Implementing the quick sort algorithm
Explanation of quick sort
Quick sort code example
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
Chapter 19: Machine Learning
Big data analysis
Basic decision tree implementation
Addition of attributes
Addition of training data and its values
Calling the ID3 method
Function of the train method
Addition of the test method
Setting up decision variables
Print the results out
Testing the program
Advantage of decision trees over if...else statements
How to develop a big data analysis application in Ruby
Index.
Notes:
Includes index.
Includes bibliographical references and index.
Description based on online resource; title from PDF title page (ebrary, viewed October 19, 2017).
OCLC:
995052705

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account