Skip to content

Instantly share code, notes, and snippets.

@kingcons
kingcons / quiz.md
Last active November 1, 2016 01:53
Quiz 10/15

Section 1 - Top Level Code, Simple Block Usage

ages = [28, 32, 42, 64]
ages.map { |x| x * 2 }
ages.each { |age| puts "Age is: #{age}" }
  1. What is the result of the ages.map call? What about ages.each?
@kingcons
kingcons / quiz.md
Created May 20, 2015 12:57
Quiz - 05/20

QUIZ TIME!!!

Section 1 - Classes & Testing

  1. Where are instance variables visible/in scope?

  2. What is the purpose of unit tests?

  3. Can we call methods on a class anywhere we have an instance of that class?

@kingcons
kingcons / issue.md
Created June 3, 2015 18:10
HW 06-03 (SamplServ)

Tonight, you'll write a simple API with Sinatra that can play Daft Punk samples. One of you should write the API, the other person should write a client for the server with HTTParty.

For more info, see the questions.md!

Work with your teammate (see "Teams") on a shared git repository as follows:

  1. One of you should fork the [samplserv][samplserv] project.
@kingcons
kingcons / tic-tac-toe.md
Created June 15, 2015 00:20
Example Assignment

In this assignment, we'll implement a version of tic-tac-toe that we can play from the command line. You should push what you have by Monday at 8am. Incomplete work that is on time and later refined is preferred to late work that is complete and bug-free.

FAQ (based on questions)

  • I would prefer you submit the script as one file and prompt the user for different options (e.g. computer or human 2nd player, hard mode, etc.)

  • Please do not use Classes for this assignment. It is possible we will revisit it

@kingcons
kingcons / june.rb
Last active April 24, 2022 16:36
Crash Course 2.0
# require 'pry'
WORDS = ["cookies", "bourbon", "dogs", "sunshine", "vacations",
"dictionaries", "georgia"]
## Pieces of data in Hangman:
# Guesses
# Answer
# Turn Count
@kingcons
kingcons / july-crash-course.rb
Created July 22, 2015 00:17
Crash Course for July
require 'pry'
words = [
"buffalo", "sportscar", "coffee", "snazzy",
"childish", "futile", "authoritarian", "fantastic",
"beautiful", "building", "macintosh", "airport"
]
answer = words.sample
turn_count = answer.length
@kingcons
kingcons / crash_course.rb
Created August 19, 2015 00:12
August Crash Course
# Pieces of data in Hangman
# - Answer
# - Guesses
# - Turn Count
require 'pry'
words = ["raining", "downpour", "parking", "tuesday",
"bourbon", "sour", "mash", "capitalism",
"puppies", "unicorns", "disestablishmentarianism"
@kingcons
kingcons / crash_course.rb
Created September 16, 2015 00:05
Crash Course for September
# Gets for input, puts for output
# data to track:
# letters guessed, strings
# turn count, number
# answer, string
# actions in hangman:
# inform user of word length
# take turns until the game ends
@kingcons
kingcons / install.md
Last active April 12, 2018 01:40
Install Party!

Computer Setup

Hey y'all. I want to be sure everyone is ready to roll, so here's are a few things I'd like for you to go ahead and install. Please ask if you have any trouble, or just are curious about why something works the way it does.

After each step, I'll leave a note saying how to check that it was installed properly. Please be sure to run these checks! The most common sorts of errors are commands not completing because your user lacks permission.

If that happens, feel free to flag me down and we'll get it fixed up quick! I'll assume things went smoothly unless I hear otherwise.

@kingcons
kingcons / sketch.md
Created October 14, 2015 20:51
Informal Homework Writeup

Today's homework

The weekend assignment will not be a group project, but today will continue from where you left off yesterday.

Pair up and share a computer, switching off at the keyboard after each commit. Talk through your thought process with your pair and ...

Write API wrappers to: