-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/clean code #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @HFG43, @francksefu
Required changes 🖊️
Almost there 🟡 🟦 🟨
Great work so far, You have come a long way, keep moving forward👏 👍
You've done well implementing the project requirements, but there are still some issues I think you need to improve on. 😄 👋
Highlights
- App class extracted to its own file✔
- Main.rb only takes user inputs👋
- Correct Git flow✔
Required Changes ♻️
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
main.rb
Outdated
app = App.new | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
You have done great so far but there are a few changes you need to make before moving to the next milestone. 😄 👍
-
Follwoing the SOLID PRINCIPLE AND DRY. You need to refactore your
create_person
and also thecreate_student and create_teacher
method. All requests for input and input validation should've been placed in the main.rb file and/or classes/methods whose responsibilities are to request or validate input. -
Also the input for
Age, name
is repeated in create person and teacher which doesn't follow the dry principle. I'll suggest you take note of these and update your code. 😄 👋
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@V-Blaze thanks for your feedback! We will review these required changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes Required ♻️
Hi team,
Great work on making the changes requested by a previous reviewer 👏
You've done well implementing some of the requested changes, but there are still some which aren't addressed yet.
(Highlights) Good Points: 👍
- You documented your work professionally. ✔
- You used GitHub flow correctly. ✔
- You have have successfully removed the duplicate code. ✔
Required Changes ♻️
Check the comments under the review.
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
app.rb
Outdated
@@ -59,17 +60,11 @@ def create_a_student | |||
puts "\n" | |||
end | |||
|
|||
def create_a_teacher | |||
def create_a_teacher(name, age) | |||
type = 'Teacher' | |||
puts 'Specialization: ' | |||
specialization = gets.chomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Great done on getting rid of the redundant code 👏. Please make sure that your methods in
app.rb,
such ascreate person,
create student,
andcreate teacher,
as he pointed out, are only doing one thing, though, per the prior reviewer's request. Hence, in order to accomplish that, you should ensure that anything that receives user inputs is placed inmain.rb
or inside other classes or methods. 👌
Hint: 👇
Every gets.chomp
should be moved
- [ OPTIONAL] Please do the same thing with the other remaining methods like:
create_a_book
,create_a_rental
, andrental_person_id
. 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ridwanediallo Thanks for the hint! It helped understanding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi team,
Your project is complete! There is nothing else to say other than... it's time to merge it
Congratulations! 🎉
Highlights
- good job following the instructions of the previous CR.
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Remember to tag me in your question so I can receive the notification.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
Hi there! We are sending this pull request for you to review our code. Thanks in advance for your feedback!
@francksefu & @HFG43
Milestones 🎯:
📌 Work on Pair Programming
📌 Ensure DRY, YAGNI, KISS, and SOLID principles are applied
📌 Ensure
main.rb
is only for starting the code and asking for initial choice📌 Test the app in the command line
🎖️ General requirements:
Gitflow
No linter errors
Ensure the use of best practices and Ruby style