software-development-lessons

Ruby on Rails Phase 1

101: RPS RCAV

video slides reading diagram

102: Fortune Teller

103: Omnicalc 1

video

104: Omnicalc Debug (more form practice)

Need API Keys in ENV

DARK_SKY_KEY=''
GEOCODING_API_KEY=''

107: Refactoring Fortune Teller with Dynamic Routes

notes

108: Dashboards

video

109: MSM Queries

video

110: Classroom Queries Debug

Here is some more practice on building a web interface to our database using ActiveRecord.

111: Refactoring MSM Queries

We’re going to refactor MSM Queries with a powerful technique for taking advantage of one-to-many and many-to-many associations between tables.

First, load this project and read through the code, starting as usual with config/routes.rb. The starter code for this project is the solution to the first MSM Queries project. How does my solution compare to yours? Where does it differ?

Then, following along with this Video: Refactoring MSM Queries 1. In it, I demonstrate how to refactor the project. Just watch while I do the first part, and if you have any questions pause the video and ask us.

Then you’ll have a chance to do more yourself. Open up and read through this Chapter for a detailed written explanation: Refactoring MSM Queries with Methods.

115: Different Ruby Styles

120: MSM Validations

reading

125: Photogram GUI

video

130: Very Best Debug

Practice building a web CRUD interface by debugging.

135: Build a resource from scratch

CRUD resources are the foundational building blocks of web applications — a database table, along with routes/actions/views/forms/links that allow users to see and manipulate entries in that table. Being a web developer means identifying, building, and assembling these resources in useful ways all day, every day.

Now that you’ve seen a few examples of how to wire a complete CRUD resource (in Photogram GUI and Very Best Debug), try building some on your own, from scratch.

Imagine that we’re building a simple, anonymous neighborhood bulletin board:

(If you want to, feel free to come up with your own, different data model / user stories. But keep it simple — 2-4 tables and a simple CRUD UI, without sign-in/sign-out.)

Suggested steps:

On paper or a whiteboard, draw a rough wireframe of the app you plan to build. Things to think about:

140: Reading — draft:resource generator

145: Cookies Intro

notes video

If you’d like to get the Google Translate portion working (optional), then you’ll have to create the following environment variables (don’t forget to restart your workspace after doing so):

TWILIO_ACCOUNT_SID: 
TWILIO_AUTH_TOKEN: 
TWILIO_SENDING_PHONE_NUMBER: 
MAILGUN_API_KEY: 
TRANSLATE_PROJECT:
TRANSLATE_CREDENTIALS:

150: Photogram Signin

video

In the video, you’ll see me using a hash called session instead of a hash called cookies to store and fetch the signed in user’s ID. We use session exactly the same way as cookies, but it’s more secure. read more

155: MSM Signin

video

160: Todo List 1 (Phase 1 practice exam)

This is the practice exam. It is intended to help you identify areas to review before the real one.

Attempt to complete it under circumstances similar to the real exam: you can (and should) use your notes, previous work, the videos, Chapters, Google, and other resources; but not a live human being.

If you’re well and truly stuck, then get help (from an instructor, ideally). Once you’ve completed this project, filled in gaps in your notes, and feel ready for the real exam, ask an instructor to unlock it for you.

165: Delivery Tracker 1 (Phase 1 exam)

This is the exam.