From f7f6ba2572d220f8e32b6969b05eb9ff881b0e21 Mon Sep 17 00:00:00 2001 From: habbie321 Date: Tue, 22 Apr 2025 17:16:09 -0400 Subject: [PATCH 1/4] started analyzer feedback description --- exercises/concept/logs-logs-logs/.meta/design.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/exercises/concept/logs-logs-logs/.meta/design.md b/exercises/concept/logs-logs-logs/.meta/design.md index df78aa422..1b66eb1bb 100644 --- a/exercises/concept/logs-logs-logs/.meta/design.md +++ b/exercises/concept/logs-logs-logs/.meta/design.md @@ -20,3 +20,15 @@ This exercise's prerequisites Concepts are: - `strings` - `switch-statement` - `constructors` + +## Analyzer + +This exercise could benefit from the following rules in the [analyzer][analyzer]: + +1. Parse log level + - `essential`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to their being many cases. +2. Support unknown log level + - `essential`: Again, verify that a default was used in a switch statement. Comment as above in the case of an if-else. +3. Convert log line to short format + +[analyzer]: https://github.com/exercism/java-analyzer From 2a80bc9ae56d85116326e76c0ab7bed7f82a06b6 Mon Sep 17 00:00:00 2001 From: habbie321 Date: Tue, 22 Apr 2025 22:55:11 -0400 Subject: [PATCH 2/4] done? --- .../concept/logs-logs-logs/.meta/design.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/exercises/concept/logs-logs-logs/.meta/design.md b/exercises/concept/logs-logs-logs/.meta/design.md index 1b66eb1bb..1adf8c83b 100644 --- a/exercises/concept/logs-logs-logs/.meta/design.md +++ b/exercises/concept/logs-logs-logs/.meta/design.md @@ -26,9 +26,22 @@ This exercise's prerequisites Concepts are: This exercise could benefit from the following rules in the [analyzer][analyzer]: 1. Parse log level - - `essential`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to their being many cases. + - `LogLevel` + - `essential`: Verify that necessary and sufficient constants are present in enum declaration (minus unknown, for now) and that the constructor is present. + - `actionable`: The enum should be public; prompt the student to think of encapsulation. + - `LogLine.getLogLevel()` + - `essential`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to there being many cases. + - `actionable`: The function should be public. 2. Support unknown log level - - `essential`: Again, verify that a default was used in a switch statement. Comment as above in the case of an if-else. + - `essential`: Verify that an unknown constant is present in the enum declaration. + - `essential`: Verify that a default was used in a switch statement. Comment as previously stated in the case of an if-else. 3. Convert log line to short format + - `essential`: Verify that the constructor is appropriately updated. + - `essential`: Verify that there exists a field dedicated to the encoded log level. + - `actionable`: Said field should be private and final. + - `LogLine.getOutputForShortLog()` + - `celebratory`: Congratulate the student if they used a getter for the encoded log level. + - `celebratory`: Celebrate if this was written in one line. + - `informative`: Let them know they can write it in one line. [analyzer]: https://github.com/exercism/java-analyzer From 008572d7a6fea579eda3263ad40969bb93c5e856 Mon Sep 17 00:00:00 2001 From: habbie321 Date: Tue, 22 Apr 2025 22:57:51 -0400 Subject: [PATCH 3/4] done..? --- exercises/concept/logs-logs-logs/.meta/design.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/exercises/concept/logs-logs-logs/.meta/design.md b/exercises/concept/logs-logs-logs/.meta/design.md index 1adf8c83b..cead6ebe5 100644 --- a/exercises/concept/logs-logs-logs/.meta/design.md +++ b/exercises/concept/logs-logs-logs/.meta/design.md @@ -38,9 +38,8 @@ This exercise could benefit from the following rules in the [analyzer][analyzer] 3. Convert log line to short format - `essential`: Verify that the constructor is appropriately updated. - `essential`: Verify that there exists a field dedicated to the encoded log level. - - `actionable`: Said field should be private and final. + - `actionable`: Said field should be private and final (this will then require the use of a getter for the log level!). - `LogLine.getOutputForShortLog()` - - `celebratory`: Congratulate the student if they used a getter for the encoded log level. - `celebratory`: Celebrate if this was written in one line. - `informative`: Let them know they can write it in one line. From ff760984ecf7cd1e4439da239511aa23b07f02f4 Mon Sep 17 00:00:00 2001 From: habbie321 Date: Sun, 18 May 2025 13:48:44 -0400 Subject: [PATCH 4/4] Implemented feedback --- exercises/concept/logs-logs-logs/.meta/design.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/exercises/concept/logs-logs-logs/.meta/design.md b/exercises/concept/logs-logs-logs/.meta/design.md index cead6ebe5..e619496dc 100644 --- a/exercises/concept/logs-logs-logs/.meta/design.md +++ b/exercises/concept/logs-logs-logs/.meta/design.md @@ -26,21 +26,15 @@ This exercise's prerequisites Concepts are: This exercise could benefit from the following rules in the [analyzer][analyzer]: 1. Parse log level - - `LogLevel` - - `essential`: Verify that necessary and sufficient constants are present in enum declaration (minus unknown, for now) and that the constructor is present. - - `actionable`: The enum should be public; prompt the student to think of encapsulation. - `LogLine.getLogLevel()` - - `essential`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to there being many cases. - - `actionable`: The function should be public. + - `actionable`: Verify that a switch statement was used. If they used if-else, comment that switch is better due to there being many cases. 2. Support unknown log level - - `essential`: Verify that an unknown constant is present in the enum declaration. - `essential`: Verify that a default was used in a switch statement. Comment as previously stated in the case of an if-else. 3. Convert log line to short format - - `essential`: Verify that the constructor is appropriately updated. - `essential`: Verify that there exists a field dedicated to the encoded log level. - `actionable`: Said field should be private and final (this will then require the use of a getter for the log level!). - `LogLine.getOutputForShortLog()` - - `celebratory`: Celebrate if this was written in one line. - - `informative`: Let them know they can write it in one line. + - `informative`: Let them know they can write it in one return statement. +- `celebratory`: Celebrate if the student's solution brought up no comments. [analyzer]: https://github.com/exercism/java-analyzer