Implementing 'say' exercise for R track

This commit introduces the new directory exercises/practice/say containing the files say.R and test_say.R. The former passes the tests in the latter.

Thank you for your interest in contributing to the R track.

As the GitHub bot said, we normally ask for these submissions to be discussed on the forum first, as you have now done. This lets us offer you some guidance on the best way forward.

A practice exercise on Exercism is significantly more than just these two files. This is explained in the docs, both as an introductory video from Jeremy, and some instructions. Step by step details are here.

Though there are quite a lot of files, creating at least some of these is automated with our add-practice-exercise script (on *nix systems; Windows is less well supported, as far as I know).

I suggest you take a look at all these, and I’ll reopen the PR.

Good luck!

And let us know if you need more help. Creating your first exercise is complicated, but it later becomes quicker and easier.

1 Like

I see. Thanks for the info. It seems there is a configlet for each track, which I suppose I already have, having cloned the track. Going through the steps. Will report back here when apparently dun.

…sorta. Each track has an identical(*) fetch-configlet script with downloads the configlet tool. It’s the same one tool used for all tracks.

More precisely, there is a bin/fetch-configlet for each track. The actual configlet is site-wide, but changes frequently. It’s worth downloading a new version fairly regularly - takes a couple of seconds, usually.

I confess I’m a bit rusty on the details of practice exercises. I spent the last several months writing concept exercises (for the Julia syllabus), and they are similar-but-different.

@IsaacG is always quicker - legend!

1 Like

The video and the web page give rather different procedures. The written instructions look simpler. I take it add-practice-exercise is a higher level of automation than configlet.

The written document doesn’t mention git checkout whereas the video more or less insists on it. I don’t entirely understand Schierboom’s arguments in favor of it. To me, git may as well be topology or something.

configlet is the original app that does most of the work. add-practice-exercise was added fairly recently, as a more user-friendly wrapper around configlet. If you look at the shell script, it mainly gives detailed instructions then runs fetch-configlet and configlet. Please use what you feel comfortable with!

git checkout is used to select/create the current branch. git is used pretty universally these days. It’s worth learning the basics of it at some point :slight_smile:

1 Like

I’ll start another thread about basic Git as it applies to submitting PRs. I can’t find anything like this in the Exercism docs, such as this. The assumption seems to be that Git is so fundamental that it can be assumed. Clearly untrue, as we all start without this background knowledge (and Git can be really confusing once you get into the details!).

Incidentally, I have an Introduction to Topology book, and I assure you Git is much easier!

GitHub has some really good git docs. There is nothing Exercism specific about how Exercism uses git so there probably isn’t much value in Exercism specific git docs. This page might be a good landing page for getting started with git: About Git - GitHub Docs

Any opinions what the difficulty level of say in R would be? I’m thinking 5…

5 looks reasonable. I checked some other tracks, and there is no agreement across languages:

  • Python 2
  • C# 8
  • Ruby 7
  • Crystal 6

To students, 5 and 6 are Medium, 7 and 8 are Hard. Python looks like the outlier here, grading it Easy

Dun as far as I can tell. Let’s see if this branch is acceptable.

Apologies, I won’t be able to review it this evening. Definitely tomorrow!

Thanks for the submission.

Okay, we’re getting closer. The next step is for you to actually create the PR.

On the GitHub website for your fork, you can select the say branch with the dropdown near the top-left:

image

I did that, and just below it tells you how far ahead of/behind the upstream repo this is (2 ahead in this case, your new pushes).

Click on 2 commits ahead and on the right it gives you a big green button for “Create pull request”.

Below the bit I screen-grabbed, it lists all the changes you made (additions in green, deletions in red).

When you’re happy, create the pull request (PR) and add a short explanatory comment. A link to this Forum post would be useful to include.

I’ll get email notification of the PR, and if necessary I’ll re-open it (probably quickly, though I need to go out later this morning).

Once the continuous integration tests (CI) have run, I’ll go through it in more detail and see if there are any comments to make that might improve it.

Please stay patient! We are keen for you to learn how to do this sort of submission, and (as I said previously) the first one is always the hardest. The R track gets relatively few contributors, so it would be great if you could learn from Say then go on to write a few more exercises. We will help.

2 Likes

It seems there are unmerged commits.

I need to review and approve the PR, then one of us can merge it.

I reopened the PR and some CI checks are still running. Looking good so far.

I have to go to a doctor’s appointment now, but I’ll do more on this when I get back.

The appointment itself is kind of funny. Because I’m on Medicare, they insist on an Annual Wellness Visit, to check that I’m not yet senile (“can you draw a clock?, remember 3 words?”) and can get out of a chair unaided. They seem less concerned about how many languages I can program in, and my skills at GitHub. OK, whatever…

2 Likes

You should draw them a binary clock. And ask them questions like “7 bit or 8 bit words?”

1 Like