exercism / java

Exercism exercises in Java.
https://exercism.org/tracks/java
MIT License
677 stars 666 forks source link

Adding analyzer feedback for `captains-log` concept exercise #2755

Closed manumafe98 closed 2 months ago

manumafe98 commented 3 months ago

pull request

closes #2674

Reviewer Resources:

Track Policies

sanderploegsma commented 3 months ago

I've been going through the community solutions and these solutions stood out to me:

Solution Observations
Link Hard-coding the number of planet classes (10) instead of using the length of the array, could be an actionable comment.
Link This solution uses a Java version >= 17, judging by the usage of the RandomGenerator.nextDouble(double) method added in Java 17. However, those Java versions also contain RandomGenerator.nextDouble(double,double) and RandomGenerator.nextInt(int,int) which support passing both a lower and upper bound, which makes the solution a bit easier to read. Could be an informative comment.
manumafe98 commented 3 months ago

I've been going through the community solutions and these solutions stood out to me:

Solution Observations Link Hard-coding the number of planet classes (10) instead of using the length of the array, could be an actionable comment. Link This solution uses a Java version >= 17, judging by the usage of the RandomGenerator.nextDouble(double) method added in Java 17. However, those Java versions also contain RandomGenerator.nextDouble(double,double) and RandomGenerator.nextInt(int,int) which support passing both a lower and upper bound, which makes the solution a bit easier to read. Could be an informative comment.

I liked that options, seems that they are more appropriate and can actually help the student!