Skip to content
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

Merged
merged 9 commits into from
Sep 5, 2023
Merged

Feature/clean code #5

merged 9 commits into from
Sep 5, 2023

Conversation

HFG43
Copy link
Owner

@HFG43 HFG43 commented Sep 4, 2023

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

Copy link

@V-Blaze V-Blaze left a 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 🟡 🟦 🟨

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
Comment on lines 18 to 19
app = App.new

Copy link

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 the create_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. 😄 👋

Copy link
Owner Author

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!

Copy link

@ridwanediallo ridwanediallo left a 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,

AlmostThereReachGIF

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

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 as create person, create student, and create 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 in main.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, and rental_person_id. 😊

Copy link
Owner Author

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

Copy link

@mikethreels mikethreels left a 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 :shipit:
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.

@HFG43 HFG43 merged commit 2116614 into develop Sep 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants