Missing featured exercises (with heart symbol)

Greeting,

There exists an implementation page for 48in24 challenge.

It is here.

On that implementation page, the exercises which we are featuring in 48in24 are marked with a heart symbol.

For example, exercise run-length-encoding for WebAssembly track and exercise largest-series-product for Groovy track are marked with a heart symbol.

Every featured exercise have an associated link. To get links for all featured exercises (marked with heart icon), one can use the following JavaScript in browser console (while being on implementation status page):

[...document.querySelectorAll('a')].filter(link => link.innerHTML == String.fromCharCode(0xD83D, 0xDC9C)).map(link => link.href)

Note that 0xD83D, 0xDC9C is a surrogate pair for a heart icon. You can read more on surrogate pairs here.

For example, one of the links we can get using the above code is:

We can successfully check that this exercise exists (by absence of output for grep command):

Aksima@DESKTOP-NIMQE87 MINGW64 ~
$ curl https://exercism.org/tracks/8th/exercises/hamming | grep page-error
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32686    0 32686    0     0  76443      0 --:--:-- --:--:-- --:--:-- 76727

Now let us narrow search down to exercises under question:

[...document.querySelectorAll('a')].filter(anchor => anchor.innerHTML == String.fromCharCode(0xD83D, 0xDC9C)).map(anchor => anchor.href).filter(link => link.includes('run-length-encoding') && link.includes('wasm') || link.includes('largest-series-product') && link.includes('groovy'))

We got the following links:

Array [ "https://exercism.org/tracks/groovy/exercises/largest-series-product", "https://exercism.org/tracks/wasm/exercises/run-length-encoding" ]

https://exercism.org/tracks/groovy/exercises/largest-series-product

https://exercism.org/tracks/wasm/exercises/run-length-encoding

And with these links, we start to get errors:

Aksima@DESKTOP-NIMQE87 MINGW64 ~
$ curl https://exercism.org/tracks/groovy/exercises/largest-series-product | grep page-error
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26438    0 26438    0     0  89139      0 --:--:-- --:--:-- --:--:-- 89925
<div class='pt-60 pt-40' id='page-error'>
Aksima@DESKTOP-NIMQE87 MINGW64 ~
$ curl https://exercism.org/tracks/wasm/exercises/run-length-encoding | grep page-error
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26428    0 26428    0     0   115k      0 --:--:-- --:--:-- --:--:--  116k
<div class='pt-60 pt-40' id='page-error'>

Note the existence of grep output <div class='pt-60 pt-40' id='page-error'> in the above logs.

So, the question is: we are missing some exercises that we wanted to feature in 48in24. What we are going to do with that problem? Maybe feature some other exercises instead? Or implement missing exercises? If answer is the latter, will you mind if I try to imlpement these?

You mean like this? Run-length-encoding-exercise: added new exercise

Run length encoding for Web Assembly already has a PR. You can search for the Groovy one and submit a PR if you don’t see one. Please make sure you read the docs before working on it!!

These are especially relevant, but some of the other buildings docs are worth reading, too.

Oh, @IsaacG, thank you much! Yes, this is exactly what I wanted to know.

Now we know that we have a PR for one of the missing featured exercises.
What about second (Groovy one)? Who is going to work on it?

Also, thanks for docs links! They should be useful if we will work on Groovy puzzle.

@IsaacG, you said:

You can search for the Groovy one and submit a PR if you don’t see one.

I made a search and nothing is found with these queries:

is:pr largest-series-product
is:pr groovy

But this of course does not mean that nobody working on this exercise.

This only means that I failed to prove that someone is working on this exercise.

I think COBOL also didn’t have its featured exercise implemented initially. I figure it’s just extra encouragement to implement it. As for Groovy, it’s a quieter track, and most of the recent activity was by me. You’ll probably be fine implementing this exercise.

I meant a forum search. You can make a forum post asking to work on the exercise, to which iHiD will probably say, “Please go ahead” which grants you a “lock” on the PR. Or you can just create the PR then post it here, in which case someone else might post before you.

I’m probably the only one who doesn’t announce they’re working on an exercise. I’d say just go for it.

1 Like

Hello, @BNAndras , @IsaacG , @glennj ,

Thank you all for replies!

I will start working on largest-series-product Groovy exercise then.

But I’m not experienced, so I will start with reading the docs.

2 Likes

