From c2e1437f16ef6a871cb2b49a89b03c290d8f113a Mon Sep 17 00:00:00 2001 From: memcmahon Date: Tue, 7 Jan 2025 14:06:36 -0700 Subject: [PATCH 01/15] add week 4 extra project --- module1/projects/beat_box/index.md | 103 ++++++++++++++++++ module1/projects/beat_box/iteration_1.md | 122 ++++++++++++++++++++++ module1/projects/beat_box/iteration_2.md | 92 ++++++++++++++++ module1/projects/beat_box/iteration_3.md | 107 +++++++++++++++++++ module1/projects/beat_box/iteration_4.md | 73 +++++++++++++ module1/projects/beat_box/requirements.md | 26 +++++ module1/projects/beat_box/rubric.md | 34 ++++++ module1/projects/beat_box/setup.md | 10 ++ 8 files changed, 567 insertions(+) create mode 100644 module1/projects/beat_box/index.md create mode 100644 module1/projects/beat_box/iteration_1.md create mode 100644 module1/projects/beat_box/iteration_2.md create mode 100644 module1/projects/beat_box/iteration_3.md create mode 100644 module1/projects/beat_box/iteration_4.md create mode 100644 module1/projects/beat_box/requirements.md create mode 100644 module1/projects/beat_box/rubric.md create mode 100644 module1/projects/beat_box/setup.md diff --git a/module1/projects/beat_box/index.md b/module1/projects/beat_box/index.md new file mode 100644 index 00000000..a69c6d0d --- /dev/null +++ b/module1/projects/beat_box/index.md @@ -0,0 +1,103 @@ +--- +layout: page +title: Beat Box +--- + +### Learning Goals + +* Follow an interaction pattern +* Write readable code that adheres to Ruby convention +* Write tests +* Distinguishing between classes and instances of those classes +* Use and implement iteration or recursion techniques +* Host code on Github + +## Overview + +In this project we're going to do some silly things with sound. Specifically, we're going to make a very basic drum machine program. + +However to add some additional depth, let's also use this project as a chance to explore one of the fundamental data structures in computer science -- the Linked List. + +### Drum Machine 101 -- Making Sounds + +Go into your Terminal and try this: + +``` +$ say -r 500 "ding, dah, oom, oom, ding, oom, oom, oom, ding, dah, oom, oom, ding, dah, oom, oom, ding, dah, oom, oom " +``` + +Yeah. That's what we're looking for. Now try it from Ruby: + +``` +$ pry +> `say -r 500 "ding, dah, oom, oom"` +``` + +Note that the backticks allow you to run terminal commands from within Ruby. + +The exact command that you need to run may differ based on what version of OS X +you have installed on your computer. The commands above will work on 10.13. + +### Linked Lists + +Linked Lists are one of the most fundamental Computer Science data structures. A Linked List models a collection of data as a series of "nodes" which link to one another in a chain. + +In a singly-linked list (the type we will be building) you have a __head__, which is a node representing the "start" of the list, and subsequent nodes which make up the remainder of the list. + +The __list__ itself can hold a reference to one thing -- the head node. + +Each node can hold a single element of data and a link to the next node in the list. + +The last node of the list is often called its __tail__. + +Using sweet ASCII art, it might look like this: + +``` +List -- (head) --> ["hello" | -]-- (link) --> ["world" | -]-- (link) --> ["!" | ] +``` + +The three nodes here hold the data "hello", "world", and "!". The first two nodes have links which point to other nodes. The last node, holding the data "!", has no reference in the link spot. This signifies that it is the end of the list. + +In other lower level languages, something called a pointer is what is used to ensure that a single link knows about the next link. In Ruby, we don't use pointers, so the link is literally its node. When we get to a node which is the last node, we call it the tail, and its link is nil. + +A linked list should be able to do the following: + + +* Insert elements +* Pop an element from the end +* Push an element onto the beginning +* Remove the (first occurrence | all occurrences) of an element by data content +* Remove an element by position +* Add an element at an arbitrary position +* Add an element after a known node +* Find whether a data element is or is not in the list +* Find the distance between two nodes + +## Tips + +* A linked list is not an array. While it may perform many of the same functions as an array, its structure is conceptually very different. +* There are only 3 types of "state" that need to be tracked for a linked list -- the head of the list, the data of each node, and the "next node" of each node. +* In object-oriented programming, "state" is generally modeled with instance variables +* There are two main ways to implement Linked Lists: __iteration__ and __recursion__. Iterative solutions use looping structures (`while`, `for`) to walk through the nodes in the list. Recursive solutions use methods which call themselves to walk through nodes. It would be ideal to solve it each way. +* Most of your methods will be defined on the `List` itself, but you will need to manipulate one or more `Node`s to implement them. +* __TDD__ will be your friend in implementing the list. Remember to start small, work iteratively, and test all of your methods. +* An __empty__ list has `nil` as its head. +* The __tail__ of a list is the node that has `nil` as its next node. + +## Constraints + +* Make sure that your code is well tested for both *expected cases* and *edge cases*. Try popping more elements than there are in the list. Try seeing if an empty list includes anything. Try inserting elements at a position beyond the length of the list. +* Avoid using other ruby collections (Arrays, Hashes, etc) for the storage of your beats. That's where you're supposed to use the linked list. But having Arrays elsewhere in your code, or using methods that return arrays (like `.split`) are totally ok. + +## Resources + +Need some help on Linked Lists? You can check out some of the following resources: + +* [Linked List in Plain English](https://www.youtube.com/watch?v=oiW79L8VYXk) +* [Ruby's Missing Data Structure](http://www.sitepoint.com/rubys-missing-data-structure/) + +## Requirements + +* [Setup](./setup) +* [Project Requirements](./requirements) +* [Evaluation Rubric](./rubric) diff --git a/module1/projects/beat_box/iteration_1.md b/module1/projects/beat_box/iteration_1.md new file mode 100644 index 00000000..4a34d1ec --- /dev/null +++ b/module1/projects/beat_box/iteration_1.md @@ -0,0 +1,122 @@ +--- +layout: page +title: Beat Box +--- +# Iteration 1 + +## Node Basics + +Our Linked List will ultimately be composed of individual nodes, so in this iteration we'll start with building out these nodes. +Note that they are quite simple -- a Node simply needs to have a slot for some data and a slot for a "next node". Eventually this +`next_node` position will be what we use to link the multiple nodes together to form the list. + +For this iteration, build a simple node class that can perform these functions: + +```ruby +pry(main)> require "./lib/node" +#=> true + +pry(main)> node = Node.new("plop") +#=> # + +pry(main)> node.data +#=> "plop" + +pry(main)> node.next_node +#=> nil +``` + +## Append, To String, and Count (Single Node / Element) + +Great! We have nodes. In this iteration we'll create the `LinkedList` class and start filling in the basic functionality needed to append our _first node_. + +We'll be adding the following methods: + +1. `append` - creates a new node with the data that we pass into this method and adds it to the end of the linked list +2. `count` - tells us how many nodes are in the list +3. `to_string` - generates a string containing the data from every node in the list, separated by spaces + +But for now, focus on building these functions so they work for just the __first__ element of data appended to the list (we'll handle multiple elements in the next iteration). + +Expected behavior: + +```ruby +pry(main)> require "./lib/linked_list" +#=> true + +pry(main)> require "./lib/node" +#=> true + +pry(main)> list = LinkedList.new +#=> # + +pry(main)> list.head +#=> nil + +pry(main)> list.append("doop") + +pry(main)> list +#=> #> + +pry(main)> list.head.data +#=> "doop" + +pry(main)> list.head.next_node +#=> nil + +pry(main)> list.count +#=> 1 + +pry(main)> list.to_string +#=> "doop" +``` + +## Append, All/To String, and Insert (Multiple Nodes) + +Now that we can insert the first element of our list (i.e. the Head), let's focus on supporting these operations for multiple elements in the list. + +This iteration is really where we'll build out the core structure that makes up our linked list -- it will probably take you more time than the previous iterations. + +Update your `append`, `count`, and `to_string` methods to support the following interaction pattern: + +```ruby +pry(main)> require "./lib/linked_list" +#=> true + +pry(main)> require "./lib/node" +#=> true + +pry(main)> list = LinkedList.new +#=> # + +pry(main)> list.head +#=> nil + +pry(main)> list.append("doop") +#=> "doop" + +pry(main)> list +#=> #> + +pry(main)> list.head +#=> # + +pry(main)> list.head.next_node +#=> nil + +pry(main)> list.append("deep") + +pry(main)> list +#=> #>> + +pry(main)> list.head.next_node +#=> # + +pry(main)> list.count +#=> 2 + +pry(main)> list.to_string +#=> "doop deep" +``` + +Notice the key point here -- the first piece of data we append becomes the Head, while the second becomes the Next Node of that (Head) node. diff --git a/module1/projects/beat_box/iteration_2.md b/module1/projects/beat_box/iteration_2.md new file mode 100644 index 00000000..96dc1269 --- /dev/null +++ b/module1/projects/beat_box/iteration_2.md @@ -0,0 +1,92 @@ +--- +layout: page +title: Beat Box +--- + +# Iteration 2 + +## Additional Methods - `insert` and `prepend` + +Now we have nodes and a `LinkedList` class that manages the list. Next step is to add the `insert` and `prepend` methods. + +`prepend` will add nodes to the beginning of the list. + +`insert` will insert one or more elements at a given position in the list. It takes two parameters, the first one is the position at which to insert nodes, the second parameter is the string of data to be inserted. + +Expected behavior: + +```ruby +pry(main)> require "./lib/linked_list" +#=> true + +pry(main)> require "./lib/node" +#=> true + +pry(main)> list = LinkedList.new +#=> # + +pry(main)> list.append("plop") + +pry(main)> list.to_string +#=> "plop" + +pry(main)> list.append("suu") + +pry(main)> list.to_string +# "plop suu" + +pry(main)> list.prepend("dop") + +pry(main)> list.to_string +#=> "dop plop suu" + +pry(main)> list.count +#=> 3 + +pry(main)> list.insert(1, "woo") + +pry(main)> list.to_string +#=> "dop woo plop suu" +``` + + +
+ +## Additional Methods - `find`, `pop`, `includes?` + +Perfect, we are almost there! Next is to add `find`, `pop` and `includes?` methods. + +`find` takes two parameters, the first indicates the first position to return and the second parameter specifies how many elements to return. + +`includes?` gives back true or false whether the supplied value is in the list. + +`pop` removes the last element from the list and returns it. + +Expected behavior: + +```ruby +.... +pry(main)> list.to_string +#=> "deep woo shi shu blop" + +pry(main)> list.find(2, 1) +#=> "shi" + +pry(main)> list.find(1, 3) +#=> "woo shi shu" + +pry(main)> list.includes?("deep") +#=> true + +pry(main)> list.includes?("dep") +#=> false + +pry(main)> list.pop +#=> "blop" + +pry(main)> list.pop +#=> "shu" + +pry(main)> list.to_string +#=> "deep woo shi" +``` diff --git a/module1/projects/beat_box/iteration_3.md b/module1/projects/beat_box/iteration_3.md new file mode 100644 index 00000000..aeb1eeb2 --- /dev/null +++ b/module1/projects/beat_box/iteration_3.md @@ -0,0 +1,107 @@ +--- +layout: page +title: Beat Box +--- +# Iteration 3 + +## Creating the BeatBox Linked List "Wrapper" + +Awesome! We have built most of our program and now it's time to wrap the Linked List logic in a `BeatBox` class. + +When we create a new instance of the `BeatBox` class, a `LinkedList` object is also instantiated and available as an attribute on the `BeatBox` instance. Now, we can manage our linked list through the `BeatBox` class. + +Up until now, we have only been able to `append` and `prepend` a single node at a time. The LinkedList class hasn't formatted the data it received, consequently, passing the string "deep bop dop" to `append` has resulted in _one_ node created with data `deep bop dop`. With `BeatBox` as an extra layer, it can take care of properly formatting the data (eg: splitting the string) before passing it down to the `LinkedList`. This implementation results in _three_ nodes appended to the list if we pass the string "deep bop dop" to `BeatBox#append`. + +Expected behavior: + +```ruby +pry(main)> require "./lib/beat_box" +#=> true + +pry(main)> require "./lib/linked_list" +#=> true + +pry(main)> require "./lib/node" +#=> true + +pry(main)> bb = BeatBox.new +#=> #> + +pry(main)> bb.list +#=> # + +pry(main)> bb.list.head +#=> nil + +pry(main)> bb.append("deep doo ditt") + +pry(main)> bb.list.head.data +#=> "deep" + +pry(main)> bb.list.head.next_node.data +#=> "doo" + +pry(main)> bb.append("woo hoo shu") + +pry(main)> bb.count +#=> 6 +``` + +
+ +## Playing Beats + +Now that we have our BeatBox class put together using the internal Linked List to keep track of our beats, let's use it to actually play the beats. + +Remember that, at the command line, we can play sounds using the `say` command: + +``` +$ say -r 500 -v Boing "ding dah oom oom ding oom oom oom ding dah oom oom ding dah oom oom ding dah oom oom " +``` + +It turns out we can also easily issue this command (or any other system command) from ruby by using backticks: ```. + +For example: + +``` +$ pry +> `say -r 500 -v Boing "ding dah oom oom ding oom oom oom ding dah oom oom ding dah oom oom ding dah oom oom "` +``` + +Additionally, we can use standard string interpolation (`#{}`) to pass dynamic content into a system command: + + +``` +$ pry +> beats = "ding dah oom oom ding oom oom oom ding dah oom oom ding dah oom oom ding dah oom oom " +> `say -r 500 -v Boing #{beats}` +``` + +For this final section, add a `play` method to your BeatBox class that will generate the string content of the Beat and use it as input to the `say` command. + +```ruby +pry(main)> require "./lib/beat_box" +#=> true + +pry(main)> require "./lib/linked_list" +#=> true + +pry(main)> require "./lib/node" +#=> true + +pry(main)> bb = BeatBox.new +#=> #> + +pry(main)> bb.append("deep doo ditt woo hoo shu") + +pry(main)> bb.count +#=> 6 + +pry(main)> bb.list.count +#=> 6 + +pry(main)> bb.play +#=> # plays the sounds deep doo ditt woo hoo shu +``` + +Note: You do not need to test the `play` method, but are welcome to give it a shot diff --git a/module1/projects/beat_box/iteration_4.md b/module1/projects/beat_box/iteration_4.md new file mode 100644 index 00000000..edf29439 --- /dev/null +++ b/module1/projects/beat_box/iteration_4.md @@ -0,0 +1,73 @@ +--- +layout: page +title: Beat Box +--- + +# Iteration 4 - Extensions + +### 1. Validating Beats + +There are a lot of words which aren't going to work for beats. Like `Mississippi`. + +Add validation to your program such that the input beats must be members of your +defined list. Insertion of a beat not in the list is rejected. Like this: + +```ruby +pry(main)> bb = BeatBox.new("deep") +#=> #>> + +pry(main)> bb.append("Mississippi") + +pry(main)> bb.all +#=> "deep" + +pry(main)> bb.prepend("tee tee tee Mississippi") + +pry(main)> bb.all +#=> "tee tee tee deep" +``` + +Here's a starter list of valid beats, but add more if you like: + +``` +tee dee deep bop boop la na +``` + +### 2. Speed & Voice + +Let's make it so the user can control the voice and speed of playback. You may not have all the voices referenced here available on your machine. You can check which voices you have by following the steps documented [here](https://support.apple.com/guide/mac-help/change-the-voice-your-mac-uses-to-speak-text-mchlp2290/mac). + +Originally +we showed you to use `say -r 500 -v Boing` where `r` is the rate and `v` is the +voice. Let's setup a usage like this: + +```ruby +pry(main)> bb = BeatBox.new("deep dop dop deep") +#=> #>>>>> + +pry(main)> bb.play +#=> # plays the four sounds normal speed with Boing voice + +pry(main)> bb.rate = 100 +#=> 100 + +pry(main)> bb.play +#=> # plays the four sounds slower with Boing voice + +pry(main)> bb.voice = "Daniel" +#=> "Daniel" + +pry(main)> bb.play +#=> # plays the four sounds slower with Daniel voice + +pry(main)> bb.reset_rate +#=> 500 + +pry(main)> bb.reset_voice +#=> "Boing" + +pry(main)> bb.play +#=> # plays the four sounds normal speed with Boing voice +``` + +Note: You do not need to test the `play` method, but are welcome to give it a shot diff --git a/module1/projects/beat_box/requirements.md b/module1/projects/beat_box/requirements.md new file mode 100644 index 00000000..6992ca70 --- /dev/null +++ b/module1/projects/beat_box/requirements.md @@ -0,0 +1,26 @@ +--- +layout: page +title: Beat Box - Requirements +--- + +_[Back to Beat Box Home](./index)_ + + +In order to help you to organize your project, we have broken the requirements into four separate iterations. It is expected that you will complete iterations 1-3, while 4 includes extensions that represent opportunities to further explore. + +* [Iteration 1](./iteration_1) +* [Iteration 2](./iteration_2) +* [Iteration 3](./iteration_3) +* [Iteration 4](./iteration_4) + +In addition to the functionality outlined in these iterations, we will expect the you to do the following: + +* write tests for each class +* write readable code +* make frequent commits +* use pull requests + +For more detailed information about what we expect, please review the [rubric](./rubric) before starting this project! + +## Submission +You will submit this project using a Google Form linked in the Project Due calendar event on the Module 1 calendar. \ No newline at end of file diff --git a/module1/projects/beat_box/rubric.md b/module1/projects/beat_box/rubric.md new file mode 100644 index 00000000..d593279f --- /dev/null +++ b/module1/projects/beat_box/rubric.md @@ -0,0 +1,34 @@ +--- +layout: page +title: Beat Box Rubric +--- + +_[Back to Beat Box Home](./index)_ + + +## Learning Goals + +* Follow an interaction pattern +* Write readable code that adheres to Ruby convention +* Write tests +* Distinguishing between classes and instances of those classes +* Use and implement iteration or recursion techniques +* Host code on Github + + +## Evaluation Preparation +1. Be prepared to share your screen with your Beat Box project open in your text editor. +2. Be prepared to share your tests. +3. Be prepared to talk about parts of your code you're proud of, and parts of your code you would like to refactor if you had more time. +4. Be prepared to ask any questions you might have. + + +
+ +
| **Exceeds Expectations** | **Meets Expectations** | **Approaching Expectations** | **Below Expectations** +-- | --- | --- | --- | --- +**Functionality** | Complete both extensions of iteration 4. | Complete through Iteration 3 and functions as defined by the project requirements. | Up to Iteration 2 is complete or the application does not exactly follow the requirements outlined in the specification. | Iteration 2 is not complete. | +**Ruby Mechanics** | Project includes appropriate uses of datatypes and methods not covered in class | Appropriately uses Ruby's built in datatypes and methods and flow control. | Does not appropriately use one or two of the following: Ruby's built in datatypes and methods or flow control | Does not appropriately use Ruby's built in datatypes and methods or flow control, or does not build classes | +**Ruby Conventions** | Classes, methods, and variables are well named so that they clearly communicate their purpose. Code is all properly indented and syntax is consistent. | Code is mostly properly indented, spaced, and lines are not excessively long. Class, method, variable, and file names follow convention | Code demonstrates some proper indenting and spacing. Class, method, variable, and file names inconsistently follow convention | Code is not properly indented and spaced and lines are excessively long. Class, method, variable, and file names do not follow convention | +**Testing** | All methods are accurately tested. Best use assertions are made. Edge cases are tested. | Each class has its own test file. Every method listed on the specification is tested. Most tests are written to accurately verify expected behavior. | Tests are written for most methods listed on the specification, but the tests may be in an incorrect location or the tests may not accurately verify the expected behavior | Fewer than 7 tests written | +**Version Control** | At least 30 commits. At least 3 pull requests. Commit messages and Pull Request documentation clearly indicate changes made. | Code is hosted on main branch of Github repository. At least 20 commits. At least 1 pull request. | Code is hosted on Github, but has fewer than 20 commits or has no pull requests | Code is not hosted on Github | diff --git a/module1/projects/beat_box/setup.md b/module1/projects/beat_box/setup.md new file mode 100644 index 00000000..7a1ba9f0 --- /dev/null +++ b/module1/projects/beat_box/setup.md @@ -0,0 +1,10 @@ +--- +layout: page +title: Beat Box - Setup +--- + +_[Back to Beat Box Home](./index)_ + +## Repository Setup + +You will create this repository from scratch. You should also host this repository on Github and use commits, branching, and pull requests. Like other project code we've seen so far, you should have a `lib` directory for your classes and a `spec` directory for your tests. \ No newline at end of file From 94087da590b4d0032730695781547338fefcb087 Mon Sep 17 00:00:00 2001 From: memcmahon Date: Tue, 7 Jan 2025 14:09:24 -0700 Subject: [PATCH 02/15] add link to beatbox --- module1/projects/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/module1/projects/index.md b/module1/projects/index.md index 70dd944c..13288b3d 100644 --- a/module1/projects/index.md +++ b/module1/projects/index.md @@ -17,6 +17,7 @@ Week 2-3 (Solo): [DMV](./dmv/) Week 3-4 (Paired): [Battleship](./battleship/) +Week 4 Extra Time!: [Beat Box](./beat_box/) Week 5-6 (Group Final): TBD From b51e59f74d3f678275c9615209916cea600b81c4 Mon Sep 17 00:00:00 2001 From: Abdul Redd <104014874+abdulredd@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:42:39 -0500 Subject: [PATCH 03/15] update m2 pr template --- module2/projects/pr_template.md | 35 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/module2/projects/pr_template.md b/module2/projects/pr_template.md index 650a209a..e5492302 100644 --- a/module2/projects/pr_template.md +++ b/module2/projects/pr_template.md @@ -8,40 +8,39 @@ title: Pull Request Template Info Example PR Template ```plaintext -- [ ] Wrote tests? - [ ] Implemented the code? - [ ] Reviewed my code? - -Necessary check marks: - - - [ ] All Tests are Passing - - [ ] The code will run locally - Type of change - [ ] New feature - [ ] Bug Fix +Check the correct boxes + + - [ ] This code broke nothing + - [ ] This code broke some stuff + - [ ] This code broke everything + Implements/Fixes: - # Description of work... + - Description of work... -Check the correct boxes +Testing Changes: - - [ ] This broke nothing - - [ ] This broke some stuff - - [ ] This broke everything + - [ ] I have fully tested my code + - [ ] All tests are passing + - [ ] Some tests are failing + - [ ] All tests are failing -Testing Changes + - [ ] No previous tests have been changed + - [ ] Some previous tests have been changed + - [ ] All of the previous tests have been changed (Please describe what in the world happened that all of the previous tests needed changing.) - - [ ] No Tests have been changed - - [ ] Some Tests have been changed - - [ ] All of the Tests have been changed(Please describe what in the world happened) Checklist: - - [ ] My code has no unused/commented out code - [ ] I have reviewed my code + - [ ] The code will run locally + - [ ] My code has no unused/commented out code - [ ] I have commented my code, particularly in hard-to-understand areas - - [ ] I have fully tested my code (Optional) What questions do you have? Anything specific you want feedback on? From 5998431e3f73f9b95cc634d25e9a591df905fd1b Mon Sep 17 00:00:00 2001 From: Abdul Redd <104014874+abdulredd@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:45:19 -0500 Subject: [PATCH 04/15] add pr template to m3 --- module3/projects/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module3/projects/index.md b/module3/projects/index.md index aed426f0..000c2615 100644 --- a/module3/projects/index.md +++ b/module3/projects/index.md @@ -15,7 +15,6 @@ The project specs will be linked below as each project is assigned. ## Additional Projects and Resources -- [PR Template](./pr_template) +- [PR Template](./../../module2/projects/pr_template.md) - [jsFunk:](./js_funk) Daily assessment prep with JS data manipulation exercises - [Ideabox Ideas & Practice](./ideabox_practice) - From c8c4d5e2c16c597d327391d96ccd65d50e20a8db Mon Sep 17 00:00:00 2001 From: Abdul Redd <104014874+abdulredd@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:46:05 -0500 Subject: [PATCH 05/15] update m2 pr template --- module2/projects/pr_template.md | 1 - 1 file changed, 1 deletion(-) diff --git a/module2/projects/pr_template.md b/module2/projects/pr_template.md index e5492302..ada0beec 100644 --- a/module2/projects/pr_template.md +++ b/module2/projects/pr_template.md @@ -34,7 +34,6 @@ Testing Changes: - [ ] Some previous tests have been changed - [ ] All of the previous tests have been changed (Please describe what in the world happened that all of the previous tests needed changing.) - Checklist: - [ ] I have reviewed my code From d6d31fc7bea4cc460b55c1344293a1830c18c3b8 Mon Sep 17 00:00:00 2001 From: Abdul Redd <104014874+abdulredd@users.noreply.github.com> Date: Tue, 7 Jan 2025 21:48:48 -0500 Subject: [PATCH 06/15] add pr template to m3 --- module3/projects/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module3/projects/index.md b/module3/projects/index.md index 000c2615..208ce9a3 100644 --- a/module3/projects/index.md +++ b/module3/projects/index.md @@ -15,6 +15,6 @@ The project specs will be linked below as each project is assigned. ## Additional Projects and Resources -- [PR Template](./../../module2/projects/pr_template.md) +- [PR Template](./pr_template.md) - [jsFunk:](./js_funk) Daily assessment prep with JS data manipulation exercises - [Ideabox Ideas & Practice](./ideabox_practice) From 268656947617a4551ef119779016a092e79d362f Mon Sep 17 00:00:00 2001 From: Megan McMahon Date: Thu, 9 Jan 2025 08:45:02 -0700 Subject: [PATCH 07/15] Update peer_code_share.md --- module1/projects/battleship/peer_code_share.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module1/projects/battleship/peer_code_share.md b/module1/projects/battleship/peer_code_share.md index 18db9c21..af409e67 100644 --- a/module1/projects/battleship/peer_code_share.md +++ b/module1/projects/battleship/peer_code_share.md @@ -19,4 +19,4 @@ Then, with your project partner, take 25 minutes to review the other team's code 1. What other feedback do you have for the other team? 1. What other questions do you have for the other team? -Once both teams have finished reviewing code, set up a 40 meeting with the other team. During that meeting, both teams should share their answers to the questions above. +Once both teams have finished reviewing code, set up a meeting with the other team. During that meeting, both teams should share their answers to the questions above. From 685802b04634cf20d39b7085cb0fdf8ece5b6ec8 Mon Sep 17 00:00:00 2001 From: Megan McMahon Date: Thu, 9 Jan 2025 12:50:53 -0700 Subject: [PATCH 08/15] Update index.md --- module0/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module0/index.md b/module0/index.md index 744300fd..e23fdb31 100644 --- a/module0/index.md +++ b/module0/index.md @@ -16,7 +16,7 @@ title: Welcome to Module 0 2502 (Feb 3) - January 13 - January 17 + January 27 - February 2 From 0a277d15be10271f9efe7f6f046d819d0b1a8e9b Mon Sep 17 00:00:00 2001 From: Abdul Redd <104014874+abdulredd@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:21:41 -0500 Subject: [PATCH 09/15] update m2 error handling lesson to use message: over title: --- module2/lessons/error_handling.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module2/lessons/error_handling.md b/module2/lessons/error_handling.md index 7980b9c3..801b21f7 100644 --- a/module2/lessons/error_handling.md +++ b/module2/lessons/error_handling.md @@ -1,6 +1,6 @@ --- layout: page -title: Error Handling in Rails Application +message: Error Handling in Rails Application length: 150 tags: rails, errors, rescue, raise, exceptions --- @@ -226,7 +226,7 @@ def show errors: [ { status: "404", - title: exception.message + message: exception.message } ] }, status: :not_found @@ -307,7 +307,7 @@ def create errors: [ { status: "422", - title: exception.message + message: exception.message } ] }, status: :unprocessable_entity @@ -342,7 +342,7 @@ def create errors: [ { status: "422", - title: song.errors.full_messages + message: song.errors.full_messages } ] }, status: :unprocessable_entity From ce2a32d4d4660000fd54444d3b2061060b0882a1 Mon Sep 17 00:00:00 2001 From: Abdul Redd <104014874+abdulredd@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:22:01 -0500 Subject: [PATCH 10/15] update m2 error handling lesson to use message: over title: --- module3/projects/pr_template.md | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 module3/projects/pr_template.md diff --git a/module3/projects/pr_template.md b/module3/projects/pr_template.md new file mode 100644 index 00000000..ada0beec --- /dev/null +++ b/module3/projects/pr_template.md @@ -0,0 +1,52 @@ +--- +layout: page +title: Pull Request Template Info +--- + +[How to create a PR Template for a GitHub Repo](https://docs.github.com/en/free-pro-team@latest/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository) + +Example PR Template + +```plaintext +Type of change + + - [ ] New feature + - [ ] Bug Fix + +Check the correct boxes + + - [ ] This code broke nothing + - [ ] This code broke some stuff + - [ ] This code broke everything + +Implements/Fixes: + + - Description of work... + +Testing Changes: + + - [ ] I have fully tested my code + - [ ] All tests are passing + - [ ] Some tests are failing + - [ ] All tests are failing + + - [ ] No previous tests have been changed + - [ ] Some previous tests have been changed + - [ ] All of the previous tests have been changed (Please describe what in the world happened that all of the previous tests needed changing.) + +Checklist: + + - [ ] I have reviewed my code + - [ ] The code will run locally + - [ ] My code has no unused/commented out code + - [ ] I have commented my code, particularly in hard-to-understand areas + +(Optional) What questions do you have? Anything specific you want feedback on? + + * + +(For Fun!) Please include a link to a gif [or add an emoji] of your feelings about this branch. + +Link: + +``` From 9d6b3dfb808b6e73c6159beba65c1de154c74cc3 Mon Sep 17 00:00:00 2001 From: Megan McMahon Date: Mon, 13 Jan 2025 10:33:19 -0700 Subject: [PATCH 11/15] Update index.md --- module1/projects/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module1/projects/index.md b/module1/projects/index.md index 13288b3d..64594568 100644 --- a/module1/projects/index.md +++ b/module1/projects/index.md @@ -18,7 +18,7 @@ Week 2-3 (Solo): [DMV](./dmv/) Week 3-4 (Paired): [Battleship](./battleship/) Week 4 Extra Time!: [Beat Box](./beat_box/) -Week 5-6 (Group Final): TBD +Week 5-6 (Group Final): [Futbol](./futbol_pd/) ## Additional Projects and Resources From bc49a83aa7ba5fe4465411edf3999fc799128130 Mon Sep 17 00:00:00 2001 From: Heather Faerber Date: Mon, 13 Jan 2025 15:44:09 -0700 Subject: [PATCH 12/15] Add questions to error handling fe lesson --- module3/lessons/fe_error_handling.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/module3/lessons/fe_error_handling.md b/module3/lessons/fe_error_handling.md index 8c5f5845..6e4f8f81 100644 --- a/module3/lessons/fe_error_handling.md +++ b/module3/lessons/fe_error_handling.md @@ -121,7 +121,16 @@ Now, let's compare that response object in two scenarios: } ``` -Do we think we could use any of these properties to check if the network request was successful? +
+ +### Consider +Do we think we could use any of these properties to check if the network request was successful? + +What triggers a catch block? + +How can we write code to trigger the catch block if our network request is not successful? + +
### Research @@ -136,6 +145,9 @@ Let's spend a little time looking through these docs: - Q: What does `throw new Error('some message here')` do?
+ +### Try It! + ## Site Reliability Engineer (SRE) -Similarly, Brennan Ayers 1903 found himself searching for a new job and was “willing to take anything." He came across a Site Reliability Engineering (SRE) Role and decided to pivot from devopment. A Site Reliability Engineer ensures that software systems are reliable, scalable, and efficient. They blend software engineering and operations to automate tasks like deployments, monitor system performance, and quickly resolve incidents. Their main goal is to maintain uptime while improving systems through automation and optimization. +Similarly, Brennan Ayers 1903 found himself searching for a new job and was “willing to take anything." He came across a Site Reliability Engineering (SRE) Role and decided to pivot from development. A Site Reliability Engineer ensures that software systems are reliable, scalable, and efficient. They blend software engineering and operations to automate tasks like deployments, monitor system performance, and quickly resolve incidents. Their main goal is to maintain uptime while improving systems through automation and optimization. ### Key Responsibilities: @@ -101,7 +101,7 @@ We had the chance to chat with Brennan, who transitioned from a traditional engi