From 171c937c5e5886b83d633ff3b635e92473c68dbb Mon Sep 17 00:00:00 2001 From: Frank Blendinger Date: Mon, 18 Mar 2024 14:36:37 +0100 Subject: [PATCH 1/3] Update instructions for parallel-letter-frequency (#2713) The exercise docs suggested that the submitted code is automatically tested for the usage of parallelism. This is not the case, so the paragraph rewritten to instead suggest students to check for parallelism themselves. To help, a few links to resources about concurrency and parallelism in Java are added. --- .../.docs/instructions.append.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md b/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md index 8f4a2f171..d33113e21 100644 --- a/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md +++ b/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md @@ -1,7 +1,11 @@ # Instructions append -Single-threaded (non-concurrent) solutions can pass all tests [but the last.](https://www.youtube.com/watch?v=mJZZNHekEQw) Your solution will be tested for concurrency by submitting it as a [Runnable](https://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html) to an [ExecutorService.](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html) Your solution must leverage multiple [Threads](https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html) to pass the final test. +The automated tests are currently not checking for parallelism. Please ensure yourself that your solution is using some form of parallelism, like threads or parallel streams. -Java documentation on [parallel streams](https://docs.oracle.com/javase/tutorial/collections/streams/parallelism.html) may provide some help. +The following resources may help you with this: + +- [Concurrency (Oracle Java Tutorials)](https://docs.oracle.com/javase/tutorial/essential/concurrency) +- [Java Concurrency (Baeldung)](https://www.baeldung.com/java-concurrency) +- [Java 8 Parallel Streams (Baeldung)](https://www.baeldung.com/java-8-streams#parallel-streams) As a stretch goal, consider if your implementation will work for characters with [diacritics or accents](https://en.wikipedia.org/wiki/Diacritic). For example, such solutions should not consider e and ë the same character. An example text for this case is [Wilhelmus](https://en.wikipedia.org/wiki/Wilhelmus), the Dutch national anthem. From c6a850d3bcd58a7d31ca283195d3c66fe3da240b Mon Sep 17 00:00:00 2001 From: Frank Blendinger Date: Wed, 20 Mar 2024 14:02:12 +0100 Subject: [PATCH 2/3] Split up docs for parallel-letter-frequency (#2713) The fact that the tests are currently not checking for parallelism is no longer mentioned in the instructions. Resources about concurrency are moved to `hints.md`. --- .../practice/parallel-letter-frequency/.docs/hints.md | 7 +++++++ .../.docs/instructions.append.md | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 exercises/practice/parallel-letter-frequency/.docs/hints.md diff --git a/exercises/practice/parallel-letter-frequency/.docs/hints.md b/exercises/practice/parallel-letter-frequency/.docs/hints.md new file mode 100644 index 000000000..50f5b65f1 --- /dev/null +++ b/exercises/practice/parallel-letter-frequency/.docs/hints.md @@ -0,0 +1,7 @@ +# Hints + +The following resources may help you with this: + +- [Concurrency (Oracle Java Tutorials)](https://docs.oracle.com/javase/tutorial/essential/concurrency) +- [Java Concurrency (Baeldung)](https://www.baeldung.com/java-concurrency) +- [Java 8 Parallel Streams (Baeldung)](https://www.baeldung.com/java-8-streams#parallel-streams) diff --git a/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md b/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md index d33113e21..47e4bf6cc 100644 --- a/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md +++ b/exercises/practice/parallel-letter-frequency/.docs/instructions.append.md @@ -1,11 +1,3 @@ # Instructions append -The automated tests are currently not checking for parallelism. Please ensure yourself that your solution is using some form of parallelism, like threads or parallel streams. - -The following resources may help you with this: - -- [Concurrency (Oracle Java Tutorials)](https://docs.oracle.com/javase/tutorial/essential/concurrency) -- [Java Concurrency (Baeldung)](https://www.baeldung.com/java-concurrency) -- [Java 8 Parallel Streams (Baeldung)](https://www.baeldung.com/java-8-streams#parallel-streams) - As a stretch goal, consider if your implementation will work for characters with [diacritics or accents](https://en.wikipedia.org/wiki/Diacritic). For example, such solutions should not consider e and ë the same character. An example text for this case is [Wilhelmus](https://en.wikipedia.org/wiki/Wilhelmus), the Dutch national anthem. From 2b33a2d9fd7a6f58a5dd633e99ee8ac785f8bc75 Mon Sep 17 00:00:00 2001 From: Frank Blendinger Date: Thu, 21 Mar 2024 08:50:20 +0100 Subject: [PATCH 3/3] Apply suggestion to parallel-letter-frequency hints Co-authored-by: Sander Ploegsma --- exercises/practice/parallel-letter-frequency/.docs/hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/parallel-letter-frequency/.docs/hints.md b/exercises/practice/parallel-letter-frequency/.docs/hints.md index 50f5b65f1..9ce49942b 100644 --- a/exercises/practice/parallel-letter-frequency/.docs/hints.md +++ b/exercises/practice/parallel-letter-frequency/.docs/hints.md @@ -1,6 +1,6 @@ # Hints -The following resources may help you with this: +The following resources may help you solve this exercise: - [Concurrency (Oracle Java Tutorials)](https://docs.oracle.com/javase/tutorial/essential/concurrency) - [Java Concurrency (Baeldung)](https://www.baeldung.com/java-concurrency)