Report on building “Largest series product” exercise for Groovy track

Report on learning resources usage

These resources were examined before building the exercise, per @IsaacG recommendations:

Report on actions taken per video in introduction to building practice exercises

  • According to what Eric said in video at 1:35, we need to clone a track repository. We are working on Groovy track, so the repository to clone is the Groovy one. Following are the actions that were made in order to clone the repository:

    1. Run Git Bash (C:\Program Files\Git\git-bash.exe)
    2. Move to Exercism directory:
    Aksima@DESKTOP-NIMQE87 MINGW64 ~
    $ cd ~/Exercism
    
    1. Create directory where we will build practice exercises for Exercism:
    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism
    $ mkdir building_exercism && cd building_exercism
    
    1. Go to the GitHub in browser and look for the web URL to clone the repository. The URL which was found is: https://github.com/exercism/groovy.git
    2. Clone the repository using the given URL:
    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism
    git clone https://github.com/exercism/groovy.git && cd groovy
    
    1. Now we have a clone of Groovy repository in the following folder:
    C:\Users\Aksima\Exercism\building_exercism\groovy
    
  • The actions in video from 2:00 to 2:23 are unclear to me, unforunately. I am very sorry. I don’t understand what is happening there. I tried to repeat commands which Eric done, but with different results:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ git checkout main
    Already on 'main'
    Your branch is up to date with 'origin/main'.
    
    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ git pull
    Already up to date.
    
  • According to what Eric was done on 3:22, we fetched the configlet command tool:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ ./bin/fetch-configlet
    Fetching configlet...
    Archive:  ./bin/latest-configlet.zip
      inflating: ./bin/configlet.exe
    Downloaded configlet 4.0.0-beta.19 to ./bin/configlet.exe
    
  • According to what Eric was done on 4:00, we run configlet without any arguments:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ ./bin/configlet
    

    …to have a look at list of possible commands and options which configlet can offer to us.

    For the purpose of our task, we are interested in create command and --practice-exercise <slug> option:

    Commands:
      ...
      create      Add a new exercise, approach or article
      ...
    Options for create:
          ...
          --practice-exercise <slug>  The slug of the practice exercise
          ...
    
  • According to what Eric was done on 4:39, we created practice exercise “Largest series product” for Groovy track:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ ./bin/configlet create --practice-exercise largest-series-product
    Cloning https://github.com/exercism/problem-specifications... success
    Created practice exercise 'largest-series-product'.
    

    We took a quick look on what was created by configlet command tool:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ git add exercises/practice/largest-series-product/
    warning: in the working copy of 'exercises/practice/largest-series-product/.meta/config.json', LF will be replaced by CRLF the next time Git touches it
    warning: in the working copy of 'exercises/practice/largest-series-product/.meta/tests.toml', LF will be replaced by CRLF the next time Git touches it
    
    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ git status
    On branch main
    Your branch is up to date with 'origin/main'.
    
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            new file:   exercises/practice/largest-series-product/.docs/instructions.md
            new file:   exercises/practice/largest-series-product/.docs/introduction.md
            new file:   exercises/practice/largest-series-product/.meta/config.json
            new file:   exercises/practice/largest-series-product/.meta/src/reference/groovy/LargestSeriesProduct.groovy
            new file:   exercises/practice/largest-series-product/.meta/tests.toml
            new file:   exercises/practice/largest-series-product/src/main/groovy/LargestSeriesProduct.groovy
            new file:   exercises/practice/largest-series-product/src/test/groovy/LargestSeriesProductSpec.groovy
    
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
            modified:   config.json
    

    Wow, that is quite a lot of work to do! As we can see, we need to review the changes made in config.json in root of the repository, as well as work in exercises/practice/largest-series-product/ directory on documentation like instructions and introduction, on metadata, source files and test files… Fortunately, at least some of the new files, like instructions.md and introduction.md, seems to be prefilled. But most of the other files, like LargestSeriesProduct.groovy and LargestSeriesProductSpec.groovy, are empty.

    I also got a nasty warning about LF being replaced by CRLF - what should I do about that?

