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 ListsModel 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
- 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)
- What is Sinatra? A web application that is a DSL in Ruby. A framework.
- What is MVC? Model, View, and Controller
- 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.
- What types of variables are accessible in our view templates without explicitly passing them? Instance variables
- 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
- 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"
- What's the purpose of ERB? Gives you access to the view template
- 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.
- What's responsive design? Design that is made for all display sizes
- What is CRUD and why is it important? Create, Read, Update, and Delete. It's important because that is how http works.
- What does HTTP stand for? Hypertext Transfer Protocol
- 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
- What's an ORM? Object-rational mapping. To program data that can be converted between different types of systems.
- What's the most commonly used ORM in ruby (Sinatra & Rails)? Rails
- 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)
- What's a migration? Is a feature in AR that let's you update your schema.
- When you create a migration, does it automatically modify your database? Yes
- How does a model relate to a database? Models are like Ruby classes that AR talks to the DB
- 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.
- What is the difference between #new and #create? #new makes a new only while #create makes new and saves.
week_two.md
- 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
-
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?
-
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
-
Assume that you added a line to your Team class as follows:
class Team << ActiveRecord::Base belongs_to :owner end
-
Now how would you find the owner of the team with an id of 4?
-
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
-
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.
-
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.
-
What are the parts of an HTTP response? client, server, db,
Optional Questions
- 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
- 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.
- What two columns does t.timestamps null: false create in our database?
- 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
- 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
- Give an example of when you might want to store information besides ids on a join table.
- Describe and diagram the relationship between patients and doctors.
- Describe and diagram the relationship between museums and original_paintings.
- 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
- What is the entry at the command line to create a new rails app? rails new ...
- What do Models generally inherit from in rails? ApplicationController
- What do Controllers generally inherit from in a rails project? ActiveRecord
- 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]
- 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.
- What is an example of a route helper? index_path When would you use them? I could use them in my test
- What's the difference between what _ url and _ path return when combined with a routes prefix?
- 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/
- What role does form_for play in helping us create our forms? it lets you make form fields
- How does form_for know where to submit the user's input? It's build in
- 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