Normalize commutative operations
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
The issue identifies commutative normalization as the target and names =, +, and multi-arity function bodies; start by locating the representer's existing normalization logic and its handling of these forms. Define a deterministic standard order and verify that equivalent permutations produce one representation while preserving the same student-facing feedback.
Written by the indexing model from the issue text.
Description
It never ceases to amaze me how many unique solution approaches there are even with all the normalizations we're doing. It's like ice cream flavors. 31 flavors sounds like a lot, but that can be achieved with like 5 or 6 basic flavors and their permutations.
After spending some time analyzing its results, the next "low-hanging fruit" seems to be:
Identifying which operations are commutative, and presenting them in some standard order.
At first glance it seems like we're scraping the bottom of the barrel, so to speak. But because of the way the possible permutations are composed, even the smallest thing can drastically reduce the number of unique representations, which practically translates to having fewer approaches to add feedback to to be displayed to the same number of students.
For example, a solution to the lasagna exercise might have: (+ (num-layers 2) 5), and another might have (+ 5 (num-layers 2)). Having to repeat the same feedback on every combination becomes tedious.
Commutative operations which can be normalized
=+- multi-arity function bodies
. . .
Again, these seem very minor, but the path to making the representer more effective lies in making these incremental improvements
- Dominant language
- Clojure
- Stars
- 2
- Forks
- 7
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from exercism/clojure-representer
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in exercism/clojure-representer
Similar issues
-
.Escalation .Needs Triage Priority:P1 Type:Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
metabase/metabase#83678 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug: MCP server rejects request bodies over 100kb (express.json default) with PayloadTooLargeErrorOpenneeds triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
[Bug]: Schema-on-read: cannot retract a vector value unless it has exactly two elementsPossibly taken @markaddleman claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
replikativ/datahike#1105 ·
Maintainers usually reply within 1 day
-
`[:maybe [:or ...]]` produces non-nilable clj-kondo typePossibly taken @yenda claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100