Learn your way! Get started

Ruby, Part 2 of 6: Variables and Data Structures

with expert Jordan Hudgens


Watch trailer


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 5/27/2016
Level Beginner
Runtime 1h 47m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

In this course, Ruby expert Jordan Hudgens examines the basic building blocks of the program and dives deep on its various data structures such as arrays. He will also discuss how Ruby uses dynamic typecasting and teach you how to use the struct class to encapsulate data with methods and behaviors. With a better understanding of data structures in place, Hudgens will then walk you through how to automate tasks in Ruby such as calculating sums.

Prerequisites

You should be familiar with basic text editing in a Windows or Linux environment. No prior knowledge of programming is assumed.

Learning Paths

This course is part of the following LearnNowOnline SuccessPaths™:
Ruby Development

Meet the expert

Jordan Hudgens has certifications for Ruby on Rails, Thinkful; Ruby on Rails, Bloc.io; Front End Development, Thinkful; and AngularJS, Thinkful. He is currently vice president of engineering for TRACKR in Midland, Texas and is working on his PhD in Computer Science from Texas Tech. In addition to Ruby, Jordan works with PHP, JavaScript, MySQL, Postgres, CSS3, C, C++, C#, Objective-C, and Python. He also works with the frameworks Rails (Ruby), Zend (PHP), and Django (Python), plus the libraries AngularJS, jQuery, and Backbone.js.

Course outline



Variables and Data Structures

Variables (21:51)
  • Introduction (00:24)
  • Dynamic Data Types (02:35)
  • Demo: Declaring Variables (06:21)
  • Variable Type Casting (02:11)
  • Demo: Type Casting (04:23)
  • Variable Scope (01:25)
  • Demo: Variable Scope (04:09)
  • Summary (00:20)
Arrays and Structs (21:42)
  • Introduction (01:09)
  • Arrays (07:01)
  • Demo: Arrays (04:49)
  • Structs (03:36)
  • Demo: Structs (04:45)
  • Summary (00:18)
Hashes (17:49)
  • Introduction (00:19)
  • Hashes (04:24)
  • Demo: Create a Hash (05:50)
  • Hash Methods (02:18)
  • Demo: Hash Methods (04:36)
  • Summary (00:20)

Loops and Enumerable Methods

Loops (23:13)
  • Introduction (00:18)
  • While Loop (02:39)
  • Demo: While Loop (02:55)
  • Each Loop (04:25)
  • Demo: Each Loop (06:10)
  • Generic Loop (02:32)
  • Demo: Generic Loop (03:59)
  • Summary (00:13)
Map, Inject, and Permutation (22:33)
  • Introduction (00:19)
  • Map and Collect (03:38)
  • Demo: Map (05:13)
  • Inject and Reduce (03:15)
  • Demo: Inject (04:08)
  • Permutation (02:36)
  • Demo: Permutation (03:04)
  • Summary (00:17)