<commit_before>---
layout: default
---

## Week 4 - Overview

Students should be comfortable with the following at the end of this week:

* Rails and MVC (cont'd)
* Session
* Authentication
* Authorization
* Controller and Integration Testing
* REST

## Monday

#### Lecture

* Draw Rails folder structure in green (things we've done) and black (things we haven't done yet)

* Project Review
  * Naming is harder than you think because of pluralization `exercises_perfomeds`
  * `duck.pluralize`
  * REST
  * Take apart the extra methods in controllers (set_weights)
  * strong params
  * default scope
  * Related table for exercise type.  Change existing project.  "Do not write this down as a set of steps.  Pay attention to concepts."
  * Welcome to the world of webapps.
  * Scaffold is dead to us now.

* Exercise: Create a new Rails app to manage employees and departments, just like [we did in plain old Ruby before](https://github.com/tiyd-rails-2015-01/employee_reviews).  Employee belongs_to Department.  Department has_many Employees.  

* The Asset Pipeline
  * Images
  * Multiple CSS Files
  * SCSS
* Primer on: Bourbon, Neat, Bitters, Refills

#### Notes

* [SCSS Guide](http://sass-lang.com/)
* [Rails Guides](http://guides.rubyonrails.org/index.html)
* [Bourbon, Neat, Bitters, Refills](http://bourbon.io/)
* [The Asset Pipeline on Heroku](https://devcenter.heroku.com/articles/rails-4-asset-pipeline)

#### Reading

* Complete Ruby Koans

#### Assignment

* [Menu](https://github.com/tiyd-rails-2015-01/menu)

<!-- This was a harder day than expected.  Next time I should cover less on Monday and more on Tuesday?  Tuesday did turn out to be the right amount, though.  -->

## Tuesday

#### Lecture

* Assignment Review
  * We did #shipit !
  * The big secret to last night's confusion: READ THE ERROR MESSAGES
  * Text vs String in the DB
  * Looping inside a loop in a view
  * The .json stuff in scaffold
  * Version of ruby for Heroku
  * README.md vs README.rdoc

* How console and server are actually doing the same things to the database

* Human Learning:
  * Immerse yourself in the culture.
  * Read some every day.
  * Ruby Rogues and Ruby Weekly.
  * Dissecting a book vs drinking from a fire hydrant
* Diagram: Developer spectrum.  Hammer-user all the way to shiny-object

* Bourbon, Neat, Bitters, Refills
* Meet the ipsums
* durhamipsum.com

#### Reading

* Continue [Git Immersion](http://gitimmersion.com/).  Get through Lab 40.

#### Assignment

* [Menu Again](https://github.com/tiyd-rails-2015-01/menu)

<!--

## Wednesday

#### Lecture

* Assignment Review
  * Adding methods on models for better views/controllers
  * Many-to-many?

* Human Learning:
  * Scarring with age
  * Good scarring example: Saving hardest things for last sucks
  * Bad scarring example: Millenials are lazy.  Taking risks on products costs too much money.
* Diagram: Topological map of scarring

* Sessions
* Exercise: Add ability to fill up a cart from your menu.  Array of strings.  Show it on the top of every page.
* Authentication

#### Reading

* Complete [Git Immersion](http://gitimmersion.com/)!

#### Assignment

* [Simple Authentication](https://github.com/masonfmatthews/rails_assignments/tree/master/assignments/simple_authentication)

## Thursday

#### Lecture

* Assignment Review
* Model testing in Rails
* Coverage (simplecov)
* Exercise: Write a test on your last night's homework and add simplecov
* Controller Testing
* Integration Testing

* Authorization

## Weekend Assignment - As Pairs

[Concept Gradebook](https://github.com/masonfmatthews/rails_assignments/tree/master/projects/concept_gradebook)

<!--
Still haven't done:

* Fixtures/seeding
* Helpers and Partials
* Hashes within Params
* Class variables - DON'T
* Just saying: you can return objects when true/false is expected
* Trying to change an array in an outer scope inside a called function.

* [Merging Apps and Heroku Deployments](https://github.com/masonfmatthews/rails_assignments/tree/master/assignments/heroku_deployments) - AS PAIRS

* [Student Awards](https://github.com/masonfmatthews/rails_assignments/tree/master/assignments/student_awards)<commit_msg>Update due to Week 4 Tuesday<commit_after>---
layout: default
---

## Week 4 - Overview

Students should be comfortable with the following at the end of this week:

* Rails and MVC (cont'd)
* Session
* Authentication
* Authorization
* Controller and Integration Testing
* REST

## Monday

#### Lecture

* Project Review
  * Naming is harder than you think because of pluralization `exercises_perfomeds`
  * `duck.pluralize`
  * REST
  * Take apart the extra methods in controllers (set_weights)
  * strong params
  * default scope
  * Related table for exercise type.  Change existing project.  "Do not write this down as a set of steps.  Pay attention to concepts."
  * Welcome to the world of webapps.
  * Scaffold is dead to us now.

* Exercise: Create a new Rails app to manage employees and departments, just like [we did in plain old Ruby before](https://github.com/tiyd-rails-2015-01/employee_reviews).  Employee belongs_to Department.  Department has_many Employees.  

* The Asset Pipeline
  * Images
  * Multiple CSS Files
  * SCSS
* Primer on: Bourbon, Neat, Bitters, Refills

#### Notes

* [SCSS Guide](http://sass-lang.com/)
* [Rails Guides](http://guides.rubyonrails.org/index.html)
* [Bourbon, Neat, Bitters, Refills](http://bourbon.io/)
* [The Asset Pipeline on Heroku](https://devcenter.heroku.com/articles/rails-4-asset-pipeline)

#### Reading

* Complete Ruby Koans

#### Assignment

* [Menu](https://github.com/tiyd-rails-2015-01/menu)

<!-- This was a harder day than expected.  Next time I should cover less on Monday and more on Tuesday?  Tuesday did turn out to be the right amount, though.  -->

## Tuesday

#### Lecture

* Assignment Review
  * We did #shipit !
  * The big secret to last night's confusion: READ THE ERROR MESSAGES
  * Text vs String in the DB
  * Looping inside a loop in a view
  * The .json stuff in scaffold
  * Version of ruby for Heroku
  * README.md vs README.rdoc

* How console and server are actually doing the same things to the database

* Human Learning:
  * Immerse yourself in the culture.
  * Read some every day.
  * Ruby Rogues and Ruby Weekly.
  * Dissecting a book vs drinking from a fire hydrant
* Diagram: Developer spectrum.  Hammer-user all the way to shiny-object

* Bourbon, Neat, Bitters, Refills <!-- Maybe consider just Foundation next time. -->
* Meet the ipsums
* durhamipsum.com

#### Reading

* Continue [Git Immersion](http://gitimmersion.com/).  Get through Lab 40.

#### Assignment

* [Menu Again](https://github.com/tiyd-rails-2015-01/menu)


## Wednesday

#### Lecture

* Assignment Review
  * Begin building glossary of methods we should be aware of
  * Draw Rails folder structure in green (things we've done) and black (things we haven't done yet)
  * Breaking down requirements, making sure you're getting them done
  * Adding methods on models for better views/controllers
  * Pair-question-asking

* Human Learning:
  * Scarring with age
  * Good scarring example: Saving hardest things for last sucks
  * Bad scarring example: Given one bad experience, some people assume that Millenials are all lazy.
  * Bad scarring example: Taking risks on products costs too much money.
* Diagram: Topological map of scarring

* Sessions
* Exercise: Add ability to choose the one thing that you're eating.  Show it on the top of every page.
* Authentication

#### Reading

* Complete [Git Immersion](http://gitimmersion.com/)!

#### Assignment

* [Simple Authentication](https://github.com/tiyd-rails-2015-01/simple_authentication)

<!--

## Thursday

#### Lecture

* Assignment Review
* Model testing in Rails
* Coverage (simplecov)
* Exercise: Write a test on your last night's homework and add simplecov
* Controller Testing
* Integration Testing

* Authorization

## Weekend Assignment - As Pairs

[Concept Gradebook](https://github.com/masonfmatthews/rails_assignments/tree/master/projects/concept_gradebook)

<!--
Still haven't done:

* Many-to-many?
* Fixtures/seeding
* Helpers and Partials
* Hashes within Params
* Class variables - DON'T
* Just saying: you can return objects when true/false is expected
* Trying to change an array in an outer scope inside a called function.

* [Merging Apps and Heroku Deployments](https://github.com/masonfmatthews/rails_assignments/tree/master/assignments/heroku_deployments) - AS PAIRS

* [Student Awards](https://github.com/masonfmatthews/rails_assignments/tree/master/assignments/student_awards)
{'fraction_non_alphanumeric': 0.09675165909884736, 'fraction_numerical': 0.005937827453719874, 'mean_word_length': 4.017523364485982, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 6, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3575134', 'n_tokens_mistral': 2707, 'n_tokens_neox': 2522, 'n_words': 963}