Skip to content

Conversation

@llinneaa
Copy link

@llinneaa llinneaa commented Sep 9, 2019

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What was a design challenge that you encountered on this project?
What was a design decision you made that changed over time over the project?
What was a concept you gained clarity on, or a learning that you'd like to share?
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case?
What is an example of an edge case test that you wrote for this assignment? What makes it an edge case?
How do you feel you did in writing pseudocode first, then writing the tests and then the code?

@jmaddox19
Copy link

Hotel

What We're Looking For

Test Inspection

Workflow yes (X) / yes but no test / no
Wave 1
List rooms X
Reserve a room for a given date range X
Reserve a room (edge case) X
List reservations for a given date X
Calculate reservation price X
Invalid date range produces an error X
Test coverage Good! Could be more thorough. There are a lot of expectations that only check for instance_of rather than checking the attributes on the result. Another example, rooms_available only has one test which means there's no testing verifying that if the dates of a booking don't conflict with the date being queried, the room does get returned.
Wave 2
View available rooms for a given date range X
Reserving a room that is not available produces an error X
Test coverage Good. Area for improvement would be if rooms_available? had edge cases tested as well. (ie. no rooms booked, all rooms booked)
Wave 3
Create a block of rooms No
Check if a block has rooms No
Reserve a room from a block No
Test coverage N/A

Code Review

Baseline Feedback
Used git regularly Definitely more commits than Grocery Store but I'd still suggest committing more frequently
Answer comprehension questions No
Design
Each class is responsible for a single piece of the program X
Classes are loosely coupled X
Fundamentals
Names variables, classes and modules appropriately X
Understanding of variable scope - local vs instance X
Can create complex logical structures utilizing variables X
Appropriately uses methods to break down tasks into smaller simpler tasks X
Understands the differences between class and instance methods N/A, no class methods used, which is totally fine
Appropriately uses iterators and Enumerable methods X
Appropriately writes and utilizes classes X
Appropriately utilizes modules as a namespace X
Wrap Up
There is a refactors.txt file No
The file provides a roadmap to future changes No

Overall Feedback

Great work overall! You've built your first project with minimal starting code. This represents an incredible milestone in your journey, and you should be proud of yourself!

I am particularly impressed by the way that you wrote clean, succinct code.

I do see some room for improvement around testing more edge cases and committing more often. (And answering comprehension Qs)

#selects first available room for reservation, shovels into reservations array
#if there were no available rooms, the array would be empty! therefore, if the length of the array is 0, the program raises an ArgumentError.
#instructor helped me fix this code and the test in our 1:1 (had been returning a Hash)
def createReservation(room_number, date_range)

Choose a reason for hiding this comment

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

This method isn't actually using the room_number param for anything.

Choose a reason for hiding this comment

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

You didn't actually need to give the user the ability to define which room number but it's bad to make the method look like it's allowing the user to specify the room number when it isn't.

#she explained the single '&' is 'bitwise' code and is used more often in lower-level languages. It is comparing the object's date range array with the inputted object's date range array and pushes those similarities into an array. If they have no similarities (e.g. the array is empty), it returns false (indicating there is no overlap). If the array contains any dates, it returns true (indicating overlap) because the array will be filled with overlapping dates.
#typically 'other' is used, but for my understanding I used the parameter 'input'
def overlap?(input)
if self.createDateArray & input.createDateArray != []

Choose a reason for hiding this comment

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

Cool that your mentor showed you this! It's important for Ada that you understand in detail what the code you wrote is doing to the point you could come up with it on your own if given a similar assignment in the future. So if you understand this to that level of depth, that's great! I'm just calling that out because I'm having trouble understanding it tbh. Haha

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