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

Stef -- Carets #49

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Stef -- Carets #49

wants to merge 8 commits into from

Conversation

SesameSeeds
Copy link

@SesameSeeds SesameSeeds commented Sep 11, 2017

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a design decision you had to make when working on this project. What options were you considering? What helped you make your final decision? I made about a billion of them. I really like the designing aspect, a lot. I dunno if it’s my OCD or what but that part is fun. However, I had to stop and reign it in because I went a little crazy, with nothing at all committed and was making a mountain out of a mole hill. I finally settled on keeping it to three necessary classes nestled under a module. I used a hotel ‘name’ for my module and then based things off of the necessities; rooms having the self-explanatory room logic, reservations having the date logic, and finally the hotel class having the whole shebang. I had planned initially to also have a customer class and without getting into details, I decided against it (see mountain vs. mole hill). To make the final decision (I also had the logic swapped around with reservations and hotel initially), I literally sat down with a pen and paper and wrote everything out by hand that I wanted and needed, keeping it simple. That allowed me to see where I could change things and what did not make sense. Turns out going old school with pen and paper is actually fairly helpful. Except that I took far too long on that part and not enough time actually coding.

| Describe a concept that you gained more clarity on as you worked on this assignment. | I’m getting better with classes. I did several hours of treehouse after I came up with my design ideas to re-solidify the syntax since I still have problems remembering things, understanding them is fine, but utilizing them (you guys know, you’ve been helping me)… Anyways, actually doing that helped me feel more comfortable on how I was going about things. However, I want to add that I REALLY need to be more comfortable with testing. I feel like I do not do enough tests, as I play it safe and I still get stuck and frustrated because the idea of testing first and coding last doesn't seem to work very well in my mind, at least not for me and perhaps that is due to where I am at. |

|Describe a nominal test that you wrote for this assignment. | I'd say accessing the cost of the room. |

| Describe an edge case test that you wrote for this assignment. | By tonight hopefully checking on accessing the data by date range will be it. That is the goal. |

| How do you feel you did in writing pseudocode first, then writing the tests and then the code? | I have a love/hate with pseudocode. Initially I loved it, because I like that it kind of helps me come up with ideas and work through them and see if I need other things or if I’ve repeated myself. My one issue with it is that I confused the bejesus out of myself a couple times going back and forth so I had to stop being overly detailed. I tried to be really basic and literal this time, not sure what counts as pseudocode. I think that with time this will all get easier. A part of me thinks this is just extra work though I see how things could be better/easier by doing this too. |

Please note I did not get to finish last night, will be doing that tonight and re-submitting.

@CheezItMan
Copy link

CheezItMan commented Sep 11, 2017

Hotel

What We're Looking For

Feature Feedback
Baseline
Used git regularly It's important that you learn to use git more regularly. Also I would avoiding starting over so much.
Answer comprehension questions Be a little careful with the Markdown table in the Comprehension questions. It makes them harder to read. I would also when doing design to look at the specific user stories and pulling the classes directly from there. That might make the design stage go faster.
Design
Each class is responsible for a single piece of the program You really only seem to have Rooms and Reservations done. I might suggest having a third class Hotel to manage rooms and reservations.
Classes are loosely coupled What you have is fairly loosely coupled. This really needs a hotel or Admin managing class to coordinate rooms and reservations.
Wave 1
List rooms Check, through the rooms reader.
Reserve a room for a given date range You have the method stubbed, but not completed.
List reservations for a given date Stubbed, but not complete
Calculate reservation price Nice work on this one.
Invalid date range produces an error not yet
Wave 2
View available rooms for a given date range Not here yet
Reserving a room that is not available produces an error Not yet
Wave 3
Create a block of rooms NA
Check if a block has rooms NA
Reserve a room from a block NA
Test coverage 80%
Additional Feedback I'd like you to work with Charles on Ruby and classes and testing, and if possible the tutor on Saturday. I think you're growing, but still need more practice here.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Just some notes in the code.

# This also needs to (I believe) hold the room cost. Each room has a $200 charge per night.

module HotelHedwig
class Rooms

Choose a reason for hiding this comment

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

I would probably name this class Room instead of Rooms. Since it describes a single room.


# Using a self.all method to work out the room numbering system.

def self.all

Choose a reason for hiding this comment

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

A good start on this, but you'd need to initialize number (probably to 0) and having return rooms at the end of the method.

Choose a reason for hiding this comment

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

It is a good idea, down the road to have a .all method like this, but also notice that this method generates an all new list each time.

def initialize(check_in, check_out)
@check_in = check_in
@check_out = check_out

Choose a reason for hiding this comment

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

It looks like this initialize method isn't closed with an end properly.

require_relative 'reservations'

module HotelHedwig
class Reservations

Choose a reason for hiding this comment

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

You're redoing this class again?


# Why is invalid_date raising a warning???

def invalid_date

Choose a reason for hiding this comment

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

Good method to have, just need to use it!


describe "invalid_date" do
it "Must raise argument error if check-in date is after check out date" do
proc { HotelHedwig::Reservations.new(@check_in < @check_out) }.must_raise ArgumentError

Choose a reason for hiding this comment

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

You're passing initialize a boolean (true/false) instead of two dates.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Really good work going through the prompts and questions here.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

The only other thing is there is no revision of Hotel as was in the assignment.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

In code comments.

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