Skip to content

Instantly share code, notes, and snippets.

@icorson3
Created July 28, 2017 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save icorson3/cb7a379226a9d0656ae3905620c37710 to your computer and use it in GitHub Desktop.
Save icorson3/cb7a379226a9d0656ae3905620c37710 to your computer and use it in GitHub Desktop.

Week One - Module 3 Recap

Fork this respository. Answer the questions to the best of your ability. Try to answer them with limited amount of external research. These questions cover the majority of what we've learned this week (which is a TON!).

Note: When you're done, submit a PR.

  1. What is json, what does it stand for, and why is it important?
  2. What kind of object is JSON in Ruby? How do we know it's JSON?
  3. What's the difference between joins and includes in ActiveRecord?
  4. What's an API?
  5. How do we test an internal API (in general)?
  6. What are two different ways to customize your json?
  7. If the the methods below return collections, what object (class) will they return? What kind of objects will be returned inside of that object?
    • .find_by_sql
    • .connection.execute
    • .where
  8. (Security) What is SQL injection? When can it happen? How can you prevent it?
  9. What do you need to do differently when you adding POST, PUT, and DELETE endpoints to your API when using the --api flag when creating a Rails app versus not using the flag?
    • Hint: What class does ApplicationController inherit from when creating a Rails project with the --api flag? What about without the --api flag? What do they do differently? Why?
  10. What's your process for solving advanced SQL or ActiveRecord lookups?

Review

  1. What is an ORM, what does it stand for, and why is it helpful?
  2. How do you create a record in the following table in SQL? In Active Record?
    (Users table with columns first_name, last_name, email, and age)
  3. Given an array numbers = [1,2,3,4,5], find the sum of the doubles of all the numbers.

Self Assessment

Rate yourself on the following scale.
4 I know and understand all these concepts and did not have to look anything up
3 I know and understand most of these concepts but had to look something up
2 I am uncertain about some of these concepts and had to look some things up ^^
1 I am feeling lost about with these concepts and had to look many things up ^^

^^ Please let an instructor know where you'd like support to catch you up.

Week Two - Module 3 Recap

Fork this respository. Answer the questions to the best of your ability. Try to answer them with limited amount of external research. These questions cover the majority of what we've learned this week (which is a TON!).

Note: When you're done, submit a PR.

  1. What's OAuth?
  2. What are some advantages/disadvantages of implementing OAuth?
  3. How many exhanges of information need to take place before a user is authenticated with OAuth?
  4. Why do we want to create services?
  5. Why is it good practice to create PORO's with the data received from an API?
  6. What do we use VCR for? Why is it a good idea to use this tool?

Review

  1. What does HTTP stand for?
  2. How do you create the following table in SQL? In Active Record?
    (Users table with columns first_name, last_name, email, and age)
  3. Writing Files: given a text file located at "/Documents/pizza.txt", write code to read the file from the filesystem, then write a new file at "/Documents/line_count.txt" containing the number of lines in the original file.

Self Assessment

Rate yourself on the following scale.
4 I know and understand all these concepts and did not have to look anything up
3 I know and understand most of these concepts but had to look something up
2 I am uncertain about some of these concepts and had to look some things up ^^
1 I am feeling lost about with these concepts and had to look many things up ^^

^^ Please let an instructor know where you'd like support to catch you up.

Week Three - Module 3 Recap

Fork this respository. Answer the questions to the best of your ability. Try to answer them with limited amount of external research. These questions cover the majority of what we've learned this week (which is a TON!).

Note: When you're done, submit a PR.

  1. What is Multitenancy how does it add value as a multitenancy provider?
  2. How might multitenancy impace your routes/controllers?
  3. What is a strategy for authorization when dealing with multitenancy?
  4. What are some strategies you can use to abide by the one instance variable per controller action rule?

Review

  1. What is a callback? How many of them can you list?
  2. How do you create a Database named Turing in raw SQL and in a Rails environment?
  3. What does a Ruby Class inherit from?

Self Assessment

Rate yourself on the following scale.
4 I know and understand all these concepts and did not have to look anything up
3 I know and understand most of these concepts but had to look something up
2 I am uncertain about some of these concepts and had to look some things up ^^
1 I am feeling lost about with these concepts and had to look many things up ^^

^^ Please let an instructor know where you'd like support to catch you up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment