-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qory 2410- SE- Mod-01 Bike Ride Independent Challenge #13
Open
qoryhanisagal
wants to merge
35
commits into
turingschool-examples:main
Choose a base branch
from
qoryhanisagal:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Iterations 1-3 logic
…racking, and best_rider method
qoryhanisagal
changed the title
Qory Bike Ride Independent Challenge with all iterations
Qory Final Reflection for Bike Ride Independent Challenge
Nov 4, 2024
qoryhanisagal
changed the title
Qory Final Reflection for Bike Ride Independent Challenge
Qory 2410- SE- Mod-01 Final Reflection for Bike Ride Independent Challenge
Nov 4, 2024
qoryhanisagal
changed the title
Qory 2410- SE- Mod-01 Final Reflection for Bike Ride Independent Challenge
Qory 2410- SE- Mod-01 Bike Ride Independent Challenge
Nov 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Final Reflection for Bike Ride Independent Challenge
Name: Qory
Reflection
This project was both challenging and deeply educational, as each iteration introduced unique aspects of Ruby programming that required careful thought, debugging, and learning. Working through the iterations not only helped me improve my skills in Ruby, but also offered insights into object-oriented design, code organization, and the importance of thorough testing.
Iteration 1: Building the Basics
In Iteration 1, creating the
Ride
class provided a solid foundation, where I practiced usingattr_reader
to control data access and defined basic methods to ensure the class could function as required. Although simple, this phase helped reinforce the importance of understanding Ruby’s class attributes and structure. Mistakes, like forgettingattr_reader
and missingend
keywords, were valuable in highlighting how small details can significantly affect code functionality. These experiences prepared me for the more complex iterations ahead by reinforcing good practices in class structure and data encapsulation.Iteration 2: Introducing State and Conditionals
The Biker class in Iteration 2 introduced additional complexity, particularly with managing multiple data types and implementing conditional logic. I learned the importance of initializing instance variables properly, especially when
rides
needed to be a hash. Through trial and error with thelog_ride
andpersonal_record
methods, I gained a better understanding of conditional checks, especially in methods that needed to handle missing or non-existent data. Fixing errors like incorrectlearn_terrain!
method definitions and ensuringpersonal_record
returnedfalse
for rides that hadn’t been logged highlighted the need for well-thought-out logic and edge-case handling.Iteration 3: Managing Relationships with BikeClub
Iteration 3 took the project to a new level by introducing the BikeClub class, where managing relationships between
Biker
instances became essential. Here, I had to ensure that bikers were correctly added to the club, that the club could track individual performance, and that it could make comparisons across its members. Adding methods likemost_rides
andbest_time
required not only a solid understanding of iteration and data structure manipulation but also an ability to troubleshoot logical errors. Implementingmost_rides
usingflatten
to count nested arrays showed me how powerful and concise Ruby methods can be for handling complex data structures, while thebikers_eligible
method reinforced my understanding of usingselect
with multiple conditions.Iteration 4: Advanced Functionality with Group Rides and Class-Level Methods
Iteration 4 was perhaps the most challenging, as it required integrating Ruby’s
Time
class forrecord_group_ride
and implementing a class-level method (best_rider
) to find the best rider across all instances ofBikeClub
. UsingObjectSpace.each_object(BikeClub)
to iterate over all clubs was a new concept for me, and it emphasized how powerful Ruby can be when working with class-level data. Testingrecord_group_ride
was another learning experience, as stubbingTime.now
made me realize how controlled test environments allow for predictable and accurate results. This iteration showed me how Ruby’s dynamic capabilities can manage relationships across multiple instances, as well as the importance of encapsulating data within appropriate classes.Overall Takeaways
This project was an invaluable experience in test-driven development (TDD), object-oriented programming (OOP), and data management. Writing and running tests after each change allowed me to catch errors early, build confidence in my code, and see firsthand the impact of even minor changes. Each iteration deepened my understanding of managing data, designing class interactions, and ensuring code readability. The process of troubleshooting and refining methods across iterations reinforced the importance of thinking through design before implementing, while also showing how TDD can serve as a guide and safety net throughout the development process.
Final Thoughts
I feel I approached this challenge thoroughly and patiently, gaining a stronger understanding of Ruby’s capabilities and the nuances of object-oriented design. The project required close attention to detail, especially in handling relationships between objects, managing data types, and setting up tests that accurately reflect real-world scenarios. Overall, I’m proud of the progress I made and grateful for the experience, as it not only strengthened my technical skills but also deepened my problem-solving abilities and my appreciation for clean, testable code.