Series example refactoring#727
Conversation
FridaTveit
left a comment
There was a problem hiding this comment.
This looks great, thanks @m-a-ge! :) I've put one comment but it's a very minor thing so feel free to ignore it if you disagree :)
| .collect(Collectors.toList()); | ||
| Series(String string) { | ||
| this.digits = | ||
| Arrays.stream(string.split((""))) |
There was a problem hiding this comment.
I would put this on the line above so that it's:
this.digits = Arrays.stream(string.split(""))
.map(Integer::parseInt)
.collect(Collectors.toList());
You might know this already but to make sure formatting is correct you can use ctrl + alt + L if you're using intellij on Windows (it's cmd + alt + L on mac). On eclipse it's ctrl + shift + F (cmd + shift + F on mac). I've found that very useful :)
Also string.split(("")) can be string.split(""). Not your fault at all, I just didn't notice it until now :)
There was a problem hiding this comment.
@FridaTveit
thanks for your suggestions, I'll update the PR as soon as get back home.
Is there any industry accepted best practices for code formatting (as you probably mentioned) or it's usually specific to the project (if so, please point me to the page describing this rules)?
There was a problem hiding this comment.
The defaults in IntelliJ (and probably also Eclipse) should be fine for formatting :) The google style guide formatting section would probably be useful if you want something for reference. I've mostly learnt best practices from experience and code reviews, so I haven't read the google style guide cover to cover, but it looks sensible and I think many people use it :)
|
@FridaTveit |
FridaTveit
left a comment
There was a problem hiding this comment.
Looks great! Thank you @m-a-ge! :)
This resolves the following issue: series: simplify example implementation
All tests passed
Reviewer Resources:
Track Policies