From 22de3232aca295ee9edc4d27265943b6f1d1617d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 13:36:17 +0200
Subject: [PATCH 01/23] Modify md files to allow Ruby course walkthrough in
github
---
README.md | 2 +-
ruby/Open_Ruby_Overview.md | 266 +++++++++++++++++++++++++++++++++++++
2 files changed, 267 insertions(+), 1 deletion(-)
create mode 100644 ruby/Open_Ruby_Overview.md
diff --git a/README.md b/README.md
index 1d088ef..644e4af 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
The material in this repository is divided by topic.
-* Ruby
+* [Ruby](ruby/Open_Ruby_Overview.md)
* SQL
* Rails
* HTML/CSS
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
new file mode 100644
index 0000000..806777d
--- /dev/null
+++ b/ruby/Open_Ruby_Overview.md
@@ -0,0 +1,266 @@
+# Ruby
+
+## Topics Covered
+
+- Enumerables and Debugging
+- References
+- Recursion
+- Git
+- Data Structures
+- Object-Oriented Programming
+- RSpec and TDD
+- Big-O
+- LRU Cache
+
+## Notes
+
+Ruby is the first module in the App Academy Full Stack Developer Curriculum. All
+of the material that you cover in these modules will seek to build upon previous
+days and as such, going back to review previous readings or videos will be in
+your best interest when time allows.
+
+As with all future modules, any "Bonus" projects are to be completed after the
+standard projects for each day are completed. Sometimes that could mean going
+back to previous day's "Bonus" projects if you otherwise finish early.
+Additional Resources are readings, videos, or articles that are not required,
+but will serve to deepen your understanding of a topic. They will be denoted
+with a specific icon in your task menu.
+
+## Lessons
+### Getting Started
+- [ ] 1. [Setting up a Development Environment (Phase 1)](course/readings/dev-setup.md)
+### Enumerables and Debugging
+- [ ] 1. [Nontechnical Overview of Ruby](ruby/readings/ruby_nontech.md)
+- [ ] 2. [Debugging](ruby/readings/debugger.md")
+- [ ] 3. [Common Exceptions](ruby/readings/common-exceptions.md)
+- [ ] 4. [More Byebug Commands: display and where](ruby/readings/bonus-debugger.md)
+- [ ] 5. [Debugging Cheatsheet](ruby/readings/debugging_cheatsheet.md)
+- [ ] 6. [Breaking Methods Into Parts](ruby/readings/breaking-into-parts.md)
+- [ ] 7. [Enumerables](ruby/projects/enumerables/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/enumerables/solution.zip)
+- [ ] 8. [Ghost](ruby/projects/ghost/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/ghost/solution.zip)
+- [ ] 9. [Maze Solver (Bonus)](ruby/projects/maze_solver/README.md)
+ - [Soution](https://assets.aaonline.io/fullstack/ruby/projects/maze_solver/solution.zip)
+- [ ] 10. [Eight Queens Puzzle (Bonus)](https://en.wikipedia.org/wiki/Eight_queens_puzzle)
+- [ ] 11. [Project Euler (Bonus)](https://projecteuler.net/problems)
+- [ ] 11. [Project Euler (Bonus)](https://projecteuler.net/problems)
+### Reference
+- [ ] 1. [References Video](https://player.vimeo.com/video/165965713)
+- [ ] 2. [References](ruby/readings/references.md)
+- [ ] 3. [Array/Hash Defaults](ruby/readings/array-hash-defaults.md)
+- [ ] 4. [Scope](ruby/readings/scope.md)
+- [ ] 5. [DRY (Dont Repeat Yourself)](ruby/readings/dry.md)
+- [ ] 6. [Method Decomposition & Design](ruby/readings/method-decomposition.md)
+- [ ] 7. [Refactoring and Code Smells](ruby/readings/refactoring.md)
+- [ ] 8. [Reference Quiz](ruby/quizzes/reference.md)
+- [ ] 9. [VSCode Cheatsheet](course/readings/vscode_cheatsheet.md)
+- [ ] 10. [Testing Small (from Memory Puzzle)](ruby/readings/testing-small.md)
+- [ ] 11. [my_flatten Solution Video](https://player.vimeo.com/video/336469470)
+- [ ] 12. [my_zip Solution Video](https://player.vimeo.com/video/336469834)
+- [ ] 13. [my_rotate Solution Video](https://player.vimeo.com/video/336470349)
+- [ ] 14. [Pass by Reference Lecture](https://player.vimeo.com/video/336470662)
+- [ ] 15. [Hash Defaults Lecture](https://player.vimeo.com/video/336471687)
+- [ ] 16. [Block and Procs Lecture](https://player.vimeo.com/video/336472385)
+- [ ] 17. [Methods Lecture](https://player.vimeo.com/video/336472772)
+- [ ] 18. [Memory Puzzle](ruby/projects/memory/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/memory/solution.zip)
+- [ ] 19. [Sudoku](ruby/projects/sudoku/README.md)
+ - [Solution](ttps://assets.aaonline.io/fullstack/ruby/projects/sudoku/solution.zip)
+- [ ] 20. [Hash and Equals](ruby/readings/hash-and-equals.md)
+- [ ] 21. [Swap](ruby/readings/swap.md)
+
+### Recursion
+- [ ] 1. [Recursion Intro](https://player.vimeo.com/video/162569408)
+- [ ] 2. [Recursion vs Iteration](https://player.vimeo.com/video/162569439)
+- [ ] 3. [Upcase and Reverse Demo](https://player.vimeo.com/video/162569447)
+- [ ] 4. [Quicksort Intro](https://player.vimeo.com/video/162569453)
+- [ ] 5. [Quicksort Demo](https://player.vimeo.com/video/162569463)
+- [ ] 6. [Stack Overflow Demo](https://player.vimeo.com/video/162569490)
+- [ ] 7. [The Stack](https://player.vimeo.com/video/162571286)
+- [ ] 8. [Recursion](ruby/readings/recursion.md)
+- [ ] 9. [Recursion Quiz](ruby/quizzes/recursion.md)
+- [ ] 10. [InDepth QuickSort Demo](https://player.vimeo.com/video/337154374)
+- [ ] 11. [Recursion Homework](ruby/homeworks/recursion/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/recursion/solution.rb)
+- [ ] 12. [Memory Puzzle Solution](https://player.vimeo.com/video/337147003)
+- [ ] 13. [Recursion Intro Lecture](https://player.vimeo.com/video/337152898)
+- [ ] 14. [Recursion exercises](ruby/projects/recursion/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/recursion/solution.zip)
+- [ ] 15. [Word Chains](ruby/projects/word_chains/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/word_chains/solution.zip)
+- [ ] 16. [More Recursion Questions (Bonus)](ruby/projects/more_recursion_exercises/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/more_recursion_exercises/solutions/recursion_problems.rb)
+- [ ] 17. [More Recursion Questions (Bonus)](ruby/projects/more_recursion_exercises/README.md)
+### Git
+- [ ] 1. [Git: Overview and Why We Use Git](https://player.vimeo.com/video/171666454)
+- [ ] 2. [Git: Mental Models](https://player.vimeo.com/video/171666455)
+- [ ] 3. [Git: Useful Commands](https://player.vimeo.com/video/171666453)
+- [ ] 4. [Git: Wrapup](https://player.vimeo.com/video/171666456)
+- [ ] 5. [Why Git](ruby/readings/why-git.md)
+- [ ] 6. [Git Summary](ruby/readings/git-summary.md)
+- [ ] 7. [Git Workflow](ruby/readings/git-workflow.md)
+- [ ] 8. [Gems and rbenv](ruby/readings/gems-and-rbenv.md)
+- [ ] 9. [Nontechnical Overview of Git](ruby/readings/git_nontech.md)
+- [ ] 10. [Nontechnical Overview of Agile Development](ruby/readings/agile_nontech.md)
+- [ ] 11. [Git Quiz](ruby/quizzes/git.md)
+- [ ] 12. [Git Workflow Exercises](ruby/homeworks/git-workflow-exercises.md)
+- [ ] 13. [Merge Sort Solution](https://player.vimeo.com/video/337155330)
+- [ ] 14. [bSearch Solution](https://player.vimeo.com/video/337165165)
+- [ ] 15. [Serialization (JSON and YAML)](ruby/readings/serialization.md)
+- [ ] 16. [Git add](ruby/readings/git-add.md)
+- [ ] 17. [Git Repository Clean Up](ruby/readings/git-repository-cleanup.md)
+- [ ] 18. [Faster Git with aliases](ruby/readings/alias.md)
+- [ ] 19. [Fixing Git commit authorship](ruby/readings/git-fix-authorship.md)
+- [ ] 20. [Git Cheatsheet](http://www.ndpsoftware.com/git-cheatsheet.html)
+- [ ] 21. [Student Github Repo Example](https://github.com/aa-repo-examples)
+- [ ] 22. [Git Lecture](https://player.vimeo.com/video/337165903)
+- [ ] 23. [Screwedoku](ruby/projects/screwdoku/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/sudoku/solution.zip)
+- [ ] 24. [Minesweeper](ruby/projects/minesweeper/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/minesweeper/solution.zip)
+### Data Structures
+- [ ] 1. [Data Structures](https://player.vimeo.com/video/162763729)
+- [ ] 2. [DFS](https://player.vimeo.com/video/162763740)
+- [ ] 3. [Intro to Algorithms and Data Structures](ruby/readings/intro-algorithms-and-data-structures.md)
+- [ ] 4. [Inspecting Complex Elements](ruby/readings/overriding_inspect.md)
+- [ ] 5. [Data Structures Quiz](ruby/quizzes/data_structures.md)
+- [ ] 6. [Homeworks with Git](ruby/homeworks/git-homeworks.md)
+- [ ] 7. [DIY ADTs](ruby/homeworks/abstract_data_types/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/abstract_data_types/solution.rb)
+- [ ] 8. [ADT - Stack & Queues Lecture](https://player.vimeo.com/video/337176180)
+- [ ] 9. [Binary Trees & DFS Lecture](https://player.vimeo.com/video/337177768)
+- [ ] 10. [Binary Trees & DFS Lecture II](https://player.vimeo.com/video/337181557)
+- [ ] 11. [Intro data structures: PolyTreeNode](ruby/projects/poly_tree_node/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poly_tree_node/solution.zip
+- [ ] 12. [Graph Intro](ruby/readings/graph_nodes_reading.md)
+- [ ] 13. [Graph Traversal](ruby/readings/graph_traversal_notes_reading.md)
+- [ ] 14. [Graph Nodes and BFS](ruby/homeworks/graphs/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/graphs/solution.rb)
+- [ ] 15. [Knights Travails](ruby/projects/knights_travails/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/knights_travails/solution.zip)
+- [ ] 16. [Knights Travails (Part Two)](ruby/projects/knights_travails/part_two.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/knights_travails/solution.zip)
+- [ ] 17. [Tic-Tac-Toe AI](ruby/projects/tic_tac_toe_ai/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/tic_tac_toe_ai/solution.zip)
+### Object-oriented programming
+- [ ] 1. [Inheritance](ruby/readings/inheritance.md)
+- [ ] 2. [Exceptions, error handling](ruby/readings/errors.md)
+- [ ] 3. [Decomposition into objects](ruby/readings/object-decomposition.md)
+- [ ] 4. [Inheritance and DRY](ruby/readings/inheritance-design.md)
+- [ ] 5. [Information hiding/encapsulation](ruby/readings/hiding.md)
+- [ ] 6. [UML](ruby/readings/uml.md)
+- [ ] 7. [Singleton](http://ruby-doc.org/stdlib-1.9.3/libdoc/singleton/rdoc/Singleton.html#module-Singleton-label-Usage)
+- [ ] 8. [OOP Quiz 1](ruby/quizzes/oop_1.md)
+- [ ] 9. [Simon](ruby/homeworks/simon/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/simon/solution.zip)
+- [ ] 10. [Stereotype Threat](https://www.nytimes.com/2012/10/07/opinion/sunday/intelligence-and-the-stereotype-threat.html)
+- [ ] 11. [Unconscious Bias in Tech](https://medium.com/@aldynchwelos/unconscious-bias-in-tech-why-women-leave-their-engineering-careers-f9653185d17b)
+- [ ] 12. [When Algorithms Discriminate](https://www.nytimes.com/2015/07/10/upshot/when-algorithms-discriminate.html)
+- [ ] 13. [Implicit Association Test](https://implicit.harvard.edu/implicit/takeatest.html)
+- [ ] 14. [You're More Biased Than You Think](https://www.fastcompany.com/3036627/youre-more-biased-than-you-think)
+- [ ] 15. [Seven Day Bias Cleanse](http://www.lookdifferent.org/what-can-i-do/bias-cleanse)
+- [ ] 16. [Error Handling Funtime](ruby/homeworks/error_handling_funtime/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/error_handling_funtime/solution.zip)
+- [ ] 17. [Class inheritance](ruby/projects/class_inheritance/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/class_inheritance/solution.zip)
+- [ ] 18. [Chess (Part One)](ruby/projects/chess/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip
+- [ ] 19. [Chess (Part Two)](ruby/projects/chess/part_two.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip
+- [ ] 20. [Chess (Part Three)](ruby/projects/chess/part_three.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip
+- [ ] 21. [OOP Quiz 2](ruby/quizzes/oop_2.md)
+- [ ] 22. [Mancala](ruby/homeworks/mancala/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/mancala/solution.zip)
+- [ ] 23. [Knight's Travails Solution](https://player.vimeo.com/video/337182911)
+- [ ] 24. [TTT Solution](https://player.vimeo.com/video/337184604)
+- [ ] 25. [PolyTreeNode Solution](https://player.vimeo.com/video/337176225)
+- [ ] 26. [Method Encapsulation Lecture](https://player.vimeo.com/video/337191439)
+- [ ] 27. [Inheritance & Modules Lecture](https://player.vimeo.com/video/337194155)
+- [ ] 28. [Error Handling Lecture](https://player.vimeo.com/video/337195111)
+- [ ] 29. [Modules](ruby/readings/modules.md)
+- [ ] 30. [load/require/require_relative](ruby/readings/require.md)
+- [ ] 31. [public/private/protected](ruby/readings/privacy.md)
+### RSpec and TDD
+- [ ] 1. [RSpec Syntax](ruby/readings/rspec-syntax.md)
+- [ ] 2. [subject and let](ruby/readings/subject-and-let.md)
+- [ ] 3. [Order of RSpec methods](ruby/readings/rspec-order.md)
+- [ ] 4. [Test doubles](ruby/readings/test-doubles.md)
+- [ ] 5. [Intro to RSpec](https://player.vimeo.com/video/192497364)
+- [ ] 6. [Setup and Basic Syntax](https://player.vimeo.com/video/192665133)
+- [ ] 7. [SErrors, Equality Matchers, Subject/Let, and Doubles](https://player.vimeo.com/video/192662950)
+- [ ] 8. [Rspec: Code Demo](https://player.vimeo.com/video/192666370)
+- [ ] 9. [RSpec and TDD Quiz](ruby/quizzes/rspec_tdd.md)
+- [ ] 10. [RSpec](ruby/homeworks/rspec/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/rspec/solution.zip)
+- [ ] 11. [RSpec](ruby/homeworks/rspec/README.md)
+- [ ] 12. [Introduction to RSpec](ruby/readings/intro-rspec.md)
+- [ ] 13. [TDD](ruby/readings/intro-tdd.md)
+- [ ] 14. [guard-rspec](ruby/readings/guard-rspec.md)
+- [ ] 15. [OO Robot RSpec Example](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/robot_spec.rb)
+- [ ] 16. [Chess Solutions Walkthroughe](https://player.vimeo.com/video/317152522)
+- [ ] 17. [RSpec Lecture - Part One](https://player.vimeo.com/video/317367140)
+- [ ] 18. [RSpec Lecture - Part Two](https://player.vimeo.com/video/317367563)
+- [ ] 19. [Hack Academy](html-css/micro-projects/css_intro/README.md)
+ - [Solution](https://www.appacademy.io/)
+- [ ] 20. [First TDD Projects](ruby/projects/first_tdd/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/solution.zip)
+- [ ] 21. [Poker](ruby/projects/poker/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poker/solution.zip)
+- [ ] 22. [How RSpec works document](ruby/readings/how-rspec-works.md)
+
+### Big-O
+- [ ] 1. [Motivations for Big-O](https://player.vimeo.com/video/175565088)
+- [ ] 2. [RAM Model of Computation](https://player.vimeo.com/video/175565090)
+- [ ] 3. [Asymptotic Analysis](https://player.vimeo.com/video/175565086)
+- [ ] 4. [The Worst Case](https://player.vimeo.com/video/175565094)
+- [ ] 5. [Common Classifications](https://player.vimeo.com/video/175568501)
+- [ ] 6. [Set Definition](https://player.vimeo.com/video/175568481)
+- [ ] 7. [Space Complexity](https://player.vimeo.com/video/175565092)
+- [ ] 8. [Big O Quiz](ruby/quizzes/big_o.md)
+- [ ] 9. [Sorting Complexity](ruby/homeworks/sorting_demo/README.md)
+- [ ] 10. [Octopus Problems](ruby/homeworks/big_octopus/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/big_octopus/solution.rb)
+- [ ] 11. [Plain English explanation of Big O](http://stackoverflow.com/questions/487258/plain-english-explanation-of-big-o)
+- [ ] 12. [Big O Notation](https://www.interviewcake.com/article/ruby/big-o-notation-time-and-space-complexity)
+- [ ] 13. [Merge Sort](https://www.hackerearth.com/practice/algorithms/sorting/merge-sort/visualize/)
+- [ ] 14. [Bubble Sort](https://www.hackerearth.com/practice/algorithms/sorting/bubble-sort/visualize/)
+- [ ] 15. [Big O Cheatsheet](http://bigocheatsheet.com/)
+- [ ] 16. [Big O Intro & Cat Matcher Lecture](https://player.vimeo.com/video/337176296)
+- [ ] 17. [Binary Search and BigO Lecture](https://player.vimeo.com/video/337181856)
+- [ ] 18. [Merge Sort and BigO Lecture](https://player.vimeo.com/video/337186188)
+- [ ] 19. [Execution Time Differences/Algorithms](ruby/projects/execution_time_differences/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/execution_time_differences/solution.zip)
+- [ ] 20. [Anagrams](ruby/projects/anagrams/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/anagrams/solution.zip)
+- [ ] 21. [Two sum problem](ruby/projects/two_sum/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/two_sum/solution.zip)
+- [ ] 22. [Windowed Max Range](ruby/projects/max_windowed_range/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/max_windowed_range/solution.zip)
+- [ ] 23. [Benchmarking (Bonus)](ruby/projects/benchmarking/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/demos/sorting_demo/sorting_demo.rb#L58-L67)
+- [ ] 24. [Benchmarking (Bonus)](ruby/projects/benchmarking/README.md)
+### LRU Cache
+- [ ] 1. [Set and Int Set](https://player.vimeo.com/video/159431377)
+- [ ] 2. [Resizing Int Set Part 1](https://player.vimeo.com/video/159433039)
+- [ ] 3. [Resizing Int Set Part 2](https://player.vimeo.com/video/159437719)
+- [ ] 4. [Hashing](https://player.vimeo.com/video/159435811)
+- [ ] 5. [Hash Set](https://player.vimeo.com/video/159438691)
+- [ ] 6. [Linked Lists and Hashmaps](https://player.vimeo.com/video/159440267)
+- [ ] 7. [Caches](https://player.vimeo.com/video/159441490)
+- [ ] 8. [LRU Cache Video](https://player.vimeo.com/video/159435146)
+- [ ] 9. [How Hashes Work](http://www.gotealeaf.com/blog/how-the-hash-works-in-ruby)
+- [ ] 10. [LRU Cache Reading](https://web.archive.org/web/20150710185255/http://mcicpc.cs.atu.edu/archives/2012/mcpc2012/lru/lru.html)
+- [ ] 11. [Dynamic Array (Wikipedia)](https://en.wikipedia.org/wiki/Dynamic_array)
+- [ ] 12. [XOR Reading](ruby/readings/xor.md)
+- [ ] 13. [LRU Cache Quiz](ruby/quizzes/lru_cache.md)
+- [ ] 14. [LRU Cache](ruby/homeworks/lru_cache/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/lru_cache/solution.rb)
+- [ ] 15. [Hash Map & LRU Cache](ruby/projects/hash_map_lru_cache/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/hash_map_lru_cache/solution.zip)
+- [ ] 16. [Hash Map & LRU Cache (Part Two)](ruby/projects/hash_map_lru_cache/part_two.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/hash_map_lru_cache/solution.zip)
+- [ ] 17. [Dynamic Array (Bonus)](ruby/projects/hash_map_lru_cache/dynamic_array.md)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/hash_map_lru_cache/solution.zip)
+- [ ] 18. [Basic cursor input](https://github.com/rglassett/ruby-cursor-game)
\ No newline at end of file
From b56cd0a8c00d49672d77aad9f1a717383de14b7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 13:37:15 +0200
Subject: [PATCH 02/23] Fix quizzes for github
---
ruby/quizzes/big_o.md | 100 +++++++++++--------------
ruby/quizzes/data_structures.md | 86 +++++++++-------------
ruby/quizzes/git.md | 68 +++++++----------
ruby/quizzes/lru_cache.md | 64 +++++++---------
ruby/quizzes/oop_1.md | 82 +++++++++------------
ruby/quizzes/oop_2.md | 76 +++++++++----------
ruby/quizzes/recursion.md | 113 +++++++++++++++-------------
ruby/quizzes/reference.md | 126 +++++++++++++++++---------------
ruby/quizzes/rspec_tdd.md | 107 +++++++++++++++------------
9 files changed, 390 insertions(+), 432 deletions(-)
diff --git a/ruby/quizzes/big_o.md b/ruby/quizzes/big_o.md
index 9fd05c5..754bc53 100644
--- a/ruby/quizzes/big_o.md
+++ b/ruby/quizzes/big_o.md
@@ -1,44 +1,35 @@
# Big-O Quiz
+Which of the following represents an ordering of strictly increasing time complexity?
+- [ ] $O(n log n) < O(log n) < O(n) < O(n^2) < O(n!) < O(2^n)$
+- [ ] $O(1)$ < $O(log n)$ < $O(n)$ < $O(n log n)$ < $O(n^2)$ < $O(2^n)$ < $O(n!)$
+- [ ] $O(n^3)$ < $O(n^2)$ < $O(2^n)$ < $O(n log n)$ < $O(n)$ < $O(log n)$ < $O(1)$
+- [ ] $O(n)$ < $O(2n)$ < $O(3n)$ < $O(n + 1)$ < $O(n + 2)$ < $O(n + 3)$
+- [ ] $O(1)$ < $O(log n)$ < $O(n)$ < $O(n^2)$ < $O(n!)$ < $O(2^n)$ < $O(n^n)$
-
-
- Which of the following represents an ordering of strictly increasing time complexity?
- `O(n log n)` < `O(log n)` < `O(n)` < `O(n^2)` < `O(n!)` < `O(2^n)`
- `O(1)` < `O(log n)` < `O(n)` < `O(n log n)` < `O(n^2)` < `O(2^n)` < `O(n!)`
- `O(n^3)` < `O(n^2)` < `O(2^n)` < `O(n log n)` < `O(n)` < `O(log n)` < `O(1)`
- `O(n)` < `O(2n)` < `O(3n)` < `O(n + 1)` < `O(n + 2)` < `O(n + 3)`
- `O(1)` < `O(log n)` < `O(n)` < `O(n^2)` < `O(n!)` < `O(2^n)` < `O(n^n)`
- Remember `O(1)`, or constant time, is the slowest growing in terms of time complexity and `O(n!)`, or factorial time, is the fastest growing.
-
-
+Answer:
$O(1)$ < $O(log n)$ < $O(n)$ < $O(n log n)$ < $O(n^2)$ < $O(2^n)$ < $O(n!)$
+Explanation:
+Remember $O(1)$, or constant time, is the slowest growing in terms of time complexity and $O(n!)$, or factorial time, is the fastest growing.
+#### What is the asymptotic representation of the following time complexity: $O(2n^3 + .5n^2 + 1000n)$
+- [ ] $O(2n^3)$
+- [ ] $O(n^3 + n^2 + n)$
+- [ ] $O(1000n)$
+- [ ] $O(n^3)$
+- [ ] $O(2n^3 + .5n^2 + 1000n)$
+- [ ] $O(.5n^2)$
-
-
- What is the asymptotic representation of the following time complexity: `O(2n^3 + .5n^2 + 1000n)`
- `O(2n^3)`
- `O(n^3 + n^2 + n)`
- `O(1000n)`
- `O(n^3)`
- `O(2n^3 + .5n^2 + 1000n)`
- `O(.5n^2)`
- Ignoring the constants, we get `n^3 + n^2 + n`. `n^3` will dominate the other terms and therefore is the asymptotic representation.
-
-
+Answer:
$O(n^3)$
+Explanation:
Ignoring the constants, we get $n^3 + n^2 + n$. $n^3$ will dominate the other terms and therefore is the asymptotic representation.
+#### Which of the following time complexities is linearithmic?
+- [ ] $O(n^2)$
+- [ ] $O(n!)$
+- [ ] $O(2^n)$
+- [ ] $O(n log n)$
+- [ ] $O(n)$
-
-
- Which of the following time complexities is linearithmic?
- `O(n^2)`
- `O(n!)`
- `O(2^n)`
- `O(n log n)`
- `O(n)`
- Remember linearithmic, or loglinear, time is `O(n log n)`. This is also the time complexity for `merge sort`, which is one of the fastest comparison sorts.
-
-
-
+Answer:
$O(n log n)$
+Explanation:
Remember linearithmic, or loglinear, time is $O(n log n)$. This is also the time complexity for $merge sort$, which is one of the fastest comparison sorts.
```ruby
def max_squared_value(arr)
@@ -57,29 +48,22 @@
max
end
```
+#### What is the time complexity of the above function?
+- [ ] $O(n log n)$
+- [ ] $O(n^2)$
+- [ ] $O(n)$
+- [ ] $O(n!)$
+- [ ] $O(1)$
-
-
- What is the time complexity of the above function?
- `O(n log n)`
- `O(n^2)`
- `O(n)`
- `O(n!)`
- `O(1)`
- We are iterating over the input array of `n` elements. For each of those `n` elements, we do work that involves another iteration over the entire input array. In other words, for each of the `n` elements, we do `n` amount of work, which gives us `O(n^2)`.
-
-
-
+Answer:
$O(n^2)$
+Explanation:
We are iterating over the input array of $n$ elements. For each of those $n$ elements, we do work that involves another iteration over the entire input array. In other words, for each of the $n$ elements, we do $n$ amount of work, which gives us $O(n^2)$.
+#### What is the time complexity of ruby's `Array#permutation` method? **Note:** you do not need to look at the Ruby source code to answer this question. Remember that Big-O notation is concerned with how runtime grows relative to the size of the input!
+- [ ] $O(n*log(n))$
+- [ ] $O(n^2)$
+- [ ] $O(n)$
+- [ ] $O(n!)$
+- [ ] $O(1)$
-
-
- What is the time complexity of ruby's `Array#permutation` method? **Note:** you do not need to look at the Ruby source code to answer this question. Remember that Big-O notation is concerned with how runtime grows relative to the size of the input!
- `O(n*log(n))`
- `O(n^2)`
- `O(n)`
- `O(n!)`
- `O(1)`
- Whenever you have a problem where you are creating permutations, you are dealing with `factorial` time complexity. E.g., if you call the `Array#permutation` method of an array with the length of 3, then 3! permutations would be returned (6 permutations total). Increasing the length to 4 would then return 24 total permutations, or 4!.
-
-
\ No newline at end of file
+Answer:
$O(n!)$
+Explanation:
Whenever you have a problem where you are creating permutations, you are dealing with $factorial$ time complexity. E.g., if you call the $Array#permutation$ method of an array with the length of 3, then 3! permutations would be returned (6 permutations total). Increasing the length to 4 would then return 24 total permutations, or 4!.
\ No newline at end of file
diff --git a/ruby/quizzes/data_structures.md b/ruby/quizzes/data_structures.md
index 6912e95..51978ea 100644
--- a/ruby/quizzes/data_structures.md
+++ b/ruby/quizzes/data_structures.md
@@ -1,16 +1,13 @@
# Data Structures Quiz
-
-
- LIFO (last-in-first-out) describes the behavior of which of the following?
- Queue
- Set
- Stack
- Map
- When you stack things on top of each other, you have to remove the item off the top first. We can remove the item at the bottom until all of the other items on top of it have been removed. So the first thing that goes in is actually the last thing that comes out.
-
-
+#### LIFO (last-in-first-out) describes the behavior of which of the following?
+- [ ] Queue
+- [ ] Set
+- [ ] Stack
+- [ ] Map
+Answer:
Stack
+Explanation:
When you stack things on top of each other, you have to remove the item off the top first. We can remove the item at the bottom until all of the other items on top of it have been removed. So the first thing that goes in is actually the last thing that comes out.
```ruby
N
@@ -22,27 +19,21 @@
N
```
-
-
- Is the above graph a binary tree?
- No
- Yes
- A binary tree is a graph with the constrant that a node can have at most two children.
-
-
+#### Is the above graph a binary tree?
+- [ ] No
+- [ ] Yes
+Answer:
Yes
+Explanation:
A binary tree is a graph with the constrant that a node can have at most two children.
-
-
- BFS (breadth first search) uses which of the following ADTs?
- Queue
- Set
- Stack
- Map
- As we are looking at each node, we want to add their children to our list of nodes to look at. A queue allows us to utilize FIFO (first in first out) so that the order in which the nodes are added to our list is the order in which they will be dealt with.
-
-
+#### BFS (breadth first search) uses which of the following ADTs?
+- [ ] Queue
+- [ ] Set
+- [ ] Stack
+- [ ] Map
+Answer:
Queue
+Explanation:
As we are looking at each node, we want to add their children to our list of nodes to look at. A queue allows us to utilize FIFO (first in first out) so that the order in which the nodes are added to our list is the order in which they will be dealt with.
```ruby
1
@@ -54,17 +45,14 @@
4 7 8
```
-
-
- If we used DFS to try and find the node with value 6 in the graph above, what is a possible ordering of nodes that would be visited?
- 1-2-5-3-6
- 1-2-3-4-5-6
- 4-3-2-1-7-8-6
- 8-7-4-9-6
- For DFS, we will look at a node, and then look at it's first child, and then that nodes first child and so on until we hit a leaf node or find the node we are searching for. When we hit a leaf node, we will begin popping off the stack of recursive calls (going back up the tree a level at a time) and looking at the next child for that node. Once we find the node we are looking for, we start popping off the stack of recursive calls returning the node we found that has the value we are looking for.
-
-
+#### If we used DFS to try and find the node with value 6 in the graph above, what is a possible ordering of nodes that would be visited?
+- [ ] 1-2-5-3-6
+- [ ] 1-2-3-4-5-6
+- [ ] 4-3-2-1-7-8-6
+- [ ] 8-7-4-9-6
+Answer:
1-2-3-4-5-6
+Explanation:
For DFS, we will look at a node, and then look at it's first child, and then that nodes first child and so on until we hit a leaf node or find the node we are searching for. When we hit a leaf node, we will begin popping off the stack of recursive calls (going back up the tree a level at a time) and looking at the next child for that node. Once we find the node we are looking for, we start popping off the stack of recursive calls returning the node we found that has the value we are looking for.
```ruby
D
@@ -76,15 +64,13 @@
H F B
```
-
-
- Which node in the above graph is the root?
- `A`
- `B`
- `D`
- `F`
- `H`
- `I`
- The root node refers to the top most node that has no parent node.
-
-
+#### Which node in the above graph is the root?
+- [ ] `A`
+- [ ] `B`
+- [ ] `D`
+- [ ] `F`
+- [ ] `H`
+- [ ] `I`
+
+Answer:
`D`
+Explanation:
The root node refers to the top most node that has no parent node.
diff --git a/ruby/quizzes/git.md b/ruby/quizzes/git.md
index 4794788..7f8bc1d 100644
--- a/ruby/quizzes/git.md
+++ b/ruby/quizzes/git.md
@@ -1,47 +1,35 @@
# Git Quiz
-
-
- I want to push changes in my workspace to a remote repository. Which of the following outlines the correct workflow for pushing local changes to a remote repo?
- workspace -> index (staging area) -> local repository -> upstream repository
- workspace -> local repository -> index (staging area) -> upstream repository
- local repository -> workspace -> index (staging area) -> upstream repository
- We make changes to our local workspace, then we need to stage the changes so that they can be commited to our local repository (the hidden .git directory in our workspace) and then we can push them to the upstream remote repository.
-
-
+#### I want to push changes in my workspace to a remote repository. Which of the following outlines the correct workflow for pushing local changes to a remote repo?
+- [ ] workspace -> index (staging area) -> local repository -> upstream repository
+- [ ] workspace -> local repository -> index (staging area) -> upstream repository
+- [ ] local repository -> workspace -> index (staging area) -> upstream repository
+
+Answer:
workspace -> index (staging area) -> local repository -> upstream repository
+Explanation:
We make changes to our local workspace, then we need to stage the changes so that they can be commited to our local repository (the hidden .git directory in our workspace) and then we can push them to the upstream remote repository.
+#### How would you create a new branch and switch to it at the same time?
+- [ ] `git -b checkout`
+- [ ] `git branch`
+- [ ] `git checkout -b`
+- [ ] `git branch -co`
-
-
- How would you create a new branch and switch to it at the same time?
- `git -b checkout`
- `git branch`
- `git checkout -b`
- `git branch -co`
- `git checkout -b` will do both for us! Instead of having to run `git branch ` and then `git checkout `
-
-
+Answer:
`git checkout -b`
+Explanation:
`git checkout -b` will do both for us! Instead of having to run `git branch ` and then `git checkout `
+#### Oh no! We've messed up and coded unwanted changes to our local project! How can we go back to a previous commit and get rid of the unwanted changes?
+- [ ] `git rollback --soft`
+- [ ] `git undo HEAD`
+- [ ] `git reset --hard`
+- [ ] `git revert HEAD`
-
-
- Oh no! We've messed up and coded unwanted changes to our local project! How can we go back to a previous commit and get rid of the unwanted changes?
- `git rollback --soft`
- `git undo HEAD`
- `git reset --hard`
- `git revert HEAD`
- `git reset --hard` will will wipe out all tracked changes back to the most recent commit.
-
-
+Answer:
`git reset --hard`
+Explanation:
`git reset --hard` will will wipe out all tracked changes back to the most recent commit.
-
-
-
- Our remote and local repositories have gotten so out of alignment that we just want to ignore any conflicts and push our local code up to remote. How would we do this?
- `git push -f`
- `git push`
- `git force push`
- `git push -u`
- The `-f` flag is short for `--force` which overrides any conflicts our local repo has with the remote repo.
-
-
\ No newline at end of file
+#### Our remote and local repositories have gotten so out of alignment that we just want to ignore any conflicts and push our local code up to remote. How would we do this?
+- [ ] `git push -f`
+- [ ] `git push`
+- [ ] `git force push`
+- [ ] `git push -u`
+Answer:
`git push -f`
+Explanation:
The `-f` flag is short for `--force` which overrides any conflicts our local repo has with the remote repo.
\ No newline at end of file
diff --git a/ruby/quizzes/lru_cache.md b/ruby/quizzes/lru_cache.md
index 4162491..dce6f72 100644
--- a/ruby/quizzes/lru_cache.md
+++ b/ruby/quizzes/lru_cache.md
@@ -8,48 +8,36 @@
end
```
-
-
- Is the above function a hashing function?
- Yes
- No
- A hashing function must be **deterministic**: the same input should always produce the same output, which won't happen if the output relies on a randomly generated number!
-
-
+#### Is the above function a hashing function?
+- [ ] Yes
+- [ ] No
+Answer:
No
+Explanation:
A hashing function must be **deterministic**: the same input should always produce the same output, which won't happen if the output relies on a randomly generated number!
-
-
- In a linked list, what is the time complexity for accessing the nth element?
- `O(1)`
- `O(log n)`
- `O(n)`
- `O(n log n)`
- `O(n^2)`
- Unlike with an array or hash--which allow access to the nth element by index and key, respectively--accessing the nth element in a linked list requires following links from the first element to each successive element until reaching the nth one, an `O(n)` operation.
-
-
+#### In a linked list, what is the time complexity for accessing the nth element?
+- [ ] $O(1)$
+- [ ] $O(log n)$
+- [ ] $O(n)$
+- [ ] $O(n log n)$
+- [ ] $O(n^2)$
+
+Answer:
$O(n)$
+Explanation:
Unlike with an array or hash--which allow access to the nth element by index and key, respectively--accessing the nth element in a linked list requires following links from the first element to each successive element until reaching the nth one, an $O(n)$ operation.
```ruby
{4,78,12,56,44,78,15}
```
+#### Is the above a set?
+- [ ] Yes
+- [ ] No
+Answer:
No
+Explanation:
A set is a data type that stores *unique* items.
-
-
- Is the above a set?
- Yes
- No
- A set is a data type that stores *unique* items.
-
-
-
-
-
- An array is an example of which of the following? (Select all that apply.)
- Abstract Data Type
- Algorithm
- Data Structure
- Transfer Function
- An array is an example of a data structure! :)
-
-
+#### An array is an example of which of the following? (Select all that apply.)
+- [ ] Abstract Data Type
+- [ ] Algorithm
+- [ ] Data Structure
+- [ ] Transfer Function
+Answer:
Data Structure
+Explanation:
An array is an example of a data structure! :)
\ No newline at end of file
diff --git a/ruby/quizzes/oop_1.md b/ruby/quizzes/oop_1.md
index 29bbb35..d7f0c4b 100644
--- a/ruby/quizzes/oop_1.md
+++ b/ruby/quizzes/oop_1.md
@@ -27,19 +27,14 @@
west_coast_swing = Swing.new("West Coast")
```
-
-
- Consider the above code. What are the respective return values from calling `bolshoi.style` and `west_coast_swing.style`?
- `"Tap"`, `"Tap"`
- `"Ballet"`, `"Tap"`
- `"Ballet"`, `"West Coast"`
- `"Vaganova"`, `"Ballet"`
- `"Vaganova"`, `"West Coast"`
- When called without any arguments (as in `Swing#initialize`), the `super` keyword will take all the arguments passed in to the current method and pass them as arguments to the parent class's version of the method. So `west_coast_swing` will have its `@style` set to "West Coast", i.e., the argument originally passed in to `Swing#initialize`. The `Ballet` class, however, does specify an argument for `super` to pass to its parent `Dance` class: "Ballet". `bolshoi`'s `@style` will accordingly be set to "Ballet".
-
-
-
-
+#### Consider the above code. What are the respective return values from calling `bolshoi.style` and `west_coast_swing.style`?
+- [ ] `"Tap"`, `"Tap"`
+- [ ] `"Ballet"`, `"Tap"`
+- [ ] `"Ballet"`, `"West Coast"`
+- [ ] `"Vaganova"`, `"Ballet"`
+- [ ] `"Vaganova"`, `"West Coast"`
+Answer:
No`"Ballet"`, `"West Coast"`
+Explanation:
When called without any arguments (as in `Swing#initialize`), the `super` keyword will take all the arguments passed in to the current method and pass them as arguments to the parent class's version of the method. So `west_coast_swing` will have its `@style` set to "West Coast", i.e., the argument originally passed in to `Swing#initialize`. The `Ballet` class, however, does specify an argument for `super` to pass to its parent `Dance` class: "Ballet". `bolshoi`'s `@style` will accordingly be set to "Ballet".
```ruby
class EngineStalledError < StandardError
@@ -64,18 +59,13 @@
end
```
-
-
- Consider the above example. The first time `drive_car` is called, an EngineStalledError is raised! What happens next?
- The program outputs `"Rescued from engine stalled!"` then `"Car stopped."`
- An uncaught error is thrown
- The program outputs `"Rescued from engine stalled!"` then retries running the code block
- The program outputs `"Car stopped."`
- After rescuing the `EngineStalledError` this code block will hit the `retry` keyword.
-
-
-
-
+#### Consider the above example. The first time `drive_car` is called, an EngineStalledError is raised! What happens next?
+- [ ] The program outputs `"Rescued from engine stalled!"` then `"Car stopped."`
+- [ ] An uncaught error is thrown
+- [ ] The program outputs `"Rescued from engine stalled!"` then retries running the code block
+- [ ] The program outputs `"Car stopped."`
+Answer:
The program outputs `"Rescued from engine stalled!"` then retries running the code block
+Explanation:
After rescuing the `EngineStalledError` this code block will hit the `retry` keyword.
```ruby
class BoxOffice
@@ -101,27 +91,21 @@
tkts = BoxOffice.new(2000, "Rent")
```
-
-
- Consider the above code. Which of the following is a valid way to increase the number of `tkts` tickets sold by 1?
- `tkts.update_tickets_sold`
- `BoxOffice.update_tickets_sold`
- `tkts.sell_ticket`
- `tkts.tickets_sold += 1`
- `BoxOffice.sell_ticket`
- To increase the number of tickets sold for the `tkts` instance of the `BoxOffice` class, you just need to call the `sell_ticket` method on that instance.
-
-
-
-
-
-
- You are writing a program that makes sandwiches. Each sandwich has a protein, a condiment, and two slices of bread. There are different types of proteins, condiments, and breads, but within each of those categories, the different types are functionally all the same. According to the principles of Object-Oriented Programming, what classes should you create for your program?
- Sandwich, Bread, RyeBread, SourDoughBread, WholeWheatBread, Protein,
- Chicken, Tofu, Seitan, Turkey, Condiment, Mustard, Ketchup, Mayo
- Sandwich, Bread, Protein, Condiment
- Sandwich
- Sandwich, Bread, Protein, Mustard, Ketchup, Aioli
- When taking an OOP approach, you typically want to break your program down into base classes (like `Bread`) that have a single responsibility / reason to change. If Sandwich were the only class, it would have to change whenever you needed to update the functionality of proteins, condiments, or bread, thus violating the preceding principle. At the same time, you don't need to break proteins, condiments, and bread down further because all of their different types share the same functionality.
-
-
\ No newline at end of file
+#### Consider the above code. Which of the following is a valid way to increase the number of `tkts` tickets sold by 1?
+- [ ] `tkts.update_tickets_sold`
+- [ ] `BoxOffice.update_tickets_sold`
+- [ ] `tkts.sell_ticket`
+- [ ] `tkts.tickets_sold += 1`
+- [ ] `BoxOffice.sell_ticket`
+Answer:
`tkts.sell_ticket`
+Explanation:
To increase the number of tickets sold for the `tkts` instance of the `BoxOffice` class, you just need to call the `sell_ticket` method on that instance.
+
+
+#### You are writing a program that makes sandwiches. Each sandwich has a protein, a condiment, and two slices of bread. There are different types of proteins, condiments, and breads, but within each of those categories, the different types are functionally all the same. According to the principles of Object-Oriented Programming, what classes should you create for your program?
+- [ ] Sandwich, Bread, RyeBread, SourDoughBread, WholeWheatBread, Protein,
+- [ ] Chicken, Tofu, Seitan, Turkey, Condiment, Mustard, Ketchup, Mayo
+- [ ] Sandwich, Bread, Protein, Condiment
+- [ ] Sandwich
+- [ ] Sandwich, Bread, Protein, Mustard, Ketchup, Aioli
+Answer:
Sandwich, Bread, Protein, Condiment
+Explanation:
When taking an OOP approach, you typically want to break your program down into base classes (like `Bread`) that have a single responsibility / reason to change. If Sandwich were the only class, it would have to change whenever you needed to update the functionality of proteins, condiments, or bread, thus violating the preceding principle. At the same time, you don't need to break proteins, condiments, and bread down further because all of their different types share the same functionality.
\ No newline at end of file
diff --git a/ruby/quizzes/oop_2.md b/ruby/quizzes/oop_2.md
index 79fee69..6781f25 100644
--- a/ruby/quizzes/oop_2.md
+++ b/ruby/quizzes/oop_2.md
@@ -34,18 +34,16 @@
marin = County.new
```
-
-
- Consider the above code. What are the respective return values from calling `nyc.state`, `oaktown.state`, and `marin.state`?
- `"New York"`, `"California"`, `"California"`
- `"New York City"`, `"California"`, `"Marin"`
- `"New York"`, `500000`, `"California"`
- `"New York City"`, `"California"`, `NoMethodError`
- `"California"`, `"California"`, `"California"`
- `City#initialize` explicitly passes its `state` parameter (here, `"New York"`) to `super`. `Town#initialize`, in contrast, just calls `super`, which passes along all of `Town#initialize`'s incoming arguments (here, `500000`) to `Municipality#initialize`. (To avoid passing along its arguments and have `super` apply the default argument of `"California"`, `Town#initialize` would need to indicate explicitly that it was calling `super` without any arguments, i.e., `super()`.) Finally, since the `County` class does not have a defined initialize method, calling `new` on `County` will run the parent class's `initialize` method, thereby setting `state` to the default value of `"California"`.
-
-
-
+#### Consider the above code. What are the respective return values from calling `nyc.state`, `oaktown.state`, and `marin.state`?
+- [ ] `"New York"`, `"California"`, `"California"`
+- [ ] `"New York City"`, `"California"`, `"Marin"`
+- [ ] `"New York"`, `500000`, `"California"`
+- [ ] `"New York City"`, `"California"`, `NoMethodError`
+- [ ] `"California"`, `"California"`, `"California"`
+
+Answer:
`"New York"`, `500000`, `"California"`
+Explanation:
`City#initialize` explicitly passes its `state` parameter (here, `"New York"`) to `super`. `Town#initialize`, in contrast, just calls `super`, which passes along all of `Town#initialize`'s incoming arguments (here, `500000`) to `Municipality#initialize`. (To avoid passing along its arguments and have `super` apply the default argument of `"California"`, `Town#initialize` would need to indicate explicitly that it was calling `super` without any arguments, i.e., `super()`.) Finally, since the `County` class does not have a defined initialize method, calling `new` on `County` will run the parent class's `initialize` method, thereby setting `state` to the default value of `"California"`.
+
@@ -74,16 +72,14 @@ board = Board.new
board.add_piece([0,0], Pawn.new)
```
-
-
- Why will the code above not add the pawn to `0, 0` as expected?
- The `*` splat operator should be used in `#add_piece` when indexing into the grid: `@grid[*pos] = piece`
- `#add_piece` should call `self[pos]` rather than `@grid[pos]`
- There should be an `attr_reader` for the `@grid` instance variable.
- Nothing is wrong with the above code.
- It will not add the pawn because `@grid[pos]` in `#add_piece` resolves to `@grid[[0,0]]`, which will produce `TypeError: no implicit conversion of Array into Integer`. It produces this error because `@grid` is an `Array`, and the `Array#[]` method expects an integer as an argument, not an array (i.e., not `[0,0]`). To avoid this problem, note that the `Board#[]` and `Board#[]=` methods both expect an array as an argument (`pos`) and use that array to access `@grid` for you. `#add_piece` will accordingly add the pawn successfully if it instead calls `self[pos] = piece`.
-
-
+#### Why will the code above not add the pawn to `0, 0` as expected?
+- [ ] The `*` splat operator should be used in `#add_piece` when indexing into the grid: `@grid[*pos] = piece`
+- [ ] `#add_piece` should call `self[pos]` rather than `@grid[pos]`
+- [ ] There should be an `attr_reader` for the `@grid` instance variable.
+- [ ] Nothing is wrong with the above code.
+
+Answer:
`#add_piece` should call `self[pos]` rather than `@grid[pos]`
+Explanation:
It will not add the pawn because `@grid[pos]` in `#add_piece` resolves to `@grid[[0,0]]`, which will produce `TypeError: no implicit conversion of Array into Integer`. It produces this error because `@grid` is an `Array`, and the `Array#[]` method expects an integer as an argument, not an array (i.e., not `[0,0]`). To avoid this problem, note that the `Board#[]` and `Board#[]=` methods both expect an array as an argument (`pos`) and use that array to access `@grid` for you. `#add_piece` will accordingly add the pawn successfully if it instead calls `self[pos] = piece`.
@@ -103,16 +99,14 @@ pawn_copy.position[1] = "CHANGED"
pawn.position
```
-
-
- Consider the above code, which uses Ruby's native `#dup` method. What will `pawn` and `pawn_copy`'s positions be?
- `[0, "CHANGED"]`, `[0, "CHANGED"]`
- `[0, 1]`, `[0, "CHANGED"]`
- `[0, 1]`, `[0, 1]`
- `[0, "CHANGED"]`, `[0, 1]`
- Remember that Ruby's native `#dup` method only makes a shallow copy. This means that it copies the references stored in instance variables instead of creating new copies of the objects they reference. `pawn` and `pawn_copy` will accordingly both reference the same array, but if they both reference the same array, then changing that array in one instance will also change it in the other! To avoid this problem, you would need to create a new position array when making your second pawn.
-
-
+#### Consider the above code, which uses Ruby's native `#dup` method. What will `pawn` and `pawn_copy`'s positions be?
+- [ ] `[0, "CHANGED"]`, `[0, "CHANGED"]`
+- [ ] `[0, 1]`, `[0, "CHANGED"]`
+- [ ] `[0, 1]`, `[0, 1]`
+- [ ] `[0, "CHANGED"]`, `[0, 1]`
+
+Answer:
`[0, "CHANGED"]`, `[0, "CHANGED"]`
+Explanation:
Remember that Ruby's native `#dup` method only makes a shallow copy. This means that it copies the references stored in instance variables instead of creating new copies of the objects they reference. `pawn` and `pawn_copy` will accordingly both reference the same array, but if they both reference the same array, then changing that array in one instance will also change it in the other! To avoid this problem, you would need to create a new position array when making your second pawn.
@@ -124,13 +118,11 @@ class Piece
end
```
-
-
- Consider the above code. How would you create and refer to this `Piece` object?
- `Piece.new`
- `Piece.create`
- `Piece.instance`
- `Singleton.instance`
- The `Singleton` module allows you to have only one instance of a class. You would invoke that singular instance using `Piece.instance`.
-
-
\ No newline at end of file
+#### Consider the above code. How would you create and refer to this `Piece` object?
+- [ ] `Piece.new`
+- [ ] `Piece.create`
+- [ ] `Piece.instance`
+- [ ] `Singleton.instance`
+
+Answer:
`Piece.instance`
+Explanation:
The `Singleton` module allows you to have only one instance of a class. You would invoke that singular instance using `Piece.instance`.
\ No newline at end of file
diff --git a/ruby/quizzes/recursion.md b/ruby/quizzes/recursion.md
index 6181d7b..aafa493 100644
--- a/ruby/quizzes/recursion.md
+++ b/ruby/quizzes/recursion.md
@@ -7,26 +7,32 @@
end
```
-
-
- What is wrong with the above function?
- Indentation is wrong
- Variable names are not descriptive
- Code needs to be broken out over more lines
- This code cannot be improved
- `arg1` and `arg2` don't give us any idea about what the numbers should be representing that will be passed in. Additionally, the math for `return_val` is not intuitive and should be broken up.
-
-
-
-
-
-
- Suppose we have a function called `args_matey` which expects 3 arguments: a string, an array, and a hash. Select each of the following that correctly passes these arguments:
- `args_matey('argument 1', [1,2,3,4], hash: 'is', last: 'argument')`
- `args_matey('argument 1', [1,2,3,4], { hash: 'is', last: 'argument' })`
- As long as the hash is the last argument given in the method invocation, ruby will assume that the key value pairs are part of the expected hash. So, we don't have to include the curly braces in this scenario.
-
-
+#### What is wrong with the above function?
+- [ ] Indentation is wrong
+- [ ] Variable names are not descriptive
+- [ ] Code needs to be broken out over more lines
+- [ ] This code cannot be improved
+
+Answer:
+
+- Variable names are not descriptive
+- Code needs to be broken out over more lines
+Explanation:
+
+`arg1` and `arg2` don't give us any idea about what the numbers should be representing that will be passed in. Additionally, the math for `return_val` is not intuitive and should be broken up.
+
+
+#### Suppose we have a function called `args_matey` which expects 3 arguments: a string, an array, and a hash. Select each of the following that correctly passes these arguments:
+- [ ] `args_matey('argument 1', [1,2,3,4], hash: 'is', last: 'argument')`
+- [ ] `args_matey('argument 1', [1,2,3,4], { hash: 'is', last: 'argument' })`
+
+Answer:
+
+- `args_matey('argument 1', [1,2,3,4], hash: 'is', last: 'argument')`
+- `args_matey('argument 1', [1,2,3,4], { hash: 'is', last: 'argument' })`
+Explanation:
+
+As long as the hash is the last argument given in the method invocation, ruby will assume that the key value pairs are part of the expected hash. So, we don't have to include the curly braces in this scenario.
```ruby
@@ -41,17 +47,20 @@
end
```
-
-
- Consider the above function that calculates the sum of all odd integers from 1 to n (inclusive). For which of the following test cases will the above function throw a stack overflow error?
- `add_odds(9)`
- `add_odds(50000)`
- `add_odds(123)`
- `add_odds(-8)`
- `add_odds(1)`
- The average computer setup will give us around 9000 stack frames before throwing a stack overflow error. With an input of 50000, our method would try to create 50000 stacks and would get cut off before it gets there. with an input of -8, our function will continue to make recursive calls and add stack frames indefinitely because we will never hit our base case which checks that `n` is equal to 1. `n` will never be equal to 1.
-
-
+#### Consider the above function that calculates the sum of all odd integers from 1 to n (inclusive). For which of the following test cases will the above function throw a stack overflow error?
+- [ ] `add_odds(9)`
+- [ ] `add_odds(50000)`
+- [ ] `add_odds(123)`
+- [ ] `add_odds(-8)`
+- [ ] `add_odds(1)`
+Answer:
+
+- `add_odds(50000)`
+- `add_odds(-8)`
+
+Explanation:
+
+The average computer setup will give us around 9000 stack frames before throwing a stack overflow error. With an input of 50000, our method would try to create 50000 stacks and would get cut off before it gets there. with an input of -8, our function will continue to make recursive calls and add stack frames indefinitely because we will never hit our base case which checks that `n` is equal to 1. `n` will never be equal to 1.
```ruby
@@ -62,14 +71,17 @@
end
```
-
-
- Consider the above function, which is defined for a 1-D array of strings. This function is:
- Recursive
- Iterative
- Each element in our array is an instance of a String. When we invoke `string.upcase` we are invoking the upcase method that is written on the String class. The `upcase` method above is written on the Array class. Therefore, we are not calling the same method inside of the `map` iteration.
-
-
+#### Consider the above function, which is defined for a 1-D array of strings. This function is:
+- [ ] Recursive
+- [ ] Iterative
+
+Answer:
+
+- Iterative
+
+Explanation:
+
+Each element in our array is an instance of a String. When we invoke `string.upcase` we are invoking the upcase method that is written on the String class. The `upcase` method above is written on the Array class. Therefore, we are not calling the same method inside of the `map` iteration.
```ruby
@@ -80,14 +92,15 @@
end
```
-
-
- Consider the above function. How many stack frames are produced from calling `powers_sum(n)`? (assume n > 0)
- `n`
- `n+1`
- `2n`
- `n^2`
- `cannot be determined`
- For each recursive call, we open up one additional stack frame because we invoke `powers_sum` once for each call. We decrease our number, `n`, by 1 for each call. Therefore there will be `n` stack frames.
-
-
+#### Consider the above function. How many stack frames are produced from calling `powers_sum(n)`? (assume n > 0)
+- [ ] `n`
+- [ ] `n+1`
+- [ ] `2n`
+- [ ] `n^2`
+- [ ] `cannot be determined`
+Answer:
+
+- `n`
+Explanation:
+
+For each recursive call, we open up one additional stack frame because we invoke `powers_sum` once for each call. We decrease our number, `n`, by 1 for each call. Therefore there will be `n` stack frames.
diff --git a/ruby/quizzes/reference.md b/ruby/quizzes/reference.md
index bcc0e03..5dde5f0 100644
--- a/ruby/quizzes/reference.md
+++ b/ruby/quizzes/reference.md
@@ -5,18 +5,19 @@
arr[0] << "Foo"
arr
```
-
-
- What will be the output of the above code?
- `[["Foo"] ,["Foo"], ["Foo"]]`
- `[[], [], []]`
- `[["Foo"], [], []]`
- `["Foo", [], []]`
- `["Foo", "Foo", "Foo"]`
- None of the above
- The three empty arrays in `arr` are all the same array in memory (same object id). When we shovel something into the first array, all three get modified because each element in our parent array has a memory pointer to the same array.
-
-
+#### What will be the output of the above code?
+- [ ] `[["Foo"] ,["Foo"], ["Foo"]]`
+- [ ] `[[], [], []]`
+- [ ] `[["Foo"], [], []]`
+- [ ] `["Foo", [], []]`
+- [ ] `["Foo", "Foo", "Foo"]`
+- [ ] None of the above
+Answer:
+
+- `[["Foo"] ,["Foo"], ["Foo"]]`
+Explanation:
+
+The three empty arrays in `arr` are all the same array in memory (same object id). When we shovel something into the first array, all three get modified because each element in our parent array has a memory pointer to the same array.
@@ -26,18 +27,19 @@
arr
```
-
-
- What will be the output of the above code?
- `[[], [], []]`
- `[["Foo"], [], []]`
- `["Foo", [], []]`
- `["Foo", "Foo", "Foo"]`
- `[["Foo"] ,["Foo"], ["Foo"]]`
- None of the above
- Passing a block to `Array.new` creates a new array with a different object id for every element in `arr`.
-
-
+#### What will be the output of the above code?
+- [ ] `[[], [], []]`
+- [ ] `[["Foo"], [], []]`
+- [ ] `["Foo", [], []]`
+- [ ] `["Foo", "Foo", "Foo"]`
+- [ ] `[["Foo"] ,["Foo"], ["Foo"]]`
+- [ ] None of the above
+Answer:
+
+- `[["Foo"], [], []]`
+Explanation:
+
+Passing a block to `Array.new` creates a new array with a different object id for every element in `arr`.
@@ -50,18 +52,20 @@
p x
```
-
-
- What will be the output of the above code?
- `42`
- `15`
- `"x"`
- `10`
- `nil`
- None of the above
- When printing `x`, ruby will check the current scope for a variable named `x`. In this case, x is set to 15. When you define a function `def` you are creating a new scope that is fully contained by the method definition. Ruby will not look into that scope for a variable named `x`.
-
-
+#### What will be the output of the above code?
+- [ ] `42`
+- [ ] `15`
+- [ ] `"x"`
+- [ ] `10`
+- [ ] `nil`
+- [ ] None of the above
+
+Answer:
+
+- `15`
+Explanation:
+
+When printing `x`, ruby will check the current scope for a variable named `x`. In this case, x is set to 15. When you define a function `def` you are creating a new scope that is fully contained by the method definition. Ruby will not look into that scope for a variable named `x`.
@@ -74,32 +78,38 @@
p x
```
-
-
- What will be the output of the above code?
- `["Fancy Feast"]`
- `"Fancy Feast"`
- `[]`
- `nil`
- `["Fancy", "Feast"]`
- None of the above
- Since we are passing the array, `x`, into the invocation of `foo`, the local variable `x` inside the scope of the `foo` method has a pointer to the same array in the outter scope.
-
-
+#### What will be the output of the above code?
+- [ ] `["Fancy Feast"]`
+- [ ] `"Fancy Feast"`
+- [ ] `[]`
+- [ ] `nil`
+- [ ] `["Fancy", "Feast"]`
+- [ ] None of the above
+
+Answer:
+
+- `["Fancy Feast"]`
+Explanation:
+Since we are passing the array, `x`, into the invocation of `foo`, the local variable `x` inside the scope of the `foo` method has a pointer to the same array in the outter scope.
```ruby
game.board[pos].revealed = true if !guess && game.board[pos] && game.board[pos].revealed == false
```
-
-
- What's wrong with the above line of code?
- Long method chain suggests Law of Demeter violation
- `if !condition` is not stylistic ruby
- Objects are tightly coupled
- Code is not DRY
- We are chaining too many methods. The `!if` should be changed to `unless` when possible. We are relying on the `board` information on the `game` for every call instead of being able to call a method directly on the game. And the `game.board[pos]` is repeated many times making it complicated to understand right off the bat.
-
-
+#### What's wrong with the above line of code?
+- [ ] Long method chain suggests Law of Demeter violation
+- [ ] `if !condition` is not stylistic ruby
+- [ ] Objects are tightly coupled
+- [ ] Code is not DRY
+
+Answer:
+
+- Long method chain suggests Law of Demeter violation
+- `if !condition` is not stylistic ruby
+- Objects are tightly coupled
+- Code is not DRY
+Explanation:
+
+We are chaining too many methods. The `!if` should be changed to `unless` when possible. We are relying on the `board` information on the `game` for every call instead of being able to call a method directly on the game. And the `game.board[pos]` is repeated many times making it complicated to understand right off the bat.
diff --git a/ruby/quizzes/rspec_tdd.md b/ruby/quizzes/rspec_tdd.md
index 8f859e8..5da076e 100644
--- a/ruby/quizzes/rspec_tdd.md
+++ b/ruby/quizzes/rspec_tdd.md
@@ -20,15 +20,17 @@
end
```
-
-
- What is wrong with the above setup for testing with RSpec?
- Spec file should say `require_relative './lib/hello_world'` instead of `require 'hello_world'`.
- `hello_world_spec.rb` should live in a `spec` directory adjacent to the `lib` directory.
- `hello_world_spec` should be a `.rspec` file instead of `.rb`.
- Your spec files should live in a `spec` directory adjacent to your `lib` directory that contains what is being tested.
-
-
+#### What is wrong with the above setup for testing with RSpec?
+- [ ] Spec file should say `require_relative './lib/hello_world'` instead of `require 'hello_world'`.
+- [ ] `hello_world_spec.rb` should live in a `spec` directory adjacent to the `lib` directory.
+- [ ] `hello_world_spec` should be a `.rspec` file instead of `.rb`.
+
+Answer:
+
+- `hello_world_spec.rb` should live in a `spec` directory adjacent to the `lib` directory.
+Explanation:
+
+Your spec files should live in a `spec` directory adjacent to your `lib` directory that contains what is being tested.
```ruby
@@ -39,16 +41,19 @@
end
```
-
-
- What is wrong with the above spec's syntax?
- An `expect` statement must be nested within an `it` block.
- A `context` block cannot be nested within a `describe` block.
- `to eq('hi')` should read `to_eq('hi')`.
- Nothing is wrong with the spec's syntax.
- Remember that RSpec proper syntax!
-
-
+#### What is wrong with the above spec's syntax?
+- [ ] An `expect` statement must be nested within an `it` block.
+- [ ] A `context` block cannot be nested within a `describe` block.
+- [ ] `to eq('hi')` should read `to_eq('hi')`.
+- [ ] Nothing is wrong with the spec's syntax.
+
+Answer:
+
+- An `expect` statement must be nested within an `it` block.
+
+Explanation:
+
+Remember that RSpec proper syntax!
@@ -65,16 +70,19 @@
end
```
-
-
- What is wrong with the above spec's syntax?
- `Robot` should be a string.
- A `describe` block cannot be nested within a `describe` block.
- `to be true` should be `to_be true`.
- Nothing is wrong with the spec's syntax.
- This spec looks good!
-
-
+#### What is wrong with the above spec's syntax?
+- [ ] `Robot` should be a string.
+- [ ] A `describe` block cannot be nested within a `describe` block.
+- [ ] `to be true` should be `to_be true`.
+- [ ] Nothing is wrong with the spec's syntax.
+
+Answer:
+
+- Nothing is wrong with the spec's syntax.
+
+Explanation:
+
+This spec looks good!
@@ -88,16 +96,19 @@ describe '#error_raiser' do
end
```
-
-
- What is wrong with the above spec's syntax?
- The pending spec is invalid.
- `expect(error_raiser('raise'))` should be `expect {error_raiser('raise')}`.
- `ArgumentError` should be a string.
- Nothing is wrong with the spec's syntax.
- Remember to wrap any spec expected to raise an error in curly braces. This will effectively create a `begin` & `rescue` block for you.
-
-
+#### What is wrong with the above spec's syntax?
+- [ ] The pending spec is invalid.
+- [ ] `expect(error_raiser('raise'))` should be `expect {error_raiser('raise')}`.
+- [ ] `ArgumentError` should be a string.
+- [ ] Nothing is wrong with the spec's syntax.
+
+Answer:
+
+- `expect(error_raiser('raise'))` should be `expect {error_raiser('raise')}`.
+
+Explanation:
+
+Remember to wrap any spec expected to raise an error in curly braces. This will effectively create a `begin` & `rescue` block for you.
@@ -126,11 +137,13 @@ describe Dog do
end
```
-
-
- Consider the above code. Will both the above specs pass?
- Yes
- No
- Remember that any state created with `let` will reset for each new `it` block. Resetting the state before each individual test can help make the test code easier to understand and use. If you needed to get around this limitation, however, you could replace the `let` with a `before(:all)` / `before(:context)`, which would run only once: `before(:all) {@dog = Dog.new("Bear")}`. (You would need to change the variables in the tests to `@dog` as well.)
-
-
\ No newline at end of file
+#### Consider the above code. Will both the above specs pass?
+- [ ] Yes
+- [ ] No
+
+Answer:
+
+- No
+Explanation:
+
+Remember that any state created with `let` will reset for each new `it` block. Resetting the state before each individual test can help make the test code easier to understand and use. If you needed to get around this limitation, however, you could replace the `let` with a `before(:all)` / `before(:context)`, which would run only once: `before(:all) {@dog = Dog.new("Bear")}`. (You would need to change the variables in the tests to `@dog` as well.)
\ No newline at end of file
From e4d3f23e9aeb1530944e5afe7340980711ee9fb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 13:40:54 +0200
Subject: [PATCH 03/23] Fix typos
---
ruby/Open_Ruby_Overview.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 806777d..3a978e1 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -132,7 +132,7 @@ with a specific icon in your task menu.
- [ ] 9. [Binary Trees & DFS Lecture](https://player.vimeo.com/video/337177768)
- [ ] 10. [Binary Trees & DFS Lecture II](https://player.vimeo.com/video/337181557)
- [ ] 11. [Intro data structures: PolyTreeNode](ruby/projects/poly_tree_node/README.md)
- - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poly_tree_node/solution.zip
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poly_tree_node/solution.zip)
- [ ] 12. [Graph Intro](ruby/readings/graph_nodes_reading.md)
- [ ] 13. [Graph Traversal](ruby/readings/graph_traversal_notes_reading.md)
- [ ] 14. [Graph Nodes and BFS](ruby/homeworks/graphs/README.md)
@@ -165,11 +165,11 @@ with a specific icon in your task menu.
- [ ] 17. [Class inheritance](ruby/projects/class_inheritance/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/class_inheritance/solution.zip)
- [ ] 18. [Chess (Part One)](ruby/projects/chess/README.md)
- - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip)
- [ ] 19. [Chess (Part Two)](ruby/projects/chess/part_two.md)
- - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip)
- [ ] 20. [Chess (Part Three)](ruby/projects/chess/part_three.md)
- - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip)
- [ ] 21. [OOP Quiz 2](ruby/quizzes/oop_2.md)
- [ ] 22. [Mancala](ruby/homeworks/mancala/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/mancala/solution.zip)
From 3e0444ad23ef36acc448c9cf524300a67955d2e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 14:26:56 +0200
Subject: [PATCH 04/23] Preserve original quizzes
---
ruby/quizzes_originals/big_o.md | 85 ++++++++++++++
ruby/quizzes_originals/data_structures.md | 90 ++++++++++++++
ruby/quizzes_originals/git.md | 47 ++++++++
ruby/quizzes_originals/lru_cache.md | 55 +++++++++
ruby/quizzes_originals/oop_1.md | 127 ++++++++++++++++++++
ruby/quizzes_originals/oop_2.md | 136 ++++++++++++++++++++++
ruby/quizzes_originals/recursion.md | 93 +++++++++++++++
ruby/quizzes_originals/reference.md | 105 +++++++++++++++++
ruby/quizzes_originals/rspec_tdd.md | 136 ++++++++++++++++++++++
9 files changed, 874 insertions(+)
create mode 100644 ruby/quizzes_originals/big_o.md
create mode 100644 ruby/quizzes_originals/data_structures.md
create mode 100644 ruby/quizzes_originals/git.md
create mode 100644 ruby/quizzes_originals/lru_cache.md
create mode 100644 ruby/quizzes_originals/oop_1.md
create mode 100644 ruby/quizzes_originals/oop_2.md
create mode 100644 ruby/quizzes_originals/recursion.md
create mode 100644 ruby/quizzes_originals/reference.md
create mode 100644 ruby/quizzes_originals/rspec_tdd.md
diff --git a/ruby/quizzes_originals/big_o.md b/ruby/quizzes_originals/big_o.md
new file mode 100644
index 0000000..9fd05c5
--- /dev/null
+++ b/ruby/quizzes_originals/big_o.md
@@ -0,0 +1,85 @@
+# Big-O Quiz
+
+
+
+ Which of the following represents an ordering of strictly increasing time complexity?
+ `O(n log n)` < `O(log n)` < `O(n)` < `O(n^2)` < `O(n!)` < `O(2^n)`
+ `O(1)` < `O(log n)` < `O(n)` < `O(n log n)` < `O(n^2)` < `O(2^n)` < `O(n!)`
+ `O(n^3)` < `O(n^2)` < `O(2^n)` < `O(n log n)` < `O(n)` < `O(log n)` < `O(1)`
+ `O(n)` < `O(2n)` < `O(3n)` < `O(n + 1)` < `O(n + 2)` < `O(n + 3)`
+ `O(1)` < `O(log n)` < `O(n)` < `O(n^2)` < `O(n!)` < `O(2^n)` < `O(n^n)`
+ Remember `O(1)`, or constant time, is the slowest growing in terms of time complexity and `O(n!)`, or factorial time, is the fastest growing.
+
+
+
+
+
+
+ What is the asymptotic representation of the following time complexity: `O(2n^3 + .5n^2 + 1000n)`
+ `O(2n^3)`
+ `O(n^3 + n^2 + n)`
+ `O(1000n)`
+ `O(n^3)`
+ `O(2n^3 + .5n^2 + 1000n)`
+ `O(.5n^2)`
+ Ignoring the constants, we get `n^3 + n^2 + n`. `n^3` will dominate the other terms and therefore is the asymptotic representation.
+
+
+
+
+
+
+ Which of the following time complexities is linearithmic?
+ `O(n^2)`
+ `O(n!)`
+ `O(2^n)`
+ `O(n log n)`
+ `O(n)`
+ Remember linearithmic, or loglinear, time is `O(n log n)`. This is also the time complexity for `merge sort`, which is one of the fastest comparison sorts.
+
+
+
+
+```ruby
+ def max_squared_value(arr)
+ max = nil
+
+ arr.each do |num1|
+ is_max = true
+
+ arr.each do |num2|
+ is_max = false if num2 ** 2 > num1 ** 2
+ end
+
+ max = num1 if is_max
+ end
+
+ max
+ end
+```
+
+
+
+ What is the time complexity of the above function?
+ `O(n log n)`
+ `O(n^2)`
+ `O(n)`
+ `O(n!)`
+ `O(1)`
+ We are iterating over the input array of `n` elements. For each of those `n` elements, we do work that involves another iteration over the entire input array. In other words, for each of the `n` elements, we do `n` amount of work, which gives us `O(n^2)`.
+
+
+
+
+
+
+
+ What is the time complexity of ruby's `Array#permutation` method? **Note:** you do not need to look at the Ruby source code to answer this question. Remember that Big-O notation is concerned with how runtime grows relative to the size of the input!
+ `O(n*log(n))`
+ `O(n^2)`
+ `O(n)`
+ `O(n!)`
+ `O(1)`
+ Whenever you have a problem where you are creating permutations, you are dealing with `factorial` time complexity. E.g., if you call the `Array#permutation` method of an array with the length of 3, then 3! permutations would be returned (6 permutations total). Increasing the length to 4 would then return 24 total permutations, or 4!.
+
+
\ No newline at end of file
diff --git a/ruby/quizzes_originals/data_structures.md b/ruby/quizzes_originals/data_structures.md
new file mode 100644
index 0000000..6912e95
--- /dev/null
+++ b/ruby/quizzes_originals/data_structures.md
@@ -0,0 +1,90 @@
+# Data Structures Quiz
+
+
+
+ LIFO (last-in-first-out) describes the behavior of which of the following?
+ Queue
+ Set
+ Stack
+ Map
+ When you stack things on top of each other, you have to remove the item off the top first. We can remove the item at the bottom until all of the other items on top of it have been removed. So the first thing that goes in is actually the last thing that comes out.
+
+
+
+
+```ruby
+ N
+ / \
+ N N
+ / \
+ N N
+ /
+ N
+```
+
+
+
+ Is the above graph a binary tree?
+ No
+ Yes
+ A binary tree is a graph with the constrant that a node can have at most two children.
+
+
+
+
+
+
+ BFS (breadth first search) uses which of the following ADTs?
+ Queue
+ Set
+ Stack
+ Map
+ As we are looking at each node, we want to add their children to our list of nodes to look at. A queue allows us to utilize FIFO (first in first out) so that the order in which the nodes are added to our list is the order in which they will be dealt with.
+
+
+
+
+```ruby
+ 1
+ / \
+ 2 5
+ / / \
+ 3 6 9
+ / / \
+ 4 7 8
+```
+
+
+
+ If we used DFS to try and find the node with value 6 in the graph above, what is a possible ordering of nodes that would be visited?
+ 1-2-5-3-6
+ 1-2-3-4-5-6
+ 4-3-2-1-7-8-6
+ 8-7-4-9-6
+ For DFS, we will look at a node, and then look at it's first child, and then that nodes first child and so on until we hit a leaf node or find the node we are searching for. When we hit a leaf node, we will begin popping off the stack of recursive calls (going back up the tree a level at a time) and looking at the next child for that node. Once we find the node we are looking for, we start popping off the stack of recursive calls returning the node we found that has the value we are looking for.
+
+
+
+
+```ruby
+ D
+ / \
+ A E
+ / \ \
+ I C G
+ / \ /
+ H F B
+```
+
+
+
+ Which node in the above graph is the root?
+ `A`
+ `B`
+ `D`
+ `F`
+ `H`
+ `I`
+ The root node refers to the top most node that has no parent node.
+
+
diff --git a/ruby/quizzes_originals/git.md b/ruby/quizzes_originals/git.md
new file mode 100644
index 0000000..4794788
--- /dev/null
+++ b/ruby/quizzes_originals/git.md
@@ -0,0 +1,47 @@
+# Git Quiz
+
+
+
+ I want to push changes in my workspace to a remote repository. Which of the following outlines the correct workflow for pushing local changes to a remote repo?
+ workspace -> index (staging area) -> local repository -> upstream repository
+ workspace -> local repository -> index (staging area) -> upstream repository
+ local repository -> workspace -> index (staging area) -> upstream repository
+ We make changes to our local workspace, then we need to stage the changes so that they can be commited to our local repository (the hidden .git directory in our workspace) and then we can push them to the upstream remote repository.
+
+
+
+
+
+
+ How would you create a new branch and switch to it at the same time?
+ `git -b checkout`
+ `git branch`
+ `git checkout -b`
+ `git branch -co`
+ `git checkout -b` will do both for us! Instead of having to run `git branch ` and then `git checkout `
+
+
+
+
+
+
+ Oh no! We've messed up and coded unwanted changes to our local project! How can we go back to a previous commit and get rid of the unwanted changes?
+ `git rollback --soft`
+ `git undo HEAD`
+ `git reset --hard`
+ `git revert HEAD`
+ `git reset --hard` will will wipe out all tracked changes back to the most recent commit.
+
+
+
+
+
+
+ Our remote and local repositories have gotten so out of alignment that we just want to ignore any conflicts and push our local code up to remote. How would we do this?
+ `git push -f`
+ `git push`
+ `git force push`
+ `git push -u`
+ The `-f` flag is short for `--force` which overrides any conflicts our local repo has with the remote repo.
+
+
\ No newline at end of file
diff --git a/ruby/quizzes_originals/lru_cache.md b/ruby/quizzes_originals/lru_cache.md
new file mode 100644
index 0000000..4162491
--- /dev/null
+++ b/ruby/quizzes_originals/lru_cache.md
@@ -0,0 +1,55 @@
+# LRU Cache Quiz
+
+```ruby
+ class Fixnum
+ def my_hashing_function
+ self * rand(10_000_000)
+ end
+ end
+```
+
+
+
+ Is the above function a hashing function?
+ Yes
+ No
+ A hashing function must be **deterministic**: the same input should always produce the same output, which won't happen if the output relies on a randomly generated number!
+
+
+
+
+
+
+ In a linked list, what is the time complexity for accessing the nth element?
+ `O(1)`
+ `O(log n)`
+ `O(n)`
+ `O(n log n)`
+ `O(n^2)`
+ Unlike with an array or hash--which allow access to the nth element by index and key, respectively--accessing the nth element in a linked list requires following links from the first element to each successive element until reaching the nth one, an `O(n)` operation.
+
+
+
+```ruby
+ {4,78,12,56,44,78,15}
+```
+
+
+
+ Is the above a set?
+ Yes
+ No
+ A set is a data type that stores *unique* items.
+
+
+
+
+
+ An array is an example of which of the following? (Select all that apply.)
+ Abstract Data Type
+ Algorithm
+ Data Structure
+ Transfer Function
+ An array is an example of a data structure! :)
+
+
diff --git a/ruby/quizzes_originals/oop_1.md b/ruby/quizzes_originals/oop_1.md
new file mode 100644
index 0000000..29bbb35
--- /dev/null
+++ b/ruby/quizzes_originals/oop_1.md
@@ -0,0 +1,127 @@
+# OOP Quiz 1
+
+```ruby
+ class Dance
+ attr_reader :style
+
+ def initialize(style = "Tap")
+ @style = style
+ end
+ end
+
+ class Ballet < Dance
+ def initialize(technique)
+ @technique = technique
+ super("Ballet")
+ end
+ end
+
+ class Swing < Dance
+ def initialize(form)
+ @form = form
+ super
+ end
+ end
+
+ bolshoi = Ballet.new("Vaganova")
+ west_coast_swing = Swing.new("West Coast")
+```
+
+
+
+ Consider the above code. What are the respective return values from calling `bolshoi.style` and `west_coast_swing.style`?
+ `"Tap"`, `"Tap"`
+ `"Ballet"`, `"Tap"`
+ `"Ballet"`, `"West Coast"`
+ `"Vaganova"`, `"Ballet"`
+ `"Vaganova"`, `"West Coast"`
+ When called without any arguments (as in `Swing#initialize`), the `super` keyword will take all the arguments passed in to the current method and pass them as arguments to the parent class's version of the method. So `west_coast_swing` will have its `@style` set to "West Coast", i.e., the argument originally passed in to `Swing#initialize`. The `Ballet` class, however, does specify an argument for `super` to pass to its parent `Dance` class: "Ballet". `bolshoi`'s `@style` will accordingly be set to "Ballet".
+
+
+
+
+
+```ruby
+ class EngineStalledError < StandardError
+ end
+
+ class CollisionOccurredError < StandardError
+ end
+
+ def drive_car
+ # engine may stall, collision may occur
+ end
+
+ begin
+ drive_car
+ rescue EngineStalledError => e
+ puts "Rescued from engine stalled!"
+ retry
+ rescue CollisionOccurredError => e
+ puts "Rescued from collision!"
+ ensure
+ puts "Car stopped."
+ end
+```
+
+
+
+ Consider the above example. The first time `drive_car` is called, an EngineStalledError is raised! What happens next?
+ The program outputs `"Rescued from engine stalled!"` then `"Car stopped."`
+ An uncaught error is thrown
+ The program outputs `"Rescued from engine stalled!"` then retries running the code block
+ The program outputs `"Car stopped."`
+ After rescuing the `EngineStalledError` this code block will hit the `retry` keyword.
+
+
+
+
+
+```ruby
+ class BoxOffice
+ def initialize(num_seats, show_title)
+ @num_seats = num_seats
+ @show_title = show_title
+ @tickets_sold = 0
+ end
+
+ def sell_ticket
+ # logic for the ticket selling process goes here
+
+ update_tickets_sold
+ end
+
+ private
+
+ def update_tickets_sold
+ @tickets_sold += 1
+ end
+ end
+
+ tkts = BoxOffice.new(2000, "Rent")
+```
+
+
+
+ Consider the above code. Which of the following is a valid way to increase the number of `tkts` tickets sold by 1?
+ `tkts.update_tickets_sold`
+ `BoxOffice.update_tickets_sold`
+ `tkts.sell_ticket`
+ `tkts.tickets_sold += 1`
+ `BoxOffice.sell_ticket`
+ To increase the number of tickets sold for the `tkts` instance of the `BoxOffice` class, you just need to call the `sell_ticket` method on that instance.
+
+
+
+
+
+
+ You are writing a program that makes sandwiches. Each sandwich has a protein, a condiment, and two slices of bread. There are different types of proteins, condiments, and breads, but within each of those categories, the different types are functionally all the same. According to the principles of Object-Oriented Programming, what classes should you create for your program?
+ Sandwich, Bread, RyeBread, SourDoughBread, WholeWheatBread, Protein,
+ Chicken, Tofu, Seitan, Turkey, Condiment, Mustard, Ketchup, Mayo
+ Sandwich, Bread, Protein, Condiment
+ Sandwich
+ Sandwich, Bread, Protein, Mustard, Ketchup, Aioli
+ When taking an OOP approach, you typically want to break your program down into base classes (like `Bread`) that have a single responsibility / reason to change. If Sandwich were the only class, it would have to change whenever you needed to update the functionality of proteins, condiments, or bread, thus violating the preceding principle. At the same time, you don't need to break proteins, condiments, and bread down further because all of their different types share the same functionality.
+
+
\ No newline at end of file
diff --git a/ruby/quizzes_originals/oop_2.md b/ruby/quizzes_originals/oop_2.md
new file mode 100644
index 0000000..79fee69
--- /dev/null
+++ b/ruby/quizzes_originals/oop_2.md
@@ -0,0 +1,136 @@
+# OOP Quiz 2
+
+```ruby
+ class Municipality
+ attr_reader :state
+
+ def initialize(state = "California")
+ @state = state
+ end
+ end
+
+ class City < Municipality
+ def initialize(name, state)
+ @name = name
+ super(state)
+ end
+ end
+
+ class Town < Municipality
+ def initialize(population)
+ @population = population
+ super
+ end
+ end
+
+ class County < Municipality
+ def change_state(new_state)
+ self.state = new_state
+ end
+ end
+
+ nyc = City.new("New York City", "New York")
+ oaktown = Town.new(500000)
+ marin = County.new
+```
+
+
+
+ Consider the above code. What are the respective return values from calling `nyc.state`, `oaktown.state`, and `marin.state`?
+ `"New York"`, `"California"`, `"California"`
+ `"New York City"`, `"California"`, `"Marin"`
+ `"New York"`, `500000`, `"California"`
+ `"New York City"`, `"California"`, `NoMethodError`
+ `"California"`, `"California"`, `"California"`
+ `City#initialize` explicitly passes its `state` parameter (here, `"New York"`) to `super`. `Town#initialize`, in contrast, just calls `super`, which passes along all of `Town#initialize`'s incoming arguments (here, `500000`) to `Municipality#initialize`. (To avoid passing along its arguments and have `super` apply the default argument of `"California"`, `Town#initialize` would need to indicate explicitly that it was calling `super` without any arguments, i.e., `super()`.) Finally, since the `County` class does not have a defined initialize method, calling `new` on `County` will run the parent class's `initialize` method, thereby setting `state` to the default value of `"California"`.
+
+
+
+
+
+
+```ruby
+class Board
+ def initialize
+ @grid = Array.new(8) { Array.new(8) { NullPiece.instance }}
+ end
+
+ def [](pos)
+ row, col = pos
+ @grid[row][col]
+ end
+
+ def []=(pos, val)
+ row, col = pos
+ @grid[row][col] = val
+ end
+
+ def add_piece(pos, piece)
+ @grid[pos] = piece
+ end
+end
+
+board = Board.new
+board.add_piece([0,0], Pawn.new)
+```
+
+
+
+ Why will the code above not add the pawn to `0, 0` as expected?
+ The `*` splat operator should be used in `#add_piece` when indexing into the grid: `@grid[*pos] = piece`
+ `#add_piece` should call `self[pos]` rather than `@grid[pos]`
+ There should be an `attr_reader` for the `@grid` instance variable.
+ Nothing is wrong with the above code.
+ It will not add the pawn because `@grid[pos]` in `#add_piece` resolves to `@grid[[0,0]]`, which will produce `TypeError: no implicit conversion of Array into Integer`. It produces this error because `@grid` is an `Array`, and the `Array#[]` method expects an integer as an argument, not an array (i.e., not `[0,0]`). To avoid this problem, note that the `Board#[]` and `Board#[]=` methods both expect an array as an argument (`pos`) and use that array to access `@grid` for you. `#add_piece` will accordingly add the pawn successfully if it instead calls `self[pos] = piece`.
+
+
+
+
+
+```ruby
+class Pawn
+ attr_accessor :position
+
+ def initialize(position)
+ @position = position
+ end
+end
+
+pawn = Pawn.new([0, 1])
+pawn_copy = pawn.dup
+
+pawn_copy.position[1] = "CHANGED"
+pawn.position
+```
+
+
+
+ Consider the above code, which uses Ruby's native `#dup` method. What will `pawn` and `pawn_copy`'s positions be?
+ `[0, "CHANGED"]`, `[0, "CHANGED"]`
+ `[0, 1]`, `[0, "CHANGED"]`
+ `[0, 1]`, `[0, 1]`
+ `[0, "CHANGED"]`, `[0, 1]`
+ Remember that Ruby's native `#dup` method only makes a shallow copy. This means that it copies the references stored in instance variables instead of creating new copies of the objects they reference. `pawn` and `pawn_copy` will accordingly both reference the same array, but if they both reference the same array, then changing that array in one instance will also change it in the other! To avoid this problem, you would need to create a new position array when making your second pawn.
+
+
+
+
+
+```ruby
+class Piece
+ include Singleton
+ # ...
+
+end
+```
+
+
+
+ Consider the above code. How would you create and refer to this `Piece` object?
+ `Piece.new`
+ `Piece.create`
+ `Piece.instance`
+ `Singleton.instance`
+ The `Singleton` module allows you to have only one instance of a class. You would invoke that singular instance using `Piece.instance`.
+
+
\ No newline at end of file
diff --git a/ruby/quizzes_originals/recursion.md b/ruby/quizzes_originals/recursion.md
new file mode 100644
index 0000000..6181d7b
--- /dev/null
+++ b/ruby/quizzes_originals/recursion.md
@@ -0,0 +1,93 @@
+# Recursion Quiz
+
+```ruby
+ def func(arg1, arg2)
+ temp = arg1 * arg2
+ return_val = (temp ** 2) + (arg1 % 6 + 1) / (7 + arg2 + arg1)
+ end
+```
+
+
+
+ What is wrong with the above function?
+ Indentation is wrong
+ Variable names are not descriptive
+ Code needs to be broken out over more lines
+ This code cannot be improved
+ `arg1` and `arg2` don't give us any idea about what the numbers should be representing that will be passed in. Additionally, the math for `return_val` is not intuitive and should be broken up.
+
+
+
+
+
+
+ Suppose we have a function called `args_matey` which expects 3 arguments: a string, an array, and a hash. Select each of the following that correctly passes these arguments:
+ `args_matey('argument 1', [1,2,3,4], hash: 'is', last: 'argument')`
+ `args_matey('argument 1', [1,2,3,4], { hash: 'is', last: 'argument' })`
+ As long as the hash is the last argument given in the method invocation, ruby will assume that the key value pairs are part of the expected hash. So, we don't have to include the curly braces in this scenario.
+
+
+
+
+```ruby
+ def add_odds(n)
+ return n if n == 1
+
+ if n.even?
+ add_odds(n-1)
+ else
+ n + add_odds(n-1)
+ end
+ end
+```
+
+
+
+ Consider the above function that calculates the sum of all odd integers from 1 to n (inclusive). For which of the following test cases will the above function throw a stack overflow error?
+ `add_odds(9)`
+ `add_odds(50000)`
+ `add_odds(123)`
+ `add_odds(-8)`
+ `add_odds(1)`
+ The average computer setup will give us around 9000 stack frames before throwing a stack overflow error. With an input of 50000, our method would try to create 50000 stacks and would get cut off before it gets there. with an input of -8, our function will continue to make recursive calls and add stack frames indefinitely because we will never hit our base case which checks that `n` is equal to 1. `n` will never be equal to 1.
+
+
+
+
+```ruby
+ class Array
+ def upcase
+ self.map { |string| string.upcase }
+ end
+ end
+```
+
+
+
+ Consider the above function, which is defined for a 1-D array of strings. This function is:
+ Recursive
+ Iterative
+ Each element in our array is an instance of a String. When we invoke `string.upcase` we are invoking the upcase method that is written on the String class. The `upcase` method above is written on the Array class. Therefore, we are not calling the same method inside of the `map` iteration.
+
+
+
+
+```ruby
+ def powers_sum(n)
+ return n if n == 1
+
+ (n * n) * powers_sum(n-1)
+ end
+```
+
+
+
+ Consider the above function. How many stack frames are produced from calling `powers_sum(n)`? (assume n > 0)
+ `n`
+ `n+1`
+ `2n`
+ `n^2`
+ `cannot be determined`
+ For each recursive call, we open up one additional stack frame because we invoke `powers_sum` once for each call. We decrease our number, `n`, by 1 for each call. Therefore there will be `n` stack frames.
+
+
diff --git a/ruby/quizzes_originals/reference.md b/ruby/quizzes_originals/reference.md
new file mode 100644
index 0000000..bcc0e03
--- /dev/null
+++ b/ruby/quizzes_originals/reference.md
@@ -0,0 +1,105 @@
+# Reference Quiz
+
+```ruby
+ arr = Array.new(3, [])
+ arr[0] << "Foo"
+ arr
+```
+
+
+ What will be the output of the above code?
+ `[["Foo"] ,["Foo"], ["Foo"]]`
+ `[[], [], []]`
+ `[["Foo"], [], []]`
+ `["Foo", [], []]`
+ `["Foo", "Foo", "Foo"]`
+ None of the above
+ The three empty arrays in `arr` are all the same array in memory (same object id). When we shovel something into the first array, all three get modified because each element in our parent array has a memory pointer to the same array.
+
+
+
+
+
+```ruby
+ arr = Array.new(3) { [] }
+ arr[0] << "Foo"
+ arr
+```
+
+
+
+ What will be the output of the above code?
+ `[[], [], []]`
+ `[["Foo"], [], []]`
+ `["Foo", [], []]`
+ `["Foo", "Foo", "Foo"]`
+ `[["Foo"] ,["Foo"], ["Foo"]]`
+ None of the above
+ Passing a block to `Array.new` creates a new array with a different object id for every element in `arr`.
+
+
+
+
+
+```ruby
+ x = 15
+ def foo(x)
+ x = 10
+ end
+ foo(x)
+ p x
+```
+
+
+
+ What will be the output of the above code?
+ `42`
+ `15`
+ `"x"`
+ `10`
+ `nil`
+ None of the above
+ When printing `x`, ruby will check the current scope for a variable named `x`. In this case, x is set to 15. When you define a function `def` you are creating a new scope that is fully contained by the method definition. Ruby will not look into that scope for a variable named `x`.
+
+
+
+
+
+```ruby
+ x = []
+ def foo(x)
+ x << "Fancy Feast"
+ end
+ foo(x)
+ p x
+```
+
+
+
+ What will be the output of the above code?
+ `["Fancy Feast"]`
+ `"Fancy Feast"`
+ `[]`
+ `nil`
+ `["Fancy", "Feast"]`
+ None of the above
+ Since we are passing the array, `x`, into the invocation of `foo`, the local variable `x` inside the scope of the `foo` method has a pointer to the same array in the outter scope.
+
+
+
+
+
+```ruby
+ game.board[pos].revealed = true if !guess && game.board[pos] && game.board[pos].revealed == false
+```
+
+
+
+ What's wrong with the above line of code?
+ Long method chain suggests Law of Demeter violation
+ `if !condition` is not stylistic ruby
+ Objects are tightly coupled
+ Code is not DRY
+ We are chaining too many methods. The `!if` should be changed to `unless` when possible. We are relying on the `board` information on the `game` for every call instead of being able to call a method directly on the game. And the `game.board[pos]` is repeated many times making it complicated to understand right off the bat.
+
+
diff --git a/ruby/quizzes_originals/rspec_tdd.md b/ruby/quizzes_originals/rspec_tdd.md
new file mode 100644
index 0000000..8f859e8
--- /dev/null
+++ b/ruby/quizzes_originals/rspec_tdd.md
@@ -0,0 +1,136 @@
+# RSpec and TDD Quiz
+
+```ruby
+# Directory Structure:
+
+ # my_cool_project
+ # lib/
+ # hello_world.rb
+ # hello_world_spec.rb
+
+# Spec File:
+
+ # hello_world_spec.rb
+
+ require 'rspec'
+ require 'hello_world'
+
+ describe '#hello_world' do
+
+ end
+```
+
+
+
+ What is wrong with the above setup for testing with RSpec?
+ Spec file should say `require_relative './lib/hello_world'` instead of `require 'hello_world'`.
+ `hello_world_spec.rb` should live in a `spec` directory adjacent to the `lib` directory.
+ `hello_world_spec` should be a `.rspec` file instead of `.rb`.
+ Your spec files should live in a `spec` directory adjacent to your `lib` directory that contains what is being tested.
+
+
+
+
+```ruby
+ describe '#hello' do
+ context 'with an odd number' do
+ expect(hello(5)).to eq('hi')
+ end
+ end
+```
+
+
+
+ What is wrong with the above spec's syntax?
+ An `expect` statement must be nested within an `it` block.
+ A `context` block cannot be nested within a `describe` block.
+ `to eq('hi')` should read `to_eq('hi')`.
+ Nothing is wrong with the spec's syntax.
+ Remember that RSpec proper syntax!
+
+
+
+
+
+```ruby
+ describe Robot do
+ describe '#valid_walk?' do
+ context 'when valid' do
+ it 'should return true' do
+ robot = Robot.new
+ expect(robot.valid_walk?("NS")).to be true
+ end
+ end
+ end
+ end
+```
+
+
+
+ What is wrong with the above spec's syntax?
+ `Robot` should be a string.
+ A `describe` block cannot be nested within a `describe` block.
+ `to be true` should be `to_be true`.
+ Nothing is wrong with the spec's syntax.
+ This spec looks good!
+
+
+
+
+
+```ruby
+describe '#error_raiser' do
+ it 'has a pending spec'
+
+ it 'should raise an error' do
+ expect(error_raiser('raise')).to raise_error(ArgumentError)
+ end
+end
+```
+
+
+
+ What is wrong with the above spec's syntax?
+ The pending spec is invalid.
+ `expect(error_raiser('raise'))` should be `expect {error_raiser('raise')}`.
+ `ArgumentError` should be a string.
+ Nothing is wrong with the spec's syntax.
+ Remember to wrap any spec expected to raise an error in curly braces. This will effectively create a `begin` & `rescue` block for you.
+
+
+
+
+
+```ruby
+class Dog
+ attr_accessor :name
+
+ def initialize(name)
+ @name = name
+ end
+end
+
+describe Dog do
+ let(:dog) { Dog.new("Bear") }
+
+ describe "name property" do
+ it "allows us to manipulate name" do
+ dog.name = "Rocky"
+ expect(dog.name).to eq("Rocky")
+ end
+
+ it "allows us to read the name" do
+ expect(dog.name).to eq("Rocky")
+ end
+ end
+end
+```
+
+
+
+ Consider the above code. Will both the above specs pass?
+ Yes
+ No
+ Remember that any state created with `let` will reset for each new `it` block. Resetting the state before each individual test can help make the test code easier to understand and use. If you needed to get around this limitation, however, you could replace the `let` with a `before(:all)` / `before(:context)`, which would run only once: `before(:all) {@dog = Dog.new("Bear")}`. (You would need to change the variables in the tests to `@dog` as well.)
+
+
\ No newline at end of file
From d88b3fc9b5c8eee40b358dd2cfd10794ccb2e4c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 14:30:04 +0200
Subject: [PATCH 05/23] Fix typo
---
ruby/Open_Ruby_Overview.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 3a978e1..227f52b 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -66,7 +66,7 @@ with a specific icon in your task menu.
- [ ] 18. [Memory Puzzle](ruby/projects/memory/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/memory/solution.zip)
- [ ] 19. [Sudoku](ruby/projects/sudoku/README.md)
- - [Solution](ttps://assets.aaonline.io/fullstack/ruby/projects/sudoku/solution.zip)
+ - [Solution](https://assets.aaonline.io/fullstack/ruby/projects/sudoku/solution.zip)
- [ ] 20. [Hash and Equals](ruby/readings/hash-and-equals.md)
- [ ] 21. [Swap](ruby/readings/swap.md)
From b1d4fdfcd0305f8f13b4faa09379b3aa33362ff1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 14:41:50 +0200
Subject: [PATCH 06/23] Add links to paragraphs in Topics Covered
---
ruby/Open_Ruby_Overview.md | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 227f52b..d73e600 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -2,15 +2,15 @@
## Topics Covered
-- Enumerables and Debugging
-- References
-- Recursion
-- Git
-- Data Structures
-- Object-Oriented Programming
-- RSpec and TDD
-- Big-O
-- LRU Cache
+- [Enumerables and Debugging](#enumerables-and-debugging)
+- [References](#reference)
+- [Recursion](#recursion)
+- [Git](#git)
+- [Data Structures](#data-structures)
+- [Object-Oriented Programming](#object-oriented-programming)
+- [RSpec and TDD](#rspec-and-tdd)
+- [Big-O](#big-o)
+- [LRU Cache](#lru-cache)
## Notes
From f4ca3de8f68f74d781f6de975ff7ee544b018f50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 14:42:32 +0200
Subject: [PATCH 07/23] Fix Setting up a Development Environment (Phase 1)
hyperlink
---
ruby/Open_Ruby_Overview.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index d73e600..81d5a53 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -28,7 +28,7 @@ with a specific icon in your task menu.
## Lessons
### Getting Started
-- [ ] 1. [Setting up a Development Environment (Phase 1)](course/readings/dev-setup.md)
+- [ ] 1. [Setting up a Development Environment (Phase 1)](../course/readings/dev-setup.md)
### Enumerables and Debugging
- [ ] 1. [Nontechnical Overview of Ruby](ruby/readings/ruby_nontech.md)
- [ ] 2. [Debugging](ruby/readings/debugger.md")
From 684c6fb6c78053a47cedd053ac560fe932712354 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 14:48:42 +0200
Subject: [PATCH 08/23] Fix paths
---
ruby/Open_Ruby_Overview.md | 202 ++++++++++++++++++-------------------
1 file changed, 101 insertions(+), 101 deletions(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 81d5a53..7b7435f 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -30,32 +30,32 @@ with a specific icon in your task menu.
### Getting Started
- [ ] 1. [Setting up a Development Environment (Phase 1)](../course/readings/dev-setup.md)
### Enumerables and Debugging
-- [ ] 1. [Nontechnical Overview of Ruby](ruby/readings/ruby_nontech.md)
-- [ ] 2. [Debugging](ruby/readings/debugger.md")
-- [ ] 3. [Common Exceptions](ruby/readings/common-exceptions.md)
-- [ ] 4. [More Byebug Commands: display and where](ruby/readings/bonus-debugger.md)
-- [ ] 5. [Debugging Cheatsheet](ruby/readings/debugging_cheatsheet.md)
-- [ ] 6. [Breaking Methods Into Parts](ruby/readings/breaking-into-parts.md)
-- [ ] 7. [Enumerables](ruby/projects/enumerables/README.md)
+- [ ] 1. [Nontechnical Overview of Ruby](readings/ruby_nontech.md)
+- [ ] 2. [Debugging](readings/debugger.md)
+- [ ] 3. [Common Exceptions](readings/common-exceptions.md)
+- [ ] 4. [More Byebug Commands: display and where](readings/bonus-debugger.md)
+- [ ] 5. [Debugging Cheatsheet](readings/debugging_cheatsheet.md)
+- [ ] 6. [Breaking Methods Into Parts](readings/breaking-into-parts.md)
+- [ ] 7. [Enumerables](projects/enumerables/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/enumerables/solution.zip)
-- [ ] 8. [Ghost](ruby/projects/ghost/README.md)
+- [ ] 8. [Ghost](projects/ghost/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/ghost/solution.zip)
-- [ ] 9. [Maze Solver (Bonus)](ruby/projects/maze_solver/README.md)
+- [ ] 9. [Maze Solver (Bonus)](projects/maze_solver/README.md)
- [Soution](https://assets.aaonline.io/fullstack/ruby/projects/maze_solver/solution.zip)
- [ ] 10. [Eight Queens Puzzle (Bonus)](https://en.wikipedia.org/wiki/Eight_queens_puzzle)
- [ ] 11. [Project Euler (Bonus)](https://projecteuler.net/problems)
- [ ] 11. [Project Euler (Bonus)](https://projecteuler.net/problems)
### Reference
- [ ] 1. [References Video](https://player.vimeo.com/video/165965713)
-- [ ] 2. [References](ruby/readings/references.md)
-- [ ] 3. [Array/Hash Defaults](ruby/readings/array-hash-defaults.md)
-- [ ] 4. [Scope](ruby/readings/scope.md)
-- [ ] 5. [DRY (Dont Repeat Yourself)](ruby/readings/dry.md)
-- [ ] 6. [Method Decomposition & Design](ruby/readings/method-decomposition.md)
-- [ ] 7. [Refactoring and Code Smells](ruby/readings/refactoring.md)
-- [ ] 8. [Reference Quiz](ruby/quizzes/reference.md)
+- [ ] 2. [References](readings/references.md)
+- [ ] 3. [Array/Hash Defaults](readings/array-hash-defaults.md)
+- [ ] 4. [Scope](readings/scope.md)
+- [ ] 5. [DRY (Dont Repeat Yourself)](readings/dry.md)
+- [ ] 6. [Method Decomposition & Design](readings/method-decomposition.md)
+- [ ] 7. [Refactoring and Code Smells](readings/refactoring.md)
+- [ ] 8. [Reference Quiz](quizzes/reference.md)
- [ ] 9. [VSCode Cheatsheet](course/readings/vscode_cheatsheet.md)
-- [ ] 10. [Testing Small (from Memory Puzzle)](ruby/readings/testing-small.md)
+- [ ] 10. [Testing Small (from Memory Puzzle)](readings/testing-small.md)
- [ ] 11. [my_flatten Solution Video](https://player.vimeo.com/video/336469470)
- [ ] 12. [my_zip Solution Video](https://player.vimeo.com/video/336469834)
- [ ] 13. [my_rotate Solution Video](https://player.vimeo.com/video/336470349)
@@ -63,12 +63,12 @@ with a specific icon in your task menu.
- [ ] 15. [Hash Defaults Lecture](https://player.vimeo.com/video/336471687)
- [ ] 16. [Block and Procs Lecture](https://player.vimeo.com/video/336472385)
- [ ] 17. [Methods Lecture](https://player.vimeo.com/video/336472772)
-- [ ] 18. [Memory Puzzle](ruby/projects/memory/README.md)
+- [ ] 18. [Memory Puzzle](projects/memory/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/memory/solution.zip)
-- [ ] 19. [Sudoku](ruby/projects/sudoku/README.md)
+- [ ] 19. [Sudoku](projects/sudoku/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/sudoku/solution.zip)
-- [ ] 20. [Hash and Equals](ruby/readings/hash-and-equals.md)
-- [ ] 21. [Swap](ruby/readings/swap.md)
+- [ ] 20. [Hash and Equals](readings/hash-and-equals.md)
+- [ ] 21. [Swap](readings/swap.md)
### Recursion
- [ ] 1. [Recursion Intro](https://player.vimeo.com/video/162569408)
@@ -78,81 +78,81 @@ with a specific icon in your task menu.
- [ ] 5. [Quicksort Demo](https://player.vimeo.com/video/162569463)
- [ ] 6. [Stack Overflow Demo](https://player.vimeo.com/video/162569490)
- [ ] 7. [The Stack](https://player.vimeo.com/video/162571286)
-- [ ] 8. [Recursion](ruby/readings/recursion.md)
-- [ ] 9. [Recursion Quiz](ruby/quizzes/recursion.md)
+- [ ] 8. [Recursion](readings/recursion.md)
+- [ ] 9. [Recursion Quiz](quizzes/recursion.md)
- [ ] 10. [InDepth QuickSort Demo](https://player.vimeo.com/video/337154374)
-- [ ] 11. [Recursion Homework](ruby/homeworks/recursion/README.md)
+- [ ] 11. [Recursion Homework](homeworks/recursion/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/recursion/solution.rb)
- [ ] 12. [Memory Puzzle Solution](https://player.vimeo.com/video/337147003)
- [ ] 13. [Recursion Intro Lecture](https://player.vimeo.com/video/337152898)
-- [ ] 14. [Recursion exercises](ruby/projects/recursion/README.md)
+- [ ] 14. [Recursion exercises](projects/recursion/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/recursion/solution.zip)
-- [ ] 15. [Word Chains](ruby/projects/word_chains/README.md)
+- [ ] 15. [Word Chains](projects/word_chains/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/word_chains/solution.zip)
-- [ ] 16. [More Recursion Questions (Bonus)](ruby/projects/more_recursion_exercises/README.md)
+- [ ] 16. [More Recursion Questions (Bonus)](projects/more_recursion_exercises/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/more_recursion_exercises/solutions/recursion_problems.rb)
-- [ ] 17. [More Recursion Questions (Bonus)](ruby/projects/more_recursion_exercises/README.md)
+- [ ] 17. [More Recursion Questions (Bonus)](projects/more_recursion_exercises/README.md)
### Git
- [ ] 1. [Git: Overview and Why We Use Git](https://player.vimeo.com/video/171666454)
- [ ] 2. [Git: Mental Models](https://player.vimeo.com/video/171666455)
- [ ] 3. [Git: Useful Commands](https://player.vimeo.com/video/171666453)
- [ ] 4. [Git: Wrapup](https://player.vimeo.com/video/171666456)
-- [ ] 5. [Why Git](ruby/readings/why-git.md)
-- [ ] 6. [Git Summary](ruby/readings/git-summary.md)
-- [ ] 7. [Git Workflow](ruby/readings/git-workflow.md)
-- [ ] 8. [Gems and rbenv](ruby/readings/gems-and-rbenv.md)
-- [ ] 9. [Nontechnical Overview of Git](ruby/readings/git_nontech.md)
-- [ ] 10. [Nontechnical Overview of Agile Development](ruby/readings/agile_nontech.md)
-- [ ] 11. [Git Quiz](ruby/quizzes/git.md)
-- [ ] 12. [Git Workflow Exercises](ruby/homeworks/git-workflow-exercises.md)
+- [ ] 5. [Why Git](readings/why-git.md)
+- [ ] 6. [Git Summary](readings/git-summary.md)
+- [ ] 7. [Git Workflow](readings/git-workflow.md)
+- [ ] 8. [Gems and rbenv](readings/gems-and-rbenv.md)
+- [ ] 9. [Nontechnical Overview of Git](readings/git_nontech.md)
+- [ ] 10. [Nontechnical Overview of Agile Development](readings/agile_nontech.md)
+- [ ] 11. [Git Quiz](quizzes/git.md)
+- [ ] 12. [Git Workflow Exercises](homeworks/git-workflow-exercises.md)
- [ ] 13. [Merge Sort Solution](https://player.vimeo.com/video/337155330)
- [ ] 14. [bSearch Solution](https://player.vimeo.com/video/337165165)
-- [ ] 15. [Serialization (JSON and YAML)](ruby/readings/serialization.md)
-- [ ] 16. [Git add](ruby/readings/git-add.md)
-- [ ] 17. [Git Repository Clean Up](ruby/readings/git-repository-cleanup.md)
-- [ ] 18. [Faster Git with aliases](ruby/readings/alias.md)
-- [ ] 19. [Fixing Git commit authorship](ruby/readings/git-fix-authorship.md)
+- [ ] 15. [Serialization (JSON and YAML)](readings/serialization.md)
+- [ ] 16. [Git add](readings/git-add.md)
+- [ ] 17. [Git Repository Clean Up](readings/git-repository-cleanup.md)
+- [ ] 18. [Faster Git with aliases](readings/alias.md)
+- [ ] 19. [Fixing Git commit authorship](readings/git-fix-authorship.md)
- [ ] 20. [Git Cheatsheet](http://www.ndpsoftware.com/git-cheatsheet.html)
- [ ] 21. [Student Github Repo Example](https://github.com/aa-repo-examples)
- [ ] 22. [Git Lecture](https://player.vimeo.com/video/337165903)
-- [ ] 23. [Screwedoku](ruby/projects/screwdoku/README.md)
+- [ ] 23. [Screwedoku](projects/screwdoku/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/sudoku/solution.zip)
-- [ ] 24. [Minesweeper](ruby/projects/minesweeper/README.md)
+- [ ] 24. [Minesweeper](projects/minesweeper/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/minesweeper/solution.zip)
### Data Structures
- [ ] 1. [Data Structures](https://player.vimeo.com/video/162763729)
- [ ] 2. [DFS](https://player.vimeo.com/video/162763740)
-- [ ] 3. [Intro to Algorithms and Data Structures](ruby/readings/intro-algorithms-and-data-structures.md)
-- [ ] 4. [Inspecting Complex Elements](ruby/readings/overriding_inspect.md)
-- [ ] 5. [Data Structures Quiz](ruby/quizzes/data_structures.md)
-- [ ] 6. [Homeworks with Git](ruby/homeworks/git-homeworks.md)
-- [ ] 7. [DIY ADTs](ruby/homeworks/abstract_data_types/README.md)
+- [ ] 3. [Intro to Algorithms and Data Structures](readings/intro-algorithms-and-data-structures.md)
+- [ ] 4. [Inspecting Complex Elements](readings/overriding_inspect.md)
+- [ ] 5. [Data Structures Quiz](quizzes/data_structures.md)
+- [ ] 6. [Homeworks with Git](homeworks/git-homeworks.md)
+- [ ] 7. [DIY ADTs](homeworks/abstract_data_types/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/abstract_data_types/solution.rb)
- [ ] 8. [ADT - Stack & Queues Lecture](https://player.vimeo.com/video/337176180)
- [ ] 9. [Binary Trees & DFS Lecture](https://player.vimeo.com/video/337177768)
- [ ] 10. [Binary Trees & DFS Lecture II](https://player.vimeo.com/video/337181557)
-- [ ] 11. [Intro data structures: PolyTreeNode](ruby/projects/poly_tree_node/README.md)
+- [ ] 11. [Intro data structures: PolyTreeNode](projects/poly_tree_node/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poly_tree_node/solution.zip)
-- [ ] 12. [Graph Intro](ruby/readings/graph_nodes_reading.md)
-- [ ] 13. [Graph Traversal](ruby/readings/graph_traversal_notes_reading.md)
-- [ ] 14. [Graph Nodes and BFS](ruby/homeworks/graphs/README.md)
+- [ ] 12. [Graph Intro](readings/graph_nodes_reading.md)
+- [ ] 13. [Graph Traversal](readings/graph_traversal_notes_reading.md)
+- [ ] 14. [Graph Nodes and BFS](homeworks/graphs/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/graphs/solution.rb)
-- [ ] 15. [Knights Travails](ruby/projects/knights_travails/README.md)
+- [ ] 15. [Knights Travails](projects/knights_travails/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/knights_travails/solution.zip)
-- [ ] 16. [Knights Travails (Part Two)](ruby/projects/knights_travails/part_two.md)
+- [ ] 16. [Knights Travails (Part Two)](projects/knights_travails/part_two.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/knights_travails/solution.zip)
-- [ ] 17. [Tic-Tac-Toe AI](ruby/projects/tic_tac_toe_ai/README.md)
+- [ ] 17. [Tic-Tac-Toe AI](projects/tic_tac_toe_ai/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/tic_tac_toe_ai/solution.zip)
### Object-oriented programming
-- [ ] 1. [Inheritance](ruby/readings/inheritance.md)
-- [ ] 2. [Exceptions, error handling](ruby/readings/errors.md)
-- [ ] 3. [Decomposition into objects](ruby/readings/object-decomposition.md)
-- [ ] 4. [Inheritance and DRY](ruby/readings/inheritance-design.md)
-- [ ] 5. [Information hiding/encapsulation](ruby/readings/hiding.md)
-- [ ] 6. [UML](ruby/readings/uml.md)
+- [ ] 1. [Inheritance](readings/inheritance.md)
+- [ ] 2. [Exceptions, error handling](readings/errors.md)
+- [ ] 3. [Decomposition into objects](readings/object-decomposition.md)
+- [ ] 4. [Inheritance and DRY](readings/inheritance-design.md)
+- [ ] 5. [Information hiding/encapsulation](readings/hiding.md)
+- [ ] 6. [UML](readings/uml.md)
- [ ] 7. [Singleton](http://ruby-doc.org/stdlib-1.9.3/libdoc/singleton/rdoc/Singleton.html#module-Singleton-label-Usage)
-- [ ] 8. [OOP Quiz 1](ruby/quizzes/oop_1.md)
-- [ ] 9. [Simon](ruby/homeworks/simon/README.md)
+- [ ] 8. [OOP Quiz 1](quizzes/oop_1.md)
+- [ ] 9. [Simon](homeworks/simon/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/simon/solution.zip)
- [ ] 10. [Stereotype Threat](https://www.nytimes.com/2012/10/07/opinion/sunday/intelligence-and-the-stereotype-threat.html)
- [ ] 11. [Unconscious Bias in Tech](https://medium.com/@aldynchwelos/unconscious-bias-in-tech-why-women-leave-their-engineering-careers-f9653185d17b)
@@ -160,18 +160,18 @@ with a specific icon in your task menu.
- [ ] 13. [Implicit Association Test](https://implicit.harvard.edu/implicit/takeatest.html)
- [ ] 14. [You're More Biased Than You Think](https://www.fastcompany.com/3036627/youre-more-biased-than-you-think)
- [ ] 15. [Seven Day Bias Cleanse](http://www.lookdifferent.org/what-can-i-do/bias-cleanse)
-- [ ] 16. [Error Handling Funtime](ruby/homeworks/error_handling_funtime/README.md)
+- [ ] 16. [Error Handling Funtime](homeworks/error_handling_funtime/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/error_handling_funtime/solution.zip)
-- [ ] 17. [Class inheritance](ruby/projects/class_inheritance/README.md)
+- [ ] 17. [Class inheritance](projects/class_inheritance/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/class_inheritance/solution.zip)
-- [ ] 18. [Chess (Part One)](ruby/projects/chess/README.md)
+- [ ] 18. [Chess (Part One)](projects/chess/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip)
-- [ ] 19. [Chess (Part Two)](ruby/projects/chess/part_two.md)
+- [ ] 19. [Chess (Part Two)](projects/chess/part_two.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip)
-- [ ] 20. [Chess (Part Three)](ruby/projects/chess/part_three.md)
+- [ ] 20. [Chess (Part Three)](projects/chess/part_three.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/chess/solution.zip)
-- [ ] 21. [OOP Quiz 2](ruby/quizzes/oop_2.md)
-- [ ] 22. [Mancala](ruby/homeworks/mancala/README.md)
+- [ ] 21. [OOP Quiz 2](quizzes/oop_2.md)
+- [ ] 22. [Mancala](homeworks/mancala/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/mancala/solution.zip)
- [ ] 23. [Knight's Travails Solution](https://player.vimeo.com/video/337182911)
- [ ] 24. [TTT Solution](https://player.vimeo.com/video/337184604)
@@ -179,36 +179,36 @@ with a specific icon in your task menu.
- [ ] 26. [Method Encapsulation Lecture](https://player.vimeo.com/video/337191439)
- [ ] 27. [Inheritance & Modules Lecture](https://player.vimeo.com/video/337194155)
- [ ] 28. [Error Handling Lecture](https://player.vimeo.com/video/337195111)
-- [ ] 29. [Modules](ruby/readings/modules.md)
-- [ ] 30. [load/require/require_relative](ruby/readings/require.md)
-- [ ] 31. [public/private/protected](ruby/readings/privacy.md)
+- [ ] 29. [Modules](readings/modules.md)
+- [ ] 30. [load/require/require_relative](readings/require.md)
+- [ ] 31. [public/private/protected](readings/privacy.md)
### RSpec and TDD
-- [ ] 1. [RSpec Syntax](ruby/readings/rspec-syntax.md)
-- [ ] 2. [subject and let](ruby/readings/subject-and-let.md)
-- [ ] 3. [Order of RSpec methods](ruby/readings/rspec-order.md)
-- [ ] 4. [Test doubles](ruby/readings/test-doubles.md)
+- [ ] 1. [RSpec Syntax](readings/rspec-syntax.md)
+- [ ] 2. [subject and let](readings/subject-and-let.md)
+- [ ] 3. [Order of RSpec methods](readings/rspec-order.md)
+- [ ] 4. [Test doubles](readings/test-doubles.md)
- [ ] 5. [Intro to RSpec](https://player.vimeo.com/video/192497364)
- [ ] 6. [Setup and Basic Syntax](https://player.vimeo.com/video/192665133)
- [ ] 7. [SErrors, Equality Matchers, Subject/Let, and Doubles](https://player.vimeo.com/video/192662950)
- [ ] 8. [Rspec: Code Demo](https://player.vimeo.com/video/192666370)
-- [ ] 9. [RSpec and TDD Quiz](ruby/quizzes/rspec_tdd.md)
-- [ ] 10. [RSpec](ruby/homeworks/rspec/README.md)
+- [ ] 9. [RSpec and TDD Quiz](quizzes/rspec_tdd.md)
+- [ ] 10. [RSpec](homeworks/rspec/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/rspec/solution.zip)
-- [ ] 11. [RSpec](ruby/homeworks/rspec/README.md)
-- [ ] 12. [Introduction to RSpec](ruby/readings/intro-rspec.md)
-- [ ] 13. [TDD](ruby/readings/intro-tdd.md)
-- [ ] 14. [guard-rspec](ruby/readings/guard-rspec.md)
+- [ ] 11. [RSpec](homeworks/rspec/README.md)
+- [ ] 12. [Introduction to RSpec](readings/intro-rspec.md)
+- [ ] 13. [TDD](readings/intro-tdd.md)
+- [ ] 14. [guard-rspec](readings/guard-rspec.md)
- [ ] 15. [OO Robot RSpec Example](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/robot_spec.rb)
- [ ] 16. [Chess Solutions Walkthroughe](https://player.vimeo.com/video/317152522)
- [ ] 17. [RSpec Lecture - Part One](https://player.vimeo.com/video/317367140)
- [ ] 18. [RSpec Lecture - Part Two](https://player.vimeo.com/video/317367563)
- [ ] 19. [Hack Academy](html-css/micro-projects/css_intro/README.md)
- [Solution](https://www.appacademy.io/)
-- [ ] 20. [First TDD Projects](ruby/projects/first_tdd/README.md)
+- [ ] 20. [First TDD Projects](projects/first_tdd/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/solution.zip)
-- [ ] 21. [Poker](ruby/projects/poker/README.md)
+- [ ] 21. [Poker](projects/poker/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poker/solution.zip)
-- [ ] 22. [How RSpec works document](ruby/readings/how-rspec-works.md)
+- [ ] 22. [How RSpec works document](readings/how-rspec-works.md)
### Big-O
- [ ] 1. [Motivations for Big-O](https://player.vimeo.com/video/175565088)
@@ -218,9 +218,9 @@ with a specific icon in your task menu.
- [ ] 5. [Common Classifications](https://player.vimeo.com/video/175568501)
- [ ] 6. [Set Definition](https://player.vimeo.com/video/175568481)
- [ ] 7. [Space Complexity](https://player.vimeo.com/video/175565092)
-- [ ] 8. [Big O Quiz](ruby/quizzes/big_o.md)
-- [ ] 9. [Sorting Complexity](ruby/homeworks/sorting_demo/README.md)
-- [ ] 10. [Octopus Problems](ruby/homeworks/big_octopus/README.md)
+- [ ] 8. [Big O Quiz](quizzes/big_o.md)
+- [ ] 9. [Sorting Complexity](homeworks/sorting_demo/README.md)
+- [ ] 10. [Octopus Problems](homeworks/big_octopus/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/big_octopus/solution.rb)
- [ ] 11. [Plain English explanation of Big O](http://stackoverflow.com/questions/487258/plain-english-explanation-of-big-o)
- [ ] 12. [Big O Notation](https://www.interviewcake.com/article/ruby/big-o-notation-time-and-space-complexity)
@@ -230,17 +230,17 @@ with a specific icon in your task menu.
- [ ] 16. [Big O Intro & Cat Matcher Lecture](https://player.vimeo.com/video/337176296)
- [ ] 17. [Binary Search and BigO Lecture](https://player.vimeo.com/video/337181856)
- [ ] 18. [Merge Sort and BigO Lecture](https://player.vimeo.com/video/337186188)
-- [ ] 19. [Execution Time Differences/Algorithms](ruby/projects/execution_time_differences/README.md)
+- [ ] 19. [Execution Time Differences/Algorithms](projects/execution_time_differences/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/execution_time_differences/solution.zip)
-- [ ] 20. [Anagrams](ruby/projects/anagrams/README.md)
+- [ ] 20. [Anagrams](projects/anagrams/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/anagrams/solution.zip)
-- [ ] 21. [Two sum problem](ruby/projects/two_sum/README.md)
+- [ ] 21. [Two sum problem](projects/two_sum/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/two_sum/solution.zip)
-- [ ] 22. [Windowed Max Range](ruby/projects/max_windowed_range/README.md)
+- [ ] 22. [Windowed Max Range](projects/max_windowed_range/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/max_windowed_range/solution.zip)
-- [ ] 23. [Benchmarking (Bonus)](ruby/projects/benchmarking/README.md)
+- [ ] 23. [Benchmarking (Bonus)](projects/benchmarking/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/demos/sorting_demo/sorting_demo.rb#L58-L67)
-- [ ] 24. [Benchmarking (Bonus)](ruby/projects/benchmarking/README.md)
+- [ ] 24. [Benchmarking (Bonus)](projects/benchmarking/README.md)
### LRU Cache
- [ ] 1. [Set and Int Set](https://player.vimeo.com/video/159431377)
- [ ] 2. [Resizing Int Set Part 1](https://player.vimeo.com/video/159433039)
@@ -253,14 +253,14 @@ with a specific icon in your task menu.
- [ ] 9. [How Hashes Work](http://www.gotealeaf.com/blog/how-the-hash-works-in-ruby)
- [ ] 10. [LRU Cache Reading](https://web.archive.org/web/20150710185255/http://mcicpc.cs.atu.edu/archives/2012/mcpc2012/lru/lru.html)
- [ ] 11. [Dynamic Array (Wikipedia)](https://en.wikipedia.org/wiki/Dynamic_array)
-- [ ] 12. [XOR Reading](ruby/readings/xor.md)
-- [ ] 13. [LRU Cache Quiz](ruby/quizzes/lru_cache.md)
-- [ ] 14. [LRU Cache](ruby/homeworks/lru_cache/README.md)
+- [ ] 12. [XOR Reading](readings/xor.md)
+- [ ] 13. [LRU Cache Quiz](quizzes/lru_cache.md)
+- [ ] 14. [LRU Cache](homeworks/lru_cache/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/lru_cache/solution.rb)
-- [ ] 15. [Hash Map & LRU Cache](ruby/projects/hash_map_lru_cache/README.md)
+- [ ] 15. [Hash Map & LRU Cache](projects/hash_map_lru_cache/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/hash_map_lru_cache/solution.zip)
-- [ ] 16. [Hash Map & LRU Cache (Part Two)](ruby/projects/hash_map_lru_cache/part_two.md)
+- [ ] 16. [Hash Map & LRU Cache (Part Two)](projects/hash_map_lru_cache/part_two.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/hash_map_lru_cache/solution.zip)
-- [ ] 17. [Dynamic Array (Bonus)](ruby/projects/hash_map_lru_cache/dynamic_array.md)
+- [ ] 17. [Dynamic Array (Bonus)](projects/hash_map_lru_cache/dynamic_array.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/hash_map_lru_cache/solution.zip)
- [ ] 18. [Basic cursor input](https://github.com/rglassett/ruby-cursor-game)
\ No newline at end of file
From 63d5439f89e9fc8c1fa9c6943872caa5635c5de3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 14:50:35 +0200
Subject: [PATCH 09/23] Deleted duplicate
---
ruby/Open_Ruby_Overview.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 7b7435f..28b3076 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -44,7 +44,6 @@ with a specific icon in your task menu.
- [Soution](https://assets.aaonline.io/fullstack/ruby/projects/maze_solver/solution.zip)
- [ ] 10. [Eight Queens Puzzle (Bonus)](https://en.wikipedia.org/wiki/Eight_queens_puzzle)
- [ ] 11. [Project Euler (Bonus)](https://projecteuler.net/problems)
-- [ ] 11. [Project Euler (Bonus)](https://projecteuler.net/problems)
### Reference
- [ ] 1. [References Video](https://player.vimeo.com/video/165965713)
- [ ] 2. [References](readings/references.md)
From 8a0040950ab8a5b24d42e4c5acfb815afa0f19d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 15:00:54 +0200
Subject: [PATCH 10/23] Remove duplicate
---
ruby/Open_Ruby_Overview.md | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 28b3076..8558264 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -53,7 +53,7 @@ with a specific icon in your task menu.
- [ ] 6. [Method Decomposition & Design](readings/method-decomposition.md)
- [ ] 7. [Refactoring and Code Smells](readings/refactoring.md)
- [ ] 8. [Reference Quiz](quizzes/reference.md)
-- [ ] 9. [VSCode Cheatsheet](course/readings/vscode_cheatsheet.md)
+- [ ] 9. [VSCode Cheatsheet](../course/readings/vscode_cheatsheet.md)
- [ ] 10. [Testing Small (from Memory Puzzle)](readings/testing-small.md)
- [ ] 11. [my_flatten Solution Video](https://player.vimeo.com/video/336469470)
- [ ] 12. [my_zip Solution Video](https://player.vimeo.com/video/336469834)
@@ -193,21 +193,20 @@ with a specific icon in your task menu.
- [ ] 9. [RSpec and TDD Quiz](quizzes/rspec_tdd.md)
- [ ] 10. [RSpec](homeworks/rspec/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/homeworks/rspec/solution.zip)
-- [ ] 11. [RSpec](homeworks/rspec/README.md)
-- [ ] 12. [Introduction to RSpec](readings/intro-rspec.md)
-- [ ] 13. [TDD](readings/intro-tdd.md)
-- [ ] 14. [guard-rspec](readings/guard-rspec.md)
-- [ ] 15. [OO Robot RSpec Example](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/robot_spec.rb)
-- [ ] 16. [Chess Solutions Walkthroughe](https://player.vimeo.com/video/317152522)
-- [ ] 17. [RSpec Lecture - Part One](https://player.vimeo.com/video/317367140)
-- [ ] 18. [RSpec Lecture - Part Two](https://player.vimeo.com/video/317367563)
-- [ ] 19. [Hack Academy](html-css/micro-projects/css_intro/README.md)
+- [ ] 11. [Introduction to RSpec](readings/intro-rspec.md)
+- [ ] 12. [TDD](readings/intro-tdd.md)
+- [ ] 13. [guard-rspec](readings/guard-rspec.md)
+- [ ] 14. [OO Robot RSpec Example](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/robot_spec.rb)
+- [ ] 15. [Chess Solutions Walkthroughe](https://player.vimeo.com/video/317152522)
+- [ ] 16. [RSpec Lecture - Part One](https://player.vimeo.com/video/317367140)
+- [ ] 17. [RSpec Lecture - Part Two](https://player.vimeo.com/video/317367563)
+- [ ] 18. [Hack Academy](html-css/micro-projects/css_intro/README.md)
- [Solution](https://www.appacademy.io/)
-- [ ] 20. [First TDD Projects](projects/first_tdd/README.md)
+- [ ] 19. [First TDD Projects](projects/first_tdd/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/first_tdd/solution.zip)
-- [ ] 21. [Poker](projects/poker/README.md)
+- [ ] 20. [Poker](projects/poker/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/poker/solution.zip)
-- [ ] 22. [How RSpec works document](readings/how-rspec-works.md)
+- [ ] 21. [How RSpec works document](readings/how-rspec-works.md)
### Big-O
- [ ] 1. [Motivations for Big-O](https://player.vimeo.com/video/175565088)
From 7bd102993367647834ce17e8fdeb5eb7de765717 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 15:07:07 +0200
Subject: [PATCH 11/23] Delete duplicate
---
ruby/Open_Ruby_Overview.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ruby/Open_Ruby_Overview.md b/ruby/Open_Ruby_Overview.md
index 8558264..3805f84 100644
--- a/ruby/Open_Ruby_Overview.md
+++ b/ruby/Open_Ruby_Overview.md
@@ -90,7 +90,7 @@ with a specific icon in your task menu.
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/word_chains/solution.zip)
- [ ] 16. [More Recursion Questions (Bonus)](projects/more_recursion_exercises/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/more_recursion_exercises/solutions/recursion_problems.rb)
-- [ ] 17. [More Recursion Questions (Bonus)](projects/more_recursion_exercises/README.md)
+
### Git
- [ ] 1. [Git: Overview and Why We Use Git](https://player.vimeo.com/video/171666454)
- [ ] 2. [Git: Mental Models](https://player.vimeo.com/video/171666455)
@@ -238,7 +238,6 @@ with a specific icon in your task menu.
- [Solution](https://assets.aaonline.io/fullstack/ruby/projects/max_windowed_range/solution.zip)
- [ ] 23. [Benchmarking (Bonus)](projects/benchmarking/README.md)
- [Solution](https://assets.aaonline.io/fullstack/ruby/demos/sorting_demo/sorting_demo.rb#L58-L67)
-- [ ] 24. [Benchmarking (Bonus)](projects/benchmarking/README.md)
### LRU Cache
- [ ] 1. [Set and Int Set](https://player.vimeo.com/video/159431377)
- [ ] 2. [Resizing Int Set Part 1](https://player.vimeo.com/video/159433039)
From fd66f729678147890be122fb43845a05447f5a0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 15:09:37 +0200
Subject: [PATCH 12/23] Fix typo
---
ruby/quizzes/big_o.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ruby/quizzes/big_o.md b/ruby/quizzes/big_o.md
index 754bc53..099a344 100644
--- a/ruby/quizzes/big_o.md
+++ b/ruby/quizzes/big_o.md
@@ -66,4 +66,6 @@ Remember $O(1)$, or constant time, is the slowest growing in terms of time compl
- [ ] $O(1)$
Answer:
$O(n!)$
-Explanation:
Whenever you have a problem where you are creating permutations, you are dealing with $factorial$ time complexity. E.g., if you call the $Array#permutation$ method of an array with the length of 3, then 3! permutations would be returned (6 permutations total). Increasing the length to 4 would then return 24 total permutations, or 4!.
\ No newline at end of file
+Explanation:
+
+Whenever you have a problem where you are creating permutations, you are dealing with $factorial$ time complexity. E.g., if you call the `Array#permutation` method of an array with the length of 3, then 3! permutations would be returned (6 permutations total). Increasing the length to 4 would then return 24 total permutations, or 4!.
\ No newline at end of file
From 8aebfc418c1dba378828c2f7efaba9c8a45acc24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Thu, 25 Jul 2024 15:15:21 +0200
Subject: [PATCH 13/23] Fix formatting
---
ruby/quizzes/data_structures.md | 4 +++-
ruby/quizzes/git.md | 28 +++++++++++++++++++++-------
ruby/quizzes/lru_cache.md | 32 ++++++++++++++++++++++++--------
ruby/quizzes/oop_1.md | 32 ++++++++++++++++++++++++--------
ruby/quizzes/oop_2.md | 32 ++++++++++++++++++++++++--------
5 files changed, 96 insertions(+), 32 deletions(-)
diff --git a/ruby/quizzes/data_structures.md b/ruby/quizzes/data_structures.md
index 51978ea..18e5b2c 100644
--- a/ruby/quizzes/data_structures.md
+++ b/ruby/quizzes/data_structures.md
@@ -72,5 +72,7 @@
- [ ] `H`
- [ ] `I`
-Answer:
`D`
+Answer:
+
+`D`
Explanation:
The root node refers to the top most node that has no parent node.
diff --git a/ruby/quizzes/git.md b/ruby/quizzes/git.md
index 7f8bc1d..6d1ec1f 100644
--- a/ruby/quizzes/git.md
+++ b/ruby/quizzes/git.md
@@ -6,7 +6,9 @@
- [ ] local repository -> workspace -> index (staging area) -> upstream repository
Answer:
workspace -> index (staging area) -> local repository -> upstream repository
-Explanation:
We make changes to our local workspace, then we need to stage the changes so that they can be commited to our local repository (the hidden .git directory in our workspace) and then we can push them to the upstream remote repository.
+Explanation:
+
+We make changes to our local workspace, then we need to stage the changes so that they can be commited to our local repository (the hidden .git directory in our workspace) and then we can push them to the upstream remote repository.
#### How would you create a new branch and switch to it at the same time?
- [ ] `git -b checkout`
@@ -14,8 +16,12 @@
- [ ] `git checkout -b`
- [ ] `git branch -co`
-Answer:
`git checkout -b`
-Explanation:
`git checkout -b` will do both for us! Instead of having to run `git branch ` and then `git checkout `
+Answer:
+
+`git checkout -b`
+Explanation:
+
+`git checkout -b` will do both for us! Instead of having to run `git branch ` and then `git checkout `
#### Oh no! We've messed up and coded unwanted changes to our local project! How can we go back to a previous commit and get rid of the unwanted changes?
- [ ] `git rollback --soft`
@@ -23,13 +29,21 @@
- [ ] `git reset --hard`
- [ ] `git revert HEAD`
-Answer:
`git reset --hard`
-Explanation:
`git reset --hard` will will wipe out all tracked changes back to the most recent commit.
+Answer:
+
+`git reset --hard`
+Explanation:
+
+`git reset --hard` will will wipe out all tracked changes back to the most recent commit.
#### Our remote and local repositories have gotten so out of alignment that we just want to ignore any conflicts and push our local code up to remote. How would we do this?
- [ ] `git push -f`
- [ ] `git push`
- [ ] `git force push`
- [ ] `git push -u`
-Answer:
`git push -f`
-Explanation:
The `-f` flag is short for `--force` which overrides any conflicts our local repo has with the remote repo.
\ No newline at end of file
+Answer:
+
+`git push -f`
+Explanation:
+
+The `-f` flag is short for `--force` which overrides any conflicts our local repo has with the remote repo.
\ No newline at end of file
diff --git a/ruby/quizzes/lru_cache.md b/ruby/quizzes/lru_cache.md
index dce6f72..e7ab979 100644
--- a/ruby/quizzes/lru_cache.md
+++ b/ruby/quizzes/lru_cache.md
@@ -12,8 +12,12 @@
- [ ] Yes
- [ ] No
-Answer:
No
-Explanation:
A hashing function must be **deterministic**: the same input should always produce the same output, which won't happen if the output relies on a randomly generated number!
+Answer:
+
+No
+Explanation:
+
+A hashing function must be **deterministic**: the same input should always produce the same output, which won't happen if the output relies on a randomly generated number!
#### In a linked list, what is the time complexity for accessing the nth element?
- [ ] $O(1)$
@@ -22,8 +26,12 @@
- [ ] $O(n log n)$
- [ ] $O(n^2)$
-Answer:
$O(n)$
-Explanation:
Unlike with an array or hash--which allow access to the nth element by index and key, respectively--accessing the nth element in a linked list requires following links from the first element to each successive element until reaching the nth one, an $O(n)$ operation.
+Answer:
+
+$O(n)$
+Explanation:
+
+Unlike with an array or hash--which allow access to the nth element by index and key, respectively--accessing the nth element in a linked list requires following links from the first element to each successive element until reaching the nth one, an $O(n)$ operation.
```ruby
{4,78,12,56,44,78,15}
@@ -31,13 +39,21 @@
#### Is the above a set?
- [ ] Yes
- [ ] No
-Answer:
No
-Explanation:
A set is a data type that stores *unique* items.
+Answer:
+
+No
+Explanation:
+
+A set is a data type that stores *unique* items.
#### An array is an example of which of the following? (Select all that apply.)
- [ ] Abstract Data Type
- [ ] Algorithm
- [ ] Data Structure
- [ ] Transfer Function
-Answer:
Data Structure
-Explanation:
An array is an example of a data structure! :)
\ No newline at end of file
+Answer:
+
+Data Structure
+Explanation:
+
+An array is an example of a data structure! :)
\ No newline at end of file
diff --git a/ruby/quizzes/oop_1.md b/ruby/quizzes/oop_1.md
index d7f0c4b..cbbfd98 100644
--- a/ruby/quizzes/oop_1.md
+++ b/ruby/quizzes/oop_1.md
@@ -33,8 +33,12 @@
- [ ] `"Ballet"`, `"West Coast"`
- [ ] `"Vaganova"`, `"Ballet"`
- [ ] `"Vaganova"`, `"West Coast"`
-Answer:
No`"Ballet"`, `"West Coast"`
-Explanation:
When called without any arguments (as in `Swing#initialize`), the `super` keyword will take all the arguments passed in to the current method and pass them as arguments to the parent class's version of the method. So `west_coast_swing` will have its `@style` set to "West Coast", i.e., the argument originally passed in to `Swing#initialize`. The `Ballet` class, however, does specify an argument for `super` to pass to its parent `Dance` class: "Ballet". `bolshoi`'s `@style` will accordingly be set to "Ballet".
+Answer:
+
+No`"Ballet"`, `"West Coast"`
+Explanation:
+
+When called without any arguments (as in `Swing#initialize`), the `super` keyword will take all the arguments passed in to the current method and pass them as arguments to the parent class's version of the method. So `west_coast_swing` will have its `@style` set to "West Coast", i.e., the argument originally passed in to `Swing#initialize`. The `Ballet` class, however, does specify an argument for `super` to pass to its parent `Dance` class: "Ballet". `bolshoi`'s `@style` will accordingly be set to "Ballet".
```ruby
class EngineStalledError < StandardError
@@ -64,8 +68,12 @@
- [ ] An uncaught error is thrown
- [ ] The program outputs `"Rescued from engine stalled!"` then retries running the code block
- [ ] The program outputs `"Car stopped."`
-Answer:
The program outputs `"Rescued from engine stalled!"` then retries running the code block
-Explanation:
After rescuing the `EngineStalledError` this code block will hit the `retry` keyword.
+Answer:
+
+The program outputs `"Rescued from engine stalled!"` then retries running the code block
+Explanation:
+
+After rescuing the `EngineStalledError` this code block will hit the `retry` keyword.
```ruby
class BoxOffice
@@ -97,8 +105,12 @@
- [ ] `tkts.sell_ticket`
- [ ] `tkts.tickets_sold += 1`
- [ ] `BoxOffice.sell_ticket`
-Answer:
`tkts.sell_ticket`
-Explanation:
To increase the number of tickets sold for the `tkts` instance of the `BoxOffice` class, you just need to call the `sell_ticket` method on that instance.
+Answer:
+
+`tkts.sell_ticket`
+Explanation:
+
+To increase the number of tickets sold for the `tkts` instance of the `BoxOffice` class, you just need to call the `sell_ticket` method on that instance.
#### You are writing a program that makes sandwiches. Each sandwich has a protein, a condiment, and two slices of bread. There are different types of proteins, condiments, and breads, but within each of those categories, the different types are functionally all the same. According to the principles of Object-Oriented Programming, what classes should you create for your program?
@@ -107,5 +119,9 @@
- [ ] Sandwich, Bread, Protein, Condiment
- [ ] Sandwich
- [ ] Sandwich, Bread, Protein, Mustard, Ketchup, Aioli
-Answer:
Sandwich, Bread, Protein, Condiment
-Explanation:
When taking an OOP approach, you typically want to break your program down into base classes (like `Bread`) that have a single responsibility / reason to change. If Sandwich were the only class, it would have to change whenever you needed to update the functionality of proteins, condiments, or bread, thus violating the preceding principle. At the same time, you don't need to break proteins, condiments, and bread down further because all of their different types share the same functionality.
\ No newline at end of file
+Answer:
+
+Sandwich, Bread, Protein, Condiment
+Explanation:
+
+When taking an OOP approach, you typically want to break your program down into base classes (like `Bread`) that have a single responsibility / reason to change. If Sandwich were the only class, it would have to change whenever you needed to update the functionality of proteins, condiments, or bread, thus violating the preceding principle. At the same time, you don't need to break proteins, condiments, and bread down further because all of their different types share the same functionality.
\ No newline at end of file
diff --git a/ruby/quizzes/oop_2.md b/ruby/quizzes/oop_2.md
index 6781f25..f973b2a 100644
--- a/ruby/quizzes/oop_2.md
+++ b/ruby/quizzes/oop_2.md
@@ -41,8 +41,12 @@
- [ ] `"New York City"`, `"California"`, `NoMethodError`
- [ ] `"California"`, `"California"`, `"California"`
-Answer:
`"New York"`, `500000`, `"California"`
-Explanation:
`City#initialize` explicitly passes its `state` parameter (here, `"New York"`) to `super`. `Town#initialize`, in contrast, just calls `super`, which passes along all of `Town#initialize`'s incoming arguments (here, `500000`) to `Municipality#initialize`. (To avoid passing along its arguments and have `super` apply the default argument of `"California"`, `Town#initialize` would need to indicate explicitly that it was calling `super` without any arguments, i.e., `super()`.) Finally, since the `County` class does not have a defined initialize method, calling `new` on `County` will run the parent class's `initialize` method, thereby setting `state` to the default value of `"California"`.
+Answer:
+
+`"New York"`, `500000`, `"California"`
+Explanation:
+
+`City#initialize` explicitly passes its `state` parameter (here, `"New York"`) to `super`. `Town#initialize`, in contrast, just calls `super`, which passes along all of `Town#initialize`'s incoming arguments (here, `500000`) to `Municipality#initialize`. (To avoid passing along its arguments and have `super` apply the default argument of `"California"`, `Town#initialize` would need to indicate explicitly that it was calling `super` without any arguments, i.e., `super()`.) Finally, since the `County` class does not have a defined initialize method, calling `new` on `County` will run the parent class's `initialize` method, thereby setting `state` to the default value of `"California"`.
@@ -78,8 +82,12 @@ board.add_piece([0,0], Pawn.new)
- [ ] There should be an `attr_reader` for the `@grid` instance variable.
- [ ] Nothing is wrong with the above code.
-Answer:
`#add_piece` should call `self[pos]` rather than `@grid[pos]`
-Explanation:
It will not add the pawn because `@grid[pos]` in `#add_piece` resolves to `@grid[[0,0]]`, which will produce `TypeError: no implicit conversion of Array into Integer`. It produces this error because `@grid` is an `Array`, and the `Array#[]` method expects an integer as an argument, not an array (i.e., not `[0,0]`). To avoid this problem, note that the `Board#[]` and `Board#[]=` methods both expect an array as an argument (`pos`) and use that array to access `@grid` for you. `#add_piece` will accordingly add the pawn successfully if it instead calls `self[pos] = piece`.
+Answer:
+
+`#add_piece` should call `self[pos]` rather than `@grid[pos]`
+Explanation:
+
+It will not add the pawn because `@grid[pos]` in `#add_piece` resolves to `@grid[[0,0]]`, which will produce `TypeError: no implicit conversion of Array into Integer`. It produces this error because `@grid` is an `Array`, and the `Array#[]` method expects an integer as an argument, not an array (i.e., not `[0,0]`). To avoid this problem, note that the `Board#[]` and `Board#[]=` methods both expect an array as an argument (`pos`) and use that array to access `@grid` for you. `#add_piece` will accordingly add the pawn successfully if it instead calls `self[pos] = piece`.
@@ -105,8 +113,12 @@ pawn.position
- [ ] `[0, 1]`, `[0, 1]`
- [ ] `[0, "CHANGED"]`, `[0, 1]`
-Answer:
`[0, "CHANGED"]`, `[0, "CHANGED"]`
-Explanation:
Remember that Ruby's native `#dup` method only makes a shallow copy. This means that it copies the references stored in instance variables instead of creating new copies of the objects they reference. `pawn` and `pawn_copy` will accordingly both reference the same array, but if they both reference the same array, then changing that array in one instance will also change it in the other! To avoid this problem, you would need to create a new position array when making your second pawn.
+Answer:
+
+`[0, "CHANGED"]`, `[0, "CHANGED"]`
+Explanation:
+
+Remember that Ruby's native `#dup` method only makes a shallow copy. This means that it copies the references stored in instance variables instead of creating new copies of the objects they reference. `pawn` and `pawn_copy` will accordingly both reference the same array, but if they both reference the same array, then changing that array in one instance will also change it in the other! To avoid this problem, you would need to create a new position array when making your second pawn.
@@ -124,5 +136,9 @@ end
- [ ] `Piece.instance`
- [ ] `Singleton.instance`
-Answer:
`Piece.instance`
-Explanation:
The `Singleton` module allows you to have only one instance of a class. You would invoke that singular instance using `Piece.instance`.
\ No newline at end of file
+Answer:
+
+`Piece.instance`
+Explanation:
+
+The `Singleton` module allows you to have only one instance of a class. You would invoke that singular instance using `Piece.instance`.
\ No newline at end of file
From cecfd7e88115067b1df7769c5da8c241b220235c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Fri, 26 Jul 2024 23:13:30 +0200
Subject: [PATCH 14/23] Add Rails course
---
README.md | 2 +-
rails/Open_Rails_Overview.md | 85 ++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+), 1 deletion(-)
create mode 100644 rails/Open_Rails_Overview.md
diff --git a/README.md b/README.md
index 644e4af..feae690 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ The material in this repository is divided by topic.
* [Ruby](ruby/Open_Ruby_Overview.md)
* SQL
-* Rails
+* [Rails](rails/Open_Rails_Overview.md)
* HTML/CSS
* JavaScript
* React
diff --git a/rails/Open_Rails_Overview.md b/rails/Open_Rails_Overview.md
new file mode 100644
index 0000000..c1dac95
--- /dev/null
+++ b/rails/Open_Rails_Overview.md
@@ -0,0 +1,85 @@
+# Rails
+
+## Topics Covered
+
+- [Getting started](#getting-started)
+- [Routes and Controllers](#routes-and-controllers)
+- [Rails Views](#rails-views)
+- [Rails Auth](#rails-auth)
+- [Rails Auth II](#rails-auth-ii)
+- [Testing with Rails](#testing-with-rails)
+- [Rails and CSS](#rails-and-css)
+- [Advanced Rails Forms](#advanced-rails-forms)
+- [Rails Lite](#rails-lite)
+
+
+## Notes
+
+Rails is the third module in the App Academy Full Stack Developer Curriculum.
+
+As with all future modules, any "Bonus" projects are to be completed after the
+standard projects for each day are completed. Sometimes that could mean going
+back to previous day's "Bonus" projects if you otherwise finish early.
+Additional Resources are readings, videos, or articles that are not required,
+but will serve to deepen your understanding of a topic. They will be denoted
+with a specific icon in your task menu.
+
+### Getting started
+- [ ] 1. [Rails Setup](readings/rails-setup.md)
+- [ ] 2. [Rails API (api.rubyonrails.org)](http://api.rubyonrails.org/v5.1.3/)
+- [ ] 3. [Rails Guides (guides.rubyonrails.org)](http://guides.rubyonrails.org/v5.1.3/)
+- [ ] 4. [Diagram of Rails](https://assets.aaonline.io/fullstack/rails/assets/rails_diagram.png)
+- [ ] 5. [Rails 4 vs Rails 5](readings/rails-5-updates.md)
+### Routes and Controllers
+- [ ] 1. [What is an API?](https://player.vimeo.com/video/168498417)
+- [ ] 2. [HTTP Request/Response](https://player.vimeo.com/video/168498424)
+- [ ] 3. [Rails Routing](https://player.vimeo.com/video/168498679)
+- [ ] 4. [Routes Demo](https://player.vimeo.com/video/168499905)
+- [ ] 5. [Basic Controller Demo](https://player.vimeo.com/video/168501163)
+- [ ] 6. [RESTful Controller Demo](https://player.vimeo.com/video/168505535)
+- [ ] 7. [Routing I: Basics](readings/routing-part-i.md)
+- [ ] 8. [Basic Controllers and Strong Params](readings/basic-controllers.md)
+- [ ] 9. [Callbacks](readings/callbacks.md)
+- [ ] 10. [Delegation](readings/delegation.md)
+- [ ] 11. [Contextual Overview of DNS](readings/dns.md)
+- [ ] 12. [Testing Routes with Postman](readings/postman.md)
+- [ ] 13. [Routes and Controllers Quiz](quizzes/routes_and_controllers.md)
+- [ ] 14. [True Diversity is Intersectional](https://medium.com/projectinclude/true-diversity-is-intersectional-2282b8da8882)
+- [ ] 15. [6-Year-Old Girls Already Have Gendered Beliefs About Intelligence](https://www.theatlantic.com/science/archive/2017/01/six-year-old-girls-already-have-gendered-beliefs-about-intelligence/514340/)
+- [ ] 16. [VCs and Female Entrepreneurs](https://hbr.org/2017/05/we-recorded-vcs-conversations-and-analyzed-how-differently-they-talk-about-female-entrepreneurs)
+- [ ] 17. [Elephant in the Valley](https://www.elephantinthevalley.com/)
+- [ ] 18. [When Bias in Product Design Means Life or Death](https://techcrunch.com/2016/11/16/when-bias-in-product-design-means-life-or-death/)
+- [ ] 19. [Basic JSON API](readings/basic-json-api.md)
+- [ ] 20. [Routing II: Nested Collections](readings/routing-part-ii.md)
+- [ ] 21. [Routing III: Adding non-default routes](readings/routing-part-iii.md)
+- [ ] 22. [(cc) 03-basic-rails-routing](https://player.vimeo.com/video/100267303)
+- [ ] 23. [(cc) 04-strong-params](https://player.vimeo.com/video/100267304)
+- [ ] 24. [(cc) 05-nested-resources](https://player.vimeo.com/video/100267305)
+- [ ] 25. [(cc) 06-erb-and-views](https://player.vimeo.com/video/100267306)
+- [ ] 26. [(cc) 07-basic-forms](https://player.vimeo.com/video/100358537)
+- [ ] 27. [(cc) 08-form-request-cycle](https://player.vimeo.com/video/100359278)
+- [ ] 28. [(cc) 09-select](https://player.vimeo.com/video/100729432)
+- [ ] 29. [(cc) 10-form-partial](https://player.vimeo.com/video/100729434)
+- [ ] 30. [(cc) 11-form-encoding](https://player.vimeo.com/video/100729434)
+- [ ] 31. [Code from Rails demos (Intro Rails Video Demo)](https://assets.aaonline.io/fullstack/rails/demos/intro_rails_video_demo.zip)
+- [ ] 32. [Rails Routing Intro](https://player.vimeo.com/video/335016614)
+- [ ] 33. [First Route & Controller Action](https://player.vimeo.com/video/335017586)
+- [ ] 34. [Show Controller Action](https://player.vimeo.com/video/335018812)
+- [ ] 35. [Create & New Controller Actions](https://player.vimeo.com/video/335019368)
+- [ ] 36. [Update & Destroy Controller Actions](https://player.vimeo.com/video/335021237)
+- [ ] 37. [First Routes and Controllers](projects/first_routes/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/first_routes/solution.zip)
+- [ ] 38. [Art Share API](projects/art_share_api/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/art_share_api/solution.zip)
+- [ ] 39. [CSS Friends Part 1](../html-css/micro-projects/css_friends_combined/css_friends_0/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/html-css/micro-projects/combined-css-friends/css-friends-pt1/solution.zip)
+- [ ] 40. [Art Share API (Part Two)](projects/art_share_api/part_two.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/art_share_api/solution.zip)
+### Rails Views
+- [ ] 1. [Rails Views: Intro](https://player.vimeo.com/video/194372657)
+### Rails Auth
+### Rails Auth II
+### Testing with Rails
+### Rails and CSS
+### Advanced Rails Forms
+### Rails Lite
\ No newline at end of file
From d3c395678207cf2ee820bf7c57631ea83fca30ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Mon, 29 Jul 2024 19:39:02 +0200
Subject: [PATCH 15/23] Modify md files to allow Rails course walkthrough in
github
---
rails/Open_Rails_Overview.md | 177 ++++++++++++++++++++++-
rails/readings/rails_user_authentication | 1 +
2 files changed, 177 insertions(+), 1 deletion(-)
create mode 160000 rails/readings/rails_user_authentication
diff --git a/rails/Open_Rails_Overview.md b/rails/Open_Rails_Overview.md
index c1dac95..b896e47 100644
--- a/rails/Open_Rails_Overview.md
+++ b/rails/Open_Rails_Overview.md
@@ -75,11 +75,186 @@ with a specific icon in your task menu.
- [Solution](https://assets.aaonline.io/fullstack/html-css/micro-projects/combined-css-friends/css-friends-pt1/solution.zip)
- [ ] 40. [Art Share API (Part Two)](projects/art_share_api/part_two.md)
- [Solution](https://assets.aaonline.io/fullstack/rails/projects/art_share_api/solution.zip)
+- [ ] 41. [Art Share API Solutions](https://player.vimeo.com/video/335906952)
+
### Rails Views
- [ ] 1. [Rails Views: Intro](https://player.vimeo.com/video/194372657)
+- [ ] 2. [Rails Views: Forms](https://player.vimeo.com/video/194376967)
+- [ ] 3. [Rails Views: Partials](https://player.vimeo.com/video/194385069)
+- [ ] 4. [Debugging a Rails Project](https://player.vimeo.com/video/194394048)
+- [ ] 5. [Code from Rails demos (Library Demo)](https://assets.aaonline.io/fullstack/rails/demos/library_demo.zip)
+- [ ] 6. [Rails Views Quiz](quizzes/views.md)
+- [ ] 7. [Partials](readings/partials.md)
+- [ ] 8. [ERB](readings/erb.md)
+- [ ] 9. [Rails Parameter Conventions](readings/parameter-conventions.md)
+- [ ] 10. [Debugging](readings/debugging-rails.md)
+- [ ] 11. [Easy Forms Demo](https://assets.aaonline.io/fullstack/rails/demos/easy_forms_demo.zip)
+- [ ] 12. [Ternary Logic in SQL](../sql/readings/sql-ternary-logic.md)
+- [ ] 13. [Rails Views - BleatsController#index](https://player.vimeo.com/video/335909324)
+- [ ] 14. [Rails Views - BleatsController#show](https://player.vimeo.com/video/335911420)
+- [ ] 15. [Rails Views - BleatsController#new & #create](https://player.vimeo.com/video/335912633)
+- [ ] 16. [Rails Views - BleatsController#edit & #update](https://player.vimeo.com/video/335917285)
+- [ ] 17. [Partials Lecture](https://player.vimeo.com/video/335919026)
+- [ ] 18. [Rails Views - BleatsController#destroy](https://player.vimeo.com/video/335920703)
+- [ ] 19. [99 Cats](projects/ninety_nine_cats_i/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/ninety_nine_cats_i/solution.zip)
### Rails Auth
+- [ ] 1. [Secure State](https://player.vimeo.com/video/160819941)
+- [ ] 2. [Cookies and Authentication](https://player.vimeo.com/video/160820294)
+- [ ] 3. [Encoding and Encryption](https://player.vimeo.com/video/160820971)
+- [ ] 4. [Hashing for Authentication](https://player.vimeo.com/video/160821222)
+- [ ] 5. [Salting](https://player.vimeo.com/video/160822597)
+- [ ] 6. [BCrypt](https://player.vimeo.com/video/160825250)
+- [ ] 7. [Session and Flash](https://player.vimeo.com/video/160824886)
+- [ ] 8. [Auth Pattern](https://player.vimeo.com/video/160826910)
+- [ ] 9. [(cc) 06 CSRF Attack](https://player.vimeo.com/video/93114286)
+- [ ] 10. [(cc) 07 CSRF Protection](https://player.vimeo.com/video/93114288)
+- [ ] 11. [(cc) 08 CSRF Methods](https://player.vimeo.com/video/93114287)
+- [ ] 12. [Singular resource](readings/singular-resources.md)
+- [ ] 13. [Rails Auth Quiz](quizzes/auth.md)
+- [ ] 14. [Cookies, JSON](https://player.vimeo.com/video/336447623)
+- [ ] 15. [Encrypted Cookies & #session](https://player.vimeo.com/video/336448651)
+- [ ] 16. [#flash & #flash.now](https://player.vimeo.com/video/336449027)
+- [ ] 17. [Rails Auth](homeworks/rails-auth/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/homeworks/rails-auth/solution.zip)
+- [ ] 18. [Cookies](readings/cookies.md)
+- [ ] 19. [Controllers and State](readings/controllers-and-state.md)
+- [ ] 20. [CSRF and Forms](readings/csrf.md)
+- [ ] 21. [Displaying validation errors; flash](readings/validation.md)
+- [ ] 22. [Auth I: Creating Users](readings/auth-part-i.md)
+- [ ] 23. [Auth II: Sessions](readings/auth-part-ii.md)
+- [ ] 24. [Common User Auth Questions](readings/rails_user_authentication/README.md)
+- [ ] 25. [99Cats pt. 1 Solution](https://player.vimeo.com/video/336446896)
+- [ ] 26. [User Password Functionality & User Signup](https://player.vimeo.com/video/336449760)
+- [ ] 27. [Auth Intro, Log In on Signup, #current_user](https://player.vimeo.com/video/336451736)
+- [ ] 28. [SessionsController](https://player.vimeo.com/video/336452376)
+- [ ] 29. [Authorization (before_action)](https://player.vimeo.com/video/336453330)
+- [ ] 30. [99 Cats II: Auth](projects/ninety_nine_cats_ii/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/ninety_nine_cats_ii/solution.zip)
### Rails Auth II
+- [ ] 1. [(cc) 14-radio-and-textarea](https://player.vimeo.com/video/100729825)
+- [ ] 2. [(cc) 15-helpers](https://player.vimeo.com/video/100780885)
+- [ ] 3. [layouts](https://player.vimeo.com/video/168822741)
+- [ ] 4. [ActionMailer](readings/mailing-1.md)
+- [ ] 5. [View helpers](readings/helpers.md)
+- [ ] 6. [View layouts](readings/layouts.md)
+- [ ] 7. [Nontechnical Overview of Rails](readings/rails_nontech.md)
+- [ ] 8. [Helpers, Layouts, and Partials](homeworks/helpers-layouts-mailer/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/homeworks/helpers-layouts-mailer/solution.zip)
+- [ ] 9. [Action Mailer Demo](https://player.vimeo.com/video/168810895)
+- [ ] 10. [CSRF Attacks & Protection](https://player.vimeo.com/video/336454209)
+- [ ] 11. [Auth Review](https://player.vimeo.com/video/336455270)
+- [ ] 12. [Music App](projects/music_app/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/music_app/solution.zip)
### Testing with Rails
+- [ ] 1. [Rails Testing: Intro](https://player.vimeo.com/video/292415799)
+- [ ] 2. [Rails Testing: Setup](https://player.vimeo.com/video/292423696)
+- [ ] 3. [Rails Testing: Models](https://player.vimeo.com/video/292829125)
+- [ ] 4. [Rails Testing: Factories](https://player.vimeo.com/video/292829352)
+- [ ] 5. [Rails Testing: Controllers](https://player.vimeo.com/video/292827733)
+- [ ] 6. [Rails Testing: Capybara](https://player.vimeo.com/video/292828799)
+- [ ] 7. [Code from Rails Testing demo (Capybara Party](https://assets.aaonline.io/fullstack/rails/demos/CapybaraParty.zip)
+- [ ] 8. [RSpec View Testing](readings/rspec-views.md)
+- [ ] 9. [Capybara](homeworks/capybara/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/homeworks/capybara/solution.md)
+- [ ] 10. [Integration Testing](readings/integration-testing.md)
+- [ ] 11. [RSpec and Rails Setup](readings/rspec-and-rails-setup.md)
+- [ ] 12. [Testing Models](readings/rspec-models.md)
+- [ ] 13. [FactoryBot and Faker Gems](readings/factorybot-and-faker.md)
+- [ ] 14. [Testing Controllers](readings/rspec-controllers.md)
+- [ ] 15. [Testing with Capybara](readings/capybara.md)
+- [ ] 16. [Spring and Guard Setup](readings/guard-spring-setup.md)
+- [ ] 17. [Shoulda Matchers Setup](readings/shoulda-matchers-setup.md)
+- [ ] 18. [Rails Testing Intro & Model Tests](https://player.vimeo.com/video/336465423)
+- [ ] 19. [Rails Controller Testing](https://player.vimeo.com/video/336466846)
+- [ ] 20. [Rails Feature Tests](https://player.vimeo.com/video/336467425)
+- [ ] 21. [Goal App](projects/goal_app/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/goal_app/solution.zip)
+- [ ] 22. [Appacademy.io Tests (Bonus)](projects/appacademy.io_tests/README.md)
### Rails and CSS
+- [ ] 1. [CSS Nontechnical Overview](../html-css/readings/css_nontech.md)
+- [ ] 2. [CSS Responsive Design](../html-css/readings/responsive_design.md)
+- [ ] 3. [CSS Quiz](quizzes/css.md)
+- [ ] 4. [Positioning & Media Queries](../html-css/micro-projects/positioning_media_queries/exercise.md)
+ - [Solution](https://assets.aaonline.io/fullstack/html-css/micro-projects/positioning_media_queries/solution.zip)
+- [ ] 5. [CSS Review](../html-css/projects/css_review/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/html-css/projects/css_review/solution.zip)
+- [ ] 6. [CSS Review Video](https://player.vimeo.com/video/214597789)
+- [ ] 7. [CSS Intro](../html-css/lecture_readings/intro_to_css.md)
+- [ ] 8. [CSS Syntax](../html-css/lecture_readings/css_syntax.md)
+- [ ] 9. [CSS Display](../html-css/lecture_readings/css_display.md)
+- [ ] 10. [CSS Box Model](../html-css/lecture_readings/css_box_model.md)
+- [ ] 11. [CSS Margin](../html-css/lecture_readings/css_margin.md)
+- [ ] 12. [CSS Inheritence](../html-css/lecture_readings/css_inherit.md)
+- [ ] 13. [CSS Reset](../html-css/lecture_readings/css_reset.md)
+- [ ] 14. [CSS Pseudo Content](../html-css/lecture_readings/css_pseudo_content.md)
+- [ ] 15. [CSS Float](../html-css/lecture_readings/css_float.md)
+- [ ] 16. [CSS Grid](../html-css/lecture_readings/css_grid.md)
+- [ ] 17. [CSS Navbar Demo](../html-css/lecture_readings/css_navbar.md)
+- [ ] 18. [CSS Positioning](../html-css/lecture_readings/css_positioning.md)
+- [ ] 19. [CSS Glasses Demo](../html-css/lecture_readings/css_glasses.md)
+- [ ] 20. [CSS Transform Property](http://css-tricks.com/almanac/properties/t/transform/)
+- [ ] 21. [Flexbox Froggy](https://flexboxfroggy.com/)
+- [ ] 22. [Flexbox Defense](http://www.flexboxdefense.com/)
+- [ ] 23. [CSS Grid Garden](http://cssgridgarden.com/)
+- [ ] 24. [Intro & Boxes Demo](https://player.vimeo.com/video/337140888)
+- [ ] 25. [Display Property & Floats Demo](https://player.vimeo.com/video/337142705)
+- [ ] 26. [Flexbox Demo](https://player.vimeo.com/video/337144348)
+- [ ] 27. [Position Demo](https://player.vimeo.com/video/337146602)
+- [ ] 28. [Styling Demo with Rails](https://player.vimeo.com/video/337149109)
+- [ ] 29. [AA Times](../html-css/projects/aa_times/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/html-css/projects/aa_times/solution.zip)
+- [ ] 30. [AA Times (Part Two)](../html-css/projects/aa_times/part_two.md)
+ - [Solution](https://assets.aaonline.io/fullstack/html-css/projects/aa_times/solution.zip)
+- [ ] 31. [Google Homepage (Bonus)](../html-css/projects/google_homepage/README.md)
+ - [Solution](https://www.google.com/)
+- [ ] 32. [Have You Experienced Racism in the Workplace?](https://www.comparably.com/guest/culture/tech/all-departments/109-have-you-ever-experienced-racism-in-the-workplac)
+- [ ] 33. [Diversity in Tech Remains Elusive](https://modelviewculture.com/pieces/diversity-in-tech-remains-elusive-due-to-racism-lack-of-representation-and-cultural-differences)
+- [ ] 34. [Commoditization and Exploitation of Asians in Tech](https://modelviewculture.com/pieces/damaged-karma-commoditization-and-exploitation-of-asians-in-tech)
+- [ ] 35. [The Other Side of Diversity](https://medium.com/this-is-hard/the-other-side-of-diversity-1bb3de2f053e)
+- [ ] 36. [How AI is Learning All of Our Worst Impulses](https://www.theguardian.com/inequality/2017/aug/08/rise-of-the-racist-robots-how-ai-is-learning-all-our-worst-impulses)
### Advanced Rails Forms
-### Rails Lite
\ No newline at end of file
+- [ ] 1. [(cc) 16-tag-ids-setter](https://player.vimeo.com/video/100780886)
+- [ ] 2. [(cc) 17-checkboxes-1](https://player.vimeo.com/video/100780887)
+- [ ] 3. [(cc) 18-checkboxes-2](https://player.vimeo.com/video/100846847)
+- [ ] 4. [(cc) 19-checkboxes-3](https://player.vimeo.com/video/100846848)
+- [ ] 5. [(cc) 20-query-string](https://player.vimeo.com/video/100849678)
+- [ ] 6. [Polymorphic Associations: Section 2.9](http://guides.rubyonrails.org/association_basics.html#polymorphic-associations)
+- [ ] 7. [Rails Forms Quiz](quizzes/rails_forms.md)
+- [ ] 8. [Polymorphism and Concerns](homeworks/polymorphism-concerns/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/homeworks/polymorphism-concerns/solution.zip)
+- [ ] 9. [Decorators (Bonus)](readings/decorators.md)
+- [ ] 10. [Checkboxes and Id Setters Reference](readings/checkboxes.md)
+- [ ] 11. [RedditClone](reddit_on_rails/README.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/reddit_on_rails/solution.zip)
+### Rails Lite
+- [ ] 1. [Rails Lite Intro](https://player.vimeo.com/video/161381457)
+- [ ] 2. [HTTP](https://player.vimeo.com/video/161381484)
+- [ ] 3. [HTTP Demo](https://player.vimeo.com/video/161381489)
+- [ ] 4. [Rails from the Inside Out](https://player.vimeo.com/video/161381601)
+- [ ] 5. [Rack](https://player.vimeo.com/video/161384649)
+- [ ] 6. [Rack Demo](https://player.vimeo.com/video/161381828)
+- [ ] 7. [Contextual Overview of TCP/IP](readings/tcp_ip.md)
+- [ ] 8. [RegexOne](http://regexone.com/)
+- [ ] 9. [RegexOne (Lesson 1 - 6)](https://regexone.com/lesson/repeating_characters)
+- [ ] 10. [RegexOne (Lesson 7 - 14)](https://regexone.com/lesson/kleene_operators)
+- [ ] 11. [Rails Lite Quiz](quizzes/rails_lite.md)
+- [ ] 12. [Rack Middleware](https://player.vimeo.com/video/161382367)
+- [ ] 13. [Rack Middleware Demo](https://player.vimeo.com/video/161386029)
+- [ ] 14. [Rack Middleware Demo code](https://assets.aaonline.io/fullstack/rails/demos/middleware.rb)
+- [ ] 15. [TCP](https://player.vimeo.com/video/161382361)
+- [ ] 16. [DNS](https://player.vimeo.com/video/161381921)
+- [ ] 17. [(cc) 00-webserver](https://player.vimeo.com/video/100169899)
+- [ ] 18. [(cc) 01-protocols](https://player.vimeo.com/video/100169898)
+- [ ] 19. [(cc) 02-http](https://player.vimeo.com/video/100267302)
+- [ ] 20. [HTTP Reading](readings/http.md)
+- [ ] 21. [Rack Reading](readings/rack.md)
+- [ ] 22. [Rack Middleware Stack](readings/middleware.md)
+- [ ] 23. [Class and Instance Eval](readings/instance-eval-class-eval.md)
+- [ ] 24. [Rack - Intro & Basic Apps](https://player.vimeo.com/video/337172677)
+- [ ] 25. [Rack - Request & Response](https://player.vimeo.com/video/337173410)
+- [ ] 26. [Rack - Class App](https://player.vimeo.com/video/337174410)
+- [ ] 27. [Rails Lite Part 1](projects/rails_lite/rails-lite-i.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/rails_lite/solution.zip)
+- [ ] 28. [Rails Lite Part 2](projects/rails_lite/rails-lite-ii.md)
+ - [Solution](https://assets.aaonline.io/fullstack/rails/projects/rails_lite/solution.zip)
diff --git a/rails/readings/rails_user_authentication b/rails/readings/rails_user_authentication
new file mode 160000
index 0000000..4fa36f8
--- /dev/null
+++ b/rails/readings/rails_user_authentication
@@ -0,0 +1 @@
+Subproject commit 4fa36f89e5605a7a0418c345d1817db5ddba2829
From 59c1c3e321cc6ee791252a80430bfe01951c3b56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krzysztof=20Rupi=C5=84ski?=
Date: Mon, 29 Jul 2024 19:59:55 +0200
Subject: [PATCH 16/23] Add rails_diagram.png
---
rails/rails_diagram.png | Bin 0 -> 71286 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 rails/rails_diagram.png
diff --git a/rails/rails_diagram.png b/rails/rails_diagram.png
new file mode 100644
index 0000000000000000000000000000000000000000..4f0c922559988f26eb826d5711ecd642b1a2d9ad
GIT binary patch
literal 71286
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