From the course: Code Clinic: Ruby
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Hints, tips, and tricks
- In this movie, I'll give you some guidance that can help you to approach this challenge, especially if you decide that you want to try it on your own. The challenge is to use the computer's mouse to affect sound output. We're going to need code to interface with the mouse, and we're going to need code to interface with the sound card, to allow for sound output. Ruby, on its own, does not have built-in interfaces for parts of your computer, like the mouse and the sound card. Typically, those parts of your computer have a driver, which the operating system uses in order to communicate with them. That driver is usually written in C, because C is very fast, and speed matters for something that's that fundamental. Anything can communicate with those drivers, as long as it can speak their language. So, what we need is a way for Ruby to communicate with those C drivers, and Ruby gems will allow us to do that. Ruby gems can contain both Ruby code and the C code that we'll need. When…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.