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

#48in24: Add analyzer feedback for Knapsack #2715

Open
sanderploegsma opened this issue Feb 2, 2024 · 3 comments
Open

#48in24: Add analyzer feedback for Knapsack #2715

sanderploegsma opened this issue Feb 2, 2024 · 3 comments
Assignees
Labels
x:action/create Work on something from scratch x:knowledge/advanced Comprehensive Exercism knowledge required x:module/analyzer Work on Analyzers x:module/practice-exercise Work on Practice Exercises x:size/large Large amount of work x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) x:type/content Work on content (e.g. exercises, concepts)

Comments

@sanderploegsma
Copy link
Contributor

The Knapsack exercise on the Java track is being featured in the #48in24 challenge, which means that we expect an influx of students attempting to solve it during that week.

It would be nice if the exercise contains some more content by that time.
One example of this is to add analyzer feedback for the exercise, to provide automated feedback on submitted solutions.

Adding analyzer feedback is done in three steps:

  1. Create (or update) the .meta/design.md file for the exercise explaining what type of feedback the analyzer should provide (example for the Leap exercise).
  2. Add the copy for the analyzer comments to exercism/website-copy.
  3. Implement the analyzer rules in exercism/java-analyzer.
@sanderploegsma sanderploegsma added x:action/create Work on something from scratch x:knowledge/advanced Comprehensive Exercism knowledge required x:module/analyzer Work on Analyzers x:module/practice-exercise Work on Practice Exercises x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) x:type/content Work on content (e.g. exercises, concepts) x:size/large Large amount of work labels Feb 2, 2024
@sanderploegsma sanderploegsma added this to the #48in24: Knapsack milestone Feb 2, 2024
@sougat818
Copy link
Contributor

Hello @sanderploegsma . Happy New Year. I have some time in the next few weeks to contribute. Please let me know if this is still worth doing or feel free to suggest a different issue.

Thanks 🙏

@kahgoh
Copy link
Member

kahgoh commented Jan 9, 2025

Hi @sougat818, I've assigned this to you to allow you to work on this one. As part mentioned in @sanderploegsma's comment above, the first part is that we'll need to decide what the analyzer should check and provide feedback for. Do you have thoughts on what the analyzer could check for?

@sougat818
Copy link
Contributor

sougat818 commented Jan 18, 2025

Hey @kahgoh , Thanks. I had a look at the analysers for existing exercises.

Essential

  1. AvoidHardCodedTestCases

  2. NoBuiltInMethods - There are multiple types for this one to discuss.
    I think these are trivial.

import java.util.Arrays;           // Arrays utility
import java.util.Collections;      // Collections utility

There are existing community solutions for Recursion with Memoization. I think these should be made into a third approach in the exercise. But if the goal of this exercise is to go towards Dynamic Programming then we can prevent it. We can move this to a different conversation as well, since this would potentially change the track.

import java.util.Map; 
import java.util.Set; 

There are a few solutions using Java Streams as well.

import java.util.stream.*;         // Streams

Actionable

  1. MethodTooLong - Could be interesting to add for the dynamic programming solutions.
  2. PreferDynamicProgramming - This would be similar to hamming.ShouldUseStreamFilterAndCount. Just nudging to try Dynamic programming solution as an optimal solution. But gets trickier with Recursion with Memoization solution.

Celebratory

  1. ExemplarSolution - This is supposed to be for Concept only but may be a similar one just for The Exemplar Dynamic Programming solution. Goes well with 4. PreferDynamicProgramming

  2. FeedbackRequest - Will add this as this is a new Analyser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/create Work on something from scratch x:knowledge/advanced Comprehensive Exercism knowledge required x:module/analyzer Work on Analyzers x:module/practice-exercise Work on Practice Exercises x:size/large Large amount of work x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

No branches or pull requests

3 participants