Join Kevin Skoglund for an in-depth discussion in this video Accessing peripherals problem, part of Code Clinic: Ruby.
- Hello, and welcome to Code Clinic. My name is Kevin Skoglund, Code Clinic is a monthly course where a unique problem is introduced to a collection of lynda.com authors, in response, each author will create a solution using their programming language of choice. You can learn several things from Code Clinic. Different approaches to solving a problem. The pros and cons of different languages. And some tips and trips to incorporate into your own coding practices. This month, the problem is to create a musical instrument controlled by the mouse.
Move the mouse up and down to change the pitch. Move it side to side to change the volume. The instrument will be silent until we click and hold one of the mouse buttons. Letting go of the buttons will turn off the musical tone. It's a simple request, but because it requires access to the mouse, it may be difficult or even impossible in some languages. In all cases, we'll explore some ways to solve the problem and learn why they might not work. Thomas Edison observed, "Negative results are "just what I want, they're just as valuable "to me as positive results, I can never find the thing "that does the job best until I find the ones that don't." You may want to take some time to try to solve this problem for yourself in Ruby.
In the next videos, I'll explain how I answered this challenge.
Author
Updated
12/16/2014Released
7/15/2014Kevin 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.
Skill Level Intermediate
Duration
Views
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 https://github.com/oneclick/
Q: Why can't I access the Lake Pend Orielle site (http://lpo.dt.navy.mil)?
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 lynda.com members outside of the U.S
Related Courses
-
Ruby Essential Training
with Kevin Skoglund6h 57m Beginner -
Ruby on Rails 4 Essential Training
with Kevin Skoglund12h 41m Beginner -
Code Clinic: PHP
with David Powers4h 44m Intermediate
-
Introduction
-
Welcome1m 3s
-
-
Problem One: Statistical Analysis
-
Overview of my solution2m 29s
-
Accepting user input7m 59s
-
Validating user input6m 59s
-
Retrieving remote data8m 29s
-
Data calculations6m 30s
-
Output results3m 57s
-
API11m 46s
-
Problem Two: Image Analysis
-
Hints, tips, and tricks2m 53s
-
Overview of my solution3m 51s
-
ImageMatcher12m 19s
-
Matching exact pixels13m 11s
-
Matching similar pixels6m 18s
-
Determining the best match5m 30s
-
Optimizations6m 53s
-
Matching with OpenCV8m 21s
-
Problem Three: Eight Queens
-
Eight Queens problem1m 46s
-
Hints, tips, and tricks3m 54s
-
Overview of my solution5m 55s
-
Queen and board classes6m 10s
-
Displaying the board7m 1s
-
Determining safe positions6m 48s
-
Using loops7m 8s
-
Loops with backtracking5m 12s
-
Recursion primer3m 45s
-
Using recursion6m 52s
-
Further exercises3m 56s
-
-
Problem Four: Accessing Peripherals
-
Hints, tips, and tricks3m 20s
-
Overview of my solution5m 43s
-
Installing Gosu4m 31s
-
Creating PitchMaker9m 7s
-
Adding an indicator9m 12s
-
Changing volume4m 36s
-
Changing pitch4m 54s
-
Problem Five: Recursion and Directories
-
Introduction2m 6s
-
Hints, tips, and tricks3m 15s
-
Overview of my solution2m 54s
-
Making a plan5m 18s
-
Finding images with recursion10m 37s
-
Finding images a simpler way3m 21s
-
Install exiftools2m 21s
-
Inspect images for metadata7m 33s
-
Organize images by caption8m 26s
-
-
Problem Six: Building the Web
-
A templating problem1m 31s
-
Hints, tips, and tricks1m 35s
-
Overview of my solution3m 12s
-
Parsing CSV files6m 9s
-
ERB templating9m 2s
-
CurriculumMaker5m 56s
-
Parsing course data3m 42s
-
Creating an ERB template10m 15s
-
Using the ERB template4m 15s
-
- Mark as unwatched
- Mark all as unwatched
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.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Accessing peripherals problem