Skip to content

Instantly share code, notes, and snippets.

@wewert
Last active May 5, 2017 16:21
Show Gist options
  • Save wewert/8bc8f5dd3563e64c6f49508b1f24aaad to your computer and use it in GitHub Desktop.
Save wewert/8bc8f5dd3563e64c6f49508b1f24aaad to your computer and use it in GitHub Desktop.
Checks for understanding

Mod_2 Skills (1 to 10) Project Management & Professional Skills

8 Career Development Curriculum 8 Employ effective communication in order to facilitate collaboration. (Functional) 7 Apply best practices in project management and Git workflow. (Functional) 3 Effectively contribute to group projects (Functional) 8 Apply good communication practices with pairs, groups, teams etc (Functional) 10 Consistent punctuality to all obligations, meetings, check-ins etc (Mastery) 7 Wireframe project ideas (Functional) 7 Write detailed user stories using the Gherkin Model(Mastery) 4 Understanding and interpreting errors and error messages

4 Where in your code is there error? (Functional) 3 What was the code trying to accomplish when it failed? (Functional) 5 What caused it to fail? (Functional) 5 Using a debugging tool like pry or byebug to sort through the error vs puts driven development” (Functional) 7 Diagram and explain the MVC model

HTTP Fundamentals

7 Request (Functional) 7 URI/URL (Functional) 7 Headers (Familiarity) 7 Body (Familiarity) 7 Response (Functional) 7 Redirect / Render (Mastery) 5 HTTP Status Codes (Functional) 5 State Transfer (Familiarity) 3 Sessions (Functional) 3 Cookies (Functional) 5 Flashes (Mastery) 6 7 HTTP Verbs (Mastery) 5 Describe the HTTP request/response cycle (Mastery) 5 Explain what happens when a client visits a website (Functional) 6 HTML/CSS

Understand basic HTML tags/elements/nodes including but not limited to: 4 Forms 4Divs

(Mastery) 8 Paragraphs

(Mastery) 5 Headers

