This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your Name: Chris Lake | |
Github Username: Chhhris | |
Blog Url (if you don't already have a blog it will be githubusername.github.io): http://chhhris.tumblr.com/ | |
Tagline: Hacker in Residence | |
Profile Picture (something normal, a headshot, of a good reusable size that can be easily cropped): http://bit.ly/132Fv5q | |
Treehouse Account: teamtreehouse.com/chhhris | |
CoderWall Account: https://coderwall.com/chhhris | |
CodeSchool Account: http://www.codeschool.com/users/chhhris | |
Favorite Websites: Evernote.com, Instapaper.com, AVC.com | |
Previous Work Experience: Product Manager & VP Strategy, Unigo.com; Analyst, McKinsey & Company Investment Office |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
round flat object = "Plate" | |
long silver object = "Knife" | |
sharp pointy end of Knife = "Knife-Blade" | |
round thick end of Knife, opposite Knife-Blade = "Knife-Handle" | |
clear round glass jar with red goo insde = "Jelly" | |
clear round plastic jar with brown mush inside = "Peanut-Butter" | |
soft rectangular brown object = "Loaf-of-Bread" | |
alien = "You" | |
appendage at end of alien's arm = "Hand" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
round flat object = "Plate" | |
long silver object = "Knife" | |
sharp pointy end of Knife = "Knife-Blade" | |
round thick end of Knife, opposite Knife-Blade = "Knife-Handle" | |
clear round glass jar with red goo insde = "Jelly" | |
clear round plastic jar with brown mush inside = "Peanut-Butter" | |
soft rectangular brown object = "Loaf-of-Bread" | |
alien = "You" | |
appendage at end of alien's arm = "Hand" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS projects; | |
DROP TABLE IF EXISTS category; | |
DROP TABLE IF EXISTS users; | |
DROP TABLE IF EXISTS pledges; | |
CREATE TABLE projects ( | |
id int, | |
user_id int, | |
category_id int, | |
title text, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# write an expression that returns true by using == | |
2 == 1 + 1 | |
# write an expression that returns false using == | |
2 == 1 + 3 | |
# write an expression that returns true using != | |
1 != 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assignment.rb | |
# FizzBuzz - The Programmer's Stairway to Heaven | |
# Define the fizzbuzz method to do the following: 10pts | |
# Use the modulo % method (divisible by) | |
# 2 % 2 #=> true | |
# 1 % 2 #=> false | |
# If a number is divisible by 3, puts "Fizz". | |
# If a number is divisible by 5, puts "Buzz". | |
# If a number is divisible by 3 and 5, puts "FizzBuzz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jukebox.rb | |
class Jukebox | |
attr_accessor :songs | |
def initialize(songs) | |
@songs = songs | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Construct an array with your favorite foods. It should have at least 5 elements. | |
fav_foods = ["penne pasta with garlic and oil", "yellow cherries", "milk shakes", "french fries", "bacon cheeseburgers"] | |
# Write a puts which returns your most favorite food out of the array. | |
fav_foods[4] | |
# Construct an array with the colors of the rainbow (ROYGBIV) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Hashes for the following use-cases. | |
# A movie collection that organizes by genres | |
movies { | |
:genre1 => ["movie title 1", "movie title 2", "movie title 3"], | |
:genre2 => ["movie title 1", "movie title 2", "movie title 3"], | |
:genre3 => ["movie title 1", "movie title 2", "movie title 3"], | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chain at least 5 method calls to an object. Reduce this operation one chain at a time. | |
puts "rotator dad rotator".reverse.slice(8,3).capitalize.slice(0,0).concat("Father's Day is this weekend.") | |
# Don't just use the methods below, make up your own chain and try to see if you can do something fun with Ruby like in the example. | |
puts "rotator dad rotator".reverse | |
# #=> rotator dad rotator | |
puts "rotator dad rotator".reverse.slice(8,3) |
OlderNewer