Assignments to Prep for Module 3
Using paper and a writing utensil:
- On one piece of paper, write out all of the parts of an example HTTP GET request
- On a separate piece of paper, write out an example 200 response to that request with all of the parts
- Bonus write your explanation as a metaphor
- Bring this to class day 1. This is your ticket into Mod 3 :)
Entering Module 3 with a solid understanding of ActiveRecord and SQL is key to getting the module off to a good start. Make sure you are able to write and understand queries that involve multiple
JOIN statements and that combine math functions.
- Complete and understand the Intermediate SQL I challenges.
- Complete and understand the Intermediate SQL II challenges.
- Complete and understand ActiveRecord American Gladiators. Make sure that you review, (http://backend.turing.io/module2/misc/active_record_obstacle_course)[ActiveRecord Obstacle Course].
Additionally, in Module 3 we will be creating applications to deliver and consume APIs. What is an API, you might ask? Watch this video to find out more.
Next Most Important
Rewrite your Book Club
Module 3 requires you to know URLs, paths and HTTP verbs inside and out. Rewrite the routes file for your Book Club to use only methods that map directly to HTTP verbs:
delete. You will probably need to add
as: parameters to make sure your apps continue to work, and tests continue to pass.
If you wrote your routes that way already, replace them using
If you do not own the repo for your project, fork it, and rewrite the routes file individually.
NOTE: This is not because one way is better, but it’s extremely important to understand what every line of your routes file is doing. Rails Engine demands a solid understanding of Rails routing.
Deeply Nested Hashes
This will be important for when you start consuming APIs.
Fork and clone Here Be Dragons
Complete the exercises within and submit a link to your repo no later than Saturday before the first day of class.
Optional (Choose Your Own Adventure)
API Learning Spike (I want a little head start on M3)
Option 1: See if you can create a Rails API that responds to a request to
/api/v1/items with JSON. Review the video above to see what this will look like in your browser. Hint: that looks an awful lot like a double nested route to me.
- Don’t worry if you can’t get this to work.
- Don’t worry about testing.
- Timebox your work so that you come to M3 refreshed.
- The goal here is to tinker and see if you can get a thing to work. Stop working if it stops being fun.
- Use the internet to see what you can find about creating a simple Rails API.
- Feel free to talk to mentors or colleagues about potential resources.
- Don’t just use the first resource you find. Cast your net wide and then pick a few resources to use as touchstones.
Reading (My laptop and I are on a break)
Practical Object-Oriented Design in Ruby: Sandi Metz’s book permanently changed the way I program. In this book, she teaches you how to write exceptionally well-factored code. At least try to read the first three chapters if you can. Head First SQL: A nice introduction to SQL.
We are mainly looking for you to get experience with the syntax, and at a minimumum you should understand the JS Data Types, Conditionals, and Looping.
Front-End Development (Where do the FE kids get those cool backpacks?)
- Revisit your personal site. See if you can upgrade the styling. Consider using Sass.
- Re-style your Rails Mini-Project or Job Tracker.
- Dive into some tools
- Explore an alternative templating language