(Mastery) 5 Lists
    ,
      ,
    1. (Mastery) 3 Tables
      , , , (Mastery) 5 The innate verbs associated with specific tags. link: get (Mastery), button: post (Mastery), form: put (Mastery) 4 Add classes and ids to HTML elements (Mastery) 4 Send params through URL: http://example.com/things?param1=valueOfP1&param2[nested1]=value-of-nested1&param2[nested2]=nested-value-2 (Mastery) 1 Target specific HMTL content with CSS selectors (Mastery) 1 Explain hierarchy/ancestry of HTML (Functional)

      Model Testing

      5 Basic RSpec syntax (Mastery) 1 data preparation/manipulation (Mastery) 4 validation testing (Mastery) 1 relationship testing (Mastery)

      Feature Testing

      8 Basic RSpec syntax (Mastery) 3 Capybara methods (Functional) within, find, visit, page, current_path, have_content, click_on and more (Mastery) SQL

      1 Writing basic SQL select statements (Mastery) 1 Inserts (Functional) 1 Calculation statements (Functional) 1 Joins (Functional) 1 Order (Functional) 1 Group (Familiarity) 5 .schema (Familiarity) 4 Database Planning, Migrations and Relationships

      3 Design database schemas to represent relationships between objects (Functional) 2 Clearly articulate a relational database structure (Functional) 9 one-to-one, one-to-many, many-to-many relationships (Mastery) 1 Rails CLI generator commands (Functional) 1 What methods do we get when we set up relationships? (Mastery) 3 Presence and Uniqueness Validations (Mastery)

      Views

      3 Template a view (Mastery) 4 Craft wireframes (Functional) 4 How to iterate over a collection of ActiveRecord objects in a view (Mastery) 4 How to use erb tags in a view to display information. (Mastery) 10 Difference between <%= %> and <% %> (Mastery) 5 How to create a form in a view using Rails, including a form using nested resources. (Mastery / Functional) 1 Make a partial (Functional)

      Controllers

      3 Inheritance (Functional) 3 ApplicationController (Functional) 5 helper_method (Mastery) 5 CRUD actions: index, show, new, create, edit, update, destroy (Mastery) 3 Custom actions from routes (Functional) 5 Inspect and understand params and strong params (Mastery) 2 How to prepare data for your views. (Mastery) 3 Refactoring best practice for MVC. Fat models, skinny controllers (Mastery)

      Models

      3 ActiveRecord Model vs PORO (Functional) 1 Inheritance (Mastery) 1 Class Methods (Mastery) 1 Instance Methods (Mastery) 1 Scopes (Functional) 4 Refactoring best practice for MVC. Fat models, skinny controllers (Mastery)

      Routes

      3 7 Restful routes - verb path combinations - for a resource (Mastery) 6 How to create routes using resources (Mastery) 2 How to handwrite a route (Mastery) 7 route_helpers ex. edit_item_path(item) (Mastery) 7 Explain what each column of the rake routes output represents and allows the developer to do. (Mastery) :only :except (Mastery) 2 Route modifiers: :module, :path, :scope (Functional) 4namespace and nested resources (Highly Functional)

      ActiveRecord

      9 ActiveRecord query methods. Differences between find find_by and where (Mastery) 7 Understand how AR create and a new instance + save are related (Mastery) 3 Methods associated with AR relationships (Mastery) 4 Validations - Presence, Uniqueness (Mastery)

      Authentication

      2 BCrypt (Functional) 1 Hashing Algorithms (Familiarity) 4 has_secure_password (Functional)

      Authorization

      3 before_action (Mastery) 1 Roles (Functional) 1 Controller Inheritance (Functional)

      week_one.md

      1. List the five common HTTP verbs and what the purpose is of each verb. POST(create), GET(read), PUT(update/replace), DELETE(delete), and PATCH(update/modify)
      2. What is Sinatra? A web application that is a DSL in Ruby. A framework.
      3. What is MVC? Model, View, and Controller
      4. Why do we follow conventions when creating our actions/path names in our Sinatra routes? We follow conventions because the work for one thing but was also follow them so other developers know what we are doing.
      5. What types of variables are accessible in our view templates without explicitly passing them? Instance variables
      6. Given the following block of code, how would I pass an instance variable count with a value of 1 to my index.erb template? Put @count = 1 before the erb :index get '/horses' do erb :index end
      7. In the same code block, how would I pass a local variable name with a value of Mr. Ed to the view? @name = "Mr. Ed"
      8. What's the purpose of ERB? Gives you access to the view template
      9. Why do I need a development AND test database? The test db is limited in how much data you use when developing and the dev db is the whole db.
      10. What's responsive design? Design that is made for all display sizes
      11. What is CRUD and why is it important? Create, Read, Update, and Delete. It's important because that is how http works.
      12. What does HTTP stand for? Hypertext Transfer Protocol
      13. What are the two ways to interpolate Ruby in an ERB view template? What's the difference between these two ways? <%= %> and <% %> The first one will print out the second one will only run and not display
      14. What's an ORM? Object-rational mapping. To program data that can be converted between different types of systems.
      15. What's the most commonly used ORM in ruby (Sinatra & Rails)? Rails
      16. Let's say we have an application with restaurants. There are seven verb + path combinations necessary to provide full CRUD functionality for our restaurant application. List each of the seven combinations, and explain what each is for. Get/index(see all restaurants), Get/show(see one restaurant), Get/new(create new restaurant), Post(create and save), Get(update), Put(save update), Delete(delete)
      17. What's a migration? Is a feature in AR that let's you update your schema.
      18. When you create a migration, does it automatically modify your database? Yes
      19. How does a model relate to a database? Models are like Ruby classes that AR talks to the DB
      20. What's the difference between agile workflow and waterfall method? Agile workflow is when development is by feature(s) that there is a feedback loop for every move and waterfall is the whole project is planned out and no one see's the end product until it's done.
      21. What is the difference between #new and #create? #new makes a new only while #create makes new and saves.

      week_two.md

      1. At a high level, what is ActiveRecord? AR is the model in MVC, representing the business logic and data. What does it do/allow you to do? AR let's there be persistent storage to a DB.

      Assume you have the following model: class Team << ActiveRecord::Base end

      1. What are some methods you can call on Team? .where, .find, .find_by If these methods aren't defined in the class, how do you have access to them?

      2. Assume that in your database, a team has the following attributes: "id", "name", owner_id". How would you find the name of a team with an id of 4? @team.find_by(4) Assuming your class only included the code from question 2, how could you find the owner of the same team? @team.find_by(4).owner.last

      3. Assume that you added a line to your Team class as follows:

      class Team << ActiveRecord::Base belongs_to :owner end

      1. Now how would you find the owner of the team with an id of 4?

      2. In a database that's holding students and teachers, what will be the relationship between students and teachers? Draw the schema diagram. There would be many teachers to many students. a many to many relationship. has_many

      3. Define foreign key is the key of the primary in the other, primary key is the key of the primary, and schema is the table with all it's attributes.

      4. Describe the relationship between a foreign key on one table and a primary key on another table. The foreign key is the key from the other primary and the primary is the key of the primary.

      5. What are the parts of an HTTP response? client, server, db,

      Optional Questions

      1. Name your five favorite ActiveRecord methods (i.e. methods your models inherit from ActiveRecord) and describe what they do. .find finds only the first one it hits, .find_by finds a specific one, .where finds all
      2. Name your three favorite ActiveRecord rake tasks and describe what they do. rake db:migrate makes the table, rake db:rollback lets you rollback to a previous version.
      3. What two columns does t.timestamps null: false create in our database?
      4. In a database that's holding schools and teachers, what will be the relationship between schools and teachers? There are many students to many teachers. Many to many relationship
      5. In the same database, what will you need to do to create this relationship (draw a schema diagram)? A join table with a class called teachers_students
      6. Give an example of when you might want to store information besides ids on a join table.
      7. Describe and diagram the relationship between patients and doctors.
      8. Describe and diagram the relationship between museums and original_paintings.
      9. What could you see in your code that would make you think you might want to create a partial? Anything to DRY up the code.

      week_three.md

      1. What is the entry at the command line to create a new rails app? rails new ...
      2. What do Models generally inherit from in rails? ApplicationController
      3. What do Controllers generally inherit from in a rails project? ActiveRecord
      4. How would I create a route if I wanted to see a specific horse in my routes file assuming I'm sticking to standard conventions and that I didn't want other CRUD functionality? params[:id]
      5. What rake task is useful when looking at routes, and what information does it give you? rake routes, lets you see all the current route paths.
      6. What is an example of a route helper? index_path When would you use them? I could use them in my test
      7. What's the difference between what _ url and _ path return when combined with a routes prefix?
      8. What are strong params and why are the necessary? Strong params are locked down params so other users can not add functionality. It's for security reasons/
      9. What role does form_for play in helping us create our forms? it lets you make form fields
      10. How does form_for know where to submit the user's input? It's build in
      11. Create a form using a form_for helper to create a new Horse.

      <% form_for @horses do |horse| %> <%= f.label %> <%= f.text_field %> 12. Why do we want to validate our models? to confirm that the data passed is exactly what we want

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