-
Notifications
You must be signed in to change notification settings - Fork 45
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
Victoria Garcia - Ampers - Hotel -updated #28
base: master
Are you sure you want to change the base?
Conversation
…oom, and reservation, as well as the spec_helper and Rakefile, aade for the project. No real content besides require statements for basic gems and documents.
…ves a class variable. But we'll see how long that lasts\!
…e' test, which I am thinking of putting in a different class, and which, in any case, is dependant on the as-yet-nonexistant Room class.
…lass. Tests written and failing in the desired way.
…Time-parsable values for 'right now', 'two days from now', and 'two days ago'. Don't know if I REALLY need these, but I spec-ed out some tests that will benefit from them being available. So yaaaay.
…sonable number of fails and errors instead of a blizzard of them. Calling that progress. (Amazing progress, actually.) Now, going to put that shizz to bed. I can troubleshoot the rest in the morning. THIS WILL WORK GDI.
… generation scheme in Reservation are actually passing. Zounds.
…multipart conditional in Room to run without breaking the room.spec doc, yay me.
… passing. now need to add bells and/or whistles for dealing with start and end dates.
…ed the kind of skips I like to the spec helper doc.
…ding reporting, is now in place. All tests passing.
…fter they broke things.
…cking method in FrontDesk
…-date reservation lookup method.
…. Do need one more, though.
…including the new one.
…range is now passing all its tests.
…passing all tests.
…g/erroring in the desired way.
… FrontDesk is written and passing its tests.
…nd failing/erroring the right way.
…hat's all for tonight.
…tioning and passing tests, including the new class BlockRoo.
lib/front_desk.rb
Outdated
return room_array | ||
end | ||
|
||
def report_all_rooms |
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.
Why would you need a separate method for this rather than using an attr
?
lib/front_desk.rb
Outdated
end | ||
|
||
def locate_room_by_id(query_rm_numb) | ||
target_room = @rooms.find {|room| room.room_number == query_rm_numb} |
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.
This logic is duplicated in the method above, so why not just use this instead of duplicating?
HotelWhat We're Looking For
Though I think you may have gotten a bit muddled down in the code overall, I think you hit most of the major points. Simple code is better - so sometimes you may just need to remind yourself of that. |
… changes recommended by Kari on the feedback.
…m and Front Desk to reduce class interdependene. Changes to Room are successful and passing all tests. Tests written for FrontDesk, but production code has not yet been adjusted.
… FrontDesk are now written and passing all tests. Also, the design-activity.md document has been updated. It's now time for a pull request.
This is the updated pull request for "Hotel Revisited." |
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions
There was a question of whether to include a "room" class, and I know that in class, there was lots of discussion about whether it was really necessary. I chose to make one, because I wanted each room to be the organizer for its own reservations, price, discounts, and availability.
Ultimately, however, this choice may have complicated things unnecessarily. No, not 'may', probably. It probably made this a lot more complicated than it needed to be. Because yiiiiiiii, did this turned out to be complicated.
Describe a concept that you gained more clarity on as you worked on this assignment. |
So very many. Array methods, hash methods, chained enumerables and basic loops-- I even got some practice using basic object methods, like is_a?. I also got a lot more facility with debugging. I'm pretty handy with pry now, along with various techniques involving commenting-out and interstitial 'puts' statements, that help you get inside a complex method and figure out what's broken.
Describe a nominal test that you wrote for this assignment. |
I did a lot of very basic tests for initialize methods: Does the thing initialize, does it have the variables you want, etc.
Describe an edge case test that you wrote for this assignment. |
In the system for tracking a room's unavailable days, I wrote an awful lot of them. I tested what would happen if a proposed reservation overlapped another, abutted two but did not overlap, etc. I should confess, however, that as I made the final push to finish Wave 3, a lot of the extensive edge-case testing kind of went out the window.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? |
It's a really good tool, especially when things seem overwhelming. I found it little unwieldy during times when I knew what I was doing, however.