Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need for Speed: Apply minor improvements #1755

Closed
Tracked by #1984
SaschaMann opened this issue Oct 2, 2021 · 7 comments · Fixed by #2235
Closed
Tracked by #1984

Need for Speed: Apply minor improvements #1755

SaschaMann opened this issue Oct 2, 2021 · 7 comments · Fixed by #2235
Assignees
Labels
help wanted x:action/improve Improve existing functionality/content x:knowledge/elementary Little Exercism knowledge required x:module/concept-exercise Work on Concept Exercises x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts)

Comments

@SaschaMann
Copy link
Contributor

SaschaMann commented Oct 2, 2021

A few things I've encountered when solving the Need for Speed exercise:

  • I can't solve the tasks in order due to undefined: Track errors. I have to do part of Task 1, then part of Task 2, then I can resume with Task 1. Since there's no extra knowledge required for defining the track struct, this could be moved into Task 1. Also related to Errors should not hide all test case info go-test-runner#48
  • What is the point of NewTrack? Why can't I just call Track{} directly?
  • Task 4: My naïve ansatz would be to loop and Drive until the battery runs out and break out of the loop with true if the track has been finished. I don't know loops yet, though. I suspect this might lead to some people searching for loops and using those instead. Perhaps this can be prevented through the instructions.
  • Task 4: Instructions call the parameter raceTrack, the code calls it track.
@junedev
Copy link
Member

junedev commented Dec 12, 2021

The open todos here are:

  • The introduction should clarify when a constructor (NewXY) makes sense.
  • Add a note in design.md that the analyzer should check whether a loop was used and if yes, recommend to try to calculate instead. (Other than that, it is totally fine if someone "researches ahead" and uses a different approach I think.)
  • The parameter name is track and the specific argument that is passed in is raceTrack. We could call them the same but it is not really necessary. So this is optional to fix.

As discussed in the other issue, we are not planning to do anything about the first point raised above for now. Adding task 2 in task 1 does not help much here I think.

For the person who wants to work on this, general information on the structure of a concept exercise can be found here if needed: https://exercism.org/docs/building/tracks/concept-exercises

@junedev junedev added help wanted x:action/improve Improve existing functionality/content x:knowledge/elementary Little Exercism knowledge required x:module/concept-exercise Work on Concept Exercises x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts) labels Dec 12, 2021
@junedev junedev changed the title Need for Speed: Test order & general feedback Need for Speed: Apply minor improvements Dec 12, 2021
@eklatzer
Copy link
Contributor

eklatzer commented Jun 7, 2022

Hey, I would like to improve this exercise. As I have never contributed to Exercism one question: do I have to take care of anything special?

@andrerfcsantos
Copy link
Member

@eklatzer Thanks for the interest in contributing.

do I have to take care of anything special?

See the previous message from june for a list of points for improvement in this exercise. Other than that, feel free to submit a PR addressing this and let us know if you have any questions.

@eklatzer
Copy link
Contributor

eklatzer commented Jun 7, 2022

I am a bit confused. Regarding to https://exercism.org/docs/building/tracks/concept-exercises the config.json should contain a UUID, slug and some other required fields (-->https://exercism.org/docs/building/tracks/config-json#concept-exercises). The config.json of the current exercise is the following one:

{
  "blurb": "Learn about structs by racing remote controlled cars.",
  "authors": [
    "tehsphinx"
  ],
  "contributors": [
    "oanaOM"
  ],
  "forked_from": [
    "csharp/need-for-speed"
  ],
  "files": {
    "solution": [
      "need_for_speed.go"
    ],
    "test": [
      "need_for_speed_test.go"
    ],
    "exemplar": [
      ".meta/exemplar.go"
    ]
  }
}

What am I getting wrong?

EDIT: I have already found the global config.json that contains these keys

@andrerfcsantos
Copy link
Member

@eklatzer Exactly, there's a global config file and a config file for each exercise. There's also a config file for each concept.

Of those, you'll probably only need to touch the exercise config file to add yourself to the contributors list.

@eklatzer
Copy link
Contributor

eklatzer commented Jun 7, 2022

How to get the point with the design.md? Are analyzers implemented by humans or is there a syntax? Looks like analyzers are implemented by humans using the feedback of the part Analyzer. This part already contains the following two lines:

  • A for-loop can be used in this exercise in the CanFinish function, however it might not have been taught yet
  • If a for-loop was used, it is encouraged to explore a different approach and might be suggested so by the analyzer
    I think this already covers task 2 of the TODO's, doesn't it?

@andrerfcsantos
Copy link
Member

Analyzers are programs that usually look up the Abstract Syntax Tree of exercises looking for patterns in the code, and can emit warnings when they see certain patterns in specific exercises. You can see the go analyzer here: https://github.com/exercism/go-analyzer

About the point in design.md, it seems that was fixed here #2031, that's why you see those lines already there, so no action needed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted x:action/improve Improve existing functionality/content x:knowledge/elementary Little Exercism knowledge required x:module/concept-exercise Work on Concept Exercises x:size/small Small amount of work x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants