-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
pascals-triangle: adjust API to use an instance method over class methods #365
Comments
Currently this exercises requires a single class that contains two methods with the following signatures:
Thoughts as to whether these should remain in a single class after conversion to instance methods? The responsibilities of each method are quite different, so I was thinking that two separate classes might be more appropriate here... |
I absolutely agree, Stuart.
Also, seems like the latter is dependent on the former (or I guess could be?). This is the first opportunity I've faced with considering dependency injection on the track. Don't worry, I'm not talking about depending on Dagger or Spring or anything... :) The question in my mind is whether the ... Also... until now, I'm pretty sure we haven't required the practitioner to submit more than one file. Should we should include a |
😰 😂
Hmm... I think it's reasonable here. I'm assuming you're thinking of constructor injection - that would seem most natural to me based on how we'd specify the tests. And yes, if we go this route, a
and the description of situations in which we would want to double-check the application of this policy would be:
[If these events weren't so infrequent, I'd suggest that we could build this checklist into a pull request template, but I think it would add too much noise.] |
tl;dr: I'll have a crack at all of the above and we can then review and see how it feels! |
@stkent said:
I couldn't agree more on both the notion of (finally) standing-up a policy page (perhaps organized by triggering event) and the way you've articulated this particular one. ... and then ...
Yup, I totally agree with you, there. Applying these policies seems like something someone with "maintainer's glasses" on. |
Turns out the canonical data removes the validation steps from this exercise! I updated the implementation to match while addressing this issue. I'll make a new issue to kick off policy tracking! |
As per #177, adjust the test suite to require a solution that uses an instance method instead of a class method.
(see #344 as an example and the conversation about Function Object vs. Value Object)
The text was updated successfully, but these errors were encountered: