Powershell track is live!

I am happy to announce that the powershell track is now live: PowerShell exercises on Exercism

The track has new exercises and a brand new test runner.

If any issue is found please open a forum post, and I will take a look at it.

The test runner isn’t completing (for me). I updated both hello-world and bob, and the iterations are still Processing.

It seems to be a site wide outage at the moment, likely unrelated to the track, the issue has been reported.

I have a question relating to the track : will there be some “exclusive” exercises to this track that leverage its unique feature like cmdlet? Or some that teach basic scripting tricks like mass creating/renaming files?

Well short answer: maybe

I think having “exclusive” exercises is something that would suit the track really well. And I think that is possible although if I would start on that I would have to talk to Erik or Jeremy, since that would require a bit of a special setup.

What is the main thing, is that the exercise would require a story and a lot of thinking on implementation, which takes quite a bit of time. And I work on quite a few tracks so it is always a time game on what should be prioritized. If I do one thing, then another thing won’t be done.

But now I know there is demand for it, so I will look at how such an exercise can be implemented. But again no promises of anything and if it goes forward it will likely take some time before it launches.

Hey @Meatball,
I tried to port one of the exercise from other track to powershell.
This is my first time doing this, and did it based on what i’ve seen from the github repo of powershell and other tracks (mainly python)
is this satisfactory ? if not how can i improve this?

I’m looking forward for feedback so I can help contribute properly

Alright so here is my first impression feedback:

The PowerShell files looks good, but here are some small nits:

  • The parameters should say the name of the parameter and not the type.
  • The solution files should have Throw "Please implement this function"

And also the author section needs to be a github name, if you don’t like the credits you can just leave it blank.

I usually avoid talking about workflows and how something should be done, but since this isn’t a fork of the repo so will you have to move these files for example into a fork.

I will give you my workflow which I use on multiple tracks which will save time and reduce mistakes:

  1. Fork the repo (there is a button on all github repos with a fork button)
  2. Clone that repo to local environment either through github desktop or github cli github clone <repo>.git.
  3. Fetch configlet (there is a file in the bin directory which can do that), if you are on windows use fetch-configlet.ps1 or if you are on linux or mac: fetch-configlet.

Those above are the onetime setup requirements and only has to be done once on each track.

  1. Create a branch either through some ui that can be found in github deskop or other software or just git checkout -b <branch_name>. Make sure you are on main before doing this.
  2. Figure out a good difficulty level for the exercise, I recommend looking at similar languages and seeing where they put it.
  3. Add the exercise to the tracks config.json, in the json file go to the exercise and then the practice section, copy this template fill in the information and place it in correct difficulty order, so if the difficulty is 4, you can’t put it next to exercises with difficulty 2 if that makes sense, but it would work if the one above it is 2 and the one below is 4 or greater. To get the uuid you can just google uuid and then you should find a website that generates it or you can get uuid from the configlet that we downloaded in last step.
      "slug": "<lower-cased>",
      "name": "<Upper Cased>",
      "uuid": "<uuid>",
      "practices": [],
      "prerequisites": [],
      "difficulty": <difficulty level>
  1. Run ./bin/configlet sync -u -e <slug> (if you are using windows you may have to add .exe), it is the same slug as defined in the json file. Then in most cases you can just accept all changes so just press yes through them all.
  2. What you should have now is the exercise folder with the new exercise, that folder should also have is a subfolder .docs with the a .md file and .meta with config.json and a toml file.
  3. Go to the config.json file of the exercise and implement all the files mentioned there.
  4. Fill in the test file with tests based on problem spec, it is alright to use the same description as problem spec, so don’t feel like you have to come up with them yourself.
  5. Fill in the exemplar file, test it against the tests, and when it passes, copy the examplar file and put it in the solution folder and then remove all of the solution and replace it with Throw "Please implement this function".
  6. Add your GitHub username to the author section in the config.json file.
  7. Push changes to github and create a pr.

This may seem like a lot of step but once you get used to it, these will go super fast. the ones which actually takes time is 10 and 11.

Alright, I made the PR.
This is actually painless than expected. I used github before but never contribute to a big project and do a PR so thank you very much for the workflow guide, I will keep this in mind for the future.
I also did a small change to the main config.json file due to your number 6 suggestion, collatz-conjecture has a difficulty of 1 but somehow stay at the bottom below 3

A small question regarding more update for the future : if i did multiple exercises, do i have to submit PR for each of them or can i do a “combo”?

1 Like

Yeah I have thought about doing that config.json change, just never got my way there.

For the future, I say for new exercises, do 1 pr at a time. It makes things less complicated. When syncing to problem spec (or update if you like to call it that) and the changes aren’t huge. I say group the exercises in groups of 3-6.

PR for DnD Character exercise.

PR for Triangle exercise.

@Meatball based on my experience from other track, I made the triangle exercise to return an enum value.
In DnD I also change the modifier function into a static method inside the class, instead of a separate function outside of it. If you want any of these to be changed please let me know

Super excited for this track, many thanks to anyone that contributed to make it happen!

I’ll set some aside time to try it out.


@Meatball Hey meatball, I will try and port these exercises to powershell (in no particular order):

  • Proverb
  • Largest series product
  • Word count
  • Queen attack
  • High scores
  • Roman numeral
  • Phone number
    Just letting you know so we wont waste time with duplication, unless you are already working any of them then please let me know.

Sounds good, keep in mind that High scores likely fits best as an exercises that uses oop elements (likely a class)

@Meatball 4 PRs for: Word Count, High Scores, Proverb and Largest Series Product

@Meatball PRs for: Roman Numerals, Phone Number and Queen Attack

Hey @Meatball , I will tackle on : sublist, square root, space age, simple cipher, matching bracket, meet up, tournament, kindergarten-garden, diamond, clock, all your base, allergies. Same as before, if you already working on any of them then please let me know.

Forum doesnt allow more than 3 consecutive posts from the same user, so im adding PR into this one

PR for space age @Meatball

Alright, this should allow you to write more messages.

I will review that pr, but it sounds good that you take on those exercises.

@Meatball PR for some small exercises.
Regarding the point about syllabus (I’m not sure if you would get notification if i reply on github so I just do it here), personally I do have time however I don’t have a lot of experience. I guess for the time being I will focus on porting as many exercises first and I will look into the process of creating a syllabus later if I feel that I’m up to it.

@Meatball PRs for : All your base, Tournament, Clock, Kindergarten, Allergies and Matching brackets.
I will just link the first one so it won’t make the thread too long to scroll, you can check out the rest on github.
Also we hit 50 exercises mark, yay! I wonder what it would do for the “Next goal: Implement at least 50 practice exercises” in Build status?