- Now that we have a skeleton for our code,…let's use what we know about CSV parsing…to get the course data out of the CSV…file and into our Curriculum-Maker class.…So we're gonna do it here in this step,…we're gonna add the course data.…But before we do that, let's jump over to…Curriculum-Maker and let's actually write a new method here.…This new method is gonna be called…"add course data", and we'll pass in a file path to it.…We already know how to work with CSV, we've…already required it up here, so all we…have to do is call courses = CSV.read,…and give it that file path.…
We'll have to figure out how to pass the…correct file path in a moment.…But, let's take the additional step here…of adding this to our course data.…Before we actually put it in the data,…remember there's a header on each of these.…If we look at first semester,…you'll see this is actually a header row.…We want to keep that header, we want to know…what it is, but we don't want it with all…of the rest of the course data.…So I'm gonna pull it out by calling…
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
-
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: Parsing course data