Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Code Clinic: Ruby

with Kevin Skoglund

Video: Welcome

Explore solutions to common Ruby programming challenges, and compare the results with other programming languages, in the Code Clinic series.
Expand all | Collapse all
  1. 3m 48s
    1. Welcome
      1m 7s
    2. What you should know before starting this course
      1m 17s
    3. Using the exercise files
    4. Getting the most from Code Clinic
  2. 52m 41s
    1. Introducing Lake Pend Oreille
      4m 32s
    2. Overview of my solution
      2m 29s
    3. Accepting user input
      7m 59s
    4. Validating user input
      6m 59s
    5. Retrieving remote data
      8m 29s
    6. Data calculations
      6m 30s
    7. Output results
      3m 57s
    8. API
      11m 46s
  3. 1h 2m
    1. Introducing image analysis
      3m 1s
    2. Hints, tips, and tricks
      2m 53s
    3. Overview of my solution
      3m 51s
    4. ImageMatcher
      12m 19s
    5. Matching exact pixels
      13m 11s
    6. Matching similar pixels
      6m 18s
    7. Determining the best match
      5m 30s
    8. Optimizations
      6m 53s
    9. Matching with OpenCV
      8m 21s
  4. 1h 10m
    1. Eight Queens problem
      1m 46s
    2. Hints, tips, and tricks
      3m 54s
    3. Overview of my solution
      5m 55s
    4. Queen and board classes
      6m 10s
    5. Displaying the board
      7m 1s
    6. Determining safe positions
      6m 48s
    7. Using loops
      7m 8s
    8. Loops with backtracking
      5m 12s
    9. Loops with smarter backtracking
      6m 2s
    10. Recursion primer
      3m 45s
    11. Using recursion
      6m 52s
    12. Finding all possible solutions
      5m 46s
    13. Further exercises
      3m 56s
  5. 56m 39s
    1. Accessing peripherals problem
      1m 22s
    2. Hints, tips, and tricks
      3m 20s
    3. Overview of my solution
      5m 43s
    4. Installing Gosu
      4m 31s
    5. Creating PitchMaker
      9m 7s
    6. Adding an indicator
      9m 12s
    7. Starting and stopping the tone
      5m 5s
    8. Changing volume
      4m 36s
    9. Changing pitch
      4m 54s
    10. Piano: Using semitone pitches
      8m 49s
  6. 45m 51s
    1. Introduction
      2m 6s
    2. Hints, tips, and tricks
      3m 15s
    3. Overview of my solution
      2m 54s
    4. Making a plan
      5m 18s
    5. Finding images with recursion
      10m 37s
    6. Finding images a simpler way
      3m 21s
    7. Install exiftools
      2m 21s
    8. Inspect images for metadata
      7m 33s
    9. Organize images by caption
      8m 26s
  7. 50m 42s
    1. A templating problem
      1m 31s
    2. Hints, tips, and tricks
      1m 35s
    3. Overview of my solution
      3m 12s
    4. Parsing CSV files
      6m 9s
    5. ERB templating
      9m 2s
    6. CurriculumMaker
      5m 56s
    7. Parsing course data
      3m 42s
    8. Creating an ERB template
      10m 15s
    9. Using the ERB template
      4m 15s
    10. Savings results to a new file
      5m 5s

please wait ...
Code Clinic: Ruby
Video duration: 0s 5h 42m Intermediate Updated Dec 16, 2014


Many successful programmers know more than just a computer language. They also know how to think about solving problems. They use "computational thinking": breaking a problem down into segments that lend themselves to technical solutions. Code Clinic is a series of six courses where authors solve the same problems using different programming languages. Here, Kevin Skoglund works with Ruby.

Kevin introduces challenges and provides an overview of his solutions in Ruby. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.

Visit other courses in the series to see how to solve the exact same challenges in languages like C#, C++, Java, PHP, and Python.

Ruby Ruby on Rails


Hello, and welcome to Code Clinic for Ruby. My name is Kevin Skoglund, and I'm excited to show you my solutions for the challenges proposed by the Code Clinic authors. In this monthly series, we'll explore creative and efficient ways to use Ruby to solve a range of programming problems. I'll describe some of the unique aspects of working with Ruby, and also show you some tips on how to make your code run faster, be more reliable, as well as to make it more readable.

If you're going to become a better programmer, it's important to study classic problems, so you understand different concepts. And it's important to look at different ways of solving the same problem. If you search the library for Code Clinic, you'll find additional courses by different authors using other languages. Each Code Clinic author solves the exact same set of problems, so you can compare different solutions, as well as the pros and cons of each language. If you're looking for tips on better coding, or trying to decide your next new programming language, you're going to love Code Clinic.

So, let's get started with Code Clinic for Ruby.

Find answers to the most frequently asked questions about Code Clinic: Ruby .

Expand all | Collapse all
please wait ...
Q: I'm running Windows and can't get some of the code shown in the videos to install. Is there something else I need to do?
A: For exercises that compile third-party code, Windows users may need to install the RubyInstaller Development Kit (DevKit).  DevKit is a MSYS/MinGW-based toolkit than enables you to build many of the native C/C++ extensions available for Ruby. DevKit was previously included in the Windows installer, but now requires a separate download and installation. The installation instructions are available at
Q: Why can't I access the Lake Pend Orielle site (

A: The Lake Pend Orielle site is not accessible in some geographical areas. We have contacted the owner of the server to try to resolve this issue.

Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for members outside of the U.S





Don't show this message again
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.

Mark all as unwatched Cancel


You have completed Code Clinic: Ruby.

Return to your organization's learning portal to continue training, or close this page.


Upgrade to View Courses Offline


With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Become a Member and Create Custom Playlists

Join today and get unlimited access to the entire library of online learning video courses—and create as many playlists as you like.

Get started

Already a member?

Log in

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

You started this assessment previously and didn’t complete it.

You can pick up where you left off, or start over.

Resume Start over

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.