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

Jaren Garman #588

Open
wants to merge 98 commits into
base: main
Choose a base branch
from
Open

Conversation

JarenGarman
Copy link

No description provided.


@facilities.map(&:registered_vehicles).flatten.group_by(&:county).max_by do |_county, vehicle_array|
vehicle_array.length
end[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of chained enumerables! As a complimentary exercise, it's a good idea to practice talking through these solutions as they are more complex, and describing your thought process and approach to a solution can be great interview practice!

end

def parse_address(facility)
"#{unless facility[:street_address_line_1].nil?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block of code is not very readable. I would much rather a more multi-line process that extracts each component as a variable and then maybe joins them at the end or uses string interpolation to combine the data together. Anytime you're using \ to join long strings together, it generally could indicate unreadable string manipulation

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.

2 participants