1 Like
  • At 5:17 Eric mentioned that we must set the difficulty level for the new exercise. Hmm… It seems that “Largest Series Product” have a lot of nuances, a lot of edge cases to be aware of. But, despite of all these nuances, the puzzle is not very complicated, and we have seen a harder puzzles on the platform…

    To cut the story short, we opened the config.json file and set a moderate diffuculty level (4) for this exercise.

    We also put the exercise in config.json closer to the exercises which teach similar topics (lists, slices, loops…). The order of exercises in config.json is a order in which they appear on website, according to Eric’s notice.

  • At 7:46 Eric mentioned there are also exists an exercise-specific config.json file. Ot top of these file, authors of puzzle can be specified (if any).

  • At 12:24 Eric advises to look to other exercises to get an idea on how to structure one’s own implementation and tests.

  • At 12:55 Eric mentioned that all tests but the first must be skipped, to allow students implement them one by one.

  • At 13:46 Jeremy put a new branch together, and so do we:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (main)
    $ git checkout -b largest-series-product
    Switched to a new branch 'largest-series-product'
    
  • The modified files are added to a new branch:

    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (largest-series-product)
    $ git add .
    warning: in the working copy of 'config.json', LF will be replaced by CRLF the next time Git touches it
    
    Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (largest-series-product)
    $ git commit -am "Add auto-generated files"
    [largest-series-product f3096f4] Add auto-generated files
     8 files changed, 122 insertions(+), 1 deletion(-)
     create mode 100644 exercises/practice/largest-series-product/.docs/instructions.md
     create mode 100644 exercises/practice/largest-series-product/.docs/introduction.md
     create mode 100644 exercises/practice/largest-series-product/.meta/config.json
     create mode 100644 exercises/practice/largest-series-product/.meta/src/reference/groovy/LargestSeriesProduct.groovy
     create mode 100644 exercises/practice/largest-series-product/.meta/tests.toml
     create mode 100644 exercises/practice/largest-series-product/src/main/groovy/LargestSeriesProduct.groovy
     create mode 100644 exercises/practice/largest-series-product/src/test/groovy/LargestSeriesProductSpec.groovy
    
  • At 14:05 Jeremy mentioned that if one is not a him or Eric, then one is need to create his/her own fork of the repository he/she is working on. Following his instructions, I clicked on the fork button in the Groovy repository and forked it to https://github.com/Aksima/groovy.

    …Uhm? how should I correctly submit the changes I made so far locally into the fork of the repository? Please help.

A conclusion on report

  1. We generated exercise files locally.
  2. We got some warnings about LF being replaced by CRLF.
  3. We have no idea on how to correctly sumbit the changes into the fork of the repository.

This how it was attempted:

Aksima@DESKTOP-NIMQE87 MINGW64 ~/Exercism/building_exercism/groovy (largest-series-product)
$ git push --repo=https://github.com/Aksima/groovy.git
Enumerating objects: 23, done.
Counting objects: 100% (23/23), done.
Delta compression using up to 8 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (19/19), 3.20 KiB | 1.60 MiB/s, done.
Total 19 (delta 3), reused 1 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
remote:
remote: Create a pull request for 'largest-series-product' on GitHub by visiting:
remote:      https://github.com/Aksima/groovy/pull/new/largest-series-product
remote:
To https://github.com/Aksima/groovy.git
 * [new branch]      largest-series-product -> largest-series-product

But this failed terribly, so please help.

1 Like

Why did it fail terribly? :slight_smile:

