Victoria Garcia - Ampers - Hotel -updated#28
Open
Lasiorhine wants to merge 51 commits intoAda-C9:masterfrom
Open
Victoria Garcia - Ampers - Hotel -updated#28Lasiorhine wants to merge 51 commits intoAda-C9:masterfrom
Lasiorhine wants to merge 51 commits intoAda-C9:masterfrom
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.
Why would you need a separate method for this rather than using an attr?
| 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.
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.
Author
|
This is the updated pull request for "Hotel Revisited." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.