If you go to the Link in the last block (https://github.com/Aksima/groovy/pull/new/largest-series-product) does that not create the pull request as you want it to? :slight_smile:

No, I did not wanted to create a pull request yet, because I need to implement tests and write documentation and solution stub for students, right?

I just wanted to save my local changes in my GitHub repository, but when I went to browser to check if the changes are saved, the window is popped out with errors:

#### Closed with unmerged commits

This pull request is closed, but the Aksima:largest-series-product branch has unmerged commits. You can delete this branch if you wish.
If you wish, you can also delete this fork of **exercism/groovy** in the [settings](https://github.com/Aksima/groovy/settings).

I need to delete the fork and try again right?

You’re local repo is a clone of exercism/groovy which you can’t push to. Typically you would (1) fork then (2) clone your personal fork. That way when you push, it pushes to your_acccount/groovy and not to exercism/groovy.

You could fix your local clone by updating when it pushes to using git remote add or you can start over from the top but change where you clone from.

1 Like

Thanks @IsaacG! Yeah, I did it like starting anew after deleting my local repository… Seemed to be the an easiest fix after all the mess I done.

Report on building “Largest series product” exercise for Groovy track - Part Two

A list of tasks given by Glenn Jackman

We are missing:

  • gradlew, gradlew.bat, gradle_wrapper/ – copy these from another exercise

  • the test class src/test/groovy/LargestSeriesProductSpec.groovy

  • the stub solution class src/main/groovy/LargestSeriesProduct.groovy

  • the reference solution .meta/src/reference/groovy/LargestSeriesProduct.groovy

A work on Gradle

Switch to building directory


Aksima@DESKTOP-NIMQE87 MINGW64 ~

$ cd ~/exercism/building-exercism

Clone the repository, as scary error message forced me to delete it


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism

$ git clone --branch largest-series-product --single-branch https://github.com/Aksima/groovy.git

Cloning into 'groovy'...

remote: Enumerating objects: 6562, done.

remote: Counting objects: 100% (1731/1731), done.

remote: Compressing objects: 100% (883/883), done.

remote: Total 6562 (delta 847), reused 1365 (delta 690), pack-reused 4831

Receiving objects: 100% (6562/6562), 1.13 MiB | 3.97 MiB/s, done.

Resolving deltas: 100% (3223/3223), done.

Move to sample exercise directory


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism

$ cd groovy/exercises/practice/hello-world

Copy gradle files


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/hello-world (largest-series-product)

$ find -name '*gradle*' -exec cp -r {} ../largest-series-product \;

Remove excess files


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/hello-world (largest-series-product)

$ cd ../largest-series-product

Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ find gradle-wrapper.* -exec rm {} \;

A work on test class

Copy test class file


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ cp ../hello-world/src/test/groovy/HelloWorldSpec.groovy src/test/groovy/LargestSeriesProductSpec.groovy

Correct the test class name


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ sed -i 's/HelloWorld/LargestSeriesProduct/' src/test/groovy/LargestSeriesProductSpec.groovy

A work on stub solution

Copy stub solution file


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ cp ../hello-world/src/main/groovy/HelloWorld.groovy src/main/groovy/LargestSeriesProduct.groovy

Correct the class name


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ sed -i 's/HelloWorld/LargestSeriesProduct/' src/main/groovy/LargestSeriesProduct.groovy

A work on reference solution

Copy reference solution file


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ cp ../hello-world/.meta/src/reference/groovy/HelloWorld.groovy .meta/src/reference/groovy/LargestSeriesProduct.groovy

Correct the class name


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ sed -i 's/HelloWorld/LargestSeriesProduct/' .meta/src/reference/groovy/LargestSeriesProduct.groovy

Commiting the solution

Adding staged files.


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ git add .

Commiting the solution


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ git commit -m 'Copied gradle and groovy files from hello-world exercise and updated class names'

[largest-series-product 4da7f26] Copied gradle and groovy files from hello-world exercise and updated class names

8 files changed, 336 insertions(+)

create mode 100644 exercises/practice/largest-series-product/build.gradle

create mode 100644 exercises/practice/largest-series-product/gradle/wrapper/gradle-wrapper.jar

create mode 100644 exercises/practice/largest-series-product/gradle/wrapper/gradle-wrapper.properties

create mode 100644 exercises/practice/largest-series-product/gradlew

create mode 100644 exercises/practice/largest-series-product/gradlew.bat

Pushing solution to remote


Aksima@DESKTOP-NIMQE87 MINGW64 ~/exercism/building-exercism/groovy/exercises/practice/largest-series-product (largest-series-product)

$ git push

Enumerating objects: 34, done.

Counting objects: 100% (31/31), done.

Delta compression using up to 8 threads

Compressing objects: 100% (15/15), done.

Writing objects: 100% (19/19), 3.01 KiB | 1.51 MiB/s, done.

Total 19 (delta 2), reused 2 (delta 0), pack-reused 0 (from 0)

remote: Resolving deltas: 100% (2/2), completed with 2 local objects.

To https://github.com/Aksima/groovy.git

f3096f4..4da7f26 largest-series-product -> largest-series-product

Looking good! Now you need to fill out the stub, the reference solution and the unit tests.

@aksima, you don’t have to duplicate the conversation both here and in the pull request.

Okay! I will discuss only here then.

@IsaacG, some work on stub and unittests is done (reflected in report).

But yeah, they are still quite incomplete, so I will continue the work.

